OM2000: Introduce VTY commands to initiate OM2000 procedures
diff --git a/openbsc/include/openbsc/abis_om2000.h b/openbsc/include/openbsc/abis_om2000.h
index d6cdb83..94e00e5 100644
--- a/openbsc/include/openbsc/abis_om2000.h
+++ b/openbsc/include/openbsc/abis_om2000.h
@@ -29,11 +29,16 @@
 	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 1be81a7..8c38313 100644
--- a/openbsc/include/openbsc/vty.h
+++ b/openbsc/include/openbsc/vty.h
@@ -33,6 +33,7 @@
 	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 4963e9b..077054c 100644
--- a/openbsc/src/Makefile.am
+++ b/openbsc/src/Makefile.am
@@ -17,7 +17,7 @@
 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 8b9277f..a2a69a2 100644
--- a/openbsc/src/abis_om2000.c
+++ b/openbsc/src/abis_om2000.c
@@ -100,6 +100,9 @@
 	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 @@
 	{ 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 @@
 	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 739d9aa..3d7d69b 100644
--- a/openbsc/src/bsc_vty.c
+++ b/openbsc/src/bsc_vty.c
@@ -2702,6 +2702,7 @@
 	install_element(ENABLE_NODE, &pdch_act_cmd);
 
 	abis_nm_vty_init();
+	abis_om2k_vty_init();
 	e1inp_vty_init();
 
 	bsc_vty_init_extra();