aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/abis_nm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@netfilter.org>2009-08-06 17:58:31 +0200
committerHarald Welte <laforge@netfilter.org>2009-08-06 17:58:31 +0200
commit1989c089dad168408a75e525a717179f2f84cc5e (patch)
treea8c7492878574b0979dc836d81f54281c20f64bf /openbsc/src/abis_nm.c
parent4fbfd3a43b0175a85da08fca0c65ce639917a0b9 (diff)
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.
Diffstat (limited to 'openbsc/src/abis_nm.c')
-rw-r--r--openbsc/src/abis_nm.c29
1 files changed, 29 insertions, 0 deletions
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)
{