gtphub.h: Remove dependency on sgsn/gprs_sgsn.h
It is only really needed to import define GSM_APN_LENGTH, which is actually also available in libosmogsm. Hence simply use the one from libosmogsm. Change-Id: I4c6110feeeaa1adfb6b1f0147eeb56dfe34636ecchanges/03/30903/3
parent
f44dfa8a0e
commit
6aad14c3fa
|
@ -27,9 +27,7 @@
|
|||
#include <osmocom/core/select.h>
|
||||
#include <osmocom/core/timer.h>
|
||||
#include <osmocom/core/rate_ctr.h>
|
||||
|
||||
#include <osmocom/sgsn/gprs_sgsn.h>
|
||||
|
||||
#include <osmocom/gsm/apn.h>
|
||||
|
||||
/* support */
|
||||
|
||||
|
@ -428,7 +426,7 @@ struct gtphub_resolved_ggsn {
|
|||
|
||||
/* The APN OI, the Operator Identifier, is the combined address,
|
||||
* including parts of the IMSI and APN NI, and ending with ".gprs". */
|
||||
char apn_oi_str[GSM_APN_LENGTH];
|
||||
char apn_oi_str[APN_MAXLEN+1];
|
||||
|
||||
/* Which address and port we resolved that to. */
|
||||
struct gtphub_peer_port *peer;
|
||||
|
|
|
@ -475,7 +475,7 @@ static int get_ie_imsi_str(union gtpie_member *ie[], int i,
|
|||
* present but cannot be decoded. */
|
||||
static int get_ie_apn_str(union gtpie_member *ie[], const char **apn_str)
|
||||
{
|
||||
static char apn_buf[GSM_APN_LENGTH];
|
||||
static char apn_buf[APN_MAXLEN+1];
|
||||
unsigned int len;
|
||||
if (gtpie_gettlv(ie, GTPIE_APN, 0,
|
||||
&len, apn_buf, sizeof(apn_buf)) != 0)
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
#include <osmocom/core/utils.h>
|
||||
#include <osmocom/gsm/apn.h>
|
||||
#include <osmocom/gsm/protocol/gsm_23_003.h>
|
||||
|
||||
/* TODO split GRX ares from sgsn into a separate struct and allow use without
|
||||
* globals. */
|
||||
|
@ -56,8 +57,8 @@ struct ggsn_lookup {
|
|||
struct gtphub *hub;
|
||||
|
||||
char imsi_str[GSM23003_IMSI_MAX_DIGITS+1];
|
||||
char apn_ni_str[GSM_APN_LENGTH];
|
||||
char apn_oi_str[GSM_APN_LENGTH];
|
||||
char apn_ni_str[APN_MAXLEN+1];
|
||||
char apn_oi_str[APN_MAXLEN+1];
|
||||
int have_3dig_mnc;
|
||||
};
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <osmocom/core/logging.h>
|
||||
#include <osmocom/core/utils.h>
|
||||
#include <osmocom/core/rate_ctr.h>
|
||||
#include <osmocom/core/msgb.h>
|
||||
|
||||
#include <osmocom/vty/logging.h>
|
||||
#include <osmocom/vty/telnet_interface.h>
|
||||
|
|
|
@ -25,6 +25,11 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <osmocom/core/utils.h>
|
||||
|
||||
#include <osmocom/gtphub/gtphub.h>
|
||||
#include <osmocom/sgsn/debug.h>
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include <osmocom/core/utils.h>
|
||||
#include <osmocom/core/application.h>
|
||||
#include <osmocom/gsm/protocol/gsm_23_003.h>
|
||||
|
||||
#include <osmocom/sgsn/debug.h>
|
||||
|
||||
|
@ -376,7 +377,7 @@ static void test_expiry(void)
|
|||
}
|
||||
|
||||
char resolve_ggsn_got_imsi[GSM23003_IMSI_MAX_DIGITS+1];
|
||||
char resolve_ggsn_got_ni[GSM_APN_LENGTH];
|
||||
char resolve_ggsn_got_ni[APN_MAXLEN+1];
|
||||
|
||||
struct sgsn_sockaddr resolved_ggsn_addr;
|
||||
static int resolve_to_ggsn(const char *addr, uint16_t port)
|
||||
|
|
Loading…
Reference in New Issue