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