diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-04-20 17:50:17 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-04-29 13:10:37 +0200 |
commit | d3fa84dbba3b67cdbe2d8c789b2833b5ddf42068 (patch) | |
tree | 6d50bb33ac683624f4c861468ce01d1e9743bf9d /openbsc/include | |
parent | 53373bca8f9fe79ca981f9fc1ef644586bd5c3b2 (diff) |
use new libosmocore gsm_23_003.h for IMEI/IMSI length
... rather than our private definitions everwhere. As an added benefit,
gprs_gsup_messages.h is now free of any header dependencies within
openbsc.
Diffstat (limited to 'openbsc/include')
-rw-r--r-- | openbsc/include/openbsc/gprs_gsup_messages.h | 7 | ||||
-rw-r--r-- | openbsc/include/openbsc/gprs_sgsn.h | 7 | ||||
-rw-r--r-- | openbsc/include/openbsc/gsm_subscriber.h | 7 | ||||
-rw-r--r-- | openbsc/include/openbsc/ipaccess.h | 3 |
4 files changed, 12 insertions, 12 deletions
diff --git a/openbsc/include/openbsc/gprs_gsup_messages.h b/openbsc/include/openbsc/gprs_gsup_messages.h index c4e97570c..fe8bef555 100644 --- a/openbsc/include/openbsc/gprs_gsup_messages.h +++ b/openbsc/include/openbsc/gprs_gsup_messages.h @@ -22,9 +22,10 @@ #pragma once #include <stdint.h> +#include <osmocom/core/msgb.h> +#include <osmocom/gsm/protocol/gsm_23_003.h> #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> -/* Needed for GSM_IMSI_LENGTH: */ -#include <openbsc/gsm_subscriber.h> +#include <osmocom/crypt/auth.h> #define GPRS_GSUP_MAX_NUM_PDP_INFO 10 /* GSM 09.02 limits this to 50 */ #define GPRS_GSUP_MAX_NUM_AUTH_INFO 5 @@ -98,7 +99,7 @@ struct gprs_gsup_pdp_info { struct gprs_gsup_message { enum gprs_gsup_message_type message_type; - char imsi[GSM_IMSI_LENGTH]; + char imsi[GSM23003_IMSI_MAX_DIGITS+2]; enum gsm48_gmm_cause cause; enum gprs_gsup_cancel_type cancel_type; int pdp_info_compl; diff --git a/openbsc/include/openbsc/gprs_sgsn.h b/openbsc/include/openbsc/gprs_sgsn.h index 49d5407f5..898b7a514 100644 --- a/openbsc/include/openbsc/gprs_sgsn.h +++ b/openbsc/include/openbsc/gprs_sgsn.h @@ -9,11 +9,10 @@ #include <osmocom/gsm/gsm48.h> #include <osmocom/crypt/gprs_cipher.h> +#include <osmocom/gsm/protocol/gsm_23_003.h> #include <openbsc/gsm_data.h> -#define GSM_IMSI_LENGTH 17 -#define GSM_IMEI_LENGTH 17 #define GSM_EXTENSION_LENGTH 15 #define GSM_APN_LENGTH 102 @@ -98,12 +97,12 @@ struct sgsn_ggsn_lookup { struct sgsn_mm_ctx { struct llist_head list; - char imsi[GSM_IMSI_LENGTH]; + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; enum gprs_mm_state mm_state; uint32_t p_tmsi; uint32_t p_tmsi_old; /* old P-TMSI before new is confirmed */ uint32_t p_tmsi_sig; - char imei[GSM_IMEI_LENGTH]; + char imei[GSM23003_IMEISV_NUM_DIGITS+1]; /* Opt: Software Version Numbber / TS 23.195 */ char msisdn[GSM_EXTENSION_LENGTH]; struct gprs_ra_id ra; diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h index 7d6c776bc..9df989a79 100644 --- a/openbsc/include/openbsc/gsm_subscriber.h +++ b/openbsc/include/openbsc/gsm_subscriber.h @@ -3,9 +3,8 @@ #include "gsm_data.h" #include <osmocom/core/linuxlist.h> +#include <osmocom/gsm/protocol/gsm_23_003.h> -#define GSM_IMEI_LENGTH 17 -#define GSM_IMSI_LENGTH 17 #define GSM_NAME_LENGTH 160 #define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */ @@ -32,7 +31,7 @@ struct gsm_subscriber_group { struct gsm_equipment { long long unsigned int id; - char imei[GSM_IMEI_LENGTH]; + char imei[GSM23003_IMEISV_NUM_DIGITS+1]; char name[GSM_NAME_LENGTH]; struct gsm48_classmark1 classmark1; @@ -45,7 +44,7 @@ struct gsm_equipment { struct gsm_subscriber { struct gsm_subscriber_group *group; long long unsigned int id; - char imsi[GSM_IMSI_LENGTH]; + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; uint32_t tmsi; uint16_t lac; char name[GSM_NAME_LENGTH]; diff --git a/openbsc/include/openbsc/ipaccess.h b/openbsc/include/openbsc/ipaccess.h index 38151c477..82e89c27d 100644 --- a/openbsc/include/openbsc/ipaccess.h +++ b/openbsc/include/openbsc/ipaccess.h @@ -5,13 +5,14 @@ #include "gsm_subscriber.h" #include <osmocom/core/linuxlist.h> #include <osmocom/gsm/protocol/ipaccess.h> +#include <osmocom/gsm/protocol/gsm_23_003.h> struct ipac_msgt_sccp_state { uint8_t src_ref[3]; uint8_t dst_ref[3]; uint8_t trans_id; uint8_t invoke_id; - char imsi[GSM_IMSI_LENGTH]; + char imsi[GSM23003_IMSI_MAX_DIGITS+1]; uint8_t data[0]; } __attribute__((packed)); |