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
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);
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.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |