ipsec initsubnet - initialize an ip_subnet
ipsec addrtosubnet - initialize a singleton ip_subnet
ipsec subnettypeof - get address type of an ip_subnet
ipsec masktocount - convert subnet mask to bit count
ipsec networkof - get base address of an ip_subnet
ipsec maskof - get subnet mask of an ip_subnet
const char *initsubnet(const ip_address *addr,
int maskbits, int clash, ip_subnet *dst);
const char *addrtosubnet(const ip_address *addr,
ip_subnet *dst);
int subnettypeof(const ip_subnet *src);
int masktocount(const ip_address *src);
void networkof(const ip_subnet *src, ip_address *dst);
void maskof(const ip_subnet *src, ip_address *dst);
Initsubnet initializes a variable *dst of type ip_subnet from a base address and a count of mask bits. The clash parameter specifies what to do if the base address includes 1 bits outside the prefix specified by the mask (that is, in the ``host number'' part of the address):
Initsubnet returns NULL for success and a pointer to a string-literal error message for failure; see DIAGNOSTICS.
Addrtosubnet initializes an ip_subnet variable *dst to a ``singleton subnet'' containing the single address *addr. It returns NULL for success and a pointer to a string-literal error message for failure.
Subnettypeof returns the address type of a subnet, normally AF_INET or AF_INET6. (The <freeswan.h> header file arranges to include the necessary headers for these names to be known.)
Masktocount converts a subnet mask, expressed as an address, to a bit count suitable for use with initsubnet. It returns -1 for error; see DIAGNOSTICS.
Networkof fills in *dst with the base address of subnet src.
Maskof fills in *dst with the subnet mask of subnet src, expressed as an address.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |