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