libosmo-sigtran 2.0.0.50-b59d
Osmocom SIGTRAN library
|
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <inttypes.h>
#include <osmocom/sccp/sccp_types.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/sccp_helpers.h>
#include <osmocom/sigtran/protocol/sua.h>
#include "xua_msg.h"
#include "xua_internal.h"
#include "sccp_internal.h"
Macros | |
#define | MAX_IES 6 |
#define | NUM_SCCP_MSGT (SCCP_MSG_TYPE_LUDTS+1) |
Functions | |
static void | msgb_put_u24be (struct msgb *msg, uint32_t val) |
static void | msgb_put_u16le (struct msgb *msg, uint16_t val) |
static uint32_t | load_24be (const void *ptr) |
load a 24bit value as big-endian More... | |
int | osmo_isup_party_parse (char *out_digits, const uint8_t *in, unsigned int in_num_bytes, bool odd) |
Parse ISUP style address of BCD digets. More... | |
int | osmo_isup_party_encode (struct msgb *msg, const char *in_digits) |
Encode an ISUP style address of BCD digits. More... | |
int | osmo_sccp_addr_parse (struct osmo_sccp_addr *out, const uint8_t *addr, unsigned int addrlen) |
Parse wire-encoded SCCP address into osmo_sccp_addr. More... | |
int | osmo_sccp_addr_encode (struct msgb *msg, const struct osmo_sccp_addr *in) |
encode a SCCP address from parsed format to wire format More... | |
static int | sccp_addr_to_sua (struct xua_msg *xua, uint16_t iei, const uint8_t *addr, unsigned int addrlen) |
convert SCCP address to SUA address More... | |
static int | sccp_addr_to_sua_ptr (struct xua_msg *xua, uint16_t iei, const uint8_t *ptr_addr, bool ptr_addr_is_long) |
convenience wrapper around sccp_addr_to_sua() for variable mandatory addresses More... | |
static int | sua_addr_to_sccp (struct msgb *msg, const struct xua_msg_part *part) |
convert SUA address to SCCP address More... | |
static int | sccp_add_var_addr (struct msgb *msg, uint8_t *var_ptr, bool var_ptr_is_long, const struct xua_msg *xua, uint16_t iei) |
Add a "SCCP Variable Mandatory Part" (Address format) to the given msgb. More... | |
static int | sccp_add_variable_part (struct msgb *msg, uint8_t *var_ptr, const struct xua_msg *xua, uint16_t iei) |
Add a "SCCP Variable Mandatory Part" to the given msgb. More... | |
static int | sccp_add_long_variable_part (struct msgb *msg, uint8_t *var_ptr, const struct xua_msg *xua, uint16_t iei) |
Add a "SCCP Long Variable Mandatory Part" to the given msgb. More... | |
static bool | sccp_ptr_part_consistent (const struct msgb *msg, const uint8_t *ptr_addr) |
validate that SCCP part with pointer + length doesn't exceed msg tail More... | |
static bool | sccp_longptr_part_consistent (const struct msgb *msg, const uint8_t *ptr_addr, bool len_is_long) |
validate that SCCP part with long pointer (2 bytes) + length doesn't exceed msg tail More... | |
static int | sccp_data_to_sua_ptr (struct xua_msg *xua, uint16_t iei, const uint8_t *ptr_addr) |
convenience wrapper around xua_msg_add_data() for variable mandatory data More... | |
static int | sccp_longdata_to_sua_ptr (struct xua_msg *xua, uint16_t iei, const uint8_t *ptr_addr) |
convenience wrapper around xua_msg_add_data() for variable mandatory data More... | |
static int | xua_msg_add_sccp_opt (struct xua_msg *xua, uint8_t sccp_opt_type, uint16_t opt_len, const uint8_t *opt) |
Convert a given SCCP option to SUA and add it to given xua_msg. More... | |
static void | msgb_put_sccp_opt_hdr (struct msgb *msg, uint8_t pnc, uint8_t len) |
append a SCCP option header to the given message More... | |
static void | msgb_put_sccp_opt (struct msgb *msg, uint8_t pnc, uint8_t len, const uint8_t *data) |
append a SCCP option to the given message More... | |
static int | sccp_msg_add_sua_opt (enum sccp_message_types type, struct msgb *msg, const struct xua_msg_part *opt) |
Convert a given SUA option/IE to SCCP and add it to given * msgb. More... | |
static struct xua_msg * | sccp_to_xua_opt (const struct msgb *msg, const uint8_t *ptr_opt, bool ptr_opt_is_long, struct xua_msg *xua) |
convert SCCP optional part to list of SUA options More... | |
static bool | sccp_is_mandatory (enum sccp_message_types type, const struct xua_msg_part *part) |
static bool | sccp_option_permitted (enum sccp_message_types type, const struct xua_msg_part *part) |
static int | xua_ies_to_sccp_opts (struct msgb *msg, uint8_t *ptr_opt, bool ptr_opt_is_long, enum sccp_message_types type, const struct xua_msg *xua) |
static int | store_local_ref (struct sccp_source_reference *local_ref, const struct xua_msg *xua, uint16_t iei) |
static struct xua_msg * | sccp_to_xua_cr (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_cr (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_cc (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_cc (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_cref (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_cref (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_rlsd (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_rlsd (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_rlc (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_rlc (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_dt1 (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_dt1 (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_udt (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_xudt (struct msgb *msg, const struct xua_msg *xua) |
static int | sua_to_sccp_ludt (struct msgb *msg, const struct xua_msg *xua) |
static int | sua_to_sccp_udt (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_xudt (const struct msgb *msg, struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_ludt (struct msgb *msg, struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_udts (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_xudts (struct msgb *msg, const struct xua_msg *xua) |
static int | sua_to_sccp_ludts (struct msgb *msg, const struct xua_msg *xua) |
static int | sua_to_sccp_udts (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_xudts (const struct msgb *msg, struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_ludts (const struct msgb *msg, struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_it (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_it (struct msgb *msg, const struct xua_msg *xua) |
static struct xua_msg * | sccp_to_xua_err (const struct msgb *msg, struct xua_msg *xua) |
static int | sua_to_sccp_err (struct msgb *msg, const struct xua_msg *xua) |
struct xua_msg * | osmo_sccp_to_xua (struct msgb *msg) |
convert SCCP message to a SUA message More... | |
struct msgb * | osmo_sua_to_sccp (struct xua_msg *xua) |
convert parsed SUA message to SCCP message More... | |
Variables | |
static const uint16_t | sccp_mandatory [NUM_SCCP_MSGT][MAX_IES] |
static const uint16_t | sccp_optional [NUM_SCCP_MSGT][MAX_IES] |
#define MAX_IES 6 |
#define NUM_SCCP_MSGT (SCCP_MSG_TYPE_LUDTS+1) |
|
static |
load a 24bit value as big-endian
References data.
Referenced by sccp_to_xua_cc(), sccp_to_xua_cr(), sccp_to_xua_cref(), sccp_to_xua_dt1(), sccp_to_xua_err(), sccp_to_xua_it(), sccp_to_xua_rlc(), sccp_to_xua_rlsd(), and xua_msg_add_sccp_opt().
|
static |
append a SCCP option to the given message
msg | Message to which option is to be appended | |
[in] | pnc | PNC of the option header |
[in] | len | length of the option, excluding the header |
[in] | data | actual data to be appended |
References data, len, and msgb_put_sccp_opt_hdr().
Referenced by sccp_msg_add_sua_opt().
|
static |
append a SCCP option header to the given message
msg | Message to which header is to be appended | |
[in] | pnc | PNC of the option header |
[in] | len | length of the option, excluding the header |
References len.
Referenced by msgb_put_sccp_opt(), and sccp_msg_add_sua_opt().
|
static |
Referenced by osmo_sccp_addr_encode().
|
static |
Referenced by sccp_msg_add_sua_opt().
int osmo_isup_party_encode | ( | struct msgb * | msg, |
const char * | in_digits | ||
) |
Encode an ISUP style address of BCD digits.
[out] | msg | Message to which the encoded address is appended |
[in] | in_digits | NUL-terminated ASCII string of digits |
Referenced by osmo_sccp_addr_encode().
int osmo_isup_party_parse | ( | char * | out_digits, |
const uint8_t * | in, | ||
unsigned int | in_num_bytes, | ||
bool | odd | ||
) |
Parse ISUP style address of BCD digets.
[out] | out_digits | user-allocated buffer for ASCII digits |
[in] | in | BCD-encoded digits |
[in] | in_num_bytes | Size of in in bytes |
[in] | odd | Odd (true) or even (false) number of digits |
Referenced by osmo_sccp_addr_parse().
int osmo_sccp_addr_encode | ( | struct msgb * | msg, |
const struct osmo_sccp_addr * | in | ||
) |
encode a SCCP address from parsed format to wire format
[out] | msg | message buffer to which address is to be appended |
[in] | in | data structure describing SCCP address |
References osmo_sccp_gt::digits, osmo_sccp_addr::gt, osmo_sccp_gt::gti, msgb_put_u16le(), osmo_sccp_gt::nai, osmo_sccp_gt::npi, osmo_isup_party_encode(), OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_GTI_NAI_ONLY, OSMO_SCCP_GTI_NO_GT, OSMO_SCCP_GTI_TT_NPL_ENC, OSMO_SCCP_GTI_TT_NPL_ENC_NAI, OSMO_SCCP_GTI_TT_ONLY, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, osmo_sccp_addr::ssn, and osmo_sccp_gt::tt.
Referenced by sua_addr_to_sccp().
int osmo_sccp_addr_parse | ( | struct osmo_sccp_addr * | out, |
const uint8_t * | addr, | ||
unsigned int | addrlen | ||
) |
Parse wire-encoded SCCP address into osmo_sccp_addr.
[out] | out | user-allocated output data structure |
[in] | addr | wire-encoded SCCP address |
[in] | addrlen | Size of addr in bytes |
References osmo_sccp_gt::digits, osmo_sccp_addr::gt, osmo_sccp_gt::gti, osmo_sccp_gt::nai, osmo_sccp_gt::npi, osmo_isup_party_parse(), OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_GTI_NAI_ONLY, OSMO_SCCP_GTI_NO_GT, OSMO_SCCP_GTI_TT_NPL_ENC, OSMO_SCCP_GTI_TT_NPL_ENC_NAI, OSMO_SCCP_GTI_TT_ONLY, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, osmo_sccp_addr::ssn, and osmo_sccp_gt::tt.
Referenced by sccp_addr_to_sua().
struct xua_msg * osmo_sccp_to_xua | ( | struct msgb * | msg | ) |
convert SCCP message to a SUA message
[in] | msg | message buffer holding SCCP message at l2h |
References xua_msg::hdr, sccp_to_xua_cc(), sccp_to_xua_cr(), sccp_to_xua_cref(), sccp_to_xua_dt1(), sccp_to_xua_err(), sccp_to_xua_it(), sccp_to_xua_ludt(), sccp_to_xua_ludts(), sccp_to_xua_rlc(), sccp_to_xua_rlsd(), sccp_to_xua_udt(), sccp_to_xua_udts(), sccp_to_xua_xudt(), sccp_to_xua_xudts(), SUA_CL_CLDR, SUA_CL_CLDT, SUA_CO_COAK, SUA_CO_CODT, SUA_CO_COERR, SUA_CO_COIT, SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELCO, SUA_CO_RELRE, SUA_MSGC_CL, SUA_MSGC_CO, XUA_HDR, xua_msg_alloc(), and xua_msg_free().
Referenced by mtp_user_prim_cb(), and patch_sccp_with_pc().
struct msgb * osmo_sua_to_sccp | ( | struct xua_msg * | xua | ) |
convert parsed SUA message to SCCP message
[in] | xua | parsed SUA message to be converted |
References xua_msg::hdr, xua_common_hdr::msg_class, xua_common_hdr::msg_type, sccp_msgb_alloc(), SUA_CL_CLDR, SUA_CL_CLDT, SUA_CO_COAK, SUA_CO_CODT, SUA_CO_COERR, SUA_CO_COIT, SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELCO, SUA_CO_RELRE, SUA_MSGC_CL, SUA_MSGC_CO, sua_to_sccp_cc(), sua_to_sccp_cr(), sua_to_sccp_cref(), sua_to_sccp_dt1(), sua_to_sccp_err(), sua_to_sccp_it(), sua_to_sccp_rlc(), sua_to_sccp_rlsd(), sua_to_sccp_udt(), sua_to_sccp_udts(), xua_dialect_sua, and xua_hdr_dump().
Referenced by patch_sccp_with_pc(), and sua2sccp_tx_m3ua().
|
static |
Add a "SCCP Long Variable Mandatory Part" to the given msgb.
msg | Message buffer to which part shall be added | |
[out] | var_ptr | pointer to relative pointer in SCCP header |
[in] | xua | xUA message from which to use source data |
[in] | iei | xUA information element identifier of source data |
References xua_msg_part::dat, xua_msg_part::len, and xua_msg_find_tag().
Referenced by sua_to_sccp_ludt(), and sua_to_sccp_ludts().
|
static |
Add a "SCCP Variable Mandatory Part" (Address format) to the given msgb.
msg | Message buffer to which part shall be added | |
[out] | var_ptr | pointer to relative pointer in SCCP header |
[in] | var_ptr_is_long | Whether the var_ptr field is 2 bytes long (network order) |
[in] | xua | xUA message from which to use address |
[in] | iei | xUA information element identifier of address |
References sua_addr_to_sccp(), and xua_msg_find_tag().
Referenced by sua_to_sccp_cr(), sua_to_sccp_ludt(), sua_to_sccp_ludts(), sua_to_sccp_udt(), sua_to_sccp_udts(), sua_to_sccp_xudt(), and sua_to_sccp_xudts().
|
static |
Add a "SCCP Variable Mandatory Part" to the given msgb.
msg | Message buffer to which part shall be added | |
[out] | var_ptr | pointer to relative pointer in SCCP header |
[in] | xua | xUA message from which to use source data |
[in] | iei | xUA information element identifier of source data |
References xua_msg_part::dat, xua_msg_part::len, and xua_msg_find_tag().
Referenced by sua_to_sccp_dt1(), sua_to_sccp_udt(), sua_to_sccp_udts(), sua_to_sccp_xudt(), and sua_to_sccp_xudts().
|
static |
convert SCCP address to SUA address
xua | user-provided xUA message to which address shall be added | |
[in] | iei | SUA Information Element Identifier for address |
[in] | addr | SCCP wire format binary address |
[in] | addrlen | Size of addr in bytes |
References osmo_sccp_addr_dump(), osmo_sccp_addr_parse(), and xua_msg_add_sccp_addr().
Referenced by sccp_addr_to_sua_ptr(), and xua_msg_add_sccp_opt().
|
static |
convenience wrapper around sccp_addr_to_sua() for variable mandatory addresses
References sccp_addr_to_sua().
Referenced by sccp_to_xua_cr(), sccp_to_xua_ludt(), sccp_to_xua_ludts(), sccp_to_xua_udt(), sccp_to_xua_udts(), sccp_to_xua_xudt(), and sccp_to_xua_xudts().
|
static |
convenience wrapper around xua_msg_add_data() for variable mandatory data
References xua_msg_add_data().
Referenced by sccp_to_xua_dt1(), sccp_to_xua_udt(), sccp_to_xua_udts(), sccp_to_xua_xudt(), and sccp_to_xua_xudts().
|
static |
References MAX_IES, sccp_mandatory, and xua_msg_part::tag.
Referenced by xua_ies_to_sccp_opts().
|
static |
convenience wrapper around xua_msg_add_data() for variable mandatory data
References xua_msg_add_data().
Referenced by sccp_to_xua_ludt(), and sccp_to_xua_ludts().
|
static |
validate that SCCP part with long pointer (2 bytes) + length doesn't exceed msg tail
[in] | msg | Message containing SCCP address (LUDT or LUDTS) |
[in] | ptr_addr | pointer to byte with relative SCCP long pointer (uint16_t, 2 bytes in network order) |
[in] | len_is_long | whether the length field at the starting of the value field pointer to by ptr_addr is 2 bytes long. |
Referenced by sccp_to_xua_ludt(), and sccp_to_xua_ludts().
|
static |
Convert a given SUA option/IE to SCCP and add it to given * msgb.
msg | caller-provided message buffer to which option is to be appended | |
[in] | opt | xUA option/IE (messge part) to be converted+added |
References xua_msg_part::dat, xua_msg_part::len, msgb_put_sccp_opt(), msgb_put_sccp_opt_hdr(), msgb_put_u24be(), sua_addr_to_sccp(), SUA_CAUSE_T_ERROR, SUA_CAUSE_T_MASK, SUA_CAUSE_T_REFUSAL, SUA_CAUSE_T_RELEASE, SUA_CAUSE_T_RESET, SUA_CAUSE_T_RETURN, SUA_IEI_CAUSE, SUA_IEI_CREDIT, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_DEST_REF, SUA_IEI_IMPORTANCE, SUA_IEI_PROTO_CLASS, SUA_IEI_ROUTE_CTX, SUA_IEI_S7_HOP_CTR, SUA_IEI_SEQ_CTRL, SUA_IEI_SRC_ADDR, SUA_IEI_SRC_REF, xua_msg_part::tag, and xua_msg_part_get_u32().
Referenced by xua_ies_to_sccp_opts().
|
static |
References MAX_IES, sccp_optional, and xua_msg_part::tag.
Referenced by xua_ies_to_sccp_opts().
|
static |
validate that SCCP part with pointer + length doesn't exceed msg tail
[in] | msg | Message containing SCCP address |
[in] | ptr_addr | pointer to byte with relative SCCP pointer |
References data.
Referenced by sccp_to_xua_cr(), sccp_to_xua_dt1(), sccp_to_xua_udt(), sccp_to_xua_udts(), sccp_to_xua_xudt(), and sccp_to_xua_xudts().
References load_24be(), sccp_to_xua_opt(), SUA_IEI_DEST_REF, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_REF, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References load_24be(), sccp_addr_to_sua_ptr(), sccp_ptr_part_consistent(), sccp_to_xua_opt(), SUA_IEI_DEST_ADDR, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_REF, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References load_24be(), sccp_to_xua_opt(), SUA_CAUSE_T_REFUSAL, SUA_IEI_CAUSE, SUA_IEI_DEST_REF, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References load_24be(), sccp_data_to_sua_ptr(), sccp_ptr_part_consistent(), SUA_IEI_DATA, SUA_IEI_DEST_REF, SUA_IEI_SEGMENTATION, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References load_24be(), SUA_CAUSE_T_ERROR, SUA_IEI_CAUSE, SUA_IEI_DEST_REF, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References load_24be(), SUA_IEI_CREDIT, SUA_IEI_DEST_REF, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_REF, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References sccp_addr_to_sua_ptr(), sccp_longdata_to_sua_ptr(), sccp_longptr_part_consistent(), sccp_to_xua_opt(), SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_PROTO_CLASS, SUA_IEI_S7_HOP_CTR, SUA_IEI_SRC_ADDR, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References sccp_addr_to_sua_ptr(), sccp_longdata_to_sua_ptr(), sccp_longptr_part_consistent(), sccp_to_xua_opt(), SUA_CAUSE_T_RETURN, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_S7_HOP_CTR, SUA_IEI_SRC_ADDR, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
|
static |
convert SCCP optional part to list of SUA options
[in] | msg | Message buffer holding SCCP message |
[in] | ptr_opt | address of relative pointer to optional part |
[in] | ptr_opt_is_long | whether ptr_opt is a long pointer (2 bytes, network order) |
xua | caller-provided xUA message to which options are added |
References data, and xua_msg_add_sccp_opt().
Referenced by sccp_to_xua_cc(), sccp_to_xua_cr(), sccp_to_xua_cref(), sccp_to_xua_ludt(), sccp_to_xua_ludts(), sccp_to_xua_rlsd(), sccp_to_xua_xudt(), and sccp_to_xua_xudts().
References load_24be(), SUA_IEI_DEST_REF, SUA_IEI_SRC_REF, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References load_24be(), sccp_to_xua_opt(), SUA_CAUSE_T_RELEASE, SUA_IEI_CAUSE, SUA_IEI_DEST_REF, SUA_IEI_SRC_REF, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References sccp_addr_to_sua_ptr(), sccp_data_to_sua_ptr(), sccp_ptr_part_consistent(), SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_ADDR, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References sccp_addr_to_sua_ptr(), sccp_data_to_sua_ptr(), sccp_ptr_part_consistent(), SUA_CAUSE_T_RETURN, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_SRC_ADDR, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References sccp_addr_to_sua_ptr(), sccp_data_to_sua_ptr(), sccp_ptr_part_consistent(), sccp_to_xua_opt(), SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_PROTO_CLASS, SUA_IEI_S7_HOP_CTR, SUA_IEI_SRC_ADDR, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
References sccp_addr_to_sua_ptr(), sccp_data_to_sua_ptr(), sccp_ptr_part_consistent(), sccp_to_xua_opt(), SUA_CAUSE_T_RETURN, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_S7_HOP_CTR, SUA_IEI_SRC_ADDR, and xua_msg_add_u32().
Referenced by osmo_sccp_to_xua().
|
static |
References xua_msg_get_u32().
Referenced by sua_to_sccp_cc(), sua_to_sccp_cr(), sua_to_sccp_cref(), sua_to_sccp_dt1(), sua_to_sccp_err(), sua_to_sccp_it(), sua_to_sccp_rlc(), and sua_to_sccp_rlsd().
|
static |
convert SUA address to SCCP address
msg | user-provided message buffer to which address shall be * appended | |
[in] | part | SUA wire format binary address |
References osmo_sccp_addr_encode(), and sua_addr_parse_part().
Referenced by sccp_add_var_addr(), and sccp_msg_add_sua_opt().
|
static |
References store_local_ref(), SUA_IEI_DEST_REF, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_REF, xua_ies_to_sccp_opts(), and xua_msg_get_u32().
Referenced by osmo_sua_to_sccp().
|
static |
References sccp_add_var_addr(), store_local_ref(), SUA_IEI_DEST_ADDR, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_REF, xua_ies_to_sccp_opts(), and xua_msg_get_u32().
Referenced by osmo_sua_to_sccp().
|
static |
References store_local_ref(), SUA_IEI_CAUSE, SUA_IEI_DEST_REF, xua_ies_to_sccp_opts(), and xua_msg_get_u32().
Referenced by osmo_sua_to_sccp().
|
static |
References sccp_add_variable_part(), store_local_ref(), SUA_IEI_DATA, SUA_IEI_DEST_REF, SUA_IEI_SEGMENTATION, and xua_msg_get_u32().
Referenced by osmo_sua_to_sccp().
|
static |
References store_local_ref(), SUA_IEI_CAUSE, SUA_IEI_DEST_REF, and xua_msg_get_u32().
Referenced by osmo_sua_to_sccp().
|
static |
References store_local_ref(), SUA_IEI_CREDIT, SUA_IEI_DEST_REF, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_REF, and xua_msg_get_u32().
Referenced by osmo_sua_to_sccp().
|
static |
References sccp_add_long_variable_part(), sccp_add_var_addr(), SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_PROTO_CLASS, SUA_IEI_S7_HOP_CTR, SUA_IEI_SRC_ADDR, xua_ies_to_sccp_opts(), and xua_msg_get_u32().
Referenced by sua_to_sccp_udt(), and sua_to_sccp_xudt().
|
static |
References sccp_add_long_variable_part(), sccp_add_var_addr(), SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_S7_HOP_CTR, SUA_IEI_SRC_ADDR, xua_ies_to_sccp_opts(), and xua_msg_get_u32().
Referenced by sua_to_sccp_udts().
|
static |
References store_local_ref(), SUA_IEI_DEST_REF, and SUA_IEI_SRC_REF.
Referenced by osmo_sua_to_sccp().
|
static |
References store_local_ref(), SUA_IEI_CAUSE, SUA_IEI_DEST_REF, SUA_IEI_SRC_REF, xua_ies_to_sccp_opts(), and xua_msg_get_u32().
Referenced by osmo_sua_to_sccp().
|
static |
|
static |
|
static |
|
static |
References sccp_add_var_addr(), sccp_add_variable_part(), SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_S7_HOP_CTR, SUA_IEI_SRC_ADDR, xua_ies_to_sccp_opts(), and xua_msg_get_u32().
Referenced by sua_to_sccp_udts().
|
static |
|
static |
Convert a given SCCP option to SUA and add it to given xua_msg.
xua | caller-provided xUA message to which option is to be added | |
[in] | sccp_opt_type | SCCP option type (PNC) |
[in] | opt_len | size of opt in bytes |
[in] | opt | pointer to wire-format encoded SCCP option data |
References load_24be(), sccp_addr_to_sua(), SUA_CAUSE_T_ERROR, SUA_CAUSE_T_REFUSAL, SUA_CAUSE_T_RELEASE, SUA_CAUSE_T_RESET, SUA_CAUSE_T_RETURN, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_DEST_REF, SUA_IEI_IMPORTANCE, SUA_IEI_PROTO_CLASS, SUA_IEI_S7_HOP_CTR, SUA_IEI_SRC_ADDR, SUA_IEI_SRC_REF, xua_msg_add_data(), and xua_msg_add_u32().
Referenced by sccp_to_xua_opt().
|
static |
Referenced by sccp_is_mandatory().
|
static |
Referenced by sccp_option_permitted().