inet_network()

The inet_network() call interprets character strings representing addresses expressed in standard dotted decimal notation and returns numbers suitable for use as a network number.

#include <manifest.h>
#include <bsdtypes.h>
#include <socket.h>
#include <in.h>
#include <inet.h>
 
unsigned long inet_network(char *cp)
Parameter
Description
cp
A character string in standard, dotted decimal (.) notation

Return values

The network number is returned in host byte order.

Related calls

inet_addr(), inet_lnaof(), inet_makeaddr(), inet_ntoa()