]>
Commit | Line | Data |
---|---|---|
320054e8 DG |
1 | #ifndef _NETPACKET_PACKET_H |
2 | #define _NETPACKET_PACKET_H | |
3 | ||
4 | #ifdef __cplusplus | |
5 | extern "C" { | |
6 | #endif | |
7 | ||
8 | struct sockaddr_ll { | |
9 | unsigned short sll_family, sll_protocol; | |
10 | int sll_ifindex; | |
11 | unsigned short sll_hatype; | |
12 | unsigned char sll_pkttype, sll_halen; | |
13 | unsigned char sll_addr[8]; | |
14 | }; | |
15 | ||
16 | struct packet_mreq { | |
17 | int mr_ifindex; | |
18 | unsigned short int mr_type, mr_alen; | |
19 | unsigned char mr_address[8]; | |
20 | }; | |
21 | ||
22 | #define PACKET_HOST 0 | |
23 | #define PACKET_BROADCAST 1 | |
24 | #define PACKET_MULTICAST 2 | |
25 | #define PACKET_OTHERHOST 3 | |
26 | #define PACKET_OUTGOING 4 | |
27 | #define PACKET_LOOPBACK 5 | |
28 | #define PACKET_FASTROUTE 6 | |
29 | ||
30 | #define PACKET_ADD_MEMBERSHIP 1 | |
31 | #define PACKET_DROP_MEMBERSHIP 2 | |
32 | #define PACKET_RECV_OUTPUT 3 | |
33 | #define PACKET_RX_RING 5 | |
34 | #define PACKET_STATISTICS 6 | |
35 | #define PACKET_COPY_THRESH 7 | |
36 | #define PACKET_AUXDATA 8 | |
37 | #define PACKET_ORIGDEV 9 | |
38 | #define PACKET_VERSION 10 | |
39 | #define PACKET_HDRLEN 11 | |
40 | #define PACKET_RESERVE 12 | |
41 | #define PACKET_TX_RING 13 | |
42 | #define PACKET_LOSS 14 | |
43 | #define PACKET_VNET_HDR 15 | |
44 | #define PACKET_TX_TIMESTAMP 16 | |
45 | #define PACKET_TIMESTAMP 17 | |
46 | #define PACKET_FANOUT 18 | |
47 | #define PACKET_TX_HAS_OFF 19 | |
48 | #define PACKET_QDISC_BYPASS 20 | |
49 | #define PACKET_ROLLOVER_STATS 21 | |
50 | #define PACKET_FANOUT_DATA 22 | |
f41256b6 | 51 | #define PACKET_IGNORE_OUTGOING 23 |
320054e8 DG |
52 | |
53 | #define PACKET_MR_MULTICAST 0 | |
54 | #define PACKET_MR_PROMISC 1 | |
55 | #define PACKET_MR_ALLMULTI 2 | |
56 | #define PACKET_MR_UNICAST 3 | |
57 | ||
58 | #ifdef __cplusplus | |
59 | } | |
60 | #endif | |
61 | ||
62 | #endif |