aboutsummaryrefslogtreecommitdiff
path: root/fad-getad.c
diff options
context:
space:
mode:
authorguy <guy>2004-11-04 07:26:04 +0000
committerguy <guy>2004-11-04 07:26:04 +0000
commitf9b1d9732a03ab3cb8205faf784d70b4002833f9 (patch)
tree8aad9dcf36299c14d55c75f90beb2ddb4e3ee81a /fad-getad.c
parentefaa1dd30a4e24cae1bb412fd80f8422f008feea (diff)
From Dean Gaudet <dean@arctic.org>: handle AF_PACKET addresses on OSes
that have them (Linux).
Diffstat (limited to 'fad-getad.c')
-rw-r--r--fad-getad.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fad-getad.c b/fad-getad.c
index 3bbf54ae..e096a6ee 100644
--- a/fad-getad.c
+++ b/fad-getad.c
@@ -34,7 +34,7 @@
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/fad-getad.c,v 1.9 2004-03-11 23:04:24 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/fad-getad.c,v 1.10 2004-11-04 07:26:04 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -58,6 +58,10 @@ static const char rcsid[] _U_ =
#include "os-proto.h"
#endif
+#ifdef AF_PACKET
+# include <linux/if_packet.h>
+#endif
+
/*
* This is fun.
*
@@ -101,6 +105,11 @@ get_sa_len(struct sockaddr *addr)
return (sizeof (struct sockaddr_in6));
#endif
+#ifdef AF_PACKET
+ case AF_PACKET:
+ return (sizeof (struct sockaddr_ll));
+#endif
+
default:
return (sizeof (struct sockaddr));
}