1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
/*
* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package android.hardware.radio@1.1;
import @1.0::CellInfo;
import @1.0::RadioError;
enum CardPowerState : int32_t {
POWER_DOWN,
POWER_UP,
POWER_UP_PASS_THROUGH,
};
enum RadioAccessNetworks : int32_t {
GERAN = 1, // GSM EDGE Radio Access Network
UTRAN = 2, // Universal Terrestrial Radio Access Network
EUTRAN = 3, // Evolved Universal Terrestrial Radio Access Network
};
enum GeranBands : int32_t {
BAND_T380 = 1,
BAND_T410 = 2,
BAND_450 = 3,
BAND_480 = 4,
BAND_710 = 5,
BAND_750 = 6,
BAND_T810 = 7,
BAND_850 = 8,
BAND_P900 = 9,
BAND_E900 = 10,
BAND_R900 = 11,
BAND_DCS1800 = 12,
BAND_PCS1900 = 13,
BAND_ER900 = 14,
};
enum UtranBands : int32_t {
BAND_1 = 1,
BAND_2 = 2,
BAND_3 = 3,
BAND_4 = 4,
BAND_5 = 5,
BAND_6 = 6,
BAND_7 = 7,
BAND_8 = 8,
BAND_9 = 9,
BAND_10 = 10,
BAND_11 = 11,
BAND_12 = 12,
BAND_13 = 13,
BAND_14 = 14,
BAND_19 = 19,
BAND_20 = 20,
BAND_21 = 21,
BAND_22 = 22,
BAND_25 = 25,
BAND_26 = 26,
};
enum EutranBands : int32_t {
BAND_1 = 1,
BAND_2 = 2,
BAND_3 = 3,
BAND_4 = 4,
BAND_5 = 5,
BAND_6 = 6,
BAND_7 = 7,
BAND_8 = 8,
BAND_9 = 9,
BAND_10 = 10,
BAND_11 = 11,
BAND_12 = 12,
BAND_13 = 13,
BAND_14 = 14,
BAND_17 = 17,
BAND_18 = 18,
BAND_19 = 19,
BAND_20 = 20,
BAND_21 = 21,
BAND_22 = 22,
BAND_23 = 23,
BAND_24 = 24,
BAND_25 = 25,
BAND_26 = 26,
BAND_27 = 27,
BAND_28 = 28,
BAND_30 = 30,
BAND_31 = 31,
BAND_33 = 33,
BAND_34 = 34,
BAND_35 = 35,
BAND_36 = 36,
BAND_37 = 37,
BAND_38 = 38,
BAND_39 = 39,
BAND_40 = 40,
BAND_41 = 41,
BAND_42 = 42,
BAND_43 = 43,
BAND_44 = 44,
BAND_45 = 45,
BAND_46 = 46,
BAND_47 = 47,
BAND_48 = 48,
BAND_65 = 65,
BAND_66 = 66,
BAND_68 = 68,
BAND_70 = 70,
};
enum ScanType : int32_t {
ONE_SHOT = 0, // Performs the scan only once
PERIODIC = 1, // Performs the scan periodically until cancelled
};
enum ScanStatus : int32_t {
PARTIAL = 1, // The result contains a part of the scan results
COMPLETE = 2, // The result contains the last part of the scan results
};
enum KeepaliveType : int32_t {
NATT_IPV4 = 0, // Keepalive specified by RFC 3948 Sec. 2.3 using IPv4
NATT_IPV6 = 1, // Keepalive specified by RFC 3948 Sec. 2.3 using IPv6
};
enum KeepaliveStatusCode : int32_t {
ACTIVE, // Keepalive is currently active
INACTIVE, // Keepalive is inactive, which indicates an error
PENDING, // Requested keepalive has not yet been processed by
// the modem. Only allowed in a RESPONSE message to
// a REQUEST
};
struct RadioAccessSpecifier {
RadioAccessNetworks radioAccessNetwork; // The type of network to scan
vec<GeranBands> geranBands; // Valid only if radioAccessNetwork = GERAN
// otherwise must be empty
// Maximum length of the vector is 8
vec<UtranBands> utranBands; // Valid only if radioAccessNetwork = UTRAN
// otherwise must be empty
// Maximum length of the vector is 8
vec<EutranBands> eutranBands; // Valid only if radioAccessNetwork = EUTRAN
// otherwise must be empty
// Maximum length of the vector is 8
vec<int32_t> channels; // The radio channels to scan as defined in
// 3GPP TS 25.101 and 36.101
// Maximum length of the vector is 32
};
struct NetworkScanRequest {
ScanType type; // One shot scan or periodic
int32_t interval; // Time interval in seconds between periodic scans, only
// valid when type = PERIODIC
// Range: 5 to 600
vec<RadioAccessSpecifier> specifiers; // networks with bands/channels to scan
// Maximum length of the vector is 8
};
struct NetworkScanResult {
ScanStatus status; // The status of the scan
RadioError error; // The error code of the incremental result
vec<CellInfo> networkInfos; // List of network information as CellInfo
};
struct KeepaliveRequest {
KeepaliveType type; // The format of the keepalive packet
vec<uint8_t> sourceAddress; // source address with type = family, in network
// byte order
int32_t sourcePort; // source port if relevant for the given type
// INT_MAX: 0x7FFFFFFF denotes that the field is unused
vec<uint8_t> destinationAddress; // destination address with type = family, in network
// byte order
int32_t destinationPort; // destination if relevant for the given type
// INT_MAX: 0x7FFFFFFF denotes that the field is unused
int32_t maxKeepaliveIntervalMillis; // the max interval between packets, in milliseconds
int32_t cid; // Context ID, returned in setupDataCallResponse
// that uniquely identifies the data call to which
// this keepalive must applied
};
struct KeepaliveStatus {
int32_t sessionHandle; // the sessionHandle provided by the api
KeepaliveStatusCode code; // status for the given keepalive
};
struct ImsiEncryptionInfo {
string mcc; // MCC of the Carrier.
string mnc; // MNC of the Carrier.
vec<uint8_t> carrierKey; // Carrier specific key to be used for encryption. It must
// be opaque to the framework. This is the byte-stream
// representation of the key. This is an external encoded
// form for the key used when a standard representation of
// the key is needed outside the Java Virtual Machine, as
// when transmitting the key to some other party.
// The key is encoded according to a standard format
// (such as X.509 SubjectPublicKeyInfo or PKCS#8), and is
// returned using the getEncoded method as defined on the
// java.security.Key interface.
string keyIdentifier; // This is an opaque value we're given by the carrier
// and is returned to the carrier. This is used by the server to
// help it locate the private key to decrypt the permanent
// identity.
int64_t expirationTime; // date-time in UTC when the key will expire.
};
|