Index of Section 3 Manual Pages

Interix / SUAinet_cidr_pton.3Interix / SUA

inet_cidr_pton(3)                                     inet_cidr_pton(3)

  inet_cidr

  NAME

    inet_cidr_ntop, inet_cidr_pton - network translation routines

  SYNOPSIS

    #include 
    #include 
    #include 
    #include 

    inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size);

    inet_cidr_pton(int af, const char *src, void *dst, int *bits);

  DESCRIPTION

    These routines are used for converting addresses to and from network and
    presentation forms with CIDR (Classless Inter-Domain Routing)
    representation, embedded net mask.

    130.155.16.1/20

    The inet_cidr_ntop() routine converts an address from network to
    presentation format.

    The af argument describes the type of address that is being passed in src.
    Currently only AF_INET is supported.

    The src argument is an address in network byte order, its length is
    determined from af.

    The bits argument specifies the number of bits in the netmask unless it is
    -1 in which case the CIDR representation is omitted.

    The dst argument is a caller supplied buffer of at least size bytes.

    The inet_cidr_ntop() routine returns dst on success or NULL. Check errno
    for reason.

    The inet_cidr_pton() routine converts and address from presentation
    format, with optional CIDR reperesentation, to network format. The
    resulting address is zero filled if there were insufficint bits in src.

    The af argument describes the type of address that is being passed in via
    src and determines the size of dst.

    The src argument is an address in presentation format.

    The bits argument returns the number of bits in the netmask or -1 if a
    CIDR representation was not supplied.

    The inet_cidr_pton() routine returns 0 on succces or -1 on error. Check
    errno for the reason. ENOENT indicates an invalid netmask.

    4th Berkeley Distribution October 19, 1998 4th Berkeley Distribution

  USAGE NOTES

    None of these functions are thread safe.

    None of these functions are async-signal safe.


Interix / SUAHosted at SUA Community for Interix, SUA and SFUInterix / SUA