1 /*
2  * This file is auto-generated. Modifications will be lost.
3  *
4  * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5  * for more information.
6  */
7 #ifndef _MSM_RMNET_H_
8 #define _MSM_RMNET_H_
9 #define RMNET_MODE_NONE (0x00)
10 #define RMNET_MODE_LLP_ETH (0x01)
11 #define RMNET_MODE_LLP_IP (0x02)
12 #define RMNET_MODE_QOS (0x04)
13 #define RMNET_MODE_MASK (RMNET_MODE_LLP_ETH | RMNET_MODE_LLP_IP | RMNET_MODE_QOS)
14 #define RMNET_IS_MODE_QOS(mode) ((mode & RMNET_MODE_QOS) == RMNET_MODE_QOS)
15 #define RMNET_IS_MODE_IP(mode) ((mode & RMNET_MODE_LLP_IP) == RMNET_MODE_LLP_IP)
16 #define RMNET_IOCTL_SET_LLP_ETHERNET 0x000089F1
17 #define RMNET_IOCTL_SET_LLP_IP 0x000089F2
18 #define RMNET_IOCTL_GET_LLP 0x000089F3
19 #define RMNET_IOCTL_SET_QOS_ENABLE 0x000089F4
20 #define RMNET_IOCTL_SET_QOS_DISABLE 0x000089F5
21 #define RMNET_IOCTL_GET_QOS 0x000089F6
22 #define RMNET_IOCTL_GET_OPMODE 0x000089F7
23 #define RMNET_IOCTL_OPEN 0x000089F8
24 #define RMNET_IOCTL_CLOSE 0x000089F9
25 #define RMNET_IOCTL_FLOW_ENABLE 0x000089FA
26 #define RMNET_IOCTL_FLOW_DISABLE 0x000089FB
27 #define RMNET_IOCTL_FLOW_SET_HNDL 0x000089FC
28 #define RMNET_IOCTL_EXTENDED 0x000089FD
29 #define RMNET_IOCTL_GET_SUPPORTED_FEATURES 0x0000
30 #define RMNET_IOCTL_SET_MRU 0x0001
31 #define RMNET_IOCTL_GET_MRU 0x0002
32 #define RMNET_IOCTL_GET_EPID 0x0003
33 #define RMNET_IOCTL_GET_DRIVER_NAME 0x0004
34 #define RMNET_IOCTL_ADD_MUX_CHANNEL 0x0005
35 #define RMNET_IOCTL_SET_EGRESS_DATA_FORMAT 0x0006
36 #define RMNET_IOCTL_SET_INGRESS_DATA_FORMAT 0x0007
37 #define RMNET_IOCTL_SET_AGGREGATION_COUNT 0x0008
38 #define RMNET_IOCTL_GET_AGGREGATION_COUNT 0x0009
39 #define RMNET_IOCTL_SET_AGGREGATION_SIZE 0x000A
40 #define RMNET_IOCTL_GET_AGGREGATION_SIZE 0x000B
41 #define RMNET_IOCTL_FLOW_CONTROL 0x000C
42 #define RMNET_IOCTL_GET_DFLT_CONTROL_CHANNEL 0x000D
43 #define RMNET_IOCTL_GET_HWSW_MAP 0x000E
44 #define RMNET_IOCTL_SET_RX_HEADROOM 0x000F
45 #define RMNET_IOCTL_GET_EP_PAIR 0x0010
46 #define RMNET_IOCTL_SET_QOS_VERSION 0x0011
47 #define RMNET_IOCTL_GET_QOS_VERSION 0x0012
48 #define RMNET_IOCTL_GET_SUPPORTED_QOS_MODES 0x0013
49 #define RMNET_IOCTL_SET_SLEEP_STATE 0x0014
50 #define RMNET_IOCTL_SET_XLAT_DEV_INFO 0x0015
51 #define RMNET_IOCTL_DEREGISTER_DEV 0x0016
52 #define RMNET_IOCTL_GET_SG_SUPPORT 0x0017
53 #define RMNET_IOCTL_SET_OFFLOAD 0x0018
54 #define RMNET_IOCTL_FEAT_NOTIFY_MUX_CHANNEL (1 << 0)
55 #define RMNET_IOCTL_FEAT_SET_EGRESS_DATA_FORMAT (1 << 1)
56 #define RMNET_IOCTL_FEAT_SET_INGRESS_DATA_FORMAT (1 << 2)
57 #define RMNET_IOCTL_FEAT_SET_AGGREGATION_COUNT (1 << 3)
58 #define RMNET_IOCTL_FEAT_GET_AGGREGATION_COUNT (1 << 4)
59 #define RMNET_IOCTL_FEAT_SET_AGGREGATION_SIZE (1 << 5)
60 #define RMNET_IOCTL_FEAT_GET_AGGREGATION_SIZE (1 << 6)
61 #define RMNET_IOCTL_FEAT_FLOW_CONTROL (1 << 7)
62 #define RMNET_IOCTL_FEAT_GET_DFLT_CONTROL_CHANNEL (1 << 8)
63 #define RMNET_IOCTL_FEAT_GET_HWSW_MAP (1 << 9)
64 #define RMNET_IOCTL_EGRESS_FORMAT_MAP (1 << 1)
65 #define RMNET_IOCTL_EGRESS_FORMAT_AGGREGATION (1 << 2)
66 #define RMNET_IOCTL_EGRESS_FORMAT_MUXING (1 << 3)
67 #define RMNET_IOCTL_EGRESS_FORMAT_CHECKSUM (1 << 4)
68 #define RMNET_IOCTL_INGRESS_FORMAT_MAP (1 << 1)
69 #define RMNET_IOCTL_INGRESS_FORMAT_DEAGGREGATION (1 << 2)
70 #define RMNET_IOCTL_INGRESS_FORMAT_DEMUXING (1 << 3)
71 #define RMNET_IOCTL_INGRESS_FORMAT_CHECKSUM (1 << 4)
72 #define RMNET_IOCTL_INGRESS_FORMAT_AGG_DATA (1 << 5)
73 #define RMNET_IOCTL_OFFLOAD_FORMAT_NONE (0)
74 #define RMNET_IOCTL_COALESCING_FORMAT_TCP (1 << 0)
75 #define RMNET_IOCTL_COALESCING_FORMAT_UDP (1 << 1)
76 #ifndef IFNAMSIZ
77 #define IFNAMSIZ 16
78 #endif
79 struct rmnet_ioctl_extended_s {
80   uint32_t extended_ioctl;
81   union {
82     uint32_t data;
83     int8_t if_name[IFNAMSIZ];
84     struct {
85       uint32_t mux_id;
86       int8_t vchannel_name[IFNAMSIZ];
87     } rmnet_mux_val;
88     struct {
89       uint8_t flow_mode;
90       uint8_t mux_id;
91     } flow_control_prop;
92     struct {
93       uint32_t consumer_pipe_num;
94       uint32_t producer_pipe_num;
95     } ipa_ep_pair;
96     struct {
97       uint32_t __data;
98       uint32_t agg_size;
99       uint32_t agg_count;
100     } ingress_format;
101     struct {
102       uint32_t flags;
103       uint8_t mux_id;
104     } offload_params;
105   } u;
106 };
107 struct rmnet_ioctl_data_s {
108   union {
109     uint32_t operation_mode;
110     uint32_t tcm_handle;
111   } u;
112 };
113 #define RMNET_IOCTL_QOS_MODE_6 (1 << 0)
114 #define RMNET_IOCTL_QOS_MODE_8 (1 << 1)
115 struct QMI_QOS_HDR_S {
116   unsigned char version;
117   unsigned char flags;
118   uint32_t flow_id;
119 } __attribute((__packed__));
120 struct qmi_qos_hdr8_s {
121   struct QMI_QOS_HDR_S hdr;
122   uint8_t reserved[2];
123 } __attribute((__packed__));
124 #endif
125