Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1882 | clevermous | 1 | #ifndef __NETPACKET_PACKET_H |
2 | #define __NETPACKET_PACKET_H |
||
3 | |||
4 | #include |
||
5 | |||
6 | __BEGIN_DECLS |
||
7 | |||
8 | struct sockaddr_ll { |
||
9 | unsigned short int sll_family; |
||
10 | unsigned short int sll_protocol; |
||
11 | int sll_ifindex; |
||
12 | unsigned short int sll_hatype; |
||
13 | unsigned char sll_pkttype; |
||
14 | unsigned char sll_halen; |
||
15 | unsigned char sll_addr[8]; |
||
16 | }; |
||
17 | |||
18 | #define PACKET_HOST 0 /* To us. */ |
||
19 | #define PACKET_BROADCAST 1 /* To all. */ |
||
20 | #define PACKET_MULTICAST 2 /* To group. */ |
||
21 | #define PACKET_OTHERHOST 3 /* To someone else. */ |
||
22 | #define PACKET_OUTGOING 4 /* Originated by us. */ |
||
23 | #define PACKET_LOOPBACK 5 |
||
24 | #define PACKET_FASTROUTE 6 |
||
25 | |||
26 | /* Packet socket options. */ |
||
27 | |||
28 | #define PACKET_ADD_MEMBERSHIP 1 |
||
29 | #define PACKET_DROP_MEMBERSHIP 2 |
||
30 | #define PACKET_RECV_OUTPUT 3 |
||
31 | #define PACKET_RX_RING 5 |
||
32 | #define PACKET_STATISTICS 6 |
||
33 | |||
34 | struct packet_mreq { |
||
35 | int mr_ifindex; |
||
36 | unsigned short int mr_type; |
||
37 | unsigned short int mr_alen; |
||
38 | unsigned char mr_address[8]; |
||
39 | }; |
||
40 | |||
41 | #define PACKET_MR_MULTICAST 0 |
||
42 | #define PACKET_MR_PROMISC 1 |
||
43 | #define PACKET_MR_ALLMULTI 2 |
||
44 | |||
45 | __END_DECLS |
||
46 | |||
47 | #endif |