aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/sccp/sccp.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-01-13 09:55:43 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-01-29 04:35:18 +0100
commita692fbcff5d0e952799ff948b80c3363332168e8 (patch)
tree52c8224eb785c0796e0bde05ea9a303dc790fe1f /openbsc/src/sccp/sccp.c
parent3b9516e0d86b2008ce2b3ccaff25cd804e6bc84c (diff)
[sccp] Add a utility for the nat..
Add a small helper to determine the type of a message
Diffstat (limited to 'openbsc/src/sccp/sccp.c')
-rw-r--r--openbsc/src/sccp/sccp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/sccp/sccp.c b/openbsc/src/sccp/sccp.c
index 522afcf7a..7e55231e5 100644
--- a/openbsc/src/sccp/sccp.c
+++ b/openbsc/src/sccp/sccp.c
@@ -1160,6 +1160,14 @@ struct sccp_source_reference sccp_src_ref_from_int(u_int32_t int_ref)
return ref;
}
+int sccp_determine_msg_type(struct msgb *msg)
+{
+ if (msgb_l2len(msg) < 1)
+ return -1;
+
+ return msg->l2h[0];
+}
+
static __attribute__((constructor)) void on_dso_load(void)
{
tall_sccp_ctx = talloc_named_const(NULL, 1, "sccp");