[nat] Move the structs to the header file
This way the VTY code can use the structures to implement
the show functionality.
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h
index 8293a4b..cfd6a8a 100644
--- a/openbsc/include/openbsc/bsc_nat.h
+++ b/openbsc/include/openbsc/bsc_nat.h
@@ -24,6 +24,8 @@
#include <sys/types.h>
#include <sccp/sccp_types.h>
+
+#include "select.h"
#include "msgb.h"
#define DIR_BSC 1
@@ -62,6 +64,34 @@
int gsm_type;
};
+/*
+ * Per BSC data structure
+ */
+struct bsc_connection {
+ struct llist_head list_entry;
+
+ /* do we know anything about this BSC? */
+ int authenticated;
+
+ /* the fd we use to communicate */
+ struct bsc_fd bsc_fd;
+};
+
+/*
+ * 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 sccp_source_reference real_ref;
+ struct sccp_source_reference patched_ref;
+};
+
+
/**
* parse the given message into the above structure
*/
diff --git a/openbsc/src/nat/bsc_nat.c b/openbsc/src/nat/bsc_nat.c
index 9242b55..49d791d 100644
--- a/openbsc/src/nat/bsc_nat.c
+++ b/openbsc/src/nat/bsc_nat.c
@@ -54,37 +54,9 @@
static struct bsc_fd bsc_connection;
-/*
- * Per BSC data structure
- */
-struct bsc_connection {
- struct llist_head list_entry;
-
- /* do we know anything about this BSC? */
- int authenticated;
-
- /* the fd we use to communicate */
- struct bsc_fd bsc_fd;
-};
-
-/*
- * 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 sccp_source_reference real_ref;
- struct sccp_source_reference patched_ref;
-};
-
static LLIST_HEAD(bsc_connections);
static LLIST_HEAD(sccp_connections);
-
/*
* below are stubs we need to link
*/