diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-02-12 15:07:30 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-02-13 15:49:25 +0100 |
commit | 8024d8ff58feb1666845a057e24f7752b87d8f75 (patch) | |
tree | 4c238007e89423143a74498df73c62ed937c3762 /openbsc/src | |
parent | 8d4a472cc470ad10219ddaabde9bf46cc9998316 (diff) |
OM2000: Add support for sending the TEST REQUEST message
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/abis_om2000.c | 12 | ||||
-rw-r--r-- | openbsc/src/abis_om2000_vty.c | 11 |
2 files changed, 23 insertions, 0 deletions
diff --git a/openbsc/src/abis_om2000.c b/openbsc/src/abis_om2000.c index f85c0226e..7c58a6f8d 100644 --- a/openbsc/src/abis_om2000.c +++ b/openbsc/src/abis_om2000.c @@ -108,6 +108,13 @@ enum abis_om2k_msgtype { OM2K_MSGT_STATUS_RESP = 0x008e, OM2K_MSGT_STATUS_REJ = 0x008f, + OM2K_MSGT_TEST_REQ = 0x0094, + OM2K_MSGT_TEST_REQ_ACK = 0x0096, + OM2K_MSGT_TEST_REQ_REJ = 0x0097, + OM2K_MSGT_TEST_RES_ACK = 0x0098, + OM2K_MSGT_TEST_RES_NACK = 0x0099, + OM2K_MSGT_TEST_RES = 0x009a, + OM2K_MSGT_NEGOT_REQ_ACK = 0x0104, OM2K_MSGT_NEGOT_REQ_NACK = 0x0105, OM2K_MSGT_NEGOT_REQ = 0x0106, @@ -556,6 +563,11 @@ int abis_om2k_tx_disconnect_cmd(struct gsm_bts *bts, const struct abis_om2k_mo * return abis_om2k_tx_simple(bts, mo, OM2K_MSGT_DISCONNECT_CMD); } +int abis_om2k_tx_test_req(struct gsm_bts *bts, const struct abis_om2k_mo *mo) +{ + return abis_om2k_tx_simple(bts, mo, OM2K_MSGT_TEST_REQ); +} + int abis_om2k_tx_op_info(struct gsm_bts *bts, const struct abis_om2k_mo *mo, uint8_t operational) { diff --git a/openbsc/src/abis_om2000_vty.c b/openbsc/src/abis_om2000_vty.c index ce5991a66..574630c2a 100644 --- a/openbsc/src/abis_om2000_vty.c +++ b/openbsc/src/abis_om2000_vty.c @@ -197,6 +197,16 @@ DEFUN(om2k_op_info, om2k_op_info_cmd, return CMD_SUCCESS; } +DEFUN(om2k_test, om2k_test_cmd, + "test-request", + "Test the MO\n") +{ + struct oml_node_state *oms = vty->index; + + abis_om2k_tx_test_req(oms->bts, &oms->mo); + return CMD_SUCCESS; +} + int abis_om2k_vty_init(void) { @@ -212,6 +222,7 @@ int abis_om2k_vty_init(void) install_element(OM2K_NODE, &om2k_connect_cmd); install_element(OM2K_NODE, &om2k_disconnect_cmd); install_element(OM2K_NODE, &om2k_op_info_cmd); + install_element(OM2K_NODE, &om2k_test_cmd); return 0; } |