Content-type: text/html Manpage of IPSEC_ANYADDR

IPSEC_ANYADDR

Section: C Library Functions (3)
Updated: 8 Sept 2000
Index Return to Main Contents
 

NAME

ipsec sameaddr - are two addresses the same?
ipsec addrcmp - ordered comparison of addresses
ipsec samesubnet - are two subnets the same?
ipsec addrinsubnet - is an address within a subnet?
ipsec subnetinsubnet - is a subnet within another subnet?
ipsec subnetishost - is a subnet a single host?
ipsec samesaid - are two SA IDs the same?
ipsec sameaddrtype - are two addresses of the same address family?
ipsec samesubnettype - are two subnets of the same address family?  

SYNOPSIS

#include <freeswan.h>

int sameaddr(const ip_address *a, const ip_address *b);
int addrcmp(const ip_address *a, const ip_address *b);
int samesubnet(const ip_subnet *a, const ip_subnet *b);
int addrinsubnet(const ip_address *a, const ip_subnet *s);
int subnetinsubnet(const ip_subnet *a, const ip_subnet *b);
int subnetishost(const ip_subnet *s);
int samesaid(const ip_said *a, const ip_said *b);
int sameaddrtype(const ip_address *a, const ip_address *b);
int samesubnettype(const ip_subnet *a, const ip_subnet *b);  

DESCRIPTION

These functions do various comparisons and tests on the ip_address type and ip_subnet types.

Sameaddr returns non-zero if addresses a and b, which must be of the same address family, are identical, and 0 otherwise.

Addrcmp returns -1, 0, or 1 respectively if address a is less than, equal to, or greater than b. They must be of the same address family,

Samesubnet returns non-zero if subnets a and b (which must be of the same address family) are identical, and 0 otherwise.

Addrinsubnet returns non-zero if address a is within subnet s (which must be of the same address family), and 0 otherwise.

Subnetinsubnet returns non-zero if subnet a is a subset of subnet b (which must be of the same address family), and 0 otherwise. A subnet is deemed to be a subset of itself.

Subnetishost returns non-zero if subnet s is in fact only a single host, and 0 otherwise.

Samesaid returns non-zero if SA IDs a and b are identical, and 0 otherwise.

Sameaddrtype returns non-zero if addresses a and b are of the same address family, and 0 otherwise.

Samesubnettype returns non-zero if subnets a and b are of the same address family, and 0 otherwise.  

SEE ALSO

inet(3), ipsec_initaddr(3)  

HISTORY

Written for the FreeS/WAN project by Henry Spencer.  

BUGS

There is no satisfactory way for most of these functions to indicate an error, e.g. mismatched address family.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
HISTORY
BUGS

This document was created by man2html, using the manual pages.
Time: 14:03:04 GMT, October 18, 2000