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