The inet_lnaof() call breaks apart the existing internet host address, and returns the local network address portion.
#include <manifest.h>
#include <bsdtypes.h>
#include <socket.h>
#include <in.h>
#include <inet.h>
unsigned long inet_lnaof(struct in_addr in)
The local network address is returned in host byte order.
inet_addr(), inet_makeaddr(), inet_netof(), inet_network(), inet_ntoa()