aboutsummaryrefslogtreecommitdiff
path: root/pcap-int.h
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-06-13 17:17:15 -0700
committerGuy Harris <gharris@sonic.net>2023-06-13 17:17:15 -0700
commit841507c824c1e3adffca4ec8b3d986fbc1244ba1 (patch)
tree3b4c2df9df60aa66d4ac90a0dd7a04a5f66857dc /pcap-int.h
parent82d052941c6d36ef5d69350b5c10169a45629a4a (diff)
Add the Solaris "any" device in pcap_findalldevs() if we have it.
There's no good run-time test, so we test at configure time, by checking whether /usr/include/inet/ipnet.h exists and contains IPNET_ANY_LINK. See https://github.com/the-tcpdump-group/tcpdump/issues/1057#issuecomment-1584088911 We make a common routine to use to add that device.
Diffstat (limited to 'pcap-int.h')
-rw-r--r--pcap-int.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/pcap-int.h b/pcap-int.h
index df4ab74f..48948238 100644
--- a/pcap-int.h
+++ b/pcap-int.h
@@ -522,6 +522,8 @@ void pcap_breakloop_common(pcap_t *);
*
* "pcap_add_dev()" adds an entry to a pcap_if_list_t.
*
+ * "pcap_add_any_dev()" adds an entry for the "any" device to a pcap_if_list_t.
+ *
* "pcap_find_dev()" tries to find a device, by name, in a pcap_if_list_t.
*
* "pcap_find_or_add_dev()" checks whether a device is already in a
@@ -540,6 +542,7 @@ pcap_if_t *pcap_find_or_add_dev(pcap_if_list_t *, const char *, bpf_u_int32,
pcap_if_t *pcap_find_dev(pcap_if_list_t *, const char *);
pcap_if_t *pcap_add_dev(pcap_if_list_t *, const char *, bpf_u_int32,
const char *, char *);
+pcap_if_t *pcap_add_any_dev(pcap_if_list_t *, char *);
int pcap_add_addr_to_dev(pcap_if_t *, struct sockaddr *, size_t,
struct sockaddr *, size_t, struct sockaddr *, size_t,
struct sockaddr *dstaddr, size_t, char *errbuf);