| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #ifndef __PACKET_DIAG_H__ | 
|  | 20 | #define __PACKET_DIAG_H__ | 
|  | 21 | #include <linux/types.h> | 
|  | 22 | struct packet_diag_req { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 23 | __u8 sdiag_family; | 
|  | 24 | __u8 sdiag_protocol; | 
|  | 25 | __u16 pad; | 
|  | 26 | __u32 pdiag_ino; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | __u32 pdiag_show; | 
|  | 28 | __u32 pdiag_cookie[2]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 29 | }; | 
|  | 30 | #define PACKET_SHOW_INFO 0x00000001 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | #define PACKET_SHOW_MCLIST 0x00000002 | 
|  | 32 | #define PACKET_SHOW_RING_CFG 0x00000004 | 
|  | 33 | #define PACKET_SHOW_FANOUT 0x00000008 | 
|  | 34 | #define PACKET_SHOW_MEMINFO 0x00000010 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 35 | #define PACKET_SHOW_FILTER 0x00000020 | 
|  | 36 | struct packet_diag_msg { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 37 | __u8 pdiag_family; | 
|  | 38 | __u8 pdiag_type; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | __u16 pdiag_num; | 
|  | 40 | __u32 pdiag_ino; | 
|  | 41 | __u32 pdiag_cookie[2]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 44 | PACKET_DIAG_INFO, | 
|  | 45 | PACKET_DIAG_MCLIST, | 
|  | 46 | PACKET_DIAG_RX_RING, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | PACKET_DIAG_TX_RING, | 
|  | 48 | PACKET_DIAG_FANOUT, | 
|  | 49 | PACKET_DIAG_UID, | 
|  | 50 | PACKET_DIAG_MEMINFO, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | PACKET_DIAG_FILTER, | 
|  | 52 | __PACKET_DIAG_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 53 | }; | 
|  | 54 | #define PACKET_DIAG_MAX (__PACKET_DIAG_MAX - 1) | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | struct packet_diag_info { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | __u32 pdi_index; | 
|  | 57 | __u32 pdi_version; | 
|  | 58 | __u32 pdi_reserve; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | __u32 pdi_copy_thresh; | 
|  | 60 | __u32 pdi_tstamp; | 
|  | 61 | __u32 pdi_flags; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 62 | #define PDI_RUNNING 0x1 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 63 | #define PDI_AUXDATA 0x2 | 
|  | 64 | #define PDI_ORIGDEV 0x4 | 
|  | 65 | #define PDI_VNETHDR 0x8 | 
|  | 66 | #define PDI_LOSS 0x10 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 67 | }; | 
|  | 68 | struct packet_diag_mclist { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 69 | __u32 pdmc_index; | 
|  | 70 | __u32 pdmc_count; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | __u16 pdmc_type; | 
|  | 72 | __u16 pdmc_alen; | 
| Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 73 | __u8 pdmc_addr[32]; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 74 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | struct packet_diag_ring { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 76 | __u32 pdr_block_size; | 
|  | 77 | __u32 pdr_block_nr; | 
|  | 78 | __u32 pdr_frame_size; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | __u32 pdr_frame_nr; | 
|  | 80 | __u32 pdr_retire_tmo; | 
|  | 81 | __u32 pdr_sizeof_priv; | 
|  | 82 | __u32 pdr_features; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | }; | 
|  | 84 | #endif |