aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-03-26 13:45:17 +0100
committerDaniel Willmann <daniel@totalueberwachung.de>2014-03-26 13:52:27 +0100
commit55405fb40b080b303dcbb380ecb2d738dc8f6206 (patch)
tree8568b877cbbf0bada9a8d55d1e41b44c8dabe86b /src/gsm
parente4c50d5a43f129aa4bdfaf62a7238c4db671974b (diff)
lapdm: Make lapdm_datalink_for_sapi public
This API allows you to get the lapdm_datalink for a SAPI. It's needed in the lapdm_test, so make it public.
Diffstat (limited to 'src/gsm')
-rw-r--r--src/gsm/lapdm.c6
-rw-r--r--src/gsm/libosmogsm.map1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index 41f4be71..4edae633 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -181,7 +181,7 @@ void lapdm_channel_exit(struct lapdm_channel *lc)
lapdm_entity_exit(&lc->lapdm_dcch);
}
-static struct lapdm_datalink *datalink_for_sapi(struct lapdm_entity *le, uint8_t sapi)
+struct lapdm_datalink *lapdm_datalink_for_sapi(struct lapdm_entity *le, uint8_t sapi)
{
switch (sapi) {
case LAPDm_SAPI_NORMAL:
@@ -543,7 +543,7 @@ static int l2_ph_data_ind(struct msgb *msg, struct lapdm_entity *le,
}
}
- mctx.dl = datalink_for_sapi(le, sapi);
+ mctx.dl = lapdm_datalink_for_sapi(le, sapi);
/* G.2.1 No action on frames containing an unallocated SAPI. */
if (!mctx.dl) {
LOGP(DLLAPD, LOGL_NOTICE, "Received frame for unsupported "
@@ -1071,7 +1071,7 @@ static int rslms_rx_rll(struct msgb *msg, struct lapdm_channel *lc)
/* G.2.1 No action shall be taken on frames containing an unallocated
* SAPI.
*/
- dl = datalink_for_sapi(le, sapi);
+ dl = lapdm_datalink_for_sapi(le, sapi);
if (!dl) {
LOGP(DLLAPD, LOGL_ERROR, "No instance for SAPI %d!\n", sapi);
msgb_free(msg);
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 9d15d668..3c5025df 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -172,6 +172,7 @@ lapdm_channel_set_flags;
lapdm_channel_set_l1;
lapdm_channel_set_l3;
lapdm_channel_set_mode;
+lapdm_datalink_for_sapi;
lapdm_entity_exit;
lapdm_entity_init;
lapdm_entity_reset;