summaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty_interface_layer3.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-12-29 23:06:22 +0100
committerHarald Welte <laforge@gnumonks.org>2010-12-30 17:11:46 +0100
commitd2a28026c152985e571ee157ac8f3dafd18649f4 (patch)
tree11fc4e3c2195a0389c046084863a9b99b92434ad /openbsc/src/vty_interface_layer3.c
parent2c1a26adb55d6c0f7e2203b186873ba73fb03425 (diff)
smscb: Prepare to fill in the info for CBCH in SI4laforge/27c3
Pass the number of bytes the rest octet for si4 should fill. We will need to include info for CBCH in our SI4. WIP: SMSCB... this should reuse the lchan2desc if it works... smscb: Add vty command for experimentation...
Diffstat (limited to 'openbsc/src/vty_interface_layer3.c')
-rw-r--r--openbsc/src/vty_interface_layer3.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index 218e3ce58..b6382ded8 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -798,7 +798,34 @@ DEFUN(ussd_dump,
return CMD_SUCCESS;
}
+DEFUN(smscb,
+ smscb_cmd,
+ "smscb-command <0-255> <0-255> HEX",
+ "Send SMSCB\n" "BTS Nr\n" "CB Cmd Type\n" "Message\n")
+{
+ uint8_t hex[86];
+ struct gsm_network *network;
+ struct gsm_bts *bts;
+ int rc;
+
+ network = gsmnet_from_vty(vty);
+ bts = gsm_bts_num(network, atoi(argv[0]));
+ if (!bts) {
+ vty_out(vty, "BTS %d was not found.%s", atoi(argv[0]), VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ rc = hexparse(argv[2], hex, sizeof(hex));
+ if (rc < 0) {
+ vty_out(vty, "Parsing the message failed.\n");
+ return CMD_WARNING;
+ }
+ /* check channel config */
+ rsl_sms_cb_command(bts, RSL_CHAN_SDCCH4_ACCH, atoi(argv[1]),
+ hex, rc);
+ return CMD_SUCCESS;
+}
int bsc_vty_init_extra(void)
{
@@ -834,6 +861,7 @@ int bsc_vty_init_extra(void)
install_element(ENABLE_NODE, &ussd_add_cmd);
install_element(ENABLE_NODE, &ussd_clear_cmd);
install_element(ENABLE_NODE, &ussd_dump_cmd);
+ install_element(ENABLE_NODE, &smscb_cmd);
return 0;
}