blob: 2ff72705bdd23a5fa195eeaabf366d1cc2784b36 [file] [log] [blame]
Jonathan Santos03fd8d02011-05-25 13:54:02 -04001#ifndef OPENBSC_ABIS_OM2K_H
2#define OPENBSC_ABIS_OM2K_H
3/* Ericsson RBS 2xxx GSM O&M (OM2000) messages on the A-bis interface
4 * implemented based on protocol trace analysis, no formal documentation */
5
6/* (C) 2010-2011 by Harald Welte <laforge@gnumonks.org>
7 *
8 * All Rights Reserved
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU Affero General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Affero General Public License for more details.
19 *
20 * You should have received a copy of the GNU Affero General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 *
23 */
24
25enum abis_om2k_mo_cls {
26 OM2K_MO_CLS_TRXC = 0x01,
27 OM2K_MO_CLS_TS = 0x03,
28 OM2K_MO_CLS_TF = 0x04,
29 OM2K_MO_CLS_IS = 0x05,
30 OM2K_MO_CLS_CON = 0x06,
31 OM2K_MO_CLS_DP = 0x07,
32 OM2K_MO_CLS_CF = 0x0a,
33 OM2K_MO_CLS_TX = 0x0b,
34 OM2K_MO_CLS_RX = 0x0c,
35};
36
Jonathan Santos5a45b152011-08-17 15:33:57 -040037enum om2k_mo_state {
38 OM2K_MO_S_RESET = 0,
39 OM2K_MO_S_STARTED,
40 OM2K_MO_S_ENABLED,
41 OM2K_MO_S_DISABLED,
42};
43
Jonathan Santos03fd8d02011-05-25 13:54:02 -040044struct abis_om2k_mo {
45 uint8_t class;
46 uint8_t bts;
47 uint8_t assoc_so;
48 uint8_t inst;
49} __attribute__ ((packed));
50
Jonathan Santos5a45b152011-08-17 15:33:57 -040051/* on-wire format for IS conn group */
Jonathan Santos03fd8d02011-05-25 13:54:02 -040052struct om2k_is_conn_grp {
53 uint16_t icp1;
54 uint16_t icp2;
55 uint8_t cont_idx;
56} __attribute__ ((packed));
57
Jonathan Santos5a45b152011-08-17 15:33:57 -040058/* internal data formant for IS conn group */
59struct is_conn_group {
60 struct llist_head list;
61 uint16_t icp1;
62 uint16_t icp2;
63 uint8_t ci;
64};
65
66extern const struct abis_om2k_mo om2k_mo_cf;
67extern const struct abis_om2k_mo om2k_mo_is;
68extern const struct abis_om2k_mo om2k_mo_con;
69extern const struct abis_om2k_mo om2k_mo_tf;
70
Jonathan Santos03fd8d02011-05-25 13:54:02 -040071extern const struct value_string om2k_mo_class_short_vals[];
72
73int abis_om2k_rcvmsg(struct msgb *msg);
74
75extern const struct abis_om2k_mo om2k_mo_cf;
76
77int abis_om2k_tx_reset_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
78int abis_om2k_tx_start_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
79int abis_om2k_tx_status_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
80int abis_om2k_tx_connect_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
81int abis_om2k_tx_disconnect_cmd(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
82int abis_om2k_tx_enable_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
83int abis_om2k_tx_disable_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
84int abis_om2k_tx_test_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo);
85int abis_om2k_tx_op_info(struct gsm_bts *bts, const struct abis_om2k_mo *mo,
86 uint8_t operational);
Jonathan Santos5a45b152011-08-17 15:33:57 -040087int abis_om2k_tx_is_conf_req(struct gsm_bts *bts);
Jonathan Santos03fd8d02011-05-25 13:54:02 -040088int abis_om2k_tx_tf_conf_req(struct gsm_bts *bts);
89int abis_om2k_tx_rx_conf_req(struct gsm_bts_trx *trx);
90int abis_om2k_tx_tx_conf_req(struct gsm_bts_trx *trx);
91int abis_om2k_tx_ts_conf_req(struct gsm_bts_trx_ts *ts);
92
93int abis_om2k_vty_init(void);
94
95struct vty;
96void abis_om2k_config_write_bts(struct vty *vty, struct gsm_bts *bts);
97
98#endif /* OPENBCS_ABIS_OM2K_H */