Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
if_packet.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  sockaddr_pkt
 
struct  sockaddr_ll
 
struct  tpacket_stats
 
struct  tpacket_stats_v3
 
union  tpacket_stats_u
 
struct  tpacket_auxdata
 
struct  tpacket_hdr
 
struct  tpacket2_hdr
 
struct  tpacket_hdr_variant1
 
struct  tpacket3_hdr
 
struct  tpacket_bd_ts
 
struct  tpacket_hdr_v1
 
union  tpacket_bd_header_u
 
struct  tpacket_block_desc
 
struct  tpacket_req
 
struct  tpacket_req3
 
union  tpacket_req_u
 
struct  packet_mreq
 

Macros

#define PACKET_HOST   0 /* To us */
 
#define PACKET_BROADCAST   1 /* To all */
 
#define PACKET_MULTICAST   2 /* To group */
 
#define PACKET_OTHERHOST   3 /* To someone else */
 
#define PACKET_OUTGOING   4 /* Outgoing of any type */
 
#define PACKET_LOOPBACK   5 /* MC/BRD frame looped back */
 
#define PACKET_FASTROUTE   6 /* Fastrouted frame */
 
#define PACKET_ADD_MEMBERSHIP   1
 
#define PACKET_DROP_MEMBERSHIP   2
 
#define PACKET_RECV_OUTPUT   3
 
#define PACKET_RX_RING   5
 
#define PACKET_STATISTICS   6
 
#define PACKET_COPY_THRESH   7
 
#define PACKET_AUXDATA   8
 
#define PACKET_ORIGDEV   9
 
#define PACKET_VERSION   10
 
#define PACKET_HDRLEN   11
 
#define PACKET_RESERVE   12
 
#define PACKET_TX_RING   13
 
#define PACKET_LOSS   14
 
#define PACKET_VNET_HDR   15
 
#define PACKET_TX_TIMESTAMP   16
 
#define PACKET_TIMESTAMP   17
 
#define PACKET_FANOUT   18
 
#define PACKET_FANOUT_HASH   0
 
#define PACKET_FANOUT_LB   1
 
#define PACKET_FANOUT_CPU   2
 
#define PACKET_FANOUT_FLAG_DEFRAG   0x8000
 
#define TP_STATUS_KERNEL   0x0
 
#define TP_STATUS_USER   0x1
 
#define TP_STATUS_COPY   0x2
 
#define TP_STATUS_LOSING   0x4
 
#define TP_STATUS_CSUMNOTREADY   0x8
 
#define TP_STATUS_VLAN_VALID   0x10 /* auxdata has valid tp_vlan_tci */
 
#define TP_STATUS_BLK_TMO   0x20
 
#define TP_STATUS_AVAILABLE   0x0
 
#define TP_STATUS_SEND_REQUEST   0x1
 
#define TP_STATUS_SENDING   0x2
 
#define TP_STATUS_WRONG_FORMAT   0x4
 
#define TP_FT_REQ_FILL_RXHASH   0x1
 
#define TPACKET_ALIGNMENT   16
 
#define TPACKET_ALIGN(x)   (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))
 
#define TPACKET_HDRLEN   (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
 
#define TPACKET2_HDRLEN   (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
 
#define TPACKET3_HDRLEN   (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + sizeof(struct sockaddr_ll))
 
#define PACKET_MR_MULTICAST   0
 
#define PACKET_MR_PROMISC   1
 
#define PACKET_MR_ALLMULTI   2
 
#define PACKET_MR_UNICAST   3
 

Enumerations

enum  tpacket_versions { TPACKET_V1, TPACKET_V2, TPACKET_V3 }
 

Macro Definition Documentation

#define PACKET_ADD_MEMBERSHIP   1

Definition at line 35 of file if_packet.h.

#define PACKET_AUXDATA   8

Definition at line 42 of file if_packet.h.

#define PACKET_BROADCAST   1 /* To all */

Definition at line 25 of file if_packet.h.

#define PACKET_COPY_THRESH   7

Definition at line 41 of file if_packet.h.

#define PACKET_DROP_MEMBERSHIP   2

Definition at line 36 of file if_packet.h.

#define PACKET_FANOUT   18

Definition at line 52 of file if_packet.h.

#define PACKET_FANOUT_CPU   2

Definition at line 56 of file if_packet.h.

#define PACKET_FANOUT_FLAG_DEFRAG   0x8000

Definition at line 57 of file if_packet.h.

#define PACKET_FANOUT_HASH   0

Definition at line 54 of file if_packet.h.

#define PACKET_FANOUT_LB   1

Definition at line 55 of file if_packet.h.

#define PACKET_FASTROUTE   6 /* Fastrouted frame */

Definition at line 31 of file if_packet.h.

#define PACKET_HDRLEN   11

Definition at line 45 of file if_packet.h.

#define PACKET_HOST   0 /* To us */

Definition at line 24 of file if_packet.h.

#define PACKET_LOOPBACK   5 /* MC/BRD frame looped back */

Definition at line 30 of file if_packet.h.

#define PACKET_LOSS   14

Definition at line 48 of file if_packet.h.

#define PACKET_MR_ALLMULTI   2

Definition at line 269 of file if_packet.h.

#define PACKET_MR_MULTICAST   0

Definition at line 267 of file if_packet.h.

#define PACKET_MR_PROMISC   1

Definition at line 268 of file if_packet.h.

#define PACKET_MR_UNICAST   3

Definition at line 270 of file if_packet.h.

#define PACKET_MULTICAST   2 /* To group */

Definition at line 26 of file if_packet.h.

#define PACKET_ORIGDEV   9

Definition at line 43 of file if_packet.h.

#define PACKET_OTHERHOST   3 /* To someone else */

Definition at line 27 of file if_packet.h.

#define PACKET_OUTGOING   4 /* Outgoing of any type */

Definition at line 28 of file if_packet.h.

#define PACKET_RECV_OUTPUT   3

Definition at line 37 of file if_packet.h.

#define PACKET_RESERVE   12

Definition at line 46 of file if_packet.h.

#define PACKET_RX_RING   5

Definition at line 39 of file if_packet.h.

#define PACKET_STATISTICS   6

Definition at line 40 of file if_packet.h.

#define PACKET_TIMESTAMP   17

Definition at line 51 of file if_packet.h.

#define PACKET_TX_RING   13

Definition at line 47 of file if_packet.h.

#define PACKET_TX_TIMESTAMP   16

Definition at line 50 of file if_packet.h.

#define PACKET_VERSION   10

Definition at line 44 of file if_packet.h.

#define PACKET_VNET_HDR   15

Definition at line 49 of file if_packet.h.

#define TP_FT_REQ_FILL_RXHASH   0x1

Definition at line 101 of file if_packet.h.

#define TP_STATUS_AVAILABLE   0x0

Definition at line 95 of file if_packet.h.

#define TP_STATUS_BLK_TMO   0x20

Definition at line 92 of file if_packet.h.

#define TP_STATUS_COPY   0x2

Definition at line 88 of file if_packet.h.

#define TP_STATUS_CSUMNOTREADY   0x8

Definition at line 90 of file if_packet.h.

#define TP_STATUS_KERNEL   0x0

Definition at line 86 of file if_packet.h.

#define TP_STATUS_LOSING   0x4

Definition at line 89 of file if_packet.h.

#define TP_STATUS_SEND_REQUEST   0x1

Definition at line 96 of file if_packet.h.

#define TP_STATUS_SENDING   0x2

Definition at line 97 of file if_packet.h.

#define TP_STATUS_USER   0x1

Definition at line 87 of file if_packet.h.

#define TP_STATUS_VLAN_VALID   0x10 /* auxdata has valid tp_vlan_tci */

Definition at line 91 of file if_packet.h.

#define TP_STATUS_WRONG_FORMAT   0x4

Definition at line 98 of file if_packet.h.

#define TPACKET2_HDRLEN   (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))

Definition at line 216 of file if_packet.h.

#define TPACKET3_HDRLEN   (TPACKET_ALIGN(sizeof(struct tpacket3_hdr)) + sizeof(struct sockaddr_ll))

Definition at line 217 of file if_packet.h.

#define TPACKET_ALIGN (   x)    (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))

Definition at line 114 of file if_packet.h.

#define TPACKET_ALIGNMENT   16

Definition at line 113 of file if_packet.h.

#define TPACKET_HDRLEN   (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))

Definition at line 115 of file if_packet.h.

Enumeration Type Documentation

Enumerator:
TPACKET_V1 
TPACKET_V2 
TPACKET_V3 

Definition at line 219 of file if_packet.h.