Logo

Charles Steinkuehler's LEAF/LRP Website


 

IPSEC_SUBNETOF

Section: C Library Functions (3)
Updated: 13 Oct 1998
Index Return to Main Contents
 

NAME

ipsec 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  

SYNOPSIS

#include <freeswan.h>

struct in_addr subnetof(struct in_addr addr,
  struct in_addr mask);
struct in_addr hostof(struct in_addr addr,
  struct in_addr mask);
struct in_addr broadcastof(struct in_addr addr,
  struct in_addr mask);  

DESCRIPTION

Subnetof 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.

These functions are provided to hide the Internet bit-munging inside an API, in hopes of easing the eventual transition to IPv6.  

SEE ALSO

inet(3), ipsec_atosubnet(3)  

HISTORY

Written for the FreeS/WAN project by Henry Spencer.  

BUGS

Calling functions for this is more costly than doing it yourself.

 


 

Index

NAME
 
SYNOPSIS
 
DESCRIPTION
 
SEE ALSO
 
HISTORY
 
BUGS
 

This document was created by man2html, using the manual pages.
Time: 21:22:49 GMT, February 08, 2000

Content-type: text/html