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 _UAPI_MSM_RMNET_H_
20 #define _UAPI_MSM_RMNET_H_
21 #define RMNET_MODE_NONE (0x00)
22 #define RMNET_MODE_LLP_ETH (0x01)
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 #define RMNET_MODE_LLP_IP (0x02)
25 #define RMNET_MODE_QOS (0x04)
26 #define RMNET_MODE_MASK (RMNET_MODE_LLP_ETH |   RMNET_MODE_LLP_IP |   RMNET_MODE_QOS)
27 #define RMNET_IS_MODE_QOS(mode)   ((mode & RMNET_MODE_QOS) == RMNET_MODE_QOS)
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define RMNET_IS_MODE_IP(mode)   ((mode & RMNET_MODE_LLP_IP) == RMNET_MODE_LLP_IP)
30 enum rmnet_ioctl_cmds_e {
31  RMNET_IOCTL_SET_LLP_ETHERNET = 0x000089F1,
32  RMNET_IOCTL_SET_LLP_IP = 0x000089F2,
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  RMNET_IOCTL_GET_LLP = 0x000089F3,
35  RMNET_IOCTL_SET_QOS_ENABLE = 0x000089F4,
36  RMNET_IOCTL_SET_QOS_DISABLE = 0x000089F5,
37  RMNET_IOCTL_GET_QOS = 0x000089F6,
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39  RMNET_IOCTL_GET_OPMODE = 0x000089F7,
40  RMNET_IOCTL_OPEN = 0x000089F8,
41  RMNET_IOCTL_CLOSE = 0x000089F9,
42  RMNET_IOCTL_FLOW_ENABLE = 0x000089FA,
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  RMNET_IOCTL_FLOW_DISABLE = 0x000089FB,
45  RMNET_IOCTL_FLOW_SET_HNDL = 0x000089FC,
46  RMNET_IOCTL_EXTENDED = 0x000089FD,
47  RMNET_IOCTL_MAX
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 };
50 enum rmnet_ioctl_extended_cmds_e {
51  RMNET_IOCTL_GET_SUPPORTED_FEATURES = 0x0000,
52  RMNET_IOCTL_SET_MRU = 0x0001,
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  RMNET_IOCTL_GET_MRU = 0x0002,
55  RMNET_IOCTL_GET_EPID = 0x0003,
56  RMNET_IOCTL_GET_DRIVER_NAME = 0x0004,
57  RMNET_IOCTL_ADD_MUX_CHANNEL = 0x0005,
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  RMNET_IOCTL_SET_EGRESS_DATA_FORMAT = 0x0006,
60  RMNET_IOCTL_SET_INGRESS_DATA_FORMAT = 0x0007,
61  RMNET_IOCTL_SET_AGGREGATION_COUNT = 0x0008,
62  RMNET_IOCTL_GET_AGGREGATION_COUNT = 0x0009,
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  RMNET_IOCTL_SET_AGGREGATION_SIZE = 0x000A,
65  RMNET_IOCTL_GET_AGGREGATION_SIZE = 0x000B,
66  RMNET_IOCTL_FLOW_CONTROL = 0x000C,
67  RMNET_IOCTL_GET_DFLT_CONTROL_CHANNEL = 0x000D,
68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  RMNET_IOCTL_GET_HWSW_MAP = 0x000E,
70  RMNET_IOCTL_SET_RX_HEADROOM = 0x000F,
71  RMNET_IOCTL_GET_EP_PAIR = 0x0010,
72  RMNET_IOCTL_SET_QOS_VERSION = 0x0011,
73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74  RMNET_IOCTL_GET_QOS_VERSION = 0x0012,
75  RMNET_IOCTL_GET_SUPPORTED_QOS_MODES = 0x0013,
76  RMNET_IOCTL_SET_SLEEP_STATE = 0x0014,
77  RMNET_IOCTL_SET_XLAT_DEV_INFO = 0x0015,
78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  RMNET_IOCTL_EXTENDED_MAX = 0x0016
80 };
81 #define RMNET_IOCTL_FEAT_NOTIFY_MUX_CHANNEL (1<<0)
82 #define RMNET_IOCTL_FEAT_SET_EGRESS_DATA_FORMAT (1<<1)
83 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84 #define RMNET_IOCTL_FEAT_SET_INGRESS_DATA_FORMAT (1<<2)
85 #define RMNET_IOCTL_FEAT_SET_AGGREGATION_COUNT (1<<3)
86 #define RMNET_IOCTL_FEAT_GET_AGGREGATION_COUNT (1<<4)
87 #define RMNET_IOCTL_FEAT_SET_AGGREGATION_SIZE (1<<5)
88 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89 #define RMNET_IOCTL_FEAT_GET_AGGREGATION_SIZE (1<<6)
90 #define RMNET_IOCTL_FEAT_FLOW_CONTROL (1<<7)
91 #define RMNET_IOCTL_FEAT_GET_DFLT_CONTROL_CHANNEL (1<<8)
92 #define RMNET_IOCTL_FEAT_GET_HWSW_MAP (1<<9)
93 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94 #define RMNET_IOCTL_EGRESS_FORMAT_MAP (1<<1)
95 #define RMNET_IOCTL_EGRESS_FORMAT_AGGREGATION (1<<2)
96 #define RMNET_IOCTL_EGRESS_FORMAT_MUXING (1<<3)
97 #define RMNET_IOCTL_EGRESS_FORMAT_CHECKSUM (1<<4)
98 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99 #define RMNET_IOCTL_INGRESS_FORMAT_MAP (1<<1)
100 #define RMNET_IOCTL_INGRESS_FORMAT_DEAGGREGATION (1<<2)
101 #define RMNET_IOCTL_INGRESS_FORMAT_DEMUXING (1<<3)
102 #define RMNET_IOCTL_INGRESS_FORMAT_CHECKSUM (1<<4)
103 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
104 #ifndef IFNAMSIZ
105 #define IFNAMSIZ 16
106 #endif
107 struct rmnet_ioctl_extended_s {
108 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
109  uint32_t extended_ioctl;
110  union {
111  uint32_t data;
112  int8_t if_name[IFNAMSIZ];
113 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
114  struct {
115  uint32_t mux_id;
116  int8_t vchannel_name[IFNAMSIZ];
117  } rmnet_mux_val;
118 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
119  struct {
120  uint8_t flow_mode;
121  uint8_t mux_id;
122  } flow_control_prop;
123 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
124  struct {
125  uint32_t consumer_pipe_num;
126  uint32_t producer_pipe_num;
127  } ipa_ep_pair;
128 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
129  } u;
130 };
131 struct rmnet_ioctl_data_s {
132  union {
133 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
134  uint32_t operation_mode;
135  uint32_t tcm_handle;
136  } u;
137 };
138 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
139 #define RMNET_IOCTL_QOS_MODE_6 (1<<0)
140 #define RMNET_IOCTL_QOS_MODE_8 (1<<1)
141 #define QMI_QOS_HDR_S __attribute((__packed__)) qmi_qos_hdr_s
142 struct QMI_QOS_HDR_S {
143 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
144  unsigned char version;
145  unsigned char flags;
146  uint32_t flow_id;
147 };
148 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
149 struct qmi_qos_hdr8_s {
150  struct QMI_QOS_HDR_S hdr;
151  uint8_t reserved[2];
152 } __attribute((__packed__));
153 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
154 #endif
155 
156