aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-02-12 14:42:59 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-13 15:49:25 +0100
commite1d5eca916347d7a425b3c39e2c7ae4157c43ce8 (patch)
tree84d0ca6f5f7a9bedf475d18e496e1b4d65d4d402
parent735410794636305976ecd6db237d023596708094 (diff)
OM2000: Introduce VTY commands to initiate OM2000 procedures
-rw-r--r--openbsc/include/openbsc/abis_om2000.h5
-rw-r--r--openbsc/include/openbsc/vty.h1
-rw-r--r--openbsc/src/Makefile.am2
-rw-r--r--openbsc/src/abis_om2000.c10
-rw-r--r--openbsc/src/bsc_vty.c1
5 files changed, 17 insertions, 2 deletions
diff --git a/openbsc/include/openbsc/abis_om2000.h b/openbsc/include/openbsc/abis_om2000.h
index d6cdb83b6..94e00e5d5 100644
--- a/openbsc/include/openbsc/abis_om2000.h
+++ b/openbsc/include/openbsc/abis_om2000.h
@@ -29,11 +29,16 @@ struct abis_om2k_mo {
uint8_t inst;
} __attribute__ ((packed));
+extern const struct value_string om2k_mo_class_short_vals[];
+
int abis_om2k_rcvmsg(struct msgb *msg);
extern const struct abis_om2k_mo om2k_mo_cf;
int abis_om2k_tx_reset_cmd(struct gsm_bts *bts, struct abis_om2k_mo *mo);
int abis_om2k_tx_start_req(struct gsm_bts *bts, struct abis_om2k_mo *mo);
+int abis_om2k_tx_status_req(struct gsm_bts *bts, struct abis_om2k_mo *mo);
+
+int abis_om2k_vty_init(void);
#endif /* OPENBCS_ABIS_OM2K_H */
diff --git a/openbsc/include/openbsc/vty.h b/openbsc/include/openbsc/vty.h
index 1be81a7f2..8c38313a5 100644
--- a/openbsc/include/openbsc/vty.h
+++ b/openbsc/include/openbsc/vty.h
@@ -33,6 +33,7 @@ enum bsc_vty_node {
NAT_NODE,
NAT_BSC_NODE,
MSC_NODE,
+ OM2K_NODE,
};
extern int bsc_vty_is_config_node(struct vty *vty, int node);
diff --git a/openbsc/src/Makefile.am b/openbsc/src/Makefile.am
index 4963e9bfe..077054c3a 100644
--- a/openbsc/src/Makefile.am
+++ b/openbsc/src/Makefile.am
@@ -17,7 +17,7 @@ sbin_PROGRAMS = bsc_hack bs11_config isdnsync bsc_mgcp
noinst_LIBRARIES = libbsc.a libmsc.a libvty.a libmgcp.a
libbsc_a_SOURCES = abis_rsl.c abis_nm.c abis_om2000.c gsm_data.c gsm_04_08_utils.c \
- chan_alloc.c debug.c socket.c abis_nm_vty.c \
+ chan_alloc.c debug.c socket.c abis_nm_vty.c abis_om2000_vty.c \
gsm_subscriber_base.c subchan_demux.c bsc_rll.c transaction.c \
trau_frame.c trau_mux.c paging.c \
e1_config.c e1_input.c e1_input_vty.c \
diff --git a/openbsc/src/abis_om2000.c b/openbsc/src/abis_om2000.c
index 8b9277fe2..a2a69a2b4 100644
--- a/openbsc/src/abis_om2000.c
+++ b/openbsc/src/abis_om2000.c
@@ -100,6 +100,9 @@ enum abis_om2k_msgtype {
OM2K_MSGT_START_RES_ACK = 0x0088,
OM2K_MSGT_START_RES_NACK = 0x0089,
OM2K_MSGT_START_RES = 0x008a,
+ OM2K_MSGT_STATUS_REQ = 0x008c,
+ OM2K_MSGT_STATUS_RESP = 0x008e,
+ OM2K_MSGT_STATUS_REJ = 0x008f,
OM2K_MSGT_NEGOT_REQ_ACK = 0x0104,
OM2K_MSGT_NEGOT_REQ_NACK = 0x0105,
@@ -435,7 +438,7 @@ static const struct value_string om2k_attr_vals[] = {
{ 0, NULL }
};
-static const struct value_string om2k_mo_class_short_vals[] = {
+const struct value_string om2k_mo_class_short_vals[] = {
{ 0x01, "TRXC" },
{ 0x03, "TS" },
{ 0x04, "TF" },
@@ -534,6 +537,11 @@ int abis_om2k_tx_start_req(struct gsm_bts *bts, struct abis_om2k_mo *mo)
return abis_om2k_tx_simple(bts, mo, OM2K_MSGT_START_REQ);
}
+int abis_om2k_tx_status_req(struct gsm_bts *bts, struct abis_om2k_mo *mo)
+{
+ return abis_om2k_tx_simple(bts, mo, OM2K_MSGT_STATUS_REQ);
+}
+
static int abis_om2k_tx_op_info(struct gsm_bts *bts, struct abis_om2k_mo *mo,
uint8_t operational)
{
diff --git a/openbsc/src/bsc_vty.c b/openbsc/src/bsc_vty.c
index 739d9aa28..3d7d69b81 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -2702,6 +2702,7 @@ int bsc_vty_init(void)
install_element(ENABLE_NODE, &pdch_act_cmd);
abis_nm_vty_init();
+ abis_om2k_vty_init();
e1inp_vty_init();
bsc_vty_init_extra();