diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-02-07 13:08:09 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-02-07 13:08:09 +0100 |
commit | 63bb29fac022ed0eb6833ad17884b78bd958175d (patch) | |
tree | 504a6895b54f64a89418703665d880799ace0801 | |
parent | 04b4f915a761f80bf026bcbc783185ce0d3cec1d (diff) |
[nat] Move the structs to the header file
This way the VTY code can use the structures to implement
the show functionality.
-rw-r--r-- | openbsc/include/openbsc/bsc_nat.h | 30 | ||||
-rw-r--r-- | openbsc/src/nat/bsc_nat.c | 28 |
2 files changed, 30 insertions, 28 deletions
diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 8293a4b5c..cfd6a8a34 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 @@ struct bsc_nat_parsed { 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 9242b55be..49d791d09 100644 --- a/openbsc/src/nat/bsc_nat.c +++ b/openbsc/src/nat/bsc_nat.c @@ -54,37 +54,9 @@ static struct bsc_fd msc_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(sccp_connections); - /* * below are stubs we need to link */ |