aboutsummaryrefslogtreecommitdiffstats
path: root/bpf
diff options
context:
space:
mode:
authorguy <guy>2000-12-21 10:29:21 +0000
committerguy <guy>2000-12-21 10:29:21 +0000
commit5b0a98d6418a0cb399a15174fe58d1f188e63e4c (patch)
treebda4a88a1b9341a46f00820a83d83a89b8d4801e /bpf
parent892c4a44362b71124fa59dbf4f723a661c27517f (diff)
Add support for a new link layer type DLT_LINUX_SLL, for use when doing
live captures with a "cooked" (SOCK_DGRAM) rather than a "raw" (SOCK_RAW) PF_PACKET socket; it includes a bunch of the fields from the "struct sockaddr_ll" you get in a "recvfrom()", including the Ethernet protocol field. This requires us to rewrite the BPF program if we're stuffing it into the kernel; as long as we're doing *ex post facto* rewriting, we might as well also do the "ret <snaplen>" -> "ret 65535" fixup there as well, rather than in the code generator.
Diffstat (limited to 'bpf')
-rw-r--r--bpf/net/bpf.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/bpf/net/bpf.h b/bpf/net/bpf.h
index 5629c4a..57f4297 100644
--- a/bpf/net/bpf.h
+++ b/bpf/net/bpf.h
@@ -37,7 +37,7 @@
*
* @(#)bpf.h 7.1 (Berkeley) 5/7/91
*
- * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.43 2000-12-16 22:19:12 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/bpf/net/Attic/bpf.h,v 1.44 2000-12-21 10:29:24 guy Exp $ (LBL)
*/
#ifndef BPF_MAJOR_VERSION
@@ -271,7 +271,12 @@ struct bpf_hdr {
*/
/*
- * The instruction encondings.
+ * This is for Linux cooked sockets.
+ */
+#define DLT_LINUX_SLL 113
+
+/*
+ * The instruction encodings.
*/
/* instruction classes */
#define BPF_CLASS(code) ((code) & 0x07)