Next: posix socket services, Previous: posix socket hosts, Up: posix socket [Index]
Scheme level representation of struct protoent
. It has the
following fields:
p_name
Bytevector, the ASCII coding of the official protocol name.
p_aliases
Null or list of bytevectors, the ASCII codings of protocol name aliases.
p_proto
Fixnum, the protocol number.
Build and return an instance of struct-protoent
.
Accessors for the fields of struct-protoent
.
Interface to the C function getprotobyname()
, (libc)getprotobyname. Given a string or bytevector name
holding the ASCII coding of a network protocol name, query the
network protocols database and build an instance of
struct-protoent
mirroring the resulting struct protoent
entry. If successful return the data structure, else raise an
exception.
(px.getprotobyname "udp") ⇒ #["struct-protoent" p_name="udp" p_aliases=(UDP) p_proto=17]
Interface to the C function getprotobynumber()
,
(libc)getprotobynumber. Given a fixnum
proto_num being the number of a network protocol, query the
network protocols database and build an instance of
struct-protoent
mirroring the resulting struct protoent
entry. If successful return the data structure, else raise an
exception.
(px.getprotobynumber 17) ⇒ #["struct-protoent" p_name="udp" p_aliases=(UDP) p_proto=17]
Interface to the C functions setprotoent()
, getprotoent()
and endprotoent()
, (libc)setprotoent.
Scan the network protocol database and build a list of
struct-protoent
mirroring the resulting struct protoent
entries. Return the list of structures.