Lines Matching +full:linux +full:- +full:headers
1 /*-
40 * For captures on Linux cooked sockets, we construct a fake header
43 * a 2-byte "packet type" which is one of:
51 * a 2-byte Ethernet protocol field;
53 * a 2-byte link-layer type;
55 * a 2-byte link-layer address length;
57 * an 8-byte source link-layer address, whose actual length is
60 * All fields except for the link-layer address are in network byte order.
63 * LINUX_SLL_ values below. If you must change the link-layer header
64 * for a "cooked" Linux capture, introduce a new DLT_ type (ask
65 * "tcpdump-workers@lists.tcpdump.org" for one, so that you don't give it
69 * without any change, and so that capture files with different headers
77 #include <pcap/pcap-inttypes.h>
80 * A DLT_LINUX_SLL fake link-layer header.
87 uint16_t sll_hatype; /* link-layer address type */
88 uint16_t sll_halen; /* link-layer address length */
89 uint8_t sll_addr[SLL_ADDRLEN]; /* link-layer address */
94 * A DLT_LINUX_SLL2 fake link-layer header.
100 uint16_t sll2_reserved_mbz; /* reserved - must be zero */
101 uint32_t sll2_if_index; /* 1-based interface index */
102 uint16_t sll2_hatype; /* link-layer address type */
104 uint8_t sll2_halen; /* link-layer address length */
105 uint8_t sll2_addr[SLL_ADDRLEN]; /* link-layer address */
110 * "sll2_pkttype"; these correspond to the PACKET_ values on Linux,
112 * kernel source, and are thus not going to change on Linux. We
114 * than Linux.
124 * "sll2_protocol"; these correspond to the ETH_P_ values on Linux, but
126 * Linux. We assume, for now, that the ETH_P_ values won't change in
127 * Linux; if they do, then:
129 * if we don't translate them in "pcap-linux.c", capture files
133 * if we do translate them in "pcap-linux.c", that makes life
140 * might show up on non-Ethernet, non-802.x networks. (Not all the ones
141 * in the Linux "if_ether.h" will, I suspect, actually show up in
146 #define LINUX_SLL_P_CAN 0x000C /* CAN frames, with SocketCAN pseudo-headers */
147 #define LINUX_SLL_P_CANFD 0x000D /* CAN FD frames, with SocketCAN pseudo-headers */
148 #define LINUX_SLL_P_CANXL 0x000E /* CAN XL frames, with SocketCAN pseudo-headers */