clocksource: make CLOCKSOURCE_OF_DECLARE type safe
[cascardo/linux.git] / include / uapi / linux / packet_diag.h
1 #ifndef __PACKET_DIAG_H__
2 #define __PACKET_DIAG_H__
3
4 #include <linux/types.h>
5
6 struct packet_diag_req {
7         __u8    sdiag_family;
8         __u8    sdiag_protocol;
9         __u16   pad;
10         __u32   pdiag_ino;
11         __u32   pdiag_show;
12         __u32   pdiag_cookie[2];
13 };
14
15 #define PACKET_SHOW_INFO        0x00000001 /* Basic packet_sk information */
16 #define PACKET_SHOW_MCLIST      0x00000002 /* A set of packet_diag_mclist-s */
17 #define PACKET_SHOW_RING_CFG    0x00000004 /* Rings configuration parameters */
18 #define PACKET_SHOW_FANOUT      0x00000008
19
20 struct packet_diag_msg {
21         __u8    pdiag_family;
22         __u8    pdiag_type;
23         __u16   pdiag_num;
24
25         __u32   pdiag_ino;
26         __u32   pdiag_cookie[2];
27 };
28
29 enum {
30         PACKET_DIAG_INFO,
31         PACKET_DIAG_MCLIST,
32         PACKET_DIAG_RX_RING,
33         PACKET_DIAG_TX_RING,
34         PACKET_DIAG_FANOUT,
35
36         PACKET_DIAG_MAX,
37 };
38
39 struct packet_diag_info {
40         __u32   pdi_index;
41         __u32   pdi_version;
42         __u32   pdi_reserve;
43         __u32   pdi_copy_thresh;
44         __u32   pdi_tstamp;
45         __u32   pdi_flags;
46
47 #define PDI_RUNNING     0x1
48 #define PDI_AUXDATA     0x2
49 #define PDI_ORIGDEV     0x4
50 #define PDI_VNETHDR     0x8
51 #define PDI_LOSS        0x10
52 };
53
54 struct packet_diag_mclist {
55         __u32   pdmc_index;
56         __u32   pdmc_count;
57         __u16   pdmc_type;
58         __u16   pdmc_alen;
59         __u8    pdmc_addr[MAX_ADDR_LEN];
60 };
61
62 struct packet_diag_ring {
63         __u32   pdr_block_size;
64         __u32   pdr_block_nr;
65         __u32   pdr_frame_size;
66         __u32   pdr_frame_nr;
67         __u32   pdr_retire_tmo;
68         __u32   pdr_sizeof_priv;
69         __u32   pdr_features;
70 };
71
72 #endif