diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-04-30 11:19:21 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-04-30 11:19:21 -0700 |
commit | 7be747499ef4ce5760fd6acf84c987466072f376 (patch) | |
tree | 8b309ab50f6bbd001a92aba9b9738a14f02d09fc /pcap-linux.c | |
parent | 0662fb409ad7eaf528861cad55708f6fb227aabc (diff) |
Pass the "get additional flags" function to the findalldevs helpers.
This lets us make it a static function - or eliminate it entirely for
pcap-null.c.
Diffstat (limited to 'pcap-linux.c')
-rw-r--r-- | pcap-linux.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pcap-linux.c b/pcap-linux.c index db29bdf3..bc8a1842 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -2605,7 +2605,7 @@ can_be_bound(const char *name _U_) /* * Get additional flags for a device, using SIOCGIFMEDIA. */ -int +static int get_if_flags(const char *name, bpf_u_int32 *flags, char *errbuf) { int sock; @@ -2770,7 +2770,8 @@ pcap_platform_finddevs(pcap_if_list_t *devlistp, char *errbuf) /* * Get the list of regular interfaces first. */ - if (pcap_findalldevs_interfaces(devlistp, errbuf, can_be_bound) == -1) + if (pcap_findalldevs_interfaces(devlistp, errbuf, can_be_bound, + get_if_flags) == -1) return (-1); /* failure */ /* |