• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef OHOS_RIL_VENDOR_DATA_DEFS_H
17 #define OHOS_RIL_VENDOR_DATA_DEFS_H
18 
19 #include "hril_public_struct.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 typedef struct {
26     int32_t reason; /* Data call fail reason. success is 0 */
27     int32_t retryTime; /* if errorCode != 0, suggested retry time */
28     int32_t cid; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
29                   * specifies a particular PDP context definition. The parameter is local to the TE-MT interface and
30                   * is used in other PDP context-related commands. */
31     int32_t active; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
32                      * indicates the state of PDP context activation
33                      * 0 - deactivated
34                      * 1 - activated */
35     char *type; /* PDP_type values from 3GPP TS 27.007 V17.3.0 (2021-09)
36                  * specifies the type of packet data protocol. The default value is manufacturer specific. */
37     char *netPortName; /* Network interface name */
38     char *address; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
39                     * <local_addr and subnet_mask>: string type;
40                     * shows the IP address and subnet mask of the MT. The string is given as dot-separated
41                     * numeric (0-255) parameters on the form: "a1.a2.a3.a4.m1.m2.m3.m4" for IPv4 or
42                     * "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
43                     * m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16" for IPv6.
44                     * When +CGPIAF is supported, its settings can influence the format of this parameter returned
45                     * with the execute form of +CGCONTRDP */
46     char *dns; /* shows the IP address of the primary DNS server. */
47     char *dnsSec; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
48                    * string type; shows the IP address of the secondary DNS server.When +CGPIAF is supported,
49                    * its settings can influence the format of this parameter returned with the execute form of
50                    * +CGCONTRDP. */
51     char *gateway; /* shows the Gateway Address of the MT.
52                     * The string is given as dot-separated numeric (0- 255) parameters. */
53     int32_t maxTransferUnit; /* Maximum Transfer Unit. shows the IPv4 MTU size in octets. */
54     char *pCscfPrimAddr; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
55                           * string type; shows the IP address of the primary P-CSCF server.When +CGPIAF is
56                           * supported, its settings can 	 influence the format of this parameter returned with
57                           * the execute form of +CGCONTRDP. */
58     char *pCscfSecAddr; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
59                          * string type; shows the IP address of the secondary P-CSCF server. When +CGPIAF is
60                          * supported, its settings can influence the format of this parameter returned with the
61                          * execute form of +CGCONTRDP. */
62     int32_t pduSessionId; /* from 3GPP TS 27.007 V17.3.0 (2021-09)
63                            * integer type; identifies the PDU session, see 3GPP TS 24.501 [161]. */
64 } HRilDataCallResponse;
65 
66 typedef struct { /* from 3GPP TS 27.007 V17.3.0 (2021-09) */
67     int32_t cid; /* specifies a particular PDP context definition. The parameter is local to the TE-MT interface and
68                   * is used in other PDP context-related commands. */
69     int32_t reason; /* Reason for the data request. */
70     int32_t rat; /* Radio Access Technology */
71     int32_t roamingEnable; /* Roaming Enable. eg: 1--enable, 0--disnable */
72     int32_t verType; /* Authentication protocol used for this PDP context.
73                       * 0 None. Used to indicate that no authentication protocol is used for this PDP context.
74                       *    Username and password are removed if previously specified.
75                       * 1 PAP
76                       * 2 CHAP */
77     char *userName; /* User name for access to the IP network. */
78     char *password; /* Password for access to the IP network. */
79     char *apn; /* (Access Point Name) a string parameter
80                 * which is a logical name that is used to select the GGSN or the */
81     char *type; /* PDP_type values from 3GPP TS 27.007 section 10.1.1.
82                  * specifies the type of packet data protocol. The default value is manufacturer specific. */
83     char *roamingType; /* PDP_type values from 3GPP TS 27.007 section 10.1.1.
84                         * specifies the type of packet data protocol. The default value is manufacturer specific. */
85 } HRilDataInfo;
86 
87 typedef struct {
88     int32_t cid; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
89                   * integer type; specifies a particular QoS flow definition, Traffic Flows
90                   * definition and a PDP Context definition (see the +CGDCONT and +CGDSCONT commands). */
91     int32_t qi; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
92                  * 0 5QI is selected by network
93                  * [1 - 4] value range for guaranteed bit rate QoS flows
94                  * 65, 66, 67 values for guaranteed bit rate QoS flows
95                  * [71 - 76] value range for guaranteed bit rate QoS flows
96                  * [5 - 9] value range for non-guaranteed bit rate QoS flows
97                  * 69, 70, 79, 80 values for non-guaranteed bit rate QoS flows
98                  * [82 - 85] value range for delay critical guaranteed bit rate QoS flows
99                  * [128 - 254] value range for Operator-specific 5QIs */
100     int32_t dlGfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
101                      * integer type; indicates DL GFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
102                      * omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]) */
103     int32_t ulGfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
104                      * integer type; indicates UL GFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
105                      * omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
106     int32_t dlMfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
107                      * integer type; indicates DL MFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
108                      * omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
109     int32_t ulMfbr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
110                      * integer type; indicates UL MFBR in case of GBR 5QI. The value is in kbit/s. This parameter is
111                      * omitted for a non-GBR 5QI (see 3GPP TS 24.501 [161]). */
112     int32_t ulSambr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
113                       * integer type; indicates the UL session AMBR(see 3GPP TS 24.501 [161]).
114                       * The value is in kbit/s. */
115     int32_t dlSambr; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
116                       * integer type; indicates the DL session AMBR(see 3GPP TS 24.501 [161]).
117                       * The value is in kbit/s. */
118     int32_t averagingWindow; /* from 3GPP TS 27.007 10.1.50 V4.3.0 (2021-10)
119                               * integer type; indicates the averaging window(see 3GPP TS 24.501 [161]).
120                               * The value is in milliseconds. */
121 } HRilLinkBandwidthInfo;
122 
123 typedef struct {
124     RatType rat;
125     int32_t delayMs; /* integer type; (0,1,2,…) indicates the targeted time between request to transfer an SDU
126                       * at one SAP to its delivery at the other SAP, in milliseconds. If the parameter is set to
127                       * '0' the subscribed value will be requested (refer 3GPP TS 24.008 [8] clause 10.5.6.5). */
128     int32_t delayUplinkKbps;
129     int32_t delayDownlinkKbps;
130     int32_t maximumUplinkKbpsSize;
131     int32_t maximumDownlinkKbpsSize;
132     int32_t *maximumUplinkKbps;
133     int32_t *maximumDownlinkKbps;
134 } HRilLinkBandwidthReportingRule;
135 
136 typedef struct {
137     int32_t performanceEnable; /* Performance Enable. eg: 1-enable, 0-disable */
138     int32_t enforce; /* Whether Enforce Data Performance. eg: 1-enable, 0-disable */
139 } HRilDataPerformanceInfo;
140 
141 typedef struct {
142     int32_t sleepEnable; /* Sleep Mode Enable. eg: 1-enable, 0-disable */
143 } HRilDataSleepInfo;
144 
145 typedef struct {
146     void (*SetInitApnInfo)(const ReqDataInfo *requestInfo, const HRilDataInfo *data);
147     void (*ActivatePdpContext)(const ReqDataInfo *requestInfo, const HRilDataInfo *data);
148     void (*DeactivatePdpContext)(const ReqDataInfo *requestInfo, const HRilDataInfo *data);
149     void (*GetPdpContextList)(const ReqDataInfo *requestInfo);
150     void (*GetLinkBandwidthInfo)(const ReqDataInfo *requestInfo, int32_t cid);
151     void (*SetLinkBandwidthReportingRule)(const ReqDataInfo *requestInfo, const HRilLinkBandwidthReportingRule *data);
152     void (*SetDataProfileInfo)(const ReqDataInfo *requestInfo, const HRilDataInfo *data, int32_t len);
153     void (*SendDataPerformanceMode)(const ReqDataInfo *requestInfo, const HRilDataPerformanceInfo *data);
154     void (*SendDataSleepMode)(const ReqDataInfo *requestInfo, const HRilDataSleepInfo *data);
155     void (*SetDataPermitted)(const ReqDataInfo *requestInfo, int32_t enabled);
156 } HRilDataReq;
157 #ifdef __cplusplus
158 }
159 #endif
160 #endif // OHOS_RIL_VENDOR_DATA_DEFS_H
161