ipsec_loopbackaddr(3)

ipsec_loopbackaddr3

Get and test for addresses of type "any", "unspecified" and loopback get "any" address

Part of ipsec_anyaddr(3).

Usage

#include <freeswan.h>

const char *anyaddr(int af, ip_address *dst);
int isanyaddr(const ip_address *src);
const char *unspecaddr(int af, ip_address *dst);
int isunspecaddr(const ip_address *src);
const char *loopbackaddr(int af, ip_address *dst);
int isloopbackaddr(const ip_address *src);

Overview

These functions fill in, and test for, special values of the ip_address type.

Anyaddr fills in the destination *dst with the ``any'' address of address family af (normally AF_INET or AF_INET6). The IPv4 ``any'' address is the one embodied in the old INADDR_ANY macro.

Isanyaddr returns 1 if the src address equals the ``any'' address, and 0 otherwise.

Similarly, unspecaddr supplies, and isunspecaddr tests for, the ``unspecified'' address, which may be the same as the ``any'' address.

Similarly, loopbackaddr supplies, and islookbackaddr tests for, the loopback address.

Anyaddr, unspecaddr, and loopbackaddr return NULL for success and a pointer to a string-literal error message for failure; see DIAGNOSTICS.

Diagnostics

Fatal errors in the address-supplying functions are: unknown address family.

Releases

4 releases since Debian 3.1 (Sarge); the text changed 3 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 7

History

Written for the FreeS/WAN project by Henry Spencer.

From openswan 1:2.6.37-3+deb7u1 in Debian 7 (Wheezy). Parsed by carta from the page's man source.