Next: posix socket socket, Previous: posix socket services, Up: posix socket [Index]
Scheme level representation of struct netent
. It has the
following fields:
n_name
Bytevector, ASCII coding of the official network name.
n_aliases
List of bytevectors, alias names for the network.
n_addrtype
Fixnum, the network type.
n_net
32-bit bytevector, the network number in network byte order.
Build and return a new instance of struct-netent
.
Accessors for the fields of struct-netent
.
Return #t
if obj is an instance of struct-netent
.
Interface to the C function getnetbyname()
, (libc)getnetbyname. Given the bytevector name holding the
ASCII coding of a network name, query the networks database and build
an instance of struct-netent
mirroring the resulting struct
netent
entry. If successful return the data structure, else raise an
exception.
(px.getnetbyname "loopback") ⇒ #["struct-netent" n_name="loopback" n_aliases=() n_addrtype=AF_INET n_net=#vu8(127 0 0 0)]
Interface to the C function getnetbyaddr()
, (libc)getnetbyaddr. Given an exact integer or bytevector net
representing a network number and the fixnum type representing a
network type, query the networks database and build an instance of
struct-netent
mirroring the resulting struct netent
entry.
If successful return the data structure, else raise an exception.
(px.getnetbyaddr '#vu8(127 0 0 0) AF_INET) ⇒ #["struct-netent" n_name="loopback" n_aliases=() n_addrtype=AF_INET n_net=#vu8(127 0 0 0)]
Interface to the C functions setnetent()
, getnetent()
and
endnetent()
, (libc)setnetent. Scan the
networks database and build a list of struct-netent
mirroring the
resulting struct netent
entries. Return the list of structures.
Next: posix socket socket, Previous: posix socket services, Up: posix socket [Index]