libbind-inet_cidr man page on YellowDog

Man page or keyword search:  
man Server   18644 pages
apropos Keyword Search (all sections)
Output format
YellowDog logo
[printable version]

INET_CIDR(3)		 BSD Library Functions Manual		  INET_CIDR(3)

NAME
     inet_cidr_ntop, inet_cidr_pton — network translation routines

SYNOPSIS
     #include <sys/types.h>
     #include <sys/socket.h>
     #include <netinet/in.h>
     #include <arpa/inet.h>

     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) representa‐
     tion, embedded net mask.

		     130.155.16.1/20

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

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

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

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

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

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

     inet_cidr_pton() 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.

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

     src is an address in presentation format.

     bits 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	     4th Berkeley Distribution
[top]

List of man pages available for YellowDog

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net