diff options
author | Harald Welte <laforge@gnumonks.org> | 2011-02-12 12:29:21 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2011-02-13 15:49:09 +0100 |
commit | 09cefee4db4e5dcec3adf75788690189f856b2e6 (patch) | |
tree | d7f31002c5b2b7e5795a0bd551b506894c417f11 | |
parent | a4898a868b85e31c63fcec6330e605d5e696072b (diff) |
[OML] Allow each BTS model to specify the OML callback
This allows us to add BTS models that do not use the standard TS 12.21 OML
-rw-r--r-- | openbsc/include/openbsc/gsm_data.h | 2 | ||||
-rw-r--r-- | openbsc/src/bts_ipaccess_nanobts.c | 2 | ||||
-rw-r--r-- | openbsc/src/bts_siemens_bs11.c | 2 | ||||
-rw-r--r-- | openbsc/src/bts_unknown.c | 2 | ||||
-rw-r--r-- | openbsc/src/e1_input.c | 4 |
5 files changed, 11 insertions, 1 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h index e8433fdab..e308ca4d7 100644 --- a/openbsc/include/openbsc/gsm_data.h +++ b/openbsc/include/openbsc/gsm_data.h @@ -429,6 +429,8 @@ struct gsm_bts_model { enum gsm_bts_type type; const char *name; + int (*oml_rcvmsg)(struct msgb *msg); + struct tlv_definition nm_att_tlvdef; struct bitvec features; diff --git a/openbsc/src/bts_ipaccess_nanobts.c b/openbsc/src/bts_ipaccess_nanobts.c index 6c7b2bd57..25dc0c8a2 100644 --- a/openbsc/src/bts_ipaccess_nanobts.c +++ b/openbsc/src/bts_ipaccess_nanobts.c @@ -30,6 +30,8 @@ static struct gsm_bts_model model_nanobts = { .type = GSM_BTS_TYPE_NANOBTS, + .name = "nanobts", + .oml_rcvmsg = &abis_nm_rcvmsg, .nm_att_tlvdef = { .def = { /* ip.access specifics */ diff --git a/openbsc/src/bts_siemens_bs11.c b/openbsc/src/bts_siemens_bs11.c index 64bc1a752..5a5f88306 100644 --- a/openbsc/src/bts_siemens_bs11.c +++ b/openbsc/src/bts_siemens_bs11.c @@ -31,6 +31,8 @@ static struct gsm_bts_model model_bs11 = { .type = GSM_BTS_TYPE_BS11, + .name = "bs11", + .oml_rcvmsg = &abis_nm_rcvmsg, .nm_att_tlvdef = { .def = { [NM_ATT_AVAIL_STATUS] = { TLV_TYPE_TLV }, diff --git a/openbsc/src/bts_unknown.c b/openbsc/src/bts_unknown.c index 2957ce08b..f95459959 100644 --- a/openbsc/src/bts_unknown.c +++ b/openbsc/src/bts_unknown.c @@ -27,6 +27,8 @@ static struct gsm_bts_model model_unknown = { .type = GSM_BTS_TYPE_UNKNOWN, + .name = "unknown", + .oml_rcvmsg = &abis_nm_rcvmsg, .nm_att_tlvdef = { .def = { }, diff --git a/openbsc/src/e1_input.c b/openbsc/src/e1_input.c index 3605f9339..79c3a5af4 100644 --- a/openbsc/src/e1_input.c +++ b/openbsc/src/e1_input.c @@ -475,6 +475,7 @@ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg, u_int8_t tei, u_int8_t sapi) { struct e1inp_sign_link *link; + struct gsm_bts *bts; int ret; switch (ts->type) { @@ -492,7 +493,8 @@ int e1inp_rx_ts(struct e1inp_ts *ts, struct msgb *msg, switch (link->type) { case E1INP_SIGN_OML: msg->trx = link->trx; - ret = abis_nm_rcvmsg(msg); + bts = msg->trx->bts; + ret = bts->model->oml_rcvmsg(msg); break; case E1INP_SIGN_RSL: msg->trx = link->trx; |