Name

tcpip_local_interfaces, inet_aton, inet_ntoa — enumerate local network interfaces and convert between IPv4 address forms

Synopsis

any tcpip_local_interfaces( );
 
integer inet_aton( in dotted varchar);
 
varchar inet_ntoa( in address integer);
 

Description

tcpip_local_interfaces returns a vector of the IPv4 / IPv6 addresses bound to the local network interfaces of the host running the server. Use it to discover which addresses the server can accept connections on, or to feed listener-binding decisions inside administrative procedures.

inet_aton converts a dotted-quad IPv4 address (e.g. '192.0.2.1') into its 32-bit integer representation in host byte order. Returns SQL NULL when the input is not a valid dotted quad.

inet_ntoa is the inverse, formatting an integer address as a dotted-quad string. Together the two functions let you store IPv4 addresses as integers (for compact ordering and range queries) while still presenting them as strings.


© 1992 - OpenLink Software. All rights reserved.

Making Technology Work for You®