diff options
author | Philipp Maier <pmaier@sysmocom.de> | 2022-01-20 17:59:48 +0100 |
---|---|---|
committer | Philipp Maier <pmaier@sysmocom.de> | 2022-01-31 17:40:49 +0100 |
commit | 63a0cfe04ea1955b0c1f94a56f7850fa116849d1 (patch) | |
tree | 4ee8daa5c1d1c9a3dd459058964b6b9912395cfa /include/osmocom/ranap | |
parent | ca6054ef8c30646bc36b0de60d28523804e717c3 (diff) |
ranap_common_ran: add decoder for CN/MSC originated messages
Lets add a counterpart for ranap_common_cn that works the same, but
decodes CN/MSC originated messages.
Change-Id: Iad4c2743d4d1ddf8ad49002d1fe6866f22eb9e98
Related: OS#5152
Diffstat (limited to 'include/osmocom/ranap')
-rw-r--r-- | include/osmocom/ranap/Makefile.am | 1 | ||||
-rw-r--r-- | include/osmocom/ranap/ranap_common.h | 3 | ||||
-rw-r--r-- | include/osmocom/ranap/ranap_common_cn.h | 2 | ||||
-rw-r--r-- | include/osmocom/ranap/ranap_common_ran.h | 15 |
4 files changed, 19 insertions, 2 deletions
diff --git a/include/osmocom/ranap/Makefile.am b/include/osmocom/ranap/Makefile.am index 1606928..2662484 100644 --- a/include/osmocom/ranap/Makefile.am +++ b/include/osmocom/ranap/Makefile.am @@ -10,6 +10,7 @@ ranap_HEADERS = \ ranap_ies_defs.h \ ranap_common.h \ ranap_common_cn.h \ + ranap_common_ran.h \ ranap_msg_factory.h \ iu_helpers.h \ iu_client.h \ diff --git a/include/osmocom/ranap/ranap_common.h b/include/osmocom/ranap/ranap_common.h index 0343a57..7511a75 100644 --- a/include/osmocom/ranap/ranap_common.h +++ b/include/osmocom/ranap/ranap_common.h @@ -596,6 +596,9 @@ struct gprs_ra_id; extern int _ranap_DRANAP; #define RANAP_DEBUG(x, args ...) DEBUGP(_ranap_DRANAP, x, ## args) +/* Callback to be used with decoder functions in ranap_common_cn.c ranap_common_ran.c */ +typedef void (*ranap_handle_cb)(void *ctx, ranap_message *ranap_msg); + extern int asn1_xer_print; extern const struct value_string ranap_presence_vals[5]; diff --git a/include/osmocom/ranap/ranap_common_cn.h b/include/osmocom/ranap/ranap_common_cn.h index 90ff6da..fb65049 100644 --- a/include/osmocom/ranap/ranap_common_cn.h +++ b/include/osmocom/ranap/ranap_common_cn.h @@ -5,8 +5,6 @@ #include <osmocom/ranap/ranap_common.h> #include <osmocom/ranap/ranap_ies_defs.h> -typedef void (*ranap_handle_cb)(void *ctx, ranap_message *ranap_msg); - /* free a decoded connection-less RANAP message */ void ranap_cn_rx_cl_free(ranap_message *message); diff --git a/include/osmocom/ranap/ranap_common_ran.h b/include/osmocom/ranap/ranap_common_ran.h new file mode 100644 index 0000000..5eef272 --- /dev/null +++ b/include/osmocom/ranap/ranap_common_ran.h @@ -0,0 +1,15 @@ +#pragma once + +#include <stdint.h> + +#include <osmocom/ranap/ranap_common.h> +#include <osmocom/ranap/ranap_ies_defs.h> + +/* free a decoded connection-oriented RANAP message */ +void ranap_ran_rx_co_free(ranap_message *message); + +/* decode a connection-oriented RANAP message */ +int ranap_ran_rx_co_decode(void *ctx, ranap_message *message, uint8_t *data, size_t len); + +/* receive a connection-oriented RANAP message */ +int ranap_ran_rx_co(ranap_handle_cb cb, void *ctx, uint8_t *data, size_t len); |