1IPSEC_SUBNETOF(3)          Library Functions Manual          IPSEC_SUBNETOF(3)
2
3
4

NAME

6       ipsec  subnetof - given Internet address and subnet mask, return subnet
7       number
8       ipsec hostof - given Internet address and subnet mask, return host part
9       ipsec broadcastof - given Internet  address  and  subnet  mask,  return
10       broadcast address
11

SYNOPSIS

13       #include <freeswan.h>
14
15       struct in_addr subnetof(struct in_addr addr,
16           struct in_addr mask);
17       struct in_addr hostof(struct in_addr addr,
18           struct in_addr mask);
19       struct in_addr broadcastof(struct in_addr addr,
20           struct in_addr mask);
21

DESCRIPTION

23       These functions are obsolete; see ipsec_networkof(3) for their replace‐
24       ments.
25
26       Subnetof takes an Internet address and a subnet mask  and  returns  the
27       network  part of the address (all in network byte order).  Hostof simi‐
28       larly returns the host part,  and  broadcastof  returns  the  broadcast
29       address (all-1s convention) for the network.
30
31       These functions are provided to hide the Internet bit-munging inside an
32       API, in hopes of easing the eventual transition to IPv6.
33

SEE ALSO

35       inet(3), ipsec_atosubnet(3)
36

HISTORY

38       Written for the FreeS/WAN project by Henry Spencer.
39

BUGS

41       Calling functions for this is more costly than doing it yourself.
42
43
44
45                                 11 June 2001                IPSEC_SUBNETOF(3)
Impressum