(index ("hostname->ip" 0) ("ip->hostname" 155) ("protocol-name->number" 304) ("protocol-number->name" 469) ("service-port->name" 639) ("service-name->port" 907) ("hostinfo-address" 1138) ("hostinfo" 1358) ("protoinfo" 1820) ("servinfo" 2064) ("hostname->hostinfo" 2371) ("ip->hostinfo" 2371) ("service-name->servinfo" 2371) ("service-port->servinfo" 2371) ("protocol-name->protoinfo" 2371) ("protocol-number->protoinfo" 2371) ("host-information" 2959) ("protocol-information" 3197) ("service-information" 3395) ("string->ip" 3836) ("ip->string" 4078) ("current-hostname" 4432))
(def (sig (procedure "(hostname->ip HOSTNAME)" (id hostname->ip))) (p "Look up string " (tt "HOSTNAME") " and return IP address as " (tt "u8vector") "."))
(def (sig (procedure "(ip->hostname IPADDR)" (id ip->hostname))) (p "Look up " (tt "u8vector") " " (tt "IPADDR") " and return hostname as string."))
(def (sig (procedure "(protocol-name->number PROTOCOL-NAME)" (id protocol-name->number))) (p "Look up string " (tt "PROTOCOL-NAME") " and return protocol number."))
(def (sig (procedure "(protocol-number->name PROTOCOL-NUMBER)" (id protocol-number->name))) (p "Look up " (tt "PROTOCOL-NUMBER") " and return protocol name as string."))
(def (sig (procedure "(service-port->name SERVICE-PORT [PROTO])" (id service-port->name))) (p "Look up " (tt "SERVICE-PORT") " number and return service name as string. Optional " (tt "PROTO") " argument, which must be a string, constrains lookup to that protocol."))
(def (sig (procedure "(service-name->port SERVICE-NAME [PROTO])" (id service-name->port))) (p "Look up string " (tt "SERVICE-NAME") " and return the canonical port for that service.  Optional " (tt "PROTO") " argument as above."))
(def (sig (procedure "(hostinfo-address h)" (id hostinfo-address))) (p "Retrieves the " (tt "address") " field of the " (tt "hostinfo") " record " (tt "h") ". Accessors are similar for other records and their fields."))
(def (sig (record "hostinfo" (id hostinfo))) (table (@ (class "symbol-table")) (tr (td "name") (td "Hostname")) "\n" (tr (td "addresses") (td "A vector of one or more u8vector IP addresses")) "\n" (tr (td "aliases") (td "A vector of any alternate hostnames")) "\n" (tr (td "address") (td "The first IP address (u8vector) in addresses")) "\n" (tr (td "type") (td "'AF_INET (IPv4) or 'AF_INET6 (IPv6)")) "\n" (tr (td "length") (td "IP address length in bytes"))))
(def (sig (record "protoinfo" (id protoinfo))) (table (@ (class "symbol-table")) (tr (td "name") (td "Protocol name")) "\n" (tr (td "number") (td "Protocol number")) "\n" (tr (td "aliases") (td "Vector of alternate names for this protocol"))))
(def (sig (record "servinfo" (id servinfo))) (table (@ (class "symbol-table")) (tr (td "name") (td "Service name")) "\n" (tr (td "number") (td "Service number")) "\n" (tr (td "aliases") (td "Vector of alternate names for this service")) "\n" (tr (td "protocol") (td "Name of protocol this service uses"))))
(def (sig (procedure "(hostname->hostinfo NAME)" (id hostname->hostinfo)) (procedure "(ip->hostinfo IPADDR)" (id ip->hostinfo)) (procedure "(service-name->servinfo NAME)" (id service-name->servinfo)) (procedure "(service-port->servinfo NUM)" (id service-port->servinfo)) (procedure "(protocol-name->protoinfo NAME)" (id protocol-name->protoinfo)) (procedure "(protocol-number->protoinfo NUM)" (id protocol-number->protoinfo))) (p "These lookups correspond to those described in " (i "Short and sweet") ", but return a full record.  The entire record is filled in a single system call."))
(def (sig (procedure "(host-information HOST)" (id host-information))) (p "Look up and return a hostinfo record, or " (tt "#f") ". " (tt "HOST") " is a string hostname, a string numeric IP address, or a " (tt "u8vector") " IP address."))
(def (sig (procedure "(protocol-information PROTO)" (id protocol-information))) (p "Look up and return a protoinfo record, or " (tt "#f") ". " (tt "PROTO") " is a protocol number or string name."))
(def (sig (procedure "(service-information SERVICE [PROTO])" (id service-information))) (p "Look up and return a servinfo record, or " (tt "#f") ". " (tt "SERVICE") " is a service number or string name. " (tt "PROTO") " is an optional protocol number or string name, which will constrain lookups to that particular protocol.") (p (b "NOTE:") " if the protocol number is illegal, an error is thrown, since this was probably unintentional."))
(def (sig (procedure "(string->ip IP-STRING)" (id string->ip))) (p "Convert an IPv4 or IPv6 address string in canonical format to a " (tt "u8vector") ", which can be considered an \"IP address object\".   Returns " (tt "#f") " on failure."))
(def (sig (procedure "(ip->string IPADDR)" (id ip->string))) (p "Convert a 4 (IPv4) or 16 (IPv6) element " (tt "u8vector") " to a string in canonical format.  Throws an error if the " (tt "u8vector") " is not 4 or 16 bytes long.  This call should only fail on system error, in which case it will return " (tt "#f") " (perhaps not the best behaviour)."))
(def (sig (procedure "(current-hostname [HOSTNAME])" (id current-hostname))) (p "Get the standard host name for the current processor; synonym for " (tt "get-host-name") ".") (p "Set the standard host name when a " (tt "HOSTNAME") " is specified; assuming permission and argument validity. Aborts with an error upon constraint violation."))
