Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 1 | /* GSM Network Management messages on the A-bis interface |
| 2 | * 3GPP TS 12.21 version 8.0.0 Release 1999 / ETSI TS 100 623 V8.0.0 */ |
| 3 | |
Harald Welte | 4724f99 | 2009-01-18 18:01:49 +0000 | [diff] [blame] | 4 | /* (C) 2008-2009 by Harald Welte <laforge@gnumonks.org> |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 5 | * All Rights Reserved |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along |
| 18 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 19 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | * |
| 21 | */ |
| 22 | |
| 23 | #ifndef _NM_H |
| 24 | #define _NM_H |
| 25 | |
| 26 | #include <sys/types.h> |
| 27 | |
Harald Welte | 0313394 | 2009-02-18 19:51:53 +0000 | [diff] [blame] | 28 | #include <openbsc/tlv.h> |
| 29 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 30 | /* PRIVATE */ |
| 31 | |
Harald Welte | 47d88ae | 2009-01-04 12:02:08 +0000 | [diff] [blame] | 32 | /* generic header in front of every OML message according to TS 08.59 */ |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 33 | struct abis_om_hdr { |
| 34 | u_int8_t mdisc; |
| 35 | u_int8_t placement; |
| 36 | u_int8_t sequence; |
| 37 | u_int8_t length; |
| 38 | u_int8_t data[0]; |
| 39 | } __attribute__ ((packed)); |
| 40 | |
| 41 | #define ABIS_OM_MDISC_FOM 0x80 |
| 42 | #define ABIS_OM_MDISC_MMI 0x40 |
| 43 | #define ABIS_OM_MDISC_TRAU 0x20 |
| 44 | #define ABIS_OM_MDISC_MANUF 0x10 |
| 45 | #define ABIS_OM_PLACEMENT_ONLY 0x80 |
| 46 | #define ABIS_OM_PLACEMENT_FIRST 0x40 |
| 47 | #define ABIS_OM_PLACEMENT_MIDDLE 0x20 |
| 48 | #define ABIS_OM_PLACEMENT_LAST 0x10 |
| 49 | |
| 50 | struct abis_om_obj_inst { |
| 51 | u_int8_t bts_nr; |
| 52 | u_int8_t trx_nr; |
| 53 | u_int8_t ts_nr; |
| 54 | } __attribute__ ((packed)); |
| 55 | |
| 56 | struct abis_om_fom_hdr { |
| 57 | u_int8_t msg_type; |
| 58 | u_int8_t obj_class; |
| 59 | struct abis_om_obj_inst obj_inst; |
Harald Welte | f3066bb | 2009-01-18 19:02:46 +0000 | [diff] [blame] | 60 | u_int8_t data[0]; |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 61 | } __attribute__ ((packed)); |
| 62 | |
| 63 | #define ABIS_OM_FOM_HDR_SIZE (sizeof(struct abis_om_hdr) + sizeof(struct abis_om_fom_hdr)) |
| 64 | |
| 65 | /* Section 9.1: Message Types */ |
| 66 | enum abis_nm_msgtype { |
| 67 | /* SW Download Management Messages */ |
| 68 | NM_MT_LOAD_INIT = 0x01, |
| 69 | NM_MT_LOAD_INIT_ACK, |
| 70 | NM_MT_LOAD_INIT_NACK, |
| 71 | NM_MT_LOAD_SEG, |
| 72 | NM_MT_LOAD_SEG_ACK, |
| 73 | NM_MT_LOAD_ABORT, |
| 74 | NM_MT_LOAD_END, |
| 75 | NM_MT_LOAD_END_ACK, |
| 76 | NM_MT_LOAD_END_NACK, |
| 77 | NM_MT_SW_ACT_REQ, /* BTS->BSC */ |
| 78 | NM_MT_SW_ACT_REQ_ACK, |
| 79 | NM_MT_SW_ACT_REQ_NACK, |
| 80 | NM_MT_ACTIVATE_SW, /* BSC->BTS */ |
| 81 | NM_MT_ACTIVATE_SW_ACK, |
| 82 | NM_MT_ACTIVATE_SW_NACK, |
| 83 | NM_MT_SW_ACTIVATED_REP, /* 0x10 */ |
| 84 | /* A-bis Interface Management Messages */ |
| 85 | NM_MT_ESTABLISH_TEI = 0x21, |
| 86 | NM_MT_ESTABLISH_TEI_ACK, |
| 87 | NM_MT_ESTABLISH_TEI_NACK, |
| 88 | NM_MT_CONN_TERR_SIGN, |
| 89 | NM_MT_CONN_TERR_SIGN_ACK, |
| 90 | NM_MT_CONN_TERR_SIGN_NACK, |
| 91 | NM_MT_DISC_TERR_SIGN, |
| 92 | NM_MT_DISC_TERR_SIGN_ACK, |
| 93 | NM_MT_DISC_TERR_SIGN_NACK, |
| 94 | NM_MT_CONN_TERR_TRAF, |
| 95 | NM_MT_CONN_TERR_TRAF_ACK, |
| 96 | NM_MT_CONN_TERR_TRAF_NACK, |
| 97 | NM_MT_DISC_TERR_TRAF, |
| 98 | NM_MT_DISC_TERR_TRAF_ACK, |
| 99 | NM_MT_DISC_TERR_TRAF_NACK, |
| 100 | /* Transmission Management Messages */ |
| 101 | NM_MT_CONN_MDROP_LINK = 0x31, |
| 102 | NM_MT_CONN_MDROP_LINK_ACK, |
| 103 | NM_MT_CONN_MDROP_LINK_NACK, |
| 104 | NM_MT_DISC_MDROP_LINK, |
| 105 | NM_MT_DISC_MDROP_LINK_ACK, |
| 106 | NM_MT_DISC_MDROP_LINK_NACK, |
| 107 | /* Air Interface Management Messages */ |
| 108 | NM_MT_SET_BTS_ATTR = 0x41, |
| 109 | NM_MT_SET_BTS_ATTR_ACK, |
| 110 | NM_MT_SET_BTS_ATTR_NACK, |
| 111 | NM_MT_SET_RADIO_ATTR, |
| 112 | NM_MT_SET_RADIO_ATTR_ACK, |
| 113 | NM_MT_SET_RADIO_ATTR_NACK, |
| 114 | NM_MT_SET_CHAN_ATTR, |
| 115 | NM_MT_SET_CHAN_ATTR_ACK, |
| 116 | NM_MT_SET_CHAN_ATTR_NACK, |
| 117 | /* Test Management Messages */ |
| 118 | NM_MT_PERF_TEST = 0x51, |
Harald Welte | 244b94b | 2009-06-25 08:23:19 +0200 | [diff] [blame] | 119 | NM_MT_PERF_TEST_ACK, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 120 | NM_MT_PERF_TEST_NACK, |
| 121 | NM_MT_TEST_REP, |
| 122 | NM_MT_SEND_TEST_REP, |
| 123 | NM_MT_SEND_TEST_REP_ACK, |
| 124 | NM_MT_SEND_TEST_REP_NACK, |
| 125 | NM_MT_STOP_TEST, |
| 126 | NM_MT_STOP_TEST_ACK, |
| 127 | NM_MT_STOP_TEST_NACK, |
| 128 | /* State Management and Event Report Messages */ |
| 129 | NM_MT_STATECHG_EVENT_REP = 0x61, |
| 130 | NM_MT_FAILURE_EVENT_REP, |
| 131 | NM_MT_STOP_EVENT_REP, |
| 132 | NM_MT_STOP_EVENT_REP_ACK, |
| 133 | NM_MT_STOP_EVENT_REP_NACK, |
| 134 | NM_MT_REST_EVENT_REP, |
| 135 | NM_MT_REST_EVENT_REP_ACK, |
| 136 | NM_MT_REST_EVENT_REP_NACK, |
| 137 | NM_MT_CHG_ADM_STATE, |
| 138 | NM_MT_CHG_ADM_STATE_ACK, |
| 139 | NM_MT_CHG_ADM_STATE_NACK, |
| 140 | NM_MT_CHG_ADM_STATE_REQ, |
| 141 | NM_MT_CHG_ADM_STATE_REQ_ACK, |
| 142 | NM_MT_CHG_ADM_STATE_REQ_NACK, |
| 143 | NM_MT_REP_OUTST_ALARMS = 0x93, |
| 144 | NM_MT_REP_OUTST_ALARMS_ACK, |
| 145 | NM_MT_REP_OUTST_ALARMS_NACK, |
| 146 | /* Equipment Management Messages */ |
| 147 | NM_MT_CHANGEOVER = 0x71, |
| 148 | NM_MT_CHANGEOVER_ACK, |
| 149 | NM_MT_CHANGEOVER_NACK, |
| 150 | NM_MT_OPSTART, |
| 151 | NM_MT_OPSTART_ACK, |
| 152 | NM_MT_OPSTART_NACK, |
| 153 | NM_MT_REINIT, |
| 154 | NM_MT_REINIT_ACK, |
| 155 | NM_MT_REINIT_NACK, |
Harald Welte | 47d88ae | 2009-01-04 12:02:08 +0000 | [diff] [blame] | 156 | NM_MT_SET_SITE_OUT, /* BS11: get alarm ?!? */ |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 157 | NM_MT_SET_SITE_OUT_ACK, |
| 158 | NM_MT_SET_SITE_OUT_NACK, |
| 159 | NM_MT_CHG_HW_CONF = 0x90, |
| 160 | NM_MT_CHG_HW_CONF_ACK, |
| 161 | NM_MT_CHG_HW_CONF_NACK, |
| 162 | /* Measurement Management Messages */ |
| 163 | NM_MT_MEAS_RES_REQ = 0x8a, |
| 164 | NM_MT_MEAS_RES_RESP, |
| 165 | NM_MT_STOP_MEAS, |
| 166 | NM_MT_START_MEAS, |
| 167 | /* Other Messages */ |
| 168 | NM_MT_GET_ATTR = 0x81, |
| 169 | NM_MT_GET_ATTR_RESP, |
| 170 | NM_MT_GET_ATTR_NACK, |
| 171 | NM_MT_SET_ALARM_THRES, |
| 172 | NM_MT_SET_ALARM_THRES_ACK, |
| 173 | NM_MT_SET_ALARM_THRES_NACK, |
Harald Welte | 677c21f | 2009-02-17 13:22:23 +0000 | [diff] [blame] | 174 | }; |
| 175 | |
| 176 | enum abis_nm_msgtype_bs11 { |
Harald Welte | 4668fda | 2009-01-03 08:19:29 +0000 | [diff] [blame] | 177 | NM_MT_BS11_RESET_RESOURCE = 0x74, |
| 178 | |
| 179 | NM_MT_BS11_BEGIN_DB_TX = 0xa3, |
| 180 | NM_MT_BS11_BEGIN_DB_TX_ACK, |
| 181 | NM_MT_BS11_BEGIN_DB_TX_NACK, |
| 182 | NM_MT_BS11_END_DB_TX = 0xa6, |
| 183 | NM_MT_BS11_END_DB_TX_ACK, |
| 184 | NM_MT_BS11_END_DB_TX_NACK, |
| 185 | NM_MT_BS11_CREATE_OBJ = 0xa9, |
| 186 | NM_MT_BS11_CREATE_OBJ_ACK, |
| 187 | NM_MT_BS11_CREATE_OBJ_NACK, |
| 188 | NM_MT_BS11_DELETE_OBJ = 0xac, |
| 189 | NM_MT_BS11_DELETE_OBJ_ACK, |
| 190 | NM_MT_BS11_DELETE_OBJ_NACK, |
| 191 | |
Harald Welte | adaf08b | 2009-01-18 11:08:10 +0000 | [diff] [blame] | 192 | NM_MT_BS11_SET_ATTR = 0xd0, |
| 193 | NM_MT_BS11_SET_ATTR_ACK, |
Harald Welte | 5659d66 | 2009-02-21 20:45:39 +0000 | [diff] [blame] | 194 | NM_MT_BS11_SET_ATTR_NACK, |
Harald Welte | a7dbe49 | 2009-02-06 16:44:37 +0000 | [diff] [blame] | 195 | NM_MT_BS11_LMT_SESSION = 0xdc, |
Harald Welte | 4668fda | 2009-01-03 08:19:29 +0000 | [diff] [blame] | 196 | |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 197 | NM_MT_BS11_GET_STATE = 0xe3, |
| 198 | NM_MT_BS11_GET_STATE_ACK, |
Harald Welte | 043d04a | 2009-01-29 23:15:30 +0000 | [diff] [blame] | 199 | NM_MT_BS11_LMT_LOGON = 0xe5, |
| 200 | NM_MT_BS11_LMT_LOGON_ACK, |
Harald Welte | 4668fda | 2009-01-03 08:19:29 +0000 | [diff] [blame] | 201 | NM_MT_BS11_RESTART = 0xe7, |
Harald Welte | adaf08b | 2009-01-18 11:08:10 +0000 | [diff] [blame] | 202 | NM_MT_BS11_RESTART_ACK, |
Harald Welte | 4668fda | 2009-01-03 08:19:29 +0000 | [diff] [blame] | 203 | NM_MT_BS11_DISCONNECT = 0xe9, |
Harald Welte | adaf08b | 2009-01-18 11:08:10 +0000 | [diff] [blame] | 204 | NM_MT_BS11_DISCONNECT_ACK, |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 205 | NM_MT_BS11_LMT_LOGOFF = 0xec, |
| 206 | NM_MT_BS11_LMT_LOGOFF_ACK, |
Harald Welte | 4668fda | 2009-01-03 08:19:29 +0000 | [diff] [blame] | 207 | NM_MT_BS11_RECONNECT = 0xf1, |
Harald Welte | adaf08b | 2009-01-18 11:08:10 +0000 | [diff] [blame] | 208 | NM_MT_BS11_RECONNECT_ACK, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 209 | }; |
| 210 | |
Harald Welte | 677c21f | 2009-02-17 13:22:23 +0000 | [diff] [blame] | 211 | enum abis_nm_msgtype_ipacc { |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 212 | NM_MT_IPACC_RESTART = 0x87, |
| 213 | NM_MT_IPACC_RESTART_ACK, |
Harald Welte | 677c21f | 2009-02-17 13:22:23 +0000 | [diff] [blame] | 214 | NM_MT_IPACC_RSL_CONNECT = 0xe0, |
| 215 | NM_MT_IPACC_RSL_CONNECT_ACK, |
| 216 | NM_MT_IPACC_RSL_CONNECT_NACK, |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 217 | NM_MT_IPACC_RSL_DISCONNECT = 0xe3, |
| 218 | NM_MT_IPACC_RSL_DISCONNECT_ACK, |
| 219 | NM_MT_IPACC_RSL_DISCONNECT_NACK, |
| 220 | NM_MT_IPACC_CONN_TRAF = 0xe6, |
| 221 | NM_MT_IPACC_CONN_TRAF_ACK, |
| 222 | NM_MT_IPACC_CONN_TRAF_NACK, |
| 223 | NM_MT_IPACC_DEF_BOOT_SW = 0xec, |
| 224 | NM_MT_IPACC_DEF_BOOT_SW_ACK, |
| 225 | MN_MT_IPACC_DEF_BOOT_SW_NACK, |
Harald Welte | 193fefc | 2009-04-30 15:16:27 +0000 | [diff] [blame] | 226 | NM_MT_IPACC_SET_NVATTR = 0xef, |
| 227 | NM_MT_IPACC_SET_NVATTR_ACK, |
| 228 | NM_MT_IPACC_SET_NVATTR_NACK, |
| 229 | NM_MT_IPACC_GET_NVATTR = 0xf2, |
| 230 | NM_MT_IPACC_GET_NVATTR_ACK, |
| 231 | NM_MT_IPACC_GET_NVATTR_NACK, |
Harald Welte | 53f4b10 | 2009-09-23 00:32:40 +0900 | [diff] [blame] | 232 | NM_MT_IPACC_SET_ATTR = 0xf5, |
| 233 | NM_MT_IPACC_SET_ATTR_ACK, |
| 234 | NM_MT_IPACC_SET_ATTR_NACK, |
Harald Welte | 677c21f | 2009-02-17 13:22:23 +0000 | [diff] [blame] | 235 | }; |
| 236 | |
Harald Welte | 7b26bcb | 2009-05-28 11:39:21 +0000 | [diff] [blame] | 237 | enum abis_nm_bs11_cell_alloc { |
| 238 | NM_BS11_CANR_GSM = 0x00, |
| 239 | NM_BS11_CANR_DCS1800 = 0x01, |
| 240 | }; |
| 241 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 242 | /* Section 9.2: Object Class */ |
| 243 | enum abis_nm_obj_class { |
| 244 | NM_OC_SITE_MANAGER = 0x00, |
| 245 | NM_OC_BTS, |
| 246 | NM_OC_RADIO_CARRIER, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 247 | NM_OC_CHANNEL, |
Harald Welte | 34a9968 | 2009-02-13 02:41:40 +0000 | [diff] [blame] | 248 | NM_OC_BASEB_TRANSC, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 249 | /* RFU: 05-FE */ |
Harald Welte | d83a127 | 2009-07-12 10:56:06 +0200 | [diff] [blame] | 250 | |
| 251 | NM_OC_IPAC_E1_TRUNK = 0x0e, |
| 252 | NM_OC_IPAC_E1_PORT = 0x0f, |
| 253 | NM_OC_IPAC_E1_CHAN = 0x10, |
| 254 | NM_OC_IPAC_CLK_MODULE = 0x22, |
| 255 | |
Harald Welte | 7b26bcb | 2009-05-28 11:39:21 +0000 | [diff] [blame] | 256 | NM_OC_BS11_ADJC = 0xa0, |
Harald Welte | 110c0ab | 2009-05-23 16:27:05 +0000 | [diff] [blame] | 257 | NM_OC_BS11_HANDOVER = 0xa1, |
| 258 | NM_OC_BS11_PWR_CTRL = 0xa2, |
Harald Welte | 7b26bcb | 2009-05-28 11:39:21 +0000 | [diff] [blame] | 259 | NM_OC_BS11_BTSE = 0xa3, /* LMT? */ |
| 260 | NM_OC_BS11_RACK = 0xa4, |
| 261 | NM_OC_BS11 = 0xa5, /* 01: ALCO */ |
| 262 | NM_OC_BS11_TEST = 0xa6, |
Harald Welte | 47d88ae | 2009-01-04 12:02:08 +0000 | [diff] [blame] | 263 | NM_OC_BS11_ENVABTSE = 0xa8, |
| 264 | NM_OC_BS11_BPORT = 0xa9, |
Harald Welte | 4668fda | 2009-01-03 08:19:29 +0000 | [diff] [blame] | 265 | |
Harald Welte | 5c1e458 | 2009-02-15 11:57:29 +0000 | [diff] [blame] | 266 | NM_OC_GPRS_NSE = 0xf0, |
| 267 | NM_OC_GPRS_CELL = 0xf1, |
Harald Welte | d83a127 | 2009-07-12 10:56:06 +0200 | [diff] [blame] | 268 | NM_OC_GPRS_NSVC = 0xf2, |
Harald Welte | 5c1e458 | 2009-02-15 11:57:29 +0000 | [diff] [blame] | 269 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 270 | NM_OC_NULL = 0xff, |
| 271 | }; |
| 272 | |
| 273 | /* Section 9.4: Attributes */ |
| 274 | enum abis_nm_attr { |
Harald Welte | adaf08b | 2009-01-18 11:08:10 +0000 | [diff] [blame] | 275 | NM_ATT_ABIS_CHANNEL = 0x01, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 276 | NM_ATT_ADD_INFO, |
| 277 | NM_ATT_ADD_TEXT, |
| 278 | NM_ATT_ADM_STATE, |
| 279 | NM_ATT_ARFCN_LIST, |
| 280 | NM_ATT_AUTON_REPORT, |
| 281 | NM_ATT_AVAIL_STATUS, |
| 282 | NM_ATT_BCCH_ARFCN, |
| 283 | NM_ATT_BSIC, |
| 284 | NM_ATT_BTS_AIR_TIMER, |
| 285 | NM_ATT_CCCH_L_I_P, |
| 286 | NM_ATT_CCCH_L_T, |
| 287 | NM_ATT_CHAN_COMB, |
| 288 | NM_ATT_CONN_FAIL_CRIT, |
| 289 | NM_ATT_DEST, |
| 290 | /* res */ |
Harald Welte | 47d88ae | 2009-01-04 12:02:08 +0000 | [diff] [blame] | 291 | NM_ATT_EVENT_TYPE = 0x11, /* BS11: file data ?!? */ |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 292 | NM_ATT_FILE_ID, |
| 293 | NM_ATT_FILE_VERSION, |
| 294 | NM_ATT_GSM_TIME, |
| 295 | NM_ATT_HSN, |
| 296 | NM_ATT_HW_CONFIG, |
| 297 | NM_ATT_HW_DESC, |
| 298 | NM_ATT_INTAVE_PARAM, |
| 299 | NM_ATT_INTERF_BOUND, |
| 300 | NM_ATT_LIST_REQ_ATTR, |
| 301 | NM_ATT_MAIO, |
| 302 | NM_ATT_MANUF_STATE, |
| 303 | NM_ATT_MANUF_THRESH, |
| 304 | NM_ATT_MANUF_ID, |
| 305 | NM_ATT_MAX_TA, |
| 306 | NM_ATT_MDROP_LINK, /* 0x20 */ |
| 307 | NM_ATT_MDROP_NEXT, |
| 308 | NM_ATT_NACK_CAUSES, |
| 309 | NM_ATT_NY1, |
| 310 | NM_ATT_OPER_STATE, |
| 311 | NM_ATT_OVERL_PERIOD, |
| 312 | NM_ATT_PHYS_CONF, |
| 313 | NM_ATT_POWER_CLASS, |
| 314 | NM_ATT_POWER_THRESH, |
| 315 | NM_ATT_PROB_CAUSE, |
| 316 | NM_ATT_RACH_B_THRESH, |
| 317 | NM_ATT_LDAVG_SLOTS, |
| 318 | NM_ATT_RAD_SUBC, |
| 319 | NM_ATT_RF_MAXPOWR_R, |
| 320 | NM_ATT_SITE_INPUTS, |
| 321 | NM_ATT_SITE_OUTPUTS, |
| 322 | NM_ATT_SOURCE, /* 0x30 */ |
| 323 | NM_ATT_SPEC_PROB, |
| 324 | NM_ATT_START_TIME, |
| 325 | NM_ATT_T200, |
| 326 | NM_ATT_TEI, |
| 327 | NM_ATT_TEST_DUR, |
| 328 | NM_ATT_TEST_NO, |
| 329 | NM_ATT_TEST_REPORT, |
| 330 | NM_ATT_VSWR_THRESH, |
| 331 | NM_ATT_WINDOW_SIZE, |
| 332 | /* Res */ |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 333 | NM_ATT_BS11_RSSI_OFFS = 0x3d, |
Harald Welte | adaf08b | 2009-01-18 11:08:10 +0000 | [diff] [blame] | 334 | NM_ATT_BS11_TXPWR = 0x3e, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 335 | NM_ATT_BS11_DIVERSITY = 0x3f, |
Harald Welte | adaf08b | 2009-01-18 11:08:10 +0000 | [diff] [blame] | 336 | /* Res */ |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 337 | NM_ATT_TSC = 0x40, |
| 338 | NM_ATT_SW_CONFIG, |
| 339 | NM_ATT_SW_DESCR, |
| 340 | NM_ATT_SEVERITY, |
| 341 | NM_ATT_GET_ARI, |
| 342 | NM_ATT_HW_CONF_CHG, |
| 343 | NM_ATT_OUTST_ALARM, |
| 344 | NM_ATT_FILE_DATA, |
| 345 | NM_ATT_MEAS_RES, |
| 346 | NM_ATT_MEAS_TYPE, |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 347 | |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 348 | NM_ATT_BS11_ESN_FW_CODE_NO = 0x4c, |
| 349 | NM_ATT_BS11_ESN_HW_CODE_NO = 0x4f, |
| 350 | |
| 351 | NM_ATT_BS11_ESN_PCB_SERIAL = 0x55, |
Harald Welte | cd99387 | 2009-02-15 16:16:28 +0000 | [diff] [blame] | 352 | NM_ATT_BS11_EXCESSIVE_DISTANCE = 0x58, |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 353 | |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 354 | NM_ATT_BS11_ALL_TEST_CATG = 0x60, |
| 355 | NM_ATT_BS11_BTSLS_HOPPING, |
| 356 | NM_ATT_BS11_CELL_ALLOC_NR, |
Harald Welte | 244b94b | 2009-06-25 08:23:19 +0200 | [diff] [blame] | 357 | NM_ATT_BS11_CELL_GLOBAL_ID, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 358 | NM_ATT_BS11_ENA_INTERF_CLASS = 0x66, |
| 359 | NM_ATT_BS11_ENA_INT_INTEC_HANDO = 0x67, |
| 360 | NM_ATT_BS11_ENA_INT_INTRC_HANDO = 0x68, |
| 361 | NM_ATT_BS11_ENA_MS_PWR_CTRL = 0x69, |
| 362 | NM_ATT_BS11_ENA_PWR_BDGT_HO = 0x6a, |
| 363 | NM_ATT_BS11_ENA_PWR_CTRL_RLFW = 0x6b, |
| 364 | NM_ATT_BS11_ENA_RXLEV_HO = 0x6c, |
| 365 | NM_ATT_BS11_ENA_RXQUAL_HO = 0x6d, |
Harald Welte | cd99387 | 2009-02-15 16:16:28 +0000 | [diff] [blame] | 366 | NM_ATT_BS11_FACCH_QUAL = 0x6e, |
| 367 | |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 368 | NM_ATT_IPACC_DST_IP = 0x80, |
| 369 | NM_ATT_IPACC_DST_IP_PORT = 0x81, |
| 370 | NM_ATT_IPACC_SSRC = 0x82, |
| 371 | NM_ATT_IPACC_RTP_PAYLD_TYPE = 0x83, |
| 372 | NM_ATT_IPACC_BASEB_ID = 0x84, |
| 373 | NM_ATT_IPACC_STREAM_ID = 0x85, |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 374 | NM_ATT_IPACC_NV_FLAGS = 0x86, |
| 375 | NM_ATT_IPACC_FREQ_CTRL = 0x87, |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 376 | NM_ATT_IPACC_PRIM_OML_CFG = 0x88, |
Harald Welte | a0c0b57 | 2009-07-03 12:46:27 +0200 | [diff] [blame] | 377 | NM_ATT_IPACC_SEC_OML_CFG = 0x89, |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 378 | NM_ATT_IPACC_IP_IF_CFG = 0x8a, /* IP interface */ |
| 379 | NM_ATT_IPACC_IP_GW_CFG = 0x8b, /* IP gateway */ |
| 380 | NM_ATT_IPACC_IN_SERV_TIME = 0x8c, |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 381 | NM_ATT_IPACC_TRX_BTS_ASS = 0x8d, |
Harald Welte | 193fefc | 2009-04-30 15:16:27 +0000 | [diff] [blame] | 382 | NM_ATT_IPACC_LOCATION = 0x8e, /* string describing location */ |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 383 | NM_ATT_IPACC_PAGING_CFG = 0x8f, |
| 384 | NM_ATT_IPACC_FILE_DATA = 0x90, |
Harald Welte | 25de991 | 2009-04-30 15:53:07 +0000 | [diff] [blame] | 385 | NM_ATT_IPACC_UNIT_ID = 0x91, /* Site/BTS/TRX */ |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 386 | NM_ATT_IPACC_PARENT_UNIT_ID = 0x92, |
Harald Welte | 193fefc | 2009-04-30 15:16:27 +0000 | [diff] [blame] | 387 | NM_ATT_IPACC_UNIT_NAME = 0x93, /* default: nbts-<mac-as-string> */ |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 388 | NM_ATT_IPACC_SNMP_CFG = 0x94, |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 389 | NM_ATT_IPACC_PRIM_OML_CFG_LIST = 0x95, |
| 390 | NM_ATT_IPACC_PRIM_OML_FB_TOUT = 0x96, |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 391 | NM_ATT_IPACC_CUR_SW_CFG = 0x97, |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 392 | NM_ATT_IPACC_TIMING_BUS = 0x98, |
| 393 | NM_ATT_IPACC_CGI = 0x99, |
| 394 | NM_ATT_IPACC_RAC = 0x9a, |
| 395 | NM_ATT_IPACC_OBJ_VERSION = 0x9b, |
| 396 | NM_ATT_IPACC_GPRS_PAGING_CFG = 0x9c, |
| 397 | NM_ATT_IPACC_NSEI = 0x9d, |
| 398 | NM_ATT_IPACC_BVCI = 0x9e, |
| 399 | NM_ATT_IPACC_NSVCI = 0x9f, |
| 400 | NM_ATT_IPACC_NS_CFG = 0xa0, |
| 401 | NM_ATT_IPACC_BSSGP_CFG = 0xa1, |
| 402 | NM_ATT_IPACC_NS_LINK_CFG = 0xa2, |
| 403 | NM_ATT_IPACC_RLC_CFG = 0xa3, |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 404 | NM_ATT_IPACC_ALM_THRESH_LIST = 0xa4, |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 405 | NM_ATT_IPACC_MONIT_VAL_LIST = 0xa5, |
| 406 | NM_ATT_IPACC_TIB_CONTROL = 0xa6, |
| 407 | NM_ATT_IPACC_SUPP_FEATURES = 0xa7, |
| 408 | NM_ATT_IPACC_CODING_SCHEMES = 0xa8, |
| 409 | NM_ATT_IPACC_RLC_CFG_2 = 0xa9, |
| 410 | NM_ATT_IPACC_HEARTB_TOUT = 0xaa, |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 411 | NM_ATT_IPACC_UPTIME = 0xab, |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 412 | NM_ATT_IPACC_RLC_CFG_3 = 0xac, |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 413 | NM_ATT_IPACC_SSL_CFG = 0xad, |
| 414 | NM_ATT_IPACC_SEC_POSSIBLE = 0xae, |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 415 | NM_ATT_IPACC_IML_SSL_STATE = 0xaf, |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 416 | NM_ATT_IPACC_REVOC_DATE = 0xb0, |
| 417 | |
Harald Welte | 677c21f | 2009-02-17 13:22:23 +0000 | [diff] [blame] | 418 | |
Harald Welte | cd99387 | 2009-02-15 16:16:28 +0000 | [diff] [blame] | 419 | NM_ATT_BS11_RF_RES_IND_PER = 0x8f, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 420 | |
| 421 | NM_ATT_BS11_RX_LEV_MIN_CELL = 0x90, |
| 422 | NM_ATT_BS11_ABIS_EXT_TIME = 0x91, |
| 423 | NM_ATT_BS11_TIMER_HO_REQUEST = 0x92, |
| 424 | NM_ATT_BS11_TIMER_NCELL = 0x93, |
| 425 | NM_ATT_BS11_TSYNC = 0x94, |
| 426 | NM_ATT_BS11_TTRAU = 0x95, |
Harald Welte | cd99387 | 2009-02-15 16:16:28 +0000 | [diff] [blame] | 427 | NM_ATT_BS11_EMRG_CFG_MEMBER = 0x9b, |
| 428 | NM_ATT_BS11_TRX_AREA = 0x9f, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 429 | |
| 430 | NM_ATT_BS11_BCCH_RECONF = 0xd7, |
| 431 | NM_ATT_BS11_BIT_ERR_THESH = 0xa0, |
| 432 | NM_ATT_BS11_BOOT_SW_VERS = 0xa1, |
| 433 | NM_ATT_BS11_CCLK_ACCURACY = 0xa3, |
| 434 | NM_ATT_BS11_CCLK_TYPE = 0xa4, |
| 435 | NM_ATT_BS11_INP_IMPEDANCE = 0xaa, |
| 436 | NM_ATT_BS11_L1_PROT_TYPE = 0xab, |
| 437 | NM_ATT_BS11_LINE_CFG = 0xac, |
| 438 | NM_ATT_BS11_LI_PORT_1 = 0xad, |
| 439 | NM_ATT_BS11_LI_PORT_2 = 0xae, |
| 440 | |
| 441 | NM_ATT_BS11_L1_REM_ALM_TYPE = 0xb0, |
| 442 | NM_ATT_BS11_SW_LOAD_INTENDED = 0xbb, |
| 443 | NM_ATT_BS11_SW_LOAD_SAFETY = 0xbc, |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 444 | NM_ATT_BS11_SW_LOAD_STORED = 0xbd, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 445 | |
| 446 | NM_ATT_BS11_VENDOR_NAME = 0xc1, |
Harald Welte | cd99387 | 2009-02-15 16:16:28 +0000 | [diff] [blame] | 447 | NM_ATT_BS11_HOPPING_MODE = 0xc5, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 448 | NM_ATT_BS11_LMT_LOGON_SESSION = 0xc6, |
| 449 | NM_ATT_BS11_LMT_LOGIN_TIME = 0xc7, |
| 450 | NM_ATT_BS11_LMT_USER_ACC_LEV = 0xc8, |
| 451 | NM_ATT_BS11_LMT_USER_NAME = 0xc9, |
| 452 | |
| 453 | NM_ATT_BS11_L1_CONTROL_TS = 0xd8, |
Harald Welte | cd99387 | 2009-02-15 16:16:28 +0000 | [diff] [blame] | 454 | NM_ATT_BS11_RADIO_MEAS_GRAN = 0xdc, /* in SACCH multiframes */ |
| 455 | NM_ATT_BS11_RADIO_MEAS_REP = 0xdd, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 456 | |
Harald Welte | 110c0ab | 2009-05-23 16:27:05 +0000 | [diff] [blame] | 457 | NM_ATT_BS11_SH_LAPD_INT_TIMER = 0xe8, |
| 458 | |
Harald Welte | 0313394 | 2009-02-18 19:51:53 +0000 | [diff] [blame] | 459 | NM_ATT_BS11_BTS_STATE = 0xf0, |
| 460 | NM_ATT_BS11_E1_STATE = 0xf1, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 461 | NM_ATT_BS11_PLL = 0xf2, |
| 462 | NM_ATT_BS11_RX_OFFSET = 0xf3, |
| 463 | NM_ATT_BS11_ANT_TYPE = 0xf4, |
Harald Welte | e69f5fb | 2009-04-28 16:31:38 +0000 | [diff] [blame] | 464 | NM_ATT_BS11_PLL_MODE = 0xfc, |
Harald Welte | 934e68b | 2009-01-29 23:08:12 +0000 | [diff] [blame] | 465 | NM_ATT_BS11_PASSWORD = 0xfd, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 466 | }; |
Harald Welte | 3b8ba21 | 2009-01-29 12:27:58 +0000 | [diff] [blame] | 467 | #define NM_ATT_BS11_FILE_DATA NM_ATT_EVENT_TYPE |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 468 | |
| 469 | /* Section 9.4.4: Administrative State */ |
| 470 | enum abis_nm_adm_state { |
| 471 | NM_STATE_LOCKED = 0x01, |
| 472 | NM_STATE_UNLOCKED = 0x02, |
| 473 | NM_STATE_SHUTDOWN = 0x03, |
| 474 | NM_STATE_NULL = 0xff, |
| 475 | }; |
| 476 | |
Harald Welte | 2d820cc | 2009-09-23 00:49:06 +0900 | [diff] [blame] | 477 | /* Section 9.4.7: Administrative State */ |
| 478 | enum abis_nm_avail_state { |
| 479 | NM_AVSTATE_IN_TEST = 1, |
| 480 | NM_AVSTATE_POWER_OFF = 2, |
| 481 | NM_AVSTATE_OFF_LINE = 3, |
| 482 | NM_AVSTATE_DEPENDENCY = 5, |
| 483 | NM_AVSTATE_DEGRADED = 6, |
| 484 | NM_AVSTATE_NOT_INSTALLED= 7, |
| 485 | }; |
| 486 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 487 | /* Section 9.4.13: Channel Combination */ |
| 488 | enum abis_nm_chan_comb { |
Harald Welte | cf845cb | 2009-08-09 21:49:37 +0200 | [diff] [blame] | 489 | NM_CHANC_TCHFull = 0x00, /* TCH/F + TCH/H + SACCH/TF */ |
| 490 | NM_CHANC_TCHHalf = 0x01, /* TCH/H(0,1) + FACCH/H(0,1) + |
| 491 | SACCH/TH(0,1) */ |
| 492 | NM_CHANC_TCHHalf2 = 0x02, /* TCH/H(0) + FACCH/H(0) + SACCH/TH(0) + |
| 493 | TCH/H(1) */ |
| 494 | NM_CHANC_SDCCH = 0x03, /* SDCCH/8 + SACCH/8 */ |
| 495 | NM_CHANC_mainBCCH = 0x04, /* FCCH + SCH + BCCH + CCCH */ |
| 496 | NM_CHANC_BCCHComb = 0x05, /* FCCH + SCH + BCCH + CCCH + SDCCH/4 + |
| 497 | SACCH/C4 */ |
| 498 | NM_CHANC_BCCH = 0x06, /* BCCH + CCCH */ |
| 499 | NM_CHANC_BCCH_CBCH = 0x07, /* CHANC_BCCHComb + CBCH */ |
| 500 | NM_CHANC_SDCCH_CBCH = 0x08, /* CHANC_SDCCH8 + CBCH */ |
Harald Welte | ed640c4 | 2009-08-01 18:23:01 +0200 | [diff] [blame] | 501 | /* ip.access */ |
Harald Welte | cf845cb | 2009-08-09 21:49:37 +0200 | [diff] [blame] | 502 | NM_CHANC_IPAC_bPDCH = 0x0b, /* PBCCH + PCCCH + PDTCH/F + PACCH/F + |
| 503 | PTCCH/F */ |
Harald Welte | ed640c4 | 2009-08-01 18:23:01 +0200 | [diff] [blame] | 504 | NM_CHANC_IPAC_cPDCH = 0x0c, /* PBCCH + PDTCH/F + PACCH/F + PTCCH/F */ |
| 505 | NM_CHANC_IPAC_PDCH = 0x0d, /* PDTCH/F + PACCH/F + PTCCH/F */ |
| 506 | NM_CHANC_IPAC_TCHFull_PDCH = 0x80, |
| 507 | NM_CHANC_IPAC_TCHFull_TCHHalf = 0x81, |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 508 | }; |
| 509 | |
Harald Welte | 0db97b2 | 2009-05-01 17:22:47 +0000 | [diff] [blame] | 510 | /* Section 9.4.16: Event Type */ |
| 511 | enum abis_nm_event_type { |
| 512 | NM_EVT_COMM_FAIL = 0x00, |
| 513 | NM_EVT_QOS_FAIL = 0x01, |
| 514 | NM_EVT_PROC_FAIL = 0x02, |
| 515 | NM_EVT_EQUIP_FAIL = 0x03, |
| 516 | NM_EVT_ENV_FAIL = 0x04, |
| 517 | }; |
| 518 | |
| 519 | /* Section: 9.4.63: Perceived Severity */ |
| 520 | enum abis_nm_severity { |
| 521 | NM_SEVER_CEASED = 0x00, |
| 522 | NM_SEVER_CRITICAL = 0x01, |
| 523 | NM_SEVER_MAJOR = 0x02, |
| 524 | NM_SEVER_MINOR = 0x03, |
| 525 | NM_SEVER_WARNING = 0x04, |
| 526 | NM_SEVER_INDETERMINATE = 0x05, |
| 527 | }; |
| 528 | |
| 529 | /* Section 9.4.43: Probable Cause Type */ |
| 530 | enum abis_nm_pcause_type { |
| 531 | NM_PCAUSE_T_X721 = 0x01, |
| 532 | NM_PCAUSE_T_GSM = 0x02, |
| 533 | NM_PCAUSE_T_MANUF = 0x03, |
| 534 | }; |
| 535 | |
Harald Welte | e0590df | 2009-02-15 03:34:15 +0000 | [diff] [blame] | 536 | /* Section 9.4.36: NACK Causes */ |
| 537 | enum abis_nm_nack_cause { |
| 538 | /* General Nack Causes */ |
| 539 | NM_NACK_INCORR_STRUCT = 0x01, |
| 540 | NM_NACK_MSGTYPE_INVAL = 0x02, |
| 541 | NM_NACK_OBJCLASS_INVAL = 0x05, |
| 542 | NM_NACK_OBJCLASS_NOTSUPP = 0x06, |
| 543 | NM_NACK_BTSNR_UNKN = 0x07, |
| 544 | NM_NACK_TRXNR_UNKN = 0x08, |
| 545 | NM_NACK_OBJINST_UNKN = 0x09, |
| 546 | NM_NACK_ATTRID_INVAL = 0x0c, |
| 547 | NM_NACK_ATTRID_NOTSUPP = 0x0d, |
| 548 | NM_NACK_PARAM_RANGE = 0x0e, |
| 549 | NM_NACK_ATTRLIST_INCONSISTENT = 0x0f, |
| 550 | NM_NACK_SPEC_IMPL_NOTSUPP = 0x10, |
| 551 | NM_NACK_CANT_PERFORM = 0x11, |
| 552 | /* Specific Nack Causes */ |
| 553 | NM_NACK_RES_NOTIMPL = 0x19, |
| 554 | NM_NACK_RES_NOTAVAIL = 0x1a, |
| 555 | NM_NACK_FREQ_NOTAVAIL = 0x1b, |
| 556 | NM_NACK_TEST_NOTSUPP = 0x1c, |
| 557 | NM_NACK_CAPACITY_RESTR = 0x1d, |
| 558 | NM_NACK_PHYSCFG_NOTPERFORM = 0x1e, |
| 559 | NM_NACK_TEST_NOTINIT = 0x1f, |
| 560 | NM_NACK_PHYSCFG_NOTRESTORE = 0x20, |
| 561 | NM_NACK_TEST_NOSUCH = 0x21, |
| 562 | NM_NACK_TEST_NOSTOP = 0x22, |
| 563 | NM_NACK_MSGINCONSIST_PHYSCFG = 0x23, |
| 564 | NM_NACK_FILE_INCOMPLETE = 0x25, |
| 565 | NM_NACK_FILE_NOTAVAIL = 0x26, |
Harald Welte | 244b94b | 2009-06-25 08:23:19 +0200 | [diff] [blame] | 566 | NM_NACK_FILE_NOTACTIVATE = 0x27, |
Harald Welte | e0590df | 2009-02-15 03:34:15 +0000 | [diff] [blame] | 567 | NM_NACK_REQ_NOT_GRANT = 0x28, |
| 568 | NM_NACK_WAIT = 0x29, |
| 569 | NM_NACK_NOTH_REPORT_EXIST = 0x2a, |
| 570 | NM_NACK_MEAS_NOTSUPP = 0x2b, |
| 571 | NM_NACK_MEAS_NOTSTART = 0x2c, |
| 572 | }; |
| 573 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 574 | /* Section 9.4.1 */ |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 575 | struct abis_nm_channel { |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 576 | u_int8_t attrib; |
| 577 | u_int8_t bts_port; |
| 578 | u_int8_t timeslot; |
| 579 | u_int8_t subslot; |
| 580 | } __attribute__ ((packed)); |
| 581 | |
Harald Welte | 7b26bcb | 2009-05-28 11:39:21 +0000 | [diff] [blame] | 582 | /* Siemens BS-11 specific objects in the SienemsHW (0xA5) object class */ |
Harald Welte | 47d88ae | 2009-01-04 12:02:08 +0000 | [diff] [blame] | 583 | enum abis_bs11_objtype { |
| 584 | BS11_OBJ_ALCO = 0x01, |
| 585 | BS11_OBJ_BBSIG = 0x02, /* obj_class: 0,1 */ |
| 586 | BS11_OBJ_TRX1 = 0x03, /* only DEACTIVATE TRX1 */ |
| 587 | BS11_OBJ_CCLK = 0x04, |
| 588 | BS11_OBJ_GPSU = 0x06, |
| 589 | BS11_OBJ_LI = 0x07, |
| 590 | BS11_OBJ_PA = 0x09, /* obj_class: 0, 1*/ |
| 591 | }; |
| 592 | |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 593 | enum abis_bs11_trx_power { |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 594 | BS11_TRX_POWER_GSM_2W = 0x06, |
| 595 | BS11_TRX_POWER_GSM_250mW= 0x07, |
| 596 | BS11_TRX_POWER_GSM_80mW = 0x08, |
| 597 | BS11_TRX_POWER_GSM_30mW = 0x09, |
| 598 | BS11_TRX_POWER_DCS_3W = 0x0a, |
| 599 | BS11_TRX_POWER_DCS_1W6 = 0x0b, |
| 600 | BS11_TRX_POWER_DCS_500mW= 0x0c, |
| 601 | BS11_TRX_POWER_DCS_160mW= 0x0d, |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 602 | }; |
| 603 | |
Harald Welte | e69f5fb | 2009-04-28 16:31:38 +0000 | [diff] [blame] | 604 | enum abis_bs11_li_pll_mode { |
| 605 | BS11_LI_PLL_LOCKED = 2, |
| 606 | BS11_LI_PLL_STANDALONE = 3, |
| 607 | }; |
| 608 | |
Daniel Willmann | 65f68fa | 2009-08-10 11:49:36 +0200 | [diff] [blame] | 609 | enum abis_bs11_line_cfg { |
| 610 | BS11_LINE_CFG_STAR = 0x00, |
| 611 | BS11_LINE_CFG_MULTIDROP = 0x01, |
| 612 | BS11_LINE_CFG_LOOP = 0x02, |
| 613 | }; |
| 614 | |
Harald Welte | 268bb40 | 2009-02-01 19:11:56 +0000 | [diff] [blame] | 615 | enum abis_bs11_phase { |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 616 | BS11_STATE_SOFTWARE_RQD = 0x01, |
Harald Welte | 268bb40 | 2009-02-01 19:11:56 +0000 | [diff] [blame] | 617 | BS11_STATE_LOAD_SMU_INTENDED = 0x11, |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 618 | BS11_STATE_LOAD_SMU_SAFETY = 0x21, |
Harald Welte | c12d52b | 2009-02-01 21:39:06 +0000 | [diff] [blame] | 619 | BS11_STATE_LOAD_FAILED = 0x31, |
| 620 | BS11_STATE_LOAD_DIAGNOSTIC = 0x41, |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 621 | BS11_STATE_WARM_UP = 0x51, |
Harald Welte | c12d52b | 2009-02-01 21:39:06 +0000 | [diff] [blame] | 622 | BS11_STATE_WARM_UP_2 = 0x52, |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 623 | BS11_STATE_WAIT_MIN_CFG = 0x62, |
| 624 | BS11_STATE_MAINTENANCE = 0x72, |
Harald Welte | 268bb40 | 2009-02-01 19:11:56 +0000 | [diff] [blame] | 625 | BS11_STATE_LOAD_MBCCU = 0x92, |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 626 | BS11_STATE_WAIT_MIN_CFG_2 = 0xA2, |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 627 | BS11_STATE_NORMAL = 0x03, |
Harald Welte | 34a9968 | 2009-02-13 02:41:40 +0000 | [diff] [blame] | 628 | BS11_STATE_ABIS_LOAD = 0x13, |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 629 | }; |
| 630 | |
Harald Welte | 9446d32 | 2009-07-01 11:03:54 +0200 | [diff] [blame] | 631 | enum abis_nm_ipacc_test_no { |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 632 | NM_IPACC_TESTNO_RLOOP_ANT = 0x01, |
| 633 | NM_IPACC_TESTNO_RLOOP_XCVR = 0x02, |
| 634 | NM_IPACC_TESTNO_FUNC_OBJ = 0x03, |
Harald Welte | 9446d32 | 2009-07-01 11:03:54 +0200 | [diff] [blame] | 635 | NM_IPACC_TESTNO_CHAN_USAGE = 0x40, |
| 636 | NM_IPACC_TESTNO_BCCH_CHAN_USAGE = 0x41, |
| 637 | NM_IPACC_TESTNO_FREQ_SYNC = 0x42, |
| 638 | NM_IPACC_TESTNO_BCCH_INFO = 0x43, |
| 639 | NM_IPACC_TESTNO_TX_BEACON = 0x44, |
Harald Welte | 0efe9b7 | 2009-07-12 09:33:54 +0200 | [diff] [blame] | 640 | NM_IPACC_TESTNO_SYSINFO_MONITOR = 0x45, |
| 641 | NM_IPACC_TESTNO_BCCCH_MONITOR = 0x46, |
Harald Welte | 9446d32 | 2009-07-01 11:03:54 +0200 | [diff] [blame] | 642 | }; |
| 643 | |
Harald Welte | d2f11f2 | 2009-07-01 09:56:21 +0200 | [diff] [blame] | 644 | /* first byte after length inside NM_ATT_TEST_REPORT */ |
| 645 | enum abis_nm_ipacc_test_res { |
| 646 | NM_IPACC_TESTRES_SUCCESS = 0, |
| 647 | NM_IPACC_TESTRES_TIMEOUT = 1, |
| 648 | NM_IPACC_TESTRES_NO_CHANS = 2, |
| 649 | NM_IPACC_TESTRES_PARTIAL = 3, |
| 650 | NM_IPACC_TESTRES_STOPPED = 4, |
| 651 | }; |
| 652 | |
| 653 | /* internal IE inside NM_ATT_TEST_REPORT */ |
| 654 | enum abis_nm_ipacc_testres_ie { |
| 655 | NM_IPACC_TR_IE_FREQ_ERR_LIST = 3, |
| 656 | NM_IPACC_TR_IE_CHAN_USAGE = 4, |
| 657 | NM_IPACC_TR_IE_BCCH_INFO = 6, |
| 658 | NM_IPACC_TR_IE_RESULT_DETAILS = 8, |
| 659 | NM_IPACC_TR_IE_FREQ_ERR = 18, |
| 660 | }; |
Harald Welte | 268bb40 | 2009-02-01 19:11:56 +0000 | [diff] [blame] | 661 | |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 662 | /* PUBLIC */ |
| 663 | |
| 664 | struct msgb; |
| 665 | |
| 666 | struct abis_nm_cfg { |
| 667 | /* callback for unidirectional reports */ |
| 668 | int (*report_cb)(struct msgb *, |
| 669 | struct abis_om_fom_hdr *); |
| 670 | /* callback for software activate requests from BTS */ |
| 671 | int (*sw_act_req)(struct msgb *); |
| 672 | }; |
| 673 | |
Harald Welte | 8470bf2 | 2008-12-25 23:28:35 +0000 | [diff] [blame] | 674 | extern int abis_nm_rcvmsg(struct msgb *msg); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 675 | |
Harald Welte | 0313394 | 2009-02-18 19:51:53 +0000 | [diff] [blame] | 676 | int abis_nm_tlv_parse(struct tlv_parsed *tp, const u_int8_t *buf, int len); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 677 | int abis_nm_rx(struct msgb *msg); |
Harald Welte | 34a9968 | 2009-02-13 02:41:40 +0000 | [diff] [blame] | 678 | int abis_nm_opstart(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0, u_int8_t i1, u_int8_t i2); |
| 679 | int abis_nm_chg_adm_state(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0, |
Daniel Willmann | 65f68fa | 2009-08-10 11:49:36 +0200 | [diff] [blame] | 680 | u_int8_t i1, u_int8_t i2, enum abis_nm_adm_state adm_state); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 681 | int abis_nm_establish_tei(struct gsm_bts *bts, u_int8_t trx_nr, |
| 682 | u_int8_t e1_port, u_int8_t e1_timeslot, u_int8_t e1_subslot, |
| 683 | u_int8_t tei); |
| 684 | int abis_nm_conn_terr_sign(struct gsm_bts_trx *trx, |
| 685 | u_int8_t e1_port, u_int8_t e1_timeslot, u_int8_t e1_subslot); |
| 686 | int abis_nm_conn_terr_traf(struct gsm_bts_trx_ts *ts, |
| 687 | u_int8_t e1_port, u_int8_t e1_timeslot, |
| 688 | u_int8_t e1_subslot); |
Harald Welte | 22af0db | 2009-02-14 15:41:08 +0000 | [diff] [blame] | 689 | int abis_nm_set_bts_attr(struct gsm_bts *bts, u_int8_t *attr, int attr_len); |
| 690 | int abis_nm_set_radio_attr(struct gsm_bts_trx *trx, u_int8_t *attr, int attr_len); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 691 | int abis_nm_set_channel_attr(struct gsm_bts_trx_ts *ts, u_int8_t chan_comb); |
Harald Welte | 34a9968 | 2009-02-13 02:41:40 +0000 | [diff] [blame] | 692 | int abis_nm_sw_act_req_ack(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i1, |
Harald Welte | 5c1e458 | 2009-02-15 11:57:29 +0000 | [diff] [blame] | 693 | u_int8_t i2, u_int8_t i3, int nack, u_int8_t *attr, int att_len); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 694 | int abis_nm_raw_msg(struct gsm_bts *bts, int len, u_int8_t *msg); |
| 695 | int abis_nm_event_reports(struct gsm_bts *bts, int on); |
| 696 | int abis_nm_reset_resource(struct gsm_bts *bts); |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 697 | int abis_nm_software_load(struct gsm_bts *bts, const char *fname, |
Harald Welte | 3ffd137 | 2009-02-01 22:15:49 +0000 | [diff] [blame] | 698 | u_int8_t win_size, int forced, |
| 699 | gsm_cbfn *cbfn, void *cb_data); |
| 700 | int abis_nm_software_load_status(struct gsm_bts *bts); |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 701 | int abis_nm_software_activate(struct gsm_bts *bts, const char *fname, |
| 702 | gsm_cbfn *cbfn, void *cb_data); |
Harald Welte | 47d88ae | 2009-01-04 12:02:08 +0000 | [diff] [blame] | 703 | |
Harald Welte | 1989c08 | 2009-08-06 17:58:31 +0200 | [diff] [blame] | 704 | int abis_nm_conn_mdrop_link(struct gsm_bts *bts, u_int8_t e1_port0, u_int8_t ts0, |
| 705 | u_int8_t e1_port1, u_int8_t ts1); |
| 706 | |
Harald Welte | c731038 | 2009-08-08 00:02:36 +0200 | [diff] [blame] | 707 | int abis_nm_perform_test(struct gsm_bts *bts, u_int8_t obj_class, |
| 708 | u_int8_t bts_nr, u_int8_t trx_nr, u_int8_t ts_nr, |
| 709 | u_int8_t test_nr, u_int8_t auton_report, |
| 710 | u_int8_t *phys_config, u_int16_t phys_config_len); |
| 711 | |
Harald Welte | 21bd3a5 | 2009-08-10 12:21:22 +0200 | [diff] [blame] | 712 | int abis_nm_chcomb4pchan(enum gsm_phys_chan_config pchan); |
| 713 | |
Harald Welte | 47d88ae | 2009-01-04 12:02:08 +0000 | [diff] [blame] | 714 | /* Siemens / BS-11 specific */ |
Holger Freyther | 245c534 | 2009-01-27 19:00:44 +0000 | [diff] [blame] | 715 | int abis_nm_bs11_reset_resource(struct gsm_bts *bts); |
Harald Welte | 05188ee | 2009-01-18 11:39:08 +0000 | [diff] [blame] | 716 | int abis_nm_bs11_db_transmission(struct gsm_bts *bts, int begin); |
| 717 | int abis_nm_bs11_create_object(struct gsm_bts *bts, enum abis_bs11_objtype type, |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 718 | u_int8_t idx, u_int8_t attr_len, const u_int8_t *attr); |
Harald Welte | 05188ee | 2009-01-18 11:39:08 +0000 | [diff] [blame] | 719 | int abis_nm_bs11_create_envaBTSE(struct gsm_bts *bts, u_int8_t idx); |
| 720 | int abis_nm_bs11_create_bport(struct gsm_bts *bts, u_int8_t idx); |
Harald Welte | 78fc0d4 | 2009-02-19 02:50:57 +0000 | [diff] [blame] | 721 | int abis_nm_bs11_delete_object(struct gsm_bts *bts, |
| 722 | enum abis_bs11_objtype type, u_int8_t idx); |
Daniel Willmann | 65f68fa | 2009-08-10 11:49:36 +0200 | [diff] [blame] | 723 | int abis_nm_bs11_delete_bport(struct gsm_bts *bts, u_int8_t idx); |
Harald Welte | b6c92ae | 2009-02-21 20:15:32 +0000 | [diff] [blame] | 724 | int abis_nm_bs11_conn_oml_tei(struct gsm_bts *bts, u_int8_t e1_port, |
| 725 | u_int8_t e1_timeslot, u_int8_t e1_subslot, u_int8_t tei); |
Harald Welte | 78fc0d4 | 2009-02-19 02:50:57 +0000 | [diff] [blame] | 726 | int abis_nm_bs11_get_oml_tei_ts(struct gsm_bts *bts); |
| 727 | int abis_nm_bs11_get_serno(struct gsm_bts *bts); |
Harald Welte | 05188ee | 2009-01-18 11:39:08 +0000 | [diff] [blame] | 728 | int abis_nm_bs11_set_trx_power(struct gsm_bts_trx *trx, u_int8_t level); |
Harald Welte | 78fc0d4 | 2009-02-19 02:50:57 +0000 | [diff] [blame] | 729 | int abis_nm_bs11_get_trx_power(struct gsm_bts_trx *trx); |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 730 | int abis_nm_bs11_factory_logon(struct gsm_bts *bts, int on); |
| 731 | int abis_nm_bs11_set_trx1_pw(struct gsm_bts *bts, const char *password); |
Harald Welte | e69f5fb | 2009-04-28 16:31:38 +0000 | [diff] [blame] | 732 | int abis_nm_bs11_set_pll_locked(struct gsm_bts *bts, int locked); |
Harald Welte | ef06195 | 2009-05-17 12:43:42 +0000 | [diff] [blame] | 733 | int abis_nm_bs11_get_pll_mode(struct gsm_bts *bts); |
| 734 | int abis_nm_bs11_get_cclk(struct gsm_bts *bts); |
Harald Welte | 1bc0906 | 2009-01-18 14:17:52 +0000 | [diff] [blame] | 735 | int abis_nm_bs11_get_state(struct gsm_bts *bts); |
Harald Welte | 5e4d1b3 | 2009-02-01 13:36:56 +0000 | [diff] [blame] | 736 | int abis_nm_bs11_load_swl(struct gsm_bts *bts, const char *fname, |
Harald Welte | 3ffd137 | 2009-02-01 22:15:49 +0000 | [diff] [blame] | 737 | u_int8_t win_size, int forced, gsm_cbfn *cbfn); |
Harald Welte | 268bb40 | 2009-02-01 19:11:56 +0000 | [diff] [blame] | 738 | int abis_nm_bs11_set_ext_time(struct gsm_bts *bts); |
Daniel Willmann | 65f68fa | 2009-08-10 11:49:36 +0200 | [diff] [blame] | 739 | int abis_nm_bs11_set_bport_line_cfg(struct gsm_bts *bts, u_int8_t bport, enum abis_bs11_line_cfg line_cfg); |
Harald Welte | 3ffd137 | 2009-02-01 22:15:49 +0000 | [diff] [blame] | 740 | int abis_nm_bs11_bsc_disconnect(struct gsm_bts *bts, int reconnect); |
Harald Welte | 1fa60c8 | 2009-02-09 18:13:26 +0000 | [diff] [blame] | 741 | int abis_nm_bs11_restart(struct gsm_bts *bts); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 742 | |
Harald Welte | 5c1e458 | 2009-02-15 11:57:29 +0000 | [diff] [blame] | 743 | /* ip.access nanoBTS specific commands */ |
| 744 | int abis_nm_ipaccess_msg(struct gsm_bts *bts, u_int8_t msg_type, |
| 745 | u_int8_t obj_class, u_int8_t bts_nr, |
| 746 | u_int8_t trx_nr, u_int8_t ts_nr, |
| 747 | u_int8_t *attr, int attr_len); |
Harald Welte | 193fefc | 2009-04-30 15:16:27 +0000 | [diff] [blame] | 748 | int abis_nm_ipaccess_set_nvattr(struct gsm_bts *bts, u_int8_t *attr, |
| 749 | int attr_len); |
| 750 | int abis_nm_ipaccess_restart(struct gsm_bts *bts); |
Harald Welte | 746d609 | 2009-10-19 22:11:11 +0200 | [diff] [blame^] | 751 | int abis_nm_ipaccess_rsl_connect(struct gsm_bts_trx *trx, |
| 752 | u_int32_t ip, u_int16_t port, u_int8_t stream); |
Harald Welte | 5c1e458 | 2009-02-15 11:57:29 +0000 | [diff] [blame] | 753 | |
Harald Welte | e0590df | 2009-02-15 03:34:15 +0000 | [diff] [blame] | 754 | /* Functions calling into other code parts */ |
| 755 | enum nm_evt { |
| 756 | EVT_STATECHG_OPER, |
| 757 | EVT_STATECHG_ADM, |
| 758 | }; |
| 759 | int nm_state_event(enum nm_evt evt, u_int8_t obj_class, void *obj, |
| 760 | struct gsm_nm_state *old_state, struct gsm_nm_state *new_state); |
| 761 | |
Harald Welte | 4d87f24 | 2009-03-10 19:43:44 +0000 | [diff] [blame] | 762 | const char *nm_opstate_name(u_int8_t os); |
| 763 | const char *nm_avail_name(u_int8_t avail); |
Harald Welte | 52b1f98 | 2008-12-23 20:25:15 +0000 | [diff] [blame] | 764 | #endif /* _NM_H */ |