These additional functions are useful for creating and operating on network connections. Note that they are supported only on some systems.
This function returns a list describing the network interfaces
of the machine you are using. The value is an alist whose
elements have the form
(name . address).
address has the same form as the local-address
and remote-address arguments to
This function returns information about the network interface named
ifname. The value is a list of the form
(addr bcast netmask hwaddr flags).
The Internet protocol address.
The broadcast address.
The network mask.
The layer 2 address (Ethernet MAC address, for instance).
The current flags of the interface.
format-network-addressaddress &optional omit-port
This function converts the Lisp representation of a network address to a string.
A five-element vector
[a b c d p]
represents an IPv4 address a.b.c.d and port
format-network-address converts that to the
A nine-element vector
[a b c d e
f g h p] represents an IPv6 address along
with a port number.
format-network-address converts that to
If the vector does not include the port number, p, or if
omit-port is non-
nil, the result does not include the