mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-11-01 20:43:47 +00:00
bsc_api: Move some parts over to the BSC API.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
/* GSM 08.08 like API for OpenBSC. The bridge from MSC to BSC */
|
/* GSM 08.08 like API for OpenBSC. The bridge from MSC to BSC */
|
||||||
|
|
||||||
/* (C) 2010 by Holger Hans Peter Freyther
|
/* (C) 2010 by Holger Hans Peter Freyther
|
||||||
|
* (C) 2009 by Harald Welte <laforge@gnumonks.org>
|
||||||
*
|
*
|
||||||
* All Rights Reserved
|
* All Rights Reserved
|
||||||
*
|
*
|
||||||
@@ -31,3 +32,22 @@ int gsm0808_submit_dtap(struct gsm_subscriber_connection *conn,
|
|||||||
msg->trx = msg->lchan->ts->trx;
|
msg->trx = msg->lchan->ts->trx;
|
||||||
return rsl_data_request(msg, link_id);
|
return rsl_data_request(msg, link_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* dequeue messages to layer 4 */
|
||||||
|
int bsc_upqueue(struct gsm_network *net)
|
||||||
|
{
|
||||||
|
struct gsm_mncc *mncc;
|
||||||
|
struct msgb *msg;
|
||||||
|
int work = 0;
|
||||||
|
|
||||||
|
if (net)
|
||||||
|
while ((msg = msgb_dequeue(&net->upqueue))) {
|
||||||
|
mncc = (struct gsm_mncc *)msg->data;
|
||||||
|
if (net->mncc_recv)
|
||||||
|
net->mncc_recv(net, mncc->msg_type, mncc);
|
||||||
|
work = 1; /* work done */
|
||||||
|
talloc_free(msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
return work;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2908,25 +2908,6 @@ int gsm0408_rcvmsg(struct msgb *msg, u_int8_t link_id)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* dequeue messages to layer 4 */
|
|
||||||
int bsc_upqueue(struct gsm_network *net)
|
|
||||||
{
|
|
||||||
struct gsm_mncc *mncc;
|
|
||||||
struct msgb *msg;
|
|
||||||
int work = 0;
|
|
||||||
|
|
||||||
if (net)
|
|
||||||
while ((msg = msgb_dequeue(&net->upqueue))) {
|
|
||||||
mncc = (struct gsm_mncc *)msg->data;
|
|
||||||
if (net->mncc_recv)
|
|
||||||
net->mncc_recv(net, mncc->msg_type, mncc);
|
|
||||||
work = 1; /* work done */
|
|
||||||
talloc_free(msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
return work;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This will be ran by the linker when loading the DSO. We use it to
|
* This will be ran by the linker when loading the DSO. We use it to
|
||||||
* do system initialization, e.g. registration of signal handlers.
|
* do system initialization, e.g. registration of signal handlers.
|
||||||
|
|||||||
Reference in New Issue
Block a user