![]() |
![]() |
![]() |
Convert a string into an Internet network number
#include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> unsigned long inet_network( const char * cp );
libsocket
The inet_network() routine converts a string representing an Internet address (for example, "127.0.0.1") into a numeric Internet network number.
All Internet addresses are returned in network order (bytes are ordered from left to right). All network numbers and local address parts are returned as machine-format integer values. For more information on Internet addresses, see inet_aton().
An Internet network number, or INADDR_NONE if an error occurs.
Standard Unix, POSIX 1003.1g (draft)
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |