aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_packet.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/if_packet.h')
-rw-r--r--include/linux/if_packet.h27
1 files changed, 9 insertions, 18 deletions
diff --git a/include/linux/if_packet.h b/include/linux/if_packet.h
index dea7d6b7cf98..4021d47cc437 100644
--- a/include/linux/if_packet.h
+++ b/include/linux/if_packet.h
@@ -3,15 +3,13 @@
#include <linux/types.h>
-struct sockaddr_pkt
-{
+struct sockaddr_pkt {
unsigned short spkt_family;
unsigned char spkt_device[14];
__be16 spkt_protocol;
};
-struct sockaddr_ll
-{
+struct sockaddr_ll {
unsigned short sll_family;
__be16 sll_protocol;
int sll_ifindex;
@@ -49,14 +47,12 @@ struct sockaddr_ll
#define PACKET_TX_RING 13
#define PACKET_LOSS 14
-struct tpacket_stats
-{
+struct tpacket_stats {
unsigned int tp_packets;
unsigned int tp_drops;
};
-struct tpacket_auxdata
-{
+struct tpacket_auxdata {
__u32 tp_status;
__u32 tp_len;
__u32 tp_snaplen;
@@ -78,8 +74,7 @@ struct tpacket_auxdata
#define TP_STATUS_SENDING 0x2
#define TP_STATUS_WRONG_FORMAT 0x4
-struct tpacket_hdr
-{
+struct tpacket_hdr {
unsigned long tp_status;
unsigned int tp_len;
unsigned int tp_snaplen;
@@ -93,8 +88,7 @@ struct tpacket_hdr
#define TPACKET_ALIGN(x) (((x)+TPACKET_ALIGNMENT-1)&~(TPACKET_ALIGNMENT-1))
#define TPACKET_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket_hdr)) + sizeof(struct sockaddr_ll))
-struct tpacket2_hdr
-{
+struct tpacket2_hdr {
__u32 tp_status;
__u32 tp_len;
__u32 tp_snaplen;
@@ -107,8 +101,7 @@ struct tpacket2_hdr
#define TPACKET2_HDRLEN (TPACKET_ALIGN(sizeof(struct tpacket2_hdr)) + sizeof(struct sockaddr_ll))
-enum tpacket_versions
-{
+enum tpacket_versions {
TPACKET_V1,
TPACKET_V2,
};
@@ -126,16 +119,14 @@ enum tpacket_versions
- Pad to align to TPACKET_ALIGNMENT=16
*/
-struct tpacket_req
-{
+struct tpacket_req {
unsigned int tp_block_size; /* Minimal size of contiguous block */
unsigned int tp_block_nr; /* Number of blocks */
unsigned int tp_frame_size; /* Size of frame */
unsigned int tp_frame_nr; /* Total number of frames */
};
-struct packet_mreq
-{
+struct packet_mreq {
int mr_ifindex;
unsigned short mr_type;
unsigned short mr_alen;