pcap_lookupnet(3PCAP) man page
Updated: 25 July 2018 • View in plain text • Return to Main Contents
pcap_lookupnet - find the IPv4 network number and netmask for a device
#include <pcap/pcap.h> char errbuf[PCAP_ERRBUF_SIZE]; int pcap_lookupnet(const char *device, bpf_u_int32 *netp, bpf_u_int32 *maskp, char *errbuf);
pcap_lookupnet() is used to determine the IPv4 network number and mask associated with the network device device. Both netp and maskp are
bpf_u_int32pointers. errbuf is a buffer large enough to hold at least
pcap_lookupnet() returns 0 on success and
PCAP_ERRORon failure. If
PCAP_ERRORis returned, errbuf is filled in with an appropriate error message.
This HTML man page was generated at 10:38:36 GMT, December 01, 2023 from a source man page in "The Tcpdump Group" git repositories using man2html and other tools.