IPSEC_SUBNETOFSection: C Library Functions (3)
Updated: 13 Oct 1998
Index Return to Main Contents
NAMEipsec subnetof - given Internet address and subnet mask, return subnet number
ipsec hostof - given Internet address and subnet mask, return host part
ipsec broadcastof - given Internet address and subnet mask, return broadcast address
struct in_addr subnetof(struct in_addr addr,
DESCRIPTIONSubnetof takes an Internet address and a subnet mask and returns the network part of the address (all in network byte order). Hostof similarly returns the host part, and broadcastof returns the broadcast address (all-1s convention) for the network.
SEE ALSOinet(3), ipsec_atosubnet(3)
HISTORYWritten for the FreeS/WAN project by Henry Spencer.
BUGSCalling functions for this is more costly than doing it yourself.
This document was created by man2html, using the manual pages.
Time: 04:38:15 GMT, May 22, 2000