aboutsummaryrefslogtreecommitdiffstats
path: root/src/abis_nm.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-01-04 12:02:08 +0000
committerHarald Welte <laforge@gnumonks.org>2009-01-04 12:02:08 +0000
commit47d88aecafefa8fa1272ee405a631782ed6abd48 (patch)
treed3fe7a734d41918da3cfecb49ba52a1b15ec73c8 /src/abis_nm.c
parent868b8cdd589ce77200f8da96a3f1771cd39d9ac3 (diff)
Add some functions to CREATE OBJECTs in the BS-11 internal database
Diffstat (limited to 'src/abis_nm.c')
-rw-r--r--src/abis_nm.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/abis_nm.c b/src/abis_nm.c
index 729832887..b297a11db 100644
--- a/src/abis_nm.c
+++ b/src/abis_nm.c
@@ -424,6 +424,8 @@ int abis_nm_event_reports(struct gsm_bts *bts, int on)
return __simple_cmd(bts, NM_MT_REST_EVENT_REP);
}
+/* Siemens (or BS-11) specific commands */
+
int abis_nm_reset_resource(struct gsm_bts *bts)
{
return __simple_cmd(bts, NM_MT_BS11_RESET_RESOURCE);
@@ -436,3 +438,40 @@ int abis_nm_db_transmission(struct gsm_bts *bts, int begin)
else
return __simple_cmd(bts, NM_MT_BS11_END_DB_TX);
}
+
+int abis_nm_create_object(struct gsm_bts *bts, enum abis_bs11_objtype type,
+ u_int8_t idx)
+{
+ struct abis_om_hdr *oh;
+ struct msgb *msg = nm_msgb_alloc();
+
+ oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
+ fill_om_fom_hdr(oh, 0, NM_MT_BS11_CREATE_OBJ, NM_OC_BS11,
+ type, idx, 0);
+
+ return abis_nm_sendmsg(bts, msg);
+}
+
+int abis_nm_create_envaBTSE(struct gsm_bts *bts, u_int8_t idx)
+{
+ struct abis_om_hdr *oh;
+ struct msgb *msg = nm_msgb_alloc();
+
+ oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
+ fill_om_fom_hdr(oh, 0, NM_MT_BS11_CREATE_OBJ, NM_OC_BS11_ENVABTSE,
+ 0, idx, 0);
+
+ return abis_nm_sendmsg(bts, msg);
+}
+
+int abis_nm_create_bport(struct gsm_bts *bts, u_int8_t idx)
+{
+ struct abis_om_hdr *oh;
+ struct msgb *msg = nm_msgb_alloc();
+
+ oh = (struct abis_om_hdr *) msgb_put(msg, ABIS_OM_FOM_HDR_SIZE);
+ fill_om_fom_hdr(oh, 0, NM_MT_BS11_CREATE_OBJ, NM_OC_BS11_BPORT,
+ idx, 0, 0);
+
+ return abis_nm_sendmsg(bts, msg);
+}