aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-01-27 20:56:55 +0100
committerAlexander Couzens <lynxis@fe80.eu>2021-01-27 21:07:01 +0100
commit21afdf9a32be2b61a31f1ec0ecbd9bc76135cb17 (patch)
treee04a91fb57200b71c936df7b5e53cab030b15c3f /src
parentc09cb29d78dce98cda15bcc92d3c32193336e0f0 (diff)
follow libosmocore/gprs_ns2 API changes of GPRS enums
All gprs_ns2 enums have now GPRS_NS2 as prefix. API change which must be synchronized with libosmocore Depends-on: I548ff12f7277cbb7e1a630a3dc02b738ce89be72 (libosmocore) Change-Id: I1af704cdd62ddaff4304479b837dc185b80d7dd6
Diffstat (limited to 'src')
-rw-r--r--src/gbproxy/gb_proxy.c28
-rw-r--r--src/sgsn/gprs_gb.c12
2 files changed, 20 insertions, 20 deletions
diff --git a/src/gbproxy/gb_proxy.c b/src/gbproxy/gb_proxy.c
index 1dc3114b..1d29b643 100644
--- a/src/gbproxy/gb_proxy.c
+++ b/src/gbproxy/gb_proxy.c
@@ -168,7 +168,7 @@ static int gbprox_relay2nse(struct msgb *old_msg, struct gbproxy_nse *nse,
if (gprs_gb_parse_tlli(msgb_data(msg), msgb_length(msg), &tlli) == 1)
nsp.u.unitdata.link_selector = tlli;
- osmo_prim_init(&nsp.oph, SAP_NS, PRIM_NS_UNIT_DATA,
+ osmo_prim_init(&nsp.oph, SAP_NS, GPRS_NS2_PRIM_UNIT_DATA,
PRIM_OP_REQUEST, msg);
rc = gprs_ns2_recv_prim(nsi, &nsp.oph);
/* FIXME: We need a counter group for gbproxy_nse */
@@ -1279,7 +1279,7 @@ int gbprox_bssgp_send_cb(void *ctx, struct msgb *msg)
nsp.bvci = msgb_bvci(msg);
nsp.nsei = msgb_nsei(msg);
- osmo_prim_init(&nsp.oph, SAP_NS, PRIM_NS_UNIT_DATA, PRIM_OP_REQUEST, msg);
+ osmo_prim_init(&nsp.oph, SAP_NS, GPRS_NS2_PRIM_UNIT_DATA, PRIM_OP_REQUEST, msg);
rc = gprs_ns2_recv_prim(nsi, &nsp.oph);
return rc;
@@ -1321,13 +1321,13 @@ int gbprox_rcvmsg(void *ctx, struct msgb *msg)
}
/* TODO: What about handling:
- * NS_AFF_CAUSE_VC_FAILURE,
- NS_AFF_CAUSE_VC_RECOVERY,
- NS_AFF_CAUSE_FAILURE,
- NS_AFF_CAUSE_RECOVERY,
+ * GPRS_NS2_AFF_CAUSE_VC_FAILURE,
+ GPRS_NS2_AFF_CAUSE_VC_RECOVERY,
+ GPRS_NS2_AFF_CAUSE_FAILURE,
+ GPRS_NS2_AFF_CAUSE_RECOVERY,
osmocom own causes
- NS_AFF_CAUSE_SNS_CONFIGURED,
- NS_AFF_CAUSE_SNS_FAILURE,
+ GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED,
+ GPRS_NS2_AFF_CAUSE_SNS_FAILURE,
*/
void gprs_ns_prim_status_cb(struct gbproxy_config *cfg, struct osmo_gprs_ns2_prim *nsp)
@@ -1340,11 +1340,11 @@ void gprs_ns_prim_status_cb(struct gbproxy_config *cfg, struct osmo_gprs_ns2_pri
struct gbproxy_nse *sgsn_nse;
switch (nsp->u.status.cause) {
- case NS_AFF_CAUSE_SNS_FAILURE:
- case NS_AFF_CAUSE_SNS_CONFIGURED:
+ case GPRS_NS2_AFF_CAUSE_SNS_FAILURE:
+ case GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED:
break;
- case NS_AFF_CAUSE_RECOVERY:
+ case GPRS_NS2_AFF_CAUSE_RECOVERY:
LOGP(DGPRS, LOGL_NOTICE, "NS-NSE %d became available\n", nsp->nsei);
sgsn_nse = gbproxy_nse_by_nsei(cfg, nsp->nsei, NSE_F_SGSN);
if (sgsn_nse) {
@@ -1354,7 +1354,7 @@ void gprs_ns_prim_status_cb(struct gbproxy_config *cfg, struct osmo_gprs_ns2_pri
osmo_fsm_inst_dispatch(bvc->fi, BSSGP_BVCFSM_E_REQ_RESET, &cause);
}
break;
- case NS_AFF_CAUSE_FAILURE:
+ case GPRS_NS2_AFF_CAUSE_FAILURE:
#if 0
if (gbproxy_is_sgsn_nsei(cfg, nsp->nsei)) {
/* sgsn */
@@ -1408,7 +1408,7 @@ int gprs_ns2_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
}
switch (oph->primitive) {
- case PRIM_NS_UNIT_DATA:
+ case GPRS_NS2_PRIM_UNIT_DATA:
/* hand the message into the BSSGP implementation */
msgb_bssgph(oph->msg) = oph->msg->l3h;
@@ -1420,7 +1420,7 @@ int gprs_ns2_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
rc = gbprox_rcvmsg(cfg, oph->msg);
msgb_free(oph->msg);
break;
- case PRIM_NS_STATUS:
+ case GPRS_NS2_PRIM_STATUS:
gprs_ns_prim_status_cb(cfg, nsp);
break;
default:
diff --git a/src/sgsn/gprs_gb.c b/src/sgsn/gprs_gb.c
index c7d5c28b..2585d6dc 100644
--- a/src/sgsn/gprs_gb.c
+++ b/src/sgsn/gprs_gb.c
@@ -114,17 +114,17 @@ int gprs_gb_send_cb(void *ctx, struct msgb *msg)
struct osmo_gprs_ns2_prim nsp = {};
nsp.nsei = msgb_nsei(msg);
nsp.bvci = msgb_bvci(msg);
- osmo_prim_init(&nsp.oph, SAP_NS, PRIM_NS_UNIT_DATA, PRIM_OP_REQUEST, msg);
+ osmo_prim_init(&nsp.oph, SAP_NS, GPRS_NS2_PRIM_UNIT_DATA, PRIM_OP_REQUEST, msg);
return gprs_ns2_recv_prim(nsi, &nsp.oph);
}
void gprs_ns_prim_status_cb(struct osmo_gprs_ns2_prim *nsp)
{
switch (nsp->u.status.cause) {
- case NS_AFF_CAUSE_SNS_CONFIGURED:
+ case GPRS_NS2_AFF_CAUSE_SNS_CONFIGURED:
LOGP(DGPRS, LOGL_NOTICE, "NS-E %d SNS configured.\n", nsp->nsei);
break;
- case NS_AFF_CAUSE_RECOVERY:
+ case GPRS_NS2_AFF_CAUSE_RECOVERY:
LOGP(DGPRS, LOGL_NOTICE, "NS-E %d became available\n", nsp->nsei);
/* workaround for broken BSS which doesn't respond correct to BSSGP status message.
* Sent a BSSGP Reset when a persistent NSVC comes up for the first time. */
@@ -135,7 +135,7 @@ void gprs_ns_prim_status_cb(struct osmo_gprs_ns2_prim *nsp)
bssgp_tx_bvc_reset2(&bctx, BVCI_SIGNALLING, BSSGP_CAUSE_EQUIP_FAIL, false);
}
break;
- case NS_AFF_CAUSE_FAILURE:
+ case GPRS_NS2_AFF_CAUSE_FAILURE:
LOGP(DGPRS, LOGL_NOTICE, "NS-E %d became unavailable\n", nsp->nsei);
break;
default:
@@ -164,7 +164,7 @@ int gprs_ns_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
}
switch (oph->primitive) {
- case PRIM_NS_UNIT_DATA:
+ case GPRS_NS2_PRIM_UNIT_DATA:
/* hand the message into the BSSGP implementation */
/* add required msg fields for Gb layer */
msgb_bssgph(oph->msg) = oph->msg->l3h;
@@ -172,7 +172,7 @@ int gprs_ns_prim_cb(struct osmo_prim_hdr *oph, void *ctx)
msgb_nsei(oph->msg) = nsp->nsei;
rc = bssgp_rcvmsg(oph->msg);
break;
- case PRIM_NS_STATUS:
+ case GPRS_NS2_PRIM_STATUS:
gprs_ns_prim_status_cb(nsp);
break;
default: