[nat] Move the structs to the header file

This way the VTY code can use the structures to implement
the show functionality.
This commit is contained in:
Holger Hans Peter Freyther
2010-02-07 13:08:09 +01:00
parent 6db5ce5318
commit 9f8f3d09a6
2 changed files with 30 additions and 28 deletions

View File

@@ -24,6 +24,8 @@
#include <sys/types.h> #include <sys/types.h>
#include <sccp/sccp_types.h> #include <sccp/sccp_types.h>
#include "select.h"
#include "msgb.h" #include "msgb.h"
#define DIR_BSC 1 #define DIR_BSC 1
@@ -62,6 +64,34 @@ struct bsc_nat_parsed {
int gsm_type; 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 * parse the given message into the above structure
*/ */

View File

@@ -54,37 +54,9 @@ static struct bsc_fd msc_connection;
static struct bsc_fd bsc_connection; 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(bsc_connections);
static LLIST_HEAD(sccp_connections); static LLIST_HEAD(sccp_connections);
/* /*
* below are stubs we need to link * below are stubs we need to link
*/ */