Content-type: text/html Man page of IPSEC_INITADDR

IPSEC_INITADDR

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

NAME

ipsec initaddr - initialize an ip_address
ipsec addrtypeof - get address type of an ip_address
ipsec addrlenof - get length of address within an ip_address
ipsec addrbytesof - get copy of address within an ip_address
ipsec addrbytesptr - get pointer to address within an ip_address  

SYNOPSIS

#include <freeswan.h>

const char *initaddr(const char *src, size_t srclen,
  int af, ip_address *dst);
int addrtypeof(const ip_address *src);
size_t addrlenof(const ip_address *src);
size_t addrbytesof(const ip_address *src,
  unsigned char *dst, size_t dstlen);
size_t addrbytesptr(const ip_address *src,
  const unsigned char **dst);  

DESCRIPTION

The <freeswan.h> library uses an internal type ip_address to contain one of the (currently two) types of IP address. These functions provide basic tools for creating and examining this type.

Initaddr initializes a variable *dst of type ip_address from an address (in network byte order, indicated by a pointer src and a length srclen) and an address family af (typically AF_INET or AF_INET6). The length must be consistent with the address family.

Addrtypeof returns the address type of an address, normally AF_INET or AF_INET6. (The <freeswan.h> header file arranges to include the necessary headers for these names to be known.)

Addrlenof returns the size (in bytes) of the address within an ip_address, 4(3), ipsec_rangetosubnet(3)  

DIAGNOSTICS

Fatal errors in initsubnet are: unknown address family; unknown clash value; impossible mask bit count; non-zero host-number bits and clash is 'x'. Fatal errors in addrtosubnet are: unknown address family. Fatal errors in masktocount are: unknown address family; mask bits not contiguous.  

HISTORY

Written for the FreeS/WAN project by Henry Spencer.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SEE ALSO
DIAGNOSTICS
HISTORY

This document was created by man2html, using the manual pages.
Time: 19:01:10 GMT, October 01, 2009 ./usr/share/doc/openswan/doc/manpage.d/ipsec_addrtot.3.html0000644000000000000000000002622311261176166022511 0ustar rootrootContent-type: text/html Man page of IPSEC_TTOADDR

I