diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-16 16:35:00 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-10-19 16:40:17 +0200 |
commit | 3d38742d1ce756dcbebcdb197574f200f57f2a77 (patch) | |
tree | 2e21e4ceeb22a6bee06fbce807a5b6260aef4a4a /openbsc/src | |
parent | f961de1108407623aa2201df4710fecd9a3bf795 (diff) |
nat: Find a connection by the real ref
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/nat/bsc_sccp.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/openbsc/src/nat/bsc_sccp.c b/openbsc/src/nat/bsc_sccp.c index dae595049..a5c4f1bf4 100644 --- a/openbsc/src/nat/bsc_sccp.c +++ b/openbsc/src/nat/bsc_sccp.c @@ -235,3 +235,16 @@ struct sccp_connections *patch_sccp_src_ref_to_msc(struct msgb *msg, return NULL; } + +struct sccp_connections *bsc_nat_find_con_by_bsc(struct bsc_nat *nat, + struct sccp_source_reference *ref) +{ + struct sccp_connections *conn; + + llist_for_each_entry(conn, &nat->sccp_connections, list_entry) { + if (memcmp(ref, &conn->real_ref, sizeof(*ref)) == 0) + return conn; + } + + return NULL; +} |