aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/bsc_nat.h
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-31 05:17:17 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-31 05:20:31 +0800
commitc2b31ed9cda31d9432ae733e6ca112ccf38f0996 (patch)
tree3d373b72bbb38a976db4d2fc9343e3e16d07c191 /openbsc/include/openbsc/bsc_nat.h
parent5654c5b090dfb797320a53c1132605d8006533de (diff)
nat: Fix compilation with nat not being enabled.
common_vty.c was including bsc_nat.h which tried to get the sccp/sccp_types.h which is not required to be installed. Move all structs using/embedding SCCP structures into the bsc_nat_sccp.h and include. This should fix the compilation.
Diffstat (limited to 'openbsc/include/openbsc/bsc_nat.h')
-rw-r--r--openbsc/include/openbsc/bsc_nat.h65
1 files changed, 2 insertions, 63 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 32628d674..140fa6837 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -25,7 +25,6 @@
#include "mgcp.h"
#include <sys/types.h>
-#include <sccp/sccp_types.h>
#include <osmocore/select.h>
#include <osmocore/msgb.h>
@@ -41,6 +40,8 @@
#define NAT_IPAC_PROTO_MGCP 0xfc
+struct sccp_connections;
+struct bsc_nat_parsed;
struct bsc_nat;
enum {
@@ -53,39 +54,6 @@ enum {
};
/*
- * For the NAT we will need to analyze and later patch
- * the received message. This would require us to parse
- * the IPA and SCCP header twice. Instead of doing this
- * we will have one analyze structure and have the patching
- * and filter operate on the same structure.
- */
-struct bsc_nat_parsed {
- /* ip access prototype */
- int ipa_proto;
-
- /* source local reference */
- struct sccp_source_reference *src_local_ref;
-
- /* destination local reference */
- struct sccp_source_reference *dest_local_ref;
-
- /* called ssn number */
- int called_ssn;
-
- /* calling ssn number */
- int calling_ssn;
-
- /* sccp message type */
- int sccp_type;
-
- /* bssap type, e.g. 0 for BSS Management */
- int bssap;
-
- /* the gsm0808 message type */
- int gsm_type;
-};
-
-/*
* Per BSC data structure
*/
struct bsc_connection {
@@ -111,35 +79,6 @@ struct bsc_connection {
struct bsc_nat *nat;
};
-/*
- * Per SCCP source local reference patch table. It needs to
- * be updated on new SCCP connections, connection confirm and reject,
- * and on the loss of the BSC connection.
- */
-struct sccp_connections {
- struct llist_head list_entry;
-
- struct bsc_connection *bsc;
- struct bsc_msc_connection *msc_con;
-
- struct sccp_source_reference real_ref;
- struct sccp_source_reference patched_ref;
- struct sccp_source_reference remote_ref;
- int has_remote_ref;
-
- /* status */
- int con_type;
- int con_local;
-
- /* GSM audio handling. That is 32 * multiplex + ts */
- int crcx;
- int msc_timeslot;
- int bsc_timeslot;
-
- /* timeout handling */
- struct timespec creation_time;
-};
-
/**
* Stats per BSC
*/