SCM
5.12.1: Host Data, Network, Protocol, and Service Inquiries
- Constant: af_inet
- Constant: af_unix
-
Integer family codes for Internet and Unix sockets, respectively.
- Function: gethost
host-spec
- Function: gethost
-
Returns a vector of information for the entry for
HOST-SPEC or the
next entry if HOST-SPEC isn't given. The information is:
-
host name string
-
list of host aliases strings
-
integer address type (
AF_INET)
-
integer size of address entries (in bytes)
-
list of integer addresses
- Function: sethostent
stay-open
- Function: sethostent
-
Rewinds the host entry table back to the begining if given an argument.
If the argument stay-open is
#f queries will be be done
using UDP datagrams. Otherwise, a connected TCP socket
will be used. When called without an argument, the host table is
closed.
- Function: getnet
name-or-number
- Function: getnet
-
Returns a vector of information for the entry for name-or-number or
the next entry if an argument isn't given. The information is:
-
official network name string
-
list of network aliases strings
-
integer network address type (
AF_INET)
-
integer network number
- Function: setnetent
stay-open
- Function: setnetent
-
Rewinds the network entry table back to the begining if given an
argument. If the argument stay-open is
#f the table will be closed
between calls to getnet. Otherwise, the table stays open. When
called without an argument, the network table is closed.
- Function: getproto
name-or-number
- Function: getproto
-
Returns a vector of information for the entry for name-or-number or
the next entry if an argument isn't given. The information is:
-
official protocol name string
-
list of protocol aliases strings
-
integer protocol number
- Function: setprotoent
stay-open
- Function: setprotoent
-
Rewinds the protocol entry table back to the begining if given an
argument. If the argument stay-open is
#f the table will be closed
between calls to getproto. Otherwise, the table stays open. When
called without an argument, the protocol table is closed.
- Function: getserv
name-or-port-number protocol
- Function: getserv
-
Returns a vector of information for the entry for name-or-port-number
and protocol or the next entry if arguments aren't given. The
information is:
-
official service name string
-
list of service aliases strings
-
integer port number
-
protocol
- Function: setservent
stay-open
- Function: setservent
-
Rewinds the service entry table back to the begining if given an
argument. If the argument stay-open is
#f the table will be closed
between calls to getserv. Otherwise, the table stays open. When
called without an argument, the service table is closed.