aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gb_proxy_patch.c
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-19 15:07:27 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-10-09 17:44:57 +0200
commit91d2f8a7048bfed3519026bb2f821bbe417c0eec (patch)
tree878f5bfaf85b9c0a961156cd1aa3c19d4e63da0b /openbsc/src/gprs/gb_proxy_patch.c
parent9a7b0d564107cb0d78a1596f595d096579562a48 (diff)
gbproxy: Use the term 'link' instead of 'tlli'
Currently in many places where 'tlli' (Temporary Logical Link Identifier) within identifiers is used, the logical link itself is meant instead. For instance, the tlli_info contain information about an LLC logical link including up to four individual TLLI. To avoid confusion between these concepts, this patch replaces all 'tlli_info' by 'link_info' and a few 'tlli' by 'link'. Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gb_proxy_patch.c')
-rw-r--r--openbsc/src/gprs/gb_proxy_patch.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/openbsc/src/gprs/gb_proxy_patch.c b/openbsc/src/gprs/gb_proxy_patch.c
index 93b85880c..cf6eb8887 100644
--- a/openbsc/src/gprs/gb_proxy_patch.c
+++ b/openbsc/src/gprs/gb_proxy_patch.c
@@ -192,20 +192,20 @@ static int gbproxy_patch_ptmsi(uint8_t *ptmsi_enc,
int gbproxy_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len,
struct gbproxy_peer *peer,
- struct gbproxy_tlli_info *tlli_info, int *len_change,
+ struct gbproxy_link_info *link_info, int *len_change,
struct gprs_gb_parse_context *parse_ctx)
{
struct gprs_llc_hdr_parsed *ghp = &parse_ctx->llc_hdr_parsed;
int have_patched = 0;
int fcs;
- if (parse_ctx->ptmsi_enc && tlli_info &&
+ if (parse_ctx->ptmsi_enc && link_info &&
!parse_ctx->old_raid_is_foreign && peer->cfg->patch_ptmsi) {
uint32_t ptmsi;
if (parse_ctx->to_bss)
- ptmsi = tlli_info->tlli.ptmsi;
+ ptmsi = link_info->tlli.ptmsi;
else
- ptmsi = tlli_info->sgsn_tlli.ptmsi;
+ ptmsi = link_info->sgsn_tlli.ptmsi;
if (ptmsi != GSM_RESERVED_TMSI) {
if (gbproxy_patch_ptmsi(parse_ctx->ptmsi_enc, peer,
@@ -216,12 +216,12 @@ int gbproxy_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len,
}
}
- if (parse_ctx->new_ptmsi_enc && tlli_info && peer->cfg->patch_ptmsi) {
+ if (parse_ctx->new_ptmsi_enc && link_info && peer->cfg->patch_ptmsi) {
uint32_t ptmsi;
if (parse_ctx->to_bss)
- ptmsi = tlli_info->tlli.ptmsi;
+ ptmsi = link_info->tlli.ptmsi;
else
- ptmsi = tlli_info->sgsn_tlli.ptmsi;
+ ptmsi = link_info->sgsn_tlli.ptmsi;
OSMO_ASSERT(ptmsi);
if (gbproxy_patch_ptmsi(parse_ctx->new_ptmsi_enc, peer,
@@ -245,7 +245,7 @@ int gbproxy_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len,
if (parse_ctx->apn_ie &&
peer->cfg->core_apn &&
!parse_ctx->to_bss &&
- gbproxy_imsi_matches(peer, tlli_info) && peer->cfg->core_apn) {
+ gbproxy_imsi_matches(peer, link_info) && peer->cfg->core_apn) {
size_t new_len;
gbproxy_patch_apn_ie(msg,
parse_ctx->apn_ie, parse_ctx->apn_ie_len,
@@ -275,7 +275,7 @@ int gbproxy_patch_llc(struct msgb *msg, uint8_t *llc, size_t llc_len,
/* patch BSSGP message to use core_mcc/mnc on the SGSN side */
void gbproxy_patch_bssgp(struct msgb *msg, uint8_t *bssgp, size_t bssgp_len,
struct gbproxy_peer *peer,
- struct gbproxy_tlli_info *tlli_info, int *len_change,
+ struct gbproxy_link_info *link_info, int *len_change,
struct gprs_gb_parse_context *parse_ctx)
{
const char *err_info = NULL;
@@ -296,7 +296,7 @@ void gbproxy_patch_bssgp(struct msgb *msg, uint8_t *bssgp, size_t bssgp_len,
goto patch_error;
}
- if (!tlli_info && parse_ctx->tlli_enc && parse_ctx->to_bss) {
+ if (!link_info && parse_ctx->tlli_enc && parse_ctx->to_bss) {
/* Happens with unknown (not cached) TLLI coming from
* the SGSN */
/* TODO: What shall be done with the message in this case? */
@@ -305,12 +305,12 @@ void gbproxy_patch_bssgp(struct msgb *msg, uint8_t *bssgp, size_t bssgp_len,
goto patch_error;
}
- if (!tlli_info)
+ if (!link_info)
return;
if (parse_ctx->tlli_enc && peer->cfg->patch_ptmsi) {
uint32_t tlli = gbproxy_map_tlli(parse_ctx->tlli,
- tlli_info, parse_ctx->to_bss);
+ link_info, parse_ctx->to_bss);
if (tlli) {
gbproxy_patch_tlli(parse_ctx->tlli_enc, peer, tlli,
@@ -329,7 +329,7 @@ void gbproxy_patch_bssgp(struct msgb *msg, uint8_t *bssgp, size_t bssgp_len,
size_t llc_len = parse_ctx->llc_len;
int llc_len_change = 0;
- gbproxy_patch_llc(msg, llc, llc_len, peer, tlli_info,
+ gbproxy_patch_llc(msg, llc, llc_len, peer, link_info,
&llc_len_change, parse_ctx);
/* Note that the APN might have been resized here, but no
* pointer int the parse_ctx will refer to an adress after the