diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-07-03 17:01:13 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-07-03 17:01:13 +0200 |
commit | c2dd1b3f2f459b90ed16600bcd5aa0369610e80e (patch) | |
tree | 537c0d9997698dc6c5704993828467a3f8913cb1 /pcap_io.h | |
parent | f5c10ae4e3cc56eb0a8662c39442146415cc2df4 (diff) |
pcap: fix build error
Various fixes for last commit. Sorry for that.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'pcap_io.h')
-rw-r--r-- | pcap_io.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -13,7 +13,10 @@ #include <stdbool.h> #include <errno.h> #include <sys/time.h> +#include <sys/socket.h> +#include <linux/if.h> #include <linux/if_packet.h> +#include <linux/if_arp.h> #include "built_in.h" #include "die.h" @@ -171,9 +174,7 @@ static inline uint16_t tp_to_pcap_tsource(uint32_t status) static inline int pcap_devtype_to_linktype(const char *ifname) { - int type = device_type(ifname); - - case (type) { + switch (device_type(ifname)) { case ARPHRD_TUNNEL: case ARPHRD_TUNNEL6: case ARPHRD_LOOPBACK: @@ -203,7 +204,6 @@ static inline int pcap_devtype_to_linktype(const char *ifname) case ARPHRD_PPP: return LINKTYPE_PPP; case ARPHRD_CAN: return LINKTYPE_CAN20B; case ARPHRD_ECONET: return LINKTYPE_ECONET; - case ARPHRD_HDLC: case ARPHRD_RAWHDLC: case ARPHRD_CISCO: return LINKTYPE_C_HDLC; case ARPHRD_FDDI: return LINKTYPE_FDDI; |