INET_CIDR(@LIB_NETWORK_EXT_U@) LOCAL INET_CIDR(@LIB_NETWORK_EXT_U@) NAME inet_cidr_ntop, inet_cidr_pton - network translation routines SYNOPSIS #include #include #include #include inet_cidr_ntop(___ __, _____ ____ ____, ___ ____, ____ ____, ______ ____) inet_cidr_pton(___ __, _____ ____ ____, ____ ____, ___ _____) DESCRIPTION These routines are used for converting addresses to and from network and presentation forms with CIDR (Classless Inter-Domain Routing) representa- tion, embedded net mask. 130.155.16.1/20 inet_cidr_ntop() converts an address from network to presentation format. __ describes the type of address that is being passed in ____ Currently only AF_INET is supported. ___ is an address in network byte order, its length is determined from ___ ____ specifies the number of bits in the netmask unless it is -1 in which case the CIDR representation is omitted. ___ is a caller supplied buffer of at least ____ bytes. inet_cidr_ntop() returns ___ on success or NULL. Check errno for reason. inet_cidr_pton() converts and address from presentation format, with op- tional CIDR reperesentation, to network format. The resulting address is zero filled if there were insufficint bits in ____ __ describes the type of address that is being passed in via ___ and de- termines the size of ____ ___ is an address in presentation format. ____ returns the number of bits in the netmask or -1 if a CIDR represen- tation was not supplied. inet_cidr_pton() returns 0 on succces or -1 on error. Check errno for reason. ENOENT indicates an invalid netmask. SEE ALSO intro(2) 4th Berkeley Distribution October 19, 1998 1