From 1989c089dad168408a75e525a717179f2f84cc5e Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 6 Aug 2009 17:58:31 +0200 Subject: add function for performing 'CONNECT MULTI-DROP LINK" as per GSM 12.21 don't be confused, BS-11 does not need this. But since I wrote the code before knowing that, I can just as well commit it. --- openbsc/include/openbsc/abis_nm.h | 3 +++ openbsc/src/abis_nm.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/openbsc/include/openbsc/abis_nm.h b/openbsc/include/openbsc/abis_nm.h index 9f8c4be9e..3dc553144 100644 --- a/openbsc/include/openbsc/abis_nm.h +++ b/openbsc/include/openbsc/abis_nm.h @@ -678,6 +678,9 @@ int abis_nm_software_load_status(struct gsm_bts *bts); int abis_nm_software_activate(struct gsm_bts *bts, const char *fname, gsm_cbfn *cbfn, void *cb_data); +int abis_nm_conn_mdrop_link(struct gsm_bts *bts, u_int8_t e1_port0, u_int8_t ts0, + u_int8_t e1_port1, u_int8_t ts1); + /* Siemens / BS-11 specific */ int abis_nm_bs11_reset_resource(struct gsm_bts *bts); int abis_nm_bs11_db_transmission(struct gsm_bts *bts, int begin); diff --git a/openbsc/src/abis_nm.c b/openbsc/src/abis_nm.c index 620946af5..0eb8657db 100644 --- a/openbsc/src/abis_nm.c +++ b/openbsc/src/abis_nm.c @@ -966,6 +966,9 @@ static int abis_nm_rcvmsg_fom(struct msgb *mb) case NM_MT_BS11_LMT_SESSION: return abis_nm_rx_lmt_event(mb); break; + case NM_MT_CONN_MDROP_LINK_ACK: + DEBUGP(DNM, "CONN MDROP LINK ACK\n"); + break; } return 0; @@ -1760,6 +1763,32 @@ int abis_nm_chg_adm_state(struct gsm_bts *bts, u_int8_t obj_class, u_int8_t i0, return abis_nm_sendmsg(bts, msg); } +int abis_nm_conn_mdrop_link(struct gsm_bts *bts, u_int8_t e1_port0, u_int8_t ts0, + u_int8_t e1_port1, u_int8_t ts1) +{ + struct abis_om_hdr *oh; + struct msgb *msg = nm_msgb_alloc(); + u_int8_t *attr; + + DEBUGP(DNM, "CONNECT MDROP LINK E1=(%u,%u) -> E1=(%u, %u)\n", + e1_port0, ts0, e1_port1, ts1); + + oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE); + fill_om_fom_hdr(oh, 6, NM_MT_CONN_MDROP_LINK, + NM_OC_SITE_MANAGER, 0x00, 0x00, 0x00); + + attr = msgb_put(msg, 3); + attr[0] = NM_ATT_MDROP_LINK; + attr[1] = e1_port0; + attr[2] = ts0; + + attr = msgb_put(msg, 3); + attr[0] = NM_ATT_MDROP_NEXT; + attr[1] = e1_port1; + attr[2] = ts1; + + return abis_nm_sendmsg(bts, msg); +} int abis_nm_event_reports(struct gsm_bts *bts, int on) { -- cgit v1.2.3