From 5b0a98d6418a0cb399a15174fe58d1f188e63e4c Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 21 Dec 2000 10:29:21 +0000 Subject: 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 " -> "ret 65535" fixup there as well, rather than in the code generator. --- bpf/net/bpf.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'bpf') 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) -- cgit v1.2.3