sigtran/html/ 0000755 0001750 0001750 00000000000 14744650332 012461 5 ustar build build sigtran/html/globals_defs_p.html 0000644 0001750 0001750 00000007512 14744650332 016317 0 ustar build build
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
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().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <stdint.h>
#include <osmocom/core/linuxlist.h>
Go to the source code of this file.
Data Structures | |
struct | osmo_ss7_route_table |
Functions | |
struct osmo_ss7_route_table * | ss7_route_table_find (struct osmo_ss7_instance *inst, const char *name) |
struct osmo_ss7_route_table * | ss7_route_table_find_or_create (struct osmo_ss7_instance *inst, const char *name) |
void | ss7_route_table_destroy (struct osmo_ss7_route_table *rtbl) |
struct osmo_ss7_route * | ss7_route_table_find_route_by_dpc (struct osmo_ss7_route_table *rtbl, uint32_t dpc) |
Find a SS7 route for given destination point code in given table. More... | |
struct osmo_ss7_route * | ss7_route_table_find_route_by_dpc_mask (struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask) |
Find a SS7 route for given destination point code + mask in given table. More... | |
void | ss7_route_table_del_routes_by_as (struct osmo_ss7_route_table *rtbl, struct osmo_ss7_as *as) |
void | ss7_route_table_del_routes_by_linkset (struct osmo_ss7_route_table *rtbl, struct osmo_ss7_linkset *lset) |
void ss7_route_table_del_routes_by_as | ( | struct osmo_ss7_route_table * | rtbl, |
struct osmo_ss7_as * | as | ||
) |
References osmo_ss7_route::as, osmo_ss7_route::dest, osmo_ss7_route::list, osmo_ss7_route_table::routes, and ss7_route_destroy().
Referenced by osmo_ss7_as_destroy().
void ss7_route_table_del_routes_by_linkset | ( | struct osmo_ss7_route_table * | rtbl, |
struct osmo_ss7_linkset * | lset | ||
) |
References osmo_ss7_route::dest, osmo_ss7_route::linkset, osmo_ss7_route::list, osmo_ss7_route_table::routes, and ss7_route_destroy().
Referenced by ss7_linkset_destroy().
void ss7_route_table_destroy | ( | struct osmo_ss7_route_table * | rtbl | ) |
References osmo_ss7_route_table::list.
struct osmo_ss7_route_table * ss7_route_table_find | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
struct osmo_ss7_route_table * ss7_route_table_find_or_create | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
References osmo_ss7_route_table::inst, osmo_ss7_route_table::name, ss7_initialized, ss7_route_table_alloc(), and ss7_route_table_find().
Referenced by ss7_instance_alloc().
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc | ( | struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc | ||
) |
Find a SS7 route for given destination point code in given table.
References osmo_ss7_instance::cfg, osmo_ss7_route::cfg, dpc, osmo_ss7_route_table::inst, osmo_ss7_route::list, osmo_ss7_route::mask, osmo_ss7_pc_normalize(), osmo_ss7_route::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_route_table::routes, and ss7_initialized.
Referenced by handle_rkey_dereg(), and osmo_ss7_route_lookup().
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc_mask | ( | struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc, | ||
uint32_t | mask | ||
) |
Find a SS7 route for given destination point code + mask in given table.
References osmo_ss7_instance::cfg, osmo_ss7_route::cfg, dpc, osmo_ss7_route_table::inst, osmo_ss7_route::list, osmo_ss7_route::mask, osmo_ss7_pc_normalize(), osmo_ss7_route::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_route_table::routes, and ss7_initialized.
Referenced by _rout_key(), DEFUN_ATTR(), ipa_add_route(), ipa_del_route(), osmo_sccp_simple_client_on_ss7_id(), ss7_route_create(), and ss7_route_insert().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <stdint.h>
#include <osmocom/core/prim.h>
#include <osmocom/sigtran/sigtran_sap.h>
#include <netinet/in.h>
Go to the source code of this file.
Data Structures | |
struct | osmo_sccp_gt |
struct | osmo_sccp_addr |
struct | osmo_scu_connect_param |
struct | osmo_scu_data_param |
struct | osmo_scu_disconn_param |
struct | osmo_scu_reset_param |
struct | osmo_scu_unitdata_param |
struct | osmo_scu_notice_param |
struct | osmo_scu_state_param |
struct | osmo_scu_pcstate_param |
struct | osmo_scu_prim |
Macros | |
#define | OSMO_SCCP_ADDR_T_GT 0x0001 /* global title */ |
#define | OSMO_SCCP_ADDR_T_PC 0x0002 /* signalling point code */ |
#define | OSMO_SCCP_ADDR_T_SSN 0x0004 /* subsystem number */ |
#define | OSMO_SCCP_ADDR_T_IPv4 0x0008 |
#define | OSMO_SCCP_ADDR_T_IPv6 0x0010 |
#define | OSMO_SCCP_ADDR_T_MASK 0x001f |
#define | OSMO_SCCP_SSN_SMLC_BSSAP OSMO_SCCP_SSN_SMLC_BSSAP_LE |
#define | msgb_scu_prim(msg) ((struct osmo_scu_prim *)(msg)->l1h) |
Functions | |
static const char * | osmo_sccp_routing_ind_name (enum osmo_sccp_routing_ind val) |
static const char * | osmo_sccp_gti_name (enum osmo_sccp_gti val) |
static const char * | osmo_sccp_sp_status_name (enum osmo_sccp_sp_status val) |
static const char * | osmo_sccp_rem_sccp_status_name (enum osmo_sccp_rem_sccp_status val) |
static const char * | osmo_sccp_ssn_name (enum osmo_sccp_ssn val) |
static const char * | osmo_scu_prim_type_name (enum osmo_scu_prim_type val) |
int | osmo_scu_prim_hdr_name_buf (char *buf, size_t buflen, const struct osmo_prim_hdr *oph) |
char * | osmo_scu_prim_hdr_name_c (void *ctx, const struct osmo_prim_hdr *oph) |
char * | osmo_scu_prim_name (const struct osmo_prim_hdr *oph) |
void | osmo_sccp_vty_init (void) |
struct osmo_sccp_instance * | osmo_sccp_instance_create (struct osmo_ss7_instance *ss7, void *priv) |
create a SCCP Instance and register it as user with SS7 inst More... | |
void | osmo_sccp_instance_destroy (struct osmo_sccp_instance *inst) |
struct osmo_ss7_instance * | osmo_sccp_get_ss7 (const struct osmo_sccp_instance *sccp) |
get the SS7 instance that is related to the given SCCP instance More... | |
struct osmo_sccp_instance * | osmo_sccp_get_sccp (const struct osmo_sccp_user *scu) |
get the SCCP instance that is related to the given sccp user More... | |
void | osmo_sccp_set_priv (struct osmo_sccp_instance *sccp, void *priv) |
void * | osmo_sccp_get_priv (struct osmo_sccp_instance *sccp) |
void | osmo_sccp_user_unbind (struct osmo_sccp_user *scu) |
Unbind a given SCCP user. More... | |
void | osmo_sccp_user_set_priv (struct osmo_sccp_user *scu, void *priv) |
void * | osmo_sccp_user_get_priv (struct osmo_sccp_user *scu) |
struct osmo_sccp_user * | osmo_sccp_user_bind_pc (struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc) |
Bind a given SCCP User to a given SSN+PC. More... | |
struct osmo_sccp_user * | osmo_sccp_user_bind (struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn) |
Bind a given SCCP User to a given SSN (at any PC) More... | |
struct osmo_sccp_user * | osmo_sccp_user_find (struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc) |
Find a SCCP User registered for given PC+SSN or SSN only. More... | |
int | osmo_sccp_user_sap_down (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph) |
Main entrance function for primitives from SCCP User. More... | |
int | osmo_sccp_user_sap_down_nofree (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph) |
Main entrance function for primitives from SCCP User. More... | |
struct osmo_ss7_instance * | osmo_sccp_addr_by_name (struct osmo_sccp_addr *dest_addr, const char *name) |
Lookup an SCCP address from the addressbook by its name. More... | |
int | osmo_sccp_addr_by_name_local (struct osmo_sccp_addr *dest_addr, const char *name, const struct osmo_ss7_instance *inst) |
Lookup an SCCP address from the addressbook of a specific instance by its name. More... | |
const char * | osmo_sccp_name_by_addr (const struct osmo_sccp_addr *addr) |
Reverse lookup the lookup-name of a specified SCCP address. More... | |
void | osmo_sccp_local_addr_by_instance (struct osmo_sccp_addr *dest_addr, const struct osmo_sccp_instance *inst, uint32_t ssn) |
derive a basic local SCCP-Address from a given SCCP instance. More... | |
bool | osmo_sccp_check_addr (struct osmo_sccp_addr *addr, uint32_t presence) |
check whether a given SCCP-Address is consistent. More... | |
int | osmo_sccp_addr_cmp (const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria) |
Compare two SCCP addresses by given presence criteria. More... | |
int | osmo_sccp_addr_ri_cmp (const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b) |
Compare the routing information of two SCCP addresses. More... | |
int | osmo_sccp_gt_cmp (const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b) |
Compare two SCCP Global Titles. More... | |
const char * | osmo_sccp_user_name (struct osmo_sccp_user *scu) |
Compose a human readable string to describe the SCCP user's connection. More... | |
int | osmo_sccp_instance_next_conn_id (struct osmo_sccp_instance *sccp) |
Variables | |
const struct value_string | osmo_sccp_routing_ind_names [] |
const struct value_string | osmo_sccp_gti_names [] |
const struct value_string | osmo_sccp_sp_status_names [] |
const struct value_string | osmo_sccp_rem_sccp_status_names [] |
const struct value_string | osmo_sccp_ssn_names [] |
const struct value_string | osmo_scu_prim_type_names [] |
#define msgb_scu_prim | ( | msg | ) | ((struct osmo_scu_prim *)(msg)->l1h) |
#define OSMO_SCCP_ADDR_T_GT 0x0001 /* global title */ |
#define OSMO_SCCP_ADDR_T_IPv4 0x0008 |
#define OSMO_SCCP_ADDR_T_IPv6 0x0010 |
#define OSMO_SCCP_ADDR_T_MASK 0x001f |
#define OSMO_SCCP_ADDR_T_PC 0x0002 /* signalling point code */ |
#define OSMO_SCCP_ADDR_T_SSN 0x0004 /* subsystem number */ |
#define OSMO_SCCP_SSN_SMLC_BSSAP OSMO_SCCP_SSN_SMLC_BSSAP_LE |
enum osmo_sccp_gti |
enum osmo_sccp_nai |
enum osmo_sccp_npi |
enum osmo_sccp_originator |
enum osmo_sccp_sp_status |
enum osmo_sccp_ssn |
enum osmo_scu_prim_type |
SCCP-User primitives as per Q.711.
struct osmo_ss7_instance * osmo_sccp_addr_by_name | ( | struct osmo_sccp_addr * | dest_addr, |
const char * | name | ||
) |
Lookup an SCCP address from the addressbook by its name.
[out] | dest_addr | pointer to output the resulting sccp-address; (set to NULL if not interested) |
[in] | name | of the address to lookup |
References osmo_sccp_addr_entry::addr, addr_entry_by_name_global(), osmo_sccp_addr_entry::inst, and osmo_sccp_addr_entry::name.
int osmo_sccp_addr_by_name_local | ( | struct osmo_sccp_addr * | dest_addr, |
const char * | name, | ||
const struct osmo_ss7_instance * | inst | ||
) |
Lookup an SCCP address from the addressbook of a specific instance by its name.
[out] | dest_addr | pointer to output the resulting sccp-address; (set to NULL if not interested) |
[in] | name | of the address to lookup |
[in] | inst | ss7 instance of which the address book will be searched |
References osmo_sccp_addr_entry::addr, addr_entry_by_name_local(), osmo_sccp_addr_entry::inst, and osmo_sccp_addr_entry::name.
int osmo_sccp_addr_cmp | ( | const struct osmo_sccp_addr * | a, |
const struct osmo_sccp_addr * | b, | ||
uint32_t | presence_criteria | ||
) |
Compare two SCCP addresses by given presence criteria.
Any OSMO_SCCP_ADDR_T_* type not set in presence_criteria is ignored. In case all bits are set in presence_criteria, the comparison is in the order of: OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_SSN. The SCCP addresses' Routing Indicator is not compared, see osmo_sccp_addr_ri_cmp().
[in] | a | left side. |
[in] | b | right side. |
[in] | presence_criteria | A bitmask of OSMO_SCCP_ADDR_T_* values, or OSMO_SCCP_ADDR_T_MASK to compare all parts, except the routing indicator. |
References osmo_sccp_addr::gt, osmo_sccp_addr::ip, OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, osmo_sccp_gt_cmp(), osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ssn, osmo_sccp_addr::v4, and osmo_sccp_addr::v6.
Referenced by osmo_sccp_addr_ri_cmp().
int osmo_sccp_addr_ri_cmp | ( | const struct osmo_sccp_addr * | a, |
const struct osmo_sccp_addr * | b | ||
) |
Compare the routing information of two SCCP addresses.
Compare the ri of a and b, and, if equal, return osmo_sccp_addr_cmp() with presence criteria selected according to ri.
[in] | a | left side. |
[in] | b | right side. |
References osmo_sccp_addr_cmp(), OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_NONE, OSMO_SCCP_RI_SSN_IP, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::presence, and osmo_sccp_addr::ri.
bool osmo_sccp_check_addr | ( | struct osmo_sccp_addr * | addr, |
uint32_t | presence | ||
) |
check whether a given SCCP-Address is consistent.
[in] | addr | SCCP address to check |
[in] | presence | mask with minimum required address components |
References osmo_sccp_addr::gt, osmo_sccp_gt::gti, osmo_sccp_gt::nai, osmo_sccp_gt::npi, OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_SSN_IP, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::presence, and osmo_sccp_addr::ri.
void * osmo_sccp_get_priv | ( | struct osmo_sccp_instance * | sccp | ) |
References osmo_sccp_instance::priv.
struct osmo_sccp_instance * osmo_sccp_get_sccp | ( | const struct osmo_sccp_user * | scu | ) |
get the SCCP instance that is related to the given sccp user
[in] | scu | SCCP user |
References osmo_sccp_user::inst.
struct osmo_ss7_instance * osmo_sccp_get_ss7 | ( | const struct osmo_sccp_instance * | sccp | ) |
get the SS7 instance that is related to the given SCCP instance
[in] | sccp | SCCP instance |
References osmo_ss7_instance::sccp, and osmo_sccp_instance::ss7.
int osmo_sccp_gt_cmp | ( | const struct osmo_sccp_gt * | a, |
const struct osmo_sccp_gt * | b | ||
) |
Compare two SCCP Global Titles.
[in] | a | left side. |
[in] | b | right side. |
Referenced by osmo_sccp_addr_cmp().
|
inlinestatic |
References osmo_sccp_gti_names.
Referenced by sccp_addr_to_str_buf().
struct osmo_sccp_instance * osmo_sccp_instance_create | ( | struct osmo_ss7_instance * | ss7, |
void * | priv | ||
) |
create a SCCP Instance and register it as user with SS7 inst
[in] | ss7 | SS7 instance to which this SCCP instance belongs |
[in] | priv | private data to be stored within SCCP instance |
References osmo_sccp_instance::list, osmo_sccp_instance::max_optional_data, MTP_SI_SCCP, mtp_user_prim_cb(), osmo_sccp_timer_defaults, osmo_ss7_user_create(), osmo_ss7_user_register(), osmo_ss7_user_set_prim_cb(), osmo_ss7_user_set_priv(), osmo_sccp_instance::priv, sccp_scmg_init(), osmo_sccp_instance::ss7, osmo_sccp_instance::ss7_user, osmo_sccp_instance::tdefs, and osmo_sccp_instance::users.
Referenced by osmo_ss7_ensure_sccp().
void osmo_sccp_instance_destroy | ( | struct osmo_sccp_instance * | inst | ) |
References osmo_sccp_user::inst, osmo_sccp_instance::list, osmo_sccp_user::list, MTP_SI_SCCP, osmo_sccp_user_unbind(), osmo_ss7_user_destroy(), osmo_ss7_user_unregister(), osmo_ss7_instance::sccp, sccp_scoc_flush_connections(), osmo_sccp_instance::ss7, osmo_sccp_instance::ss7_user, and osmo_sccp_instance::users.
int osmo_sccp_instance_next_conn_id | ( | struct osmo_sccp_instance * | sccp | ) |
References conn_find_by_id(), and osmo_sccp_instance::next_id.
Referenced by conn_create().
void osmo_sccp_local_addr_by_instance | ( | struct osmo_sccp_addr * | dest_addr, |
const struct osmo_sccp_instance * | inst, | ||
uint32_t | ssn | ||
) |
derive a basic local SCCP-Address from a given SCCP instance.
[out] | dest_addr | pointer to output address memory |
[in] | inst | SCCP instance |
[in] | ssn | Subsystem Number |
References osmo_ss7_instance::cfg, osmo_sccp_make_addr_pc_ssn(), osmo_ss7_instance::primary_pc, and osmo_sccp_instance::ss7.
const char * osmo_sccp_name_by_addr | ( | const struct osmo_sccp_addr * | addr | ) |
Reverse lookup the lookup-name of a specified SCCP address.
[in] | name | of the address to lookup |
References osmo_sccp_addr_entry::addr, osmo_sccp_addr_entry::list_global, and osmo_sccp_addr_entry::name.
|
inlinestatic |
References osmo_sccp_rem_sccp_status_names.
|
inlinestatic |
References osmo_sccp_routing_ind_names.
Referenced by sccp_addr_to_str_buf().
void osmo_sccp_set_priv | ( | struct osmo_sccp_instance * | sccp, |
void * | priv | ||
) |
References osmo_sccp_instance::priv, and osmo_sccp_user::priv.
|
inlinestatic |
References osmo_sccp_sp_status_names.
|
inlinestatic |
References osmo_sccp_ssn_names.
Referenced by sccp_addr_to_str_buf().
struct osmo_sccp_user * osmo_sccp_user_bind | ( | struct osmo_sccp_instance * | inst, |
const char * | name, | ||
osmo_prim_cb | prim_cb, | ||
uint16_t | ssn | ||
) |
Bind a given SCCP User to a given SSN (at any PC)
[in] | inst | SCCP Instance |
[in] | name | human-readable name |
[in] | ssn | Sub-System Number to bind to |
References osmo_sccp_user::inst, osmo_sccp_user::name, OSMO_SS7_PC_INVALID, osmo_sccp_user::prim_cb, sccp_user_bind_pc(), and osmo_sccp_user::ssn.
Referenced by sccp_scmg_init().
struct osmo_sccp_user * osmo_sccp_user_bind_pc | ( | struct osmo_sccp_instance * | inst, |
const char * | name, | ||
osmo_prim_cb | prim_cb, | ||
uint16_t | ssn, | ||
uint32_t | pc | ||
) |
Bind a given SCCP User to a given SSN+PC.
[in] | inst | SCCP Instance |
[in] | name | human-readable name |
[in] | ssn | Sub-System Number to bind to |
[in] | pc | Point Code to bind to |
References osmo_sccp_user::inst, osmo_sccp_user::name, osmo_sccp_user::pc, osmo_sccp_user::prim_cb, sccp_user_bind_pc(), and osmo_sccp_user::ssn.
struct osmo_sccp_user * osmo_sccp_user_find | ( | struct osmo_sccp_instance * | inst, |
uint16_t | ssn, | ||
uint32_t | pc | ||
) |
Find a SCCP User registered for given PC+SSN or SSN only.
First search all users with a valid PC for a full PC+SSN match. If no match was found, search all users with an invalid PC for an SSN-only match.
[in] | inst | SCCP Instance in which to search. |
[in] | ssn | Sub-System Number to search for. |
[in] | pc | Point Code to search for. |
References osmo_sccp_user::inst, osmo_sccp_user::pc, sccp_user_find(), and osmo_sccp_user::ssn.
void * osmo_sccp_user_get_priv | ( | struct osmo_sccp_user * | scu | ) |
References osmo_sccp_user::priv.
const char * osmo_sccp_user_name | ( | struct osmo_sccp_user * | scu | ) |
Compose a human readable string to describe the SCCP user's connection.
The output follows ['<scu.name>':]<local-sccp-addr>, e.g. "'OsmoHNBW':RI=SSN_PC,PC=0.23.5,SSN=RANAP", or just "RI=SSN_PC,PC=0.23.5,SSN=RANAP" if no scu->name is set. This calls osmo_sccp_addr_name(), which returns a static buffer; hence calling this function and osmo_sccp_addr_name() in the same printf statement is likely to conflict.
References osmo_sccp_user::inst, osmo_sccp_user::name, osmo_sccp_addr_name(), osmo_sccp_make_addr_pc_ssn(), osmo_sccp_user::pc, osmo_sccp_instance::ss7, and osmo_sccp_user::ssn.
int osmo_sccp_user_sap_down | ( | struct osmo_sccp_user * | scu, |
struct osmo_prim_hdr * | oph | ||
) |
Main entrance function for primitives from SCCP User.
Implies a msgb_free(oph->msg), otherwise the same as osmo_sccp_user_sap().
[in] | scu | SCCP User sending us the primitive |
[in] | oph | Osmocom primitive sent by the user |
References osmo_scu_prim::oph, and osmo_sccp_user_sap_down_nofree().
Referenced by osmo_sccp_tx_conn_req(), osmo_sccp_tx_conn_resp_msg(), osmo_sccp_tx_data(), osmo_sccp_tx_disconn_data(), osmo_sccp_tx_unitdata(), and sccp_scmg_tx().
int osmo_sccp_user_sap_down_nofree | ( | struct osmo_sccp_user * | scu, |
struct osmo_prim_hdr * | oph | ||
) |
Main entrance function for primitives from SCCP User.
The caller is required to free oph->msg, otherwise the same as osmo_sccp_user_sap_down().
[in] | scu | SCCP User sending us the primitive |
[in] | oph | Osmocom primitive sent by the user |
References conn_create_id(), conn_find_by_id(), osmo_scu_connect_param::conn_id, osmo_scu_prim::connect, sccp_connection::fi, osmo_sccp_user::inst, sccp_connection::inst, osmo_scu_prim::oph, OSMO_SCU_PRIM_N_CONNECT, OSMO_SCU_PRIM_N_DATA, OSMO_SCU_PRIM_N_DISCONNECT, OSMO_SCU_PRIM_N_RESET, OSMO_SCU_PRIM_N_UNITDATA, osmo_scu_prim_name(), sccp_sclc_user_sap_down_nofree(), scu_prim_conn_id(), scu_scoc_event_map, and osmo_scu_prim::u.
Referenced by osmo_sccp_user_sap_down().
void osmo_sccp_user_set_priv | ( | struct osmo_sccp_user * | scu, |
void * | priv | ||
) |
References osmo_sccp_user::priv.
void osmo_sccp_user_unbind | ( | struct osmo_sccp_user * | scu | ) |
Unbind a given SCCP user.
[in] | scu | SCCP User which is to be un-bound. Will be destroyed at the time this function returns. |
References osmo_sccp_user::inst, osmo_sccp_user::list, osmo_sccp_user::name, osmo_ss7_pointcode_print(), osmo_sccp_user::pc, osmo_sccp_instance::ss7, and osmo_sccp_user::ssn.
Referenced by osmo_sccp_instance_destroy().
void osmo_sccp_vty_init | ( | void | ) |
References gen_sccp_timer_cmd_strs().
int osmo_scu_prim_hdr_name_buf | ( | char * | buf, |
size_t | buflen, | ||
const struct osmo_prim_hdr * | oph | ||
) |
References osmo_scu_prim_type_name().
Referenced by osmo_scu_prim_hdr_name_c(), and osmo_scu_prim_name().
char * osmo_scu_prim_hdr_name_c | ( | void * | ctx, |
const struct osmo_prim_hdr * | oph | ||
) |
References osmo_scu_prim_hdr_name_buf().
char * osmo_scu_prim_name | ( | const struct osmo_prim_hdr * | oph | ) |
References osmo_scu_prim_hdr_name_buf(), and prim_name_buf.
Referenced by osmo_sccp_user_sap_down_nofree(), sccp_sclc_user_sap_down_nofree(), sccp_user_prim_up(), scmg_prim_cb(), xua_drop_data_check_drop(), and xua_opt_data_cache_keep().
|
inlinestatic |
References osmo_scu_prim_type_names.
Referenced by osmo_scu_prim_hdr_name_buf().
|
extern |
Referenced by osmo_sccp_gti_name().
|
extern |
Referenced by osmo_sccp_rem_sccp_status_name().
|
extern |
Referenced by osmo_sccp_routing_ind_name().
|
extern |
Referenced by osmo_sccp_sp_status_name().
|
extern |
Referenced by osmo_sccp_ssn_name().
|
extern |
Referenced by osmo_scu_prim_type_name().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <sccp_sap.h>
Data Fields | |
uint32_t | affected_pc |
uint32_t | restricted_importance_level |
enum osmo_sccp_sp_status | sp_status |
enum osmo_sccp_rem_sccp_status | remote_sccp_status |
uint32_t osmo_scu_pcstate_param::affected_pc |
Referenced by sccp_scmg_rx_mtp_pause(), sccp_scmg_rx_mtp_resume(), and sccp_scmg_rx_mtp_status().
enum osmo_sccp_rem_sccp_status osmo_scu_pcstate_param::remote_sccp_status |
uint32_t osmo_scu_pcstate_param::restricted_importance_level |
enum osmo_sccp_sp_status osmo_scu_pcstate_param::sp_status |
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <stdint.h>
#include <osmocom/core/linuxlist.h>
Go to the source code of this file.
Data Structures | |
struct | osmo_ss7_linkset |
Functions | |
void | ss7_linkset_destroy (struct osmo_ss7_linkset *lset) |
Destroy a SS7 Linkset. More... | |
struct osmo_ss7_linkset * | ss7_linkset_find_by_name (struct osmo_ss7_instance *inst, const char *name) |
Find SS7 Linkset by given name. More... | |
struct osmo_ss7_linkset * | ss7_linkset_find_or_create (struct osmo_ss7_instance *inst, const char *name, uint32_t pc) |
Find or allocate SS7 Linkset. More... | |
void ss7_linkset_destroy | ( | struct osmo_ss7_linkset * | lset | ) |
Destroy a SS7 Linkset.
[in] | lset | Linkset to be destroyed |
References osmo_ss7_linkset::cfg, osmo_ss7_linkset::inst, osmo_ss7_linkset::links, osmo_ss7_linkset::list, LOGSS7, osmo_ss7_linkset::name, osmo_ss7_instance::rtable_system, ss7_initialized, ss7_link_destroy(), and ss7_route_table_del_routes_by_linkset().
Referenced by osmo_ss7_instance_destroy().
struct osmo_ss7_linkset * ss7_linkset_find_by_name | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
Find SS7 Linkset by given name.
[in] | inst | SS7 Instance in which to look |
[in] | name | Name of SS7 Linkset |
References osmo_ss7_linkset::cfg, osmo_ss7_linkset::inst, osmo_ss7_instance::linksets, osmo_ss7_linkset::list, osmo_ss7_linkset::name, and ss7_initialized.
Referenced by ss7_linkset_find_or_create(), and ss7_route_set_linkset().
struct osmo_ss7_linkset * ss7_linkset_find_or_create | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
uint32_t | pc | ||
) |
Find or allocate SS7 Linkset.
[in] | inst | SS7 Instance in which we operate |
[in] | name | Name of SS7 Linkset |
[in] | pc | Adjacent Pointcode |
References osmo_ss7_linkset::adjacent_pc, osmo_ss7_linkset::cfg, osmo_ss7_linkset::inst, osmo_ss7_instance::linksets, osmo_ss7_linkset::list, LOGSS7, osmo_ss7_linkset::name, ss7_initialized, and ss7_linkset_find_by_name().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <inttypes.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "ss7_internal.h"
#include "xua_as_fsm.h"
#include "xua_asp_fsm.h"
Functions | |
struct osmo_ss7_as * | ss7_as_alloc (struct osmo_ss7_instance *inst, const char *name, enum osmo_ss7_asp_protocol proto) |
Allocate an Application Server. More... | |
enum osmo_ss7_asp_protocol | osmo_ss7_as_get_asp_protocol (const struct osmo_ss7_as *as) |
Get asp_protocol configuration of a given AS. More... | |
int | osmo_ss7_as_add_asp (struct osmo_ss7_as *as, const char *asp_name) |
Add given ASP to given AS. More... | |
int | osmo_ss7_as_del_asp (struct osmo_ss7_as *as, const char *asp_name) |
Delete given ASP from given AS. More... | |
void | osmo_ss7_as_destroy (struct osmo_ss7_as *as) |
Destroy given Application Server. More... | |
bool | osmo_ss7_as_has_asp (const struct osmo_ss7_as *as, const struct osmo_ss7_asp *asp) |
Determine if given AS contains ASP. More... | |
bool | osmo_ss7_as_active (const struct osmo_ss7_as *as) |
Determine if given AS is in the active state. More... | |
bool | osmo_ss7_as_down (const struct osmo_ss7_as *as) |
Determine if given AS is in the down state. More... | |
static struct osmo_ss7_asp * | ss7_as_select_asp_override (struct osmo_ss7_as *as) |
static struct osmo_ss7_asp * | ss7_as_select_asp_roundrobin (struct osmo_ss7_as *as) |
static struct osmo_ss7_asp * | ss7_as_select_asp_broadcast (struct osmo_ss7_as *as) |
struct osmo_ss7_asp * | osmo_ss7_as_select_asp (struct osmo_ss7_as *as) |
Select an AS to transmit a message, according to AS configuration and ASP availability. More... | |
bool | osmo_ss7_as_tmode_compatible_xua (struct osmo_ss7_as *as, uint32_t m3ua_tmt) |
Variables | |
struct value_string | osmo_ss7_as_traffic_mode_vals [] |
static const struct rate_ctr_desc | ss7_as_rcd [] |
static const struct rate_ctr_group_desc | ss7_as_rcgd |
static unsigned int | g_ss7_as_rcg_idx |
bool osmo_ss7_as_active | ( | const struct osmo_ss7_as * | as | ) |
Determine if given AS is in the active state.
[in] | as | Application Server. |
References osmo_ss7_as::fi, and XUA_AS_S_ACTIVE.
Referenced by DEFUN().
int osmo_ss7_as_add_asp | ( | struct osmo_ss7_as * | as, |
const char * | asp_name | ||
) |
Add given ASP to given AS.
[in] | as | Application Server to which asp is added |
[in] | asp | Application Server Process to be added to as |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_asp::fi, osmo_ss7_as::inst, LOGPAS, osmo_ss7_asp::name, osmo_ss7_as_has_asp(), osmo_ss7_asp_find_by_name(), ss7_initialized, and XUA_ASP_E_AS_ASSIGNED.
Referenced by DEFUN_ATTR(), handle_rkey_reg(), ipa_asp_fsm_wait_id_resp(), osmo_sccp_simple_client_on_ss7_id(), and osmo_sccp_simple_server_add_clnt().
int osmo_ss7_as_del_asp | ( | struct osmo_ss7_as * | as, |
const char * | asp_name | ||
) |
Delete given ASP from given AS.
[in] | as | Application Server from which asp is deleted |
[in] | asp | Application Server Process to delete from as |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_as::inst, LOGPAS, osmo_ss7_asp::name, osmo_ss7_asp_find_by_name(), and ss7_initialized.
Referenced by DEFUN_ATTR(), and handle_rkey_dereg().
void osmo_ss7_as_destroy | ( | struct osmo_ss7_as * | as | ) |
Destroy given Application Server.
[in] | as | Application Server to destroy |
References osmo_ss7_as::ctrg, osmo_ss7_as::fi, osmo_ss7_as::inst, osmo_ss7_as::list, LOGPAS, osmo_ss7_instance::rtable_system, ss7_initialized, and ss7_route_table_del_routes_by_as().
Referenced by DEFUN_ATTR(), handle_rkey_dereg(), handle_rkey_reg(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_ss7_instance_destroy(), and xua_rkm_cleanup_dyn_as_for_asp().
bool osmo_ss7_as_down | ( | const struct osmo_ss7_as * | as | ) |
Determine if given AS is in the down state.
[in] | as | Application Server. |
References osmo_ss7_as::fi, and XUA_AS_S_DOWN.
Referenced by hmrt_message_for_routing().
enum osmo_ss7_asp_protocol osmo_ss7_as_get_asp_protocol | ( | const struct osmo_ss7_as * | as | ) |
Get asp_protocol configuration of a given AS.
[in] | as | Application Server in which to look for asp_protocol |
References osmo_ss7_as::cfg, and osmo_ss7_as::proto.
bool osmo_ss7_as_has_asp | ( | const struct osmo_ss7_as * | as, |
const struct osmo_ss7_asp * | asp | ||
) |
Determine if given AS contains ASP.
[in] | as | Application Server in which to look for asp |
[in] | asp | Application Server Process to look for in as |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, and ss7_initialized.
Referenced by as_list_for_asp(), determine_traf_mode(), dispatch_to_all_as(), find_single_as_for_asp(), get_all_rctx_for_asp(), handle_rkey_dereg(), ipa_find_as_for_asp(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_as_add_asp(), xua_asp_fsm_inactive(), xua_find_as_for_asp(), xua_msg_add_asp_rctx(), and xua_rkm_cleanup_dyn_as_for_asp().
struct osmo_ss7_asp * osmo_ss7_as_select_asp | ( | struct osmo_ss7_as * | as | ) |
Select an AS to transmit a message, according to AS configuration and ASP availability.
[in] | as | Application Server. |
This function returns NULL too if multiple ASPs would be selected, ie. AS is configured in broadcast mode and more than one ASP is configured.
References _NUM_OSMO_SS7_ASP_TMOD, osmo_ss7_as::cfg, osmo_ss7_as::fi, osmo_ss7_as::mode, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, OSMO_SS7_AS_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_ROUNDROBIN, ss7_as_select_asp_broadcast(), ss7_as_select_asp_override(), and ss7_as_select_asp_roundrobin().
Referenced by xua_as_transmit_msg().
bool osmo_ss7_as_tmode_compatible_xua | ( | struct osmo_ss7_as * | as, |
uint32_t | m3ua_tmt | ||
) |
References osmo_ss7_as::cfg, M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, osmo_ss7_as::mode, osmo_ss7_as::mode_set_by_peer, osmo_ss7_as::mode_set_by_vty, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, OSMO_SS7_AS_TMOD_OVERRIDE, and OSMO_SS7_AS_TMOD_ROUNDROBIN.
Referenced by handle_rkey_reg(), and xua_asp_fsm_inactive().
struct osmo_ss7_as * ss7_as_alloc | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
enum osmo_ss7_asp_protocol | proto | ||
) |
Allocate an Application Server.
[in] | inst | SS7 Instance on which we operate |
[in] | name | Name of Application Server |
[in] | proto | Protocol of Application Server |
References osmo_ss7_instance::as_list, osmo_ss7_as::cfg, osmo_ss7_as::ctrg, osmo_ss7_as::fi, g_ss7_as_rcg_idx, osmo_ss7_as::inst, osmo_ss7_routing_key::l_rk_id, osmo_ss7_as::list, osmo_ss7_as::mode, osmo_ss7_as::name, OSMO_SS7_AS_TMOD_OVERRIDE, osmo_ss7_as::proto, osmo_ss7_as::recovery_timeout_msec, osmo_ss7_as::routing_key, ss7_as_rcgd, ss7_find_free_l_rk_id(), and xua_as_fsm_start().
Referenced by osmo_ss7_as_find_or_create().
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, and osmo_ss7_asp_active().
Referenced by osmo_ss7_as_select_asp().
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, and osmo_ss7_asp_active().
Referenced by osmo_ss7_as_select_asp().
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_as::last_asp_idx_sent, and osmo_ss7_asp_active().
Referenced by osmo_ss7_as_select_asp().
|
static |
Referenced by ss7_as_alloc().
struct value_string osmo_ss7_as_traffic_mode_vals[] |
Referenced by DEFUN_USRATTR(), and osmo_ss7_as_traffic_mode_name().
|
static |
|
static |
Referenced by ss7_as_alloc().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <ss7_as.h>
Data Fields | |
struct llist_head | list |
entry in 'ref osmo_ss7_instance.as_list More... | |
struct osmo_ss7_instance * | inst |
struct osmo_fsm_inst * | fi |
AS FSM. More... | |
bool | rkm_dyn_allocated |
Were we dynamically allocated by RKM? More... | |
bool | simple_client_allocated |
Were we allocated by "simple client" support? More... | |
struct rate_ctr_group * | ctrg |
Rate Counter Group. More... | |
struct { | |
char * name | |
char * description | |
enum osmo_ss7_asp_protocol proto | |
struct osmo_ss7_routing_key routing_key | |
enum osmo_ss7_as_traffic_mode mode | |
bool mode_set_by_vty | |
bool mode_set_by_peer | |
uint32_t recovery_timeout_msec | |
uint8_t qos_class | |
struct { | |
uint32_t dpc | |
enum osmo_ss7_as_patch_sccp_mode sccp_mode | |
} pc_override | |
struct osmo_ss7_asp * asps [16] | |
uint8_t last_asp_idx_sent | |
} | cfg |
struct osmo_ss7_asp* osmo_ss7_as::asps[16] |
Referenced by as_notify_all_asp(), check_any_other_asp_in_active(), check_any_other_asp_not_down(), find_first_as_in_asp(), get_local_role(), is_single_ipa_asp(), notify_any_other_active_asp_as_inactive(), osmo_ss7_as_add_asp(), osmo_ss7_as_del_asp(), osmo_ss7_as_has_asp(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find_by_proto(), osmo_ss7_route_name(), ss7_as_select_asp_broadcast(), ss7_as_select_asp_override(), ss7_as_select_asp_roundrobin(), write_one_as(), and xua_as_transmit_msg_broadcast().
struct { ... } osmo_ss7_as::cfg |
Referenced by _rout_key(), as_list_for_asp(), as_notify_all_asp(), check_any_other_asp_in_active(), check_any_other_asp_not_down(), DEFUN(), DEFUN_ATTR(), DEFUN_USRATTR(), determine_traf_mode(), find_first_as_in_asp(), gen_mtp_transfer_req_xua(), get_all_rctx_for_asp(), get_local_role(), handle_reg_conf(), handle_rkey_dereg(), handle_rkey_reg(), hmrt_message_for_routing(), ipa_add_route(), ipa_asp_allstate(), ipa_asp_fsm_start(), ipa_del_route(), ipa_rx_msg_sccp(), ipa_tx_xua_as(), is_single_ipa_asp(), lm_timer_cb(), m3ua_tx_xua_as(), notify_any_other_active_asp_as_inactive(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_as_add_asp(), osmo_ss7_as_del_asp(), osmo_ss7_as_find_by_l_rk_id(), osmo_ss7_as_find_by_name(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_by_rctx(), osmo_ss7_as_find_or_create(), osmo_ss7_as_get_asp_protocol(), osmo_ss7_as_has_asp(), osmo_ss7_as_select_asp(), osmo_ss7_as_tmode_compatible_xua(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find_by_proto(), osmo_ss7_route_name(), ss7_as_alloc(), ss7_as_select_asp_broadcast(), ss7_as_select_asp_override(), ss7_as_select_asp_roundrobin(), ss7_route_set_linkset(), sua_tx_xua_as(), write_one_as(), xua_as_fsm_active(), xua_as_fsm_start(), xua_as_transmit_msg(), xua_as_transmit_msg_broadcast(), xua_asp_fsm_inactive(), and xua_msg_add_asp_rctx().
struct rate_ctr_group* osmo_ss7_as::ctrg |
Rate Counter Group.
Referenced by hmrt_message_for_routing(), ipa_rx_msg_sccp(), m3ua_rx_xfer(), osmo_ss7_as_destroy(), ss7_as_alloc(), sua_rx_cl(), and sua_rx_co().
char* osmo_ss7_as::description |
Referenced by DEFUN_ATTR(), handle_rkey_reg(), and write_one_as().
uint32_t osmo_ss7_as::dpc |
Referenced by DEFUN_ATTR(), ipa_rx_msg_sccp(), and write_one_as().
struct osmo_fsm_inst* osmo_ss7_as::fi |
AS FSM.
Referenced by DEFUN(), dispatch_to_all_as(), handle_reg_conf(), handle_rkey_dereg(), ipa_asp_allstate(), ipa_asp_fsm_start(), lm_timer_cb(), m3ua_rx_rkm_reg_req(), m3ua_tx_xua_as(), osmo_ss7_as_active(), osmo_ss7_as_destroy(), osmo_ss7_as_down(), osmo_ss7_as_select_asp(), ss7_as_alloc(), sua_tx_xua_as(), and xua_as_transmit_msg().
struct osmo_ss7_instance* osmo_ss7_as::inst |
Referenced by _rout_key(), DEFUN(), DEFUN_ATTR(), dispatch_to_all_as(), gen_mtp_transfer_req_xua(), handle_rkey_reg(), hmrt_message_for_routing(), ipa_add_route(), ipa_del_route(), ipa_rx_msg_sccp(), m3ua_hmdc_rx_from_l2(), osmo_ss7_as_add_asp(), osmo_ss7_as_del_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_l_rk_id(), osmo_ss7_as_find_by_name(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_by_rctx(), osmo_ss7_as_find_or_create(), osmo_ss7_vty_go_parent(), scrc_node_12(), scrc_node_2(), scrc_node_4(), scrc_node_7(), ss7_as_alloc(), sua_rx_cl(), sua_rx_co(), sua_snm_ssn_available(), write_one_as(), xua_rkm_cleanup_dyn_as_for_asp(), xua_snm_pc_available(), xua_snm_scon(), and xua_snm_upu().
uint8_t osmo_ss7_as::last_asp_idx_sent |
Referenced by ss7_as_select_asp_roundrobin().
struct llist_head osmo_ss7_as::list |
entry in 'ref osmo_ss7_instance.as_list
Referenced by as_list_for_asp(), DEFUN(), determine_traf_mode(), dispatch_to_all_as(), find_first_as_in_asp(), find_single_as_for_asp(), get_all_rctx_for_asp(), ipa_find_as_for_asp(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_l_rk_id(), osmo_ss7_as_find_by_name(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_by_rctx(), osmo_ss7_asp_destroy(), ss7_as_alloc(), xua_msg_add_asp_rctx(), and xua_rkm_cleanup_dyn_as_for_asp().
enum osmo_ss7_as_traffic_mode osmo_ss7_as::mode |
bool osmo_ss7_as::mode_set_by_peer |
Referenced by handle_rkey_reg(), osmo_ss7_as_tmode_compatible_xua(), and xua_asp_fsm_inactive().
bool osmo_ss7_as::mode_set_by_vty |
char* osmo_ss7_as::name |
Referenced by _rout_key(), as_list_for_asp(), DEFUN(), DEFUN_ATTR(), hmrt_message_for_routing(), ipa_add_route(), ipa_asp_allstate(), ipa_asp_fsm_start(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_as_find_by_name(), osmo_ss7_as_find_or_create(), osmo_ss7_route_name(), ss7_as_alloc(), ss7_route_set_linkset(), write_one_as(), and xua_as_fsm_start().
struct { ... } osmo_ss7_as::pc_override |
Referenced by DEFUN_ATTR(), ipa_rx_msg_sccp(), and write_one_as().
enum osmo_ss7_asp_protocol osmo_ss7_as::proto |
Referenced by _rout_key(), as_notify_all_asp(), DEFUN(), DEFUN_ATTR(), gen_mtp_transfer_req_xua(), hmrt_message_for_routing(), ipa_tx_xua_as(), m3ua_tx_xua_as(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_or_create(), osmo_ss7_as_get_asp_protocol(), osmo_ss7_route_name(), ss7_as_alloc(), sua_tx_xua_as(), and write_one_as().
uint8_t osmo_ss7_as::qos_class |
Referenced by DEFUN_ATTR(), and write_one_as().
uint32_t osmo_ss7_as::recovery_timeout_msec |
Referenced by DEFUN_ATTR(), ss7_as_alloc(), write_one_as(), and xua_as_fsm_active().
bool osmo_ss7_as::rkm_dyn_allocated |
Were we dynamically allocated by RKM?
Referenced by handle_rkey_dereg(), handle_rkey_reg(), write_one_as(), and xua_rkm_cleanup_dyn_as_for_asp().
struct osmo_ss7_routing_key osmo_ss7_as::routing_key |
Referenced by _rout_key(), DEFUN(), get_all_rctx_for_asp(), handle_reg_conf(), handle_rkey_dereg(), handle_rkey_reg(), ipa_add_route(), ipa_del_route(), ipa_rx_msg_sccp(), lm_timer_cb(), m3ua_tx_xua_as(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_as_find_by_l_rk_id(), osmo_ss7_as_find_by_rctx(), ss7_as_alloc(), sua_tx_xua_as(), write_one_as(), and xua_msg_add_asp_rctx().
enum osmo_ss7_as_patch_sccp_mode osmo_ss7_as::sccp_mode |
Referenced by DEFUN_ATTR(), ipa_rx_msg_sccp(), and write_one_as().
bool osmo_ss7_as::simple_client_allocated |
Were we allocated by "simple client" support?
Referenced by osmo_sccp_simple_client_on_ss7_id(), and write_one_as().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <stdint.h>
#include <stdbool.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/prim.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/rate_ctr.h>
Go to the source code of this file.
Data Structures | |
struct | osmo_ss7_routing_key |
Macros | |
#define | OSMO_SS7_PC_INVALID 0xffffffff |
#define | OSMO_SS7_ASP_QUIRK_NO_NOTIFY 0x00000001 |
Peer SG doesn't send NTFY(AS-INACTIVE) after ASP-UP procedure. More... | |
#define | OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP 0x00000002 |
Accept DAUD in ASP role (RFC states only permitted in ASP->SG role) More... | |
#define | OSMO_SS7_ASP_QUIRK_SNM_INACTIVE 0x00000004 |
Accept SSNM even if ASP is in AS-INACTIVE state. More... | |
Typedefs | |
typedef int | osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg) |
Weak function to handle payload for unknown/unsupported PPID or IPA StreamID. More... | |
Functions | |
struct osmo_ss7_instance * | osmo_ss7_instances_llist_entry (struct llist_head *list) |
int | osmo_ss7_init (void) |
static bool | osmo_ss7_pc_is_valid (uint32_t pc) |
struct osmo_ss7_instance * | osmo_ss7_instance_find (uint32_t id) |
Find a SS7 Instance with given ID. More... | |
struct osmo_ss7_instance * | osmo_ss7_instance_find_or_create (void *ctx, uint32_t id) |
Find or create a SS7 Instance. More... | |
void | osmo_ss7_instance_destroy (struct osmo_ss7_instance *inst) |
Destroy a SS7 Instance. More... | |
uint32_t | osmo_ss7_instance_get_id (const struct osmo_ss7_instance *inst) |
const char * | osmo_ss7_instance_get_name (const struct osmo_ss7_instance *inst) |
int | osmo_ss7_instance_set_pc_fmt (struct osmo_ss7_instance *inst, uint8_t c0, uint8_t c1, uint8_t c2) |
Set the point code format used in given SS7 instance. More... | |
const struct osmo_ss7_pc_fmt * | osmo_ss7_instance_get_pc_fmt (const struct osmo_ss7_instance *inst) |
uint32_t | osmo_ss7_instance_get_primary_pc (const struct osmo_ss7_instance *inst) |
struct osmo_sccp_instance * | osmo_ss7_ensure_sccp (struct osmo_ss7_instance *inst) |
Allocate an SCCP instance, if not present yet. More... | |
struct osmo_sccp_instance * | osmo_ss7_get_sccp (const struct osmo_ss7_instance *inst) |
Get the SCCP instance, if present. More... | |
int | osmo_ss7_find_free_rctx (struct osmo_ss7_instance *inst) |
bool | osmo_ss7_pc_is_local (const struct osmo_ss7_instance *inst, uint32_t pc) |
int | osmo_ss7_pointcode_parse (const struct osmo_ss7_instance *inst, const char *str) |
int | osmo_ss7_pointcode_parse_mask_or_len (const struct osmo_ss7_instance *inst, const char *in) |
const char * | osmo_ss7_pointcode_print_buf (char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, uint32_t pc) |
const char * | osmo_ss7_pointcode_print (const struct osmo_ss7_instance *inst, uint32_t pc) |
const char * | osmo_ss7_pointcode_print2 (const struct osmo_ss7_instance *inst, uint32_t pc) |
uint8_t | osmo_ss7_pc_width (const struct osmo_ss7_pc_fmt *pc_fmt) |
uint32_t | osmo_ss7_pc_normalize (const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc) |
struct osmo_ss7_user * | osmo_ss7_user_create (struct osmo_ss7_instance *inst, const char *name) |
void | osmo_ss7_user_destroy (struct osmo_ss7_user *user) |
struct osmo_ss7_instance * | osmo_ss7_user_get_instance (const struct osmo_ss7_user *user) |
void | osmo_ss7_user_set_prim_cb (struct osmo_ss7_user *user, osmo_prim_cb prim_cb) |
void | osmo_ss7_user_set_priv (struct osmo_ss7_user *user, void *priv) |
void * | osmo_ss7_user_get_priv (const struct osmo_ss7_user *user) |
int | osmo_ss7_user_register (struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user) |
Register a MTP user for a given service indicator. More... | |
int | osmo_ss7_user_unregister (struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user) |
Unregister a MTP user for a given service indicator. More... | |
int | osmo_ss7_user_mtp_xfer_req (struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp) |
void | osmo_sccp_set_max_optional_data (struct osmo_sccp_instance *inst, int val) |
Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages. More... | |
struct osmo_ss7_route * | osmo_ss7_route_lookup (struct osmo_ss7_instance *inst, uint32_t dpc) |
Find a SS7 route for given destination point code in given SS7. More... | |
const char * | osmo_ss7_route_print (const struct osmo_ss7_route *rt) |
const char * | osmo_ss7_route_name (struct osmo_ss7_route *rt, bool list_asps) |
Return human readable representation of the route, in a static buffer. More... | |
struct osmo_ss7_as * | osmo_ss7_route_get_dest_as (struct osmo_ss7_route *rt) |
Get destination AS of route. More... | |
static const char * | osmo_ss7_asp_protocol_name (enum osmo_ss7_asp_protocol mode) |
int | osmo_ss7_asp_protocol_port (enum osmo_ss7_asp_protocol prot) |
static const char * | osmo_ss7_as_traffic_mode_name (enum osmo_ss7_as_traffic_mode mode) |
enum osmo_ss7_as_traffic_mode | osmo_ss7_tmode_from_xua (uint32_t in) |
int | osmo_ss7_tmode_to_xua (enum osmo_ss7_as_traffic_mode tmod) |
struct osmo_ss7_as * | osmo_ss7_as_find_by_name (struct osmo_ss7_instance *inst, const char *name) |
Find Application Server by given name. More... | |
struct osmo_ss7_as * | osmo_ss7_as_find_by_rctx (struct osmo_ss7_instance *inst, uint32_t rctx) |
Find Application Server by given routing context. More... | |
struct osmo_ss7_as * | osmo_ss7_as_find_by_l_rk_id (struct osmo_ss7_instance *inst, uint32_t l_rk_id) |
Find Application Server by given local routing key ID. More... | |
struct osmo_ss7_as * | osmo_ss7_as_find_by_proto (struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto) |
Find Application Server (AS) by given protocol. More... | |
struct osmo_ss7_as * | osmo_ss7_as_find_or_create (struct osmo_ss7_instance *inst, const char *name, enum osmo_ss7_asp_protocol proto) |
Find or Create Application Server. More... | |
enum osmo_ss7_asp_protocol | osmo_ss7_as_get_asp_protocol (const struct osmo_ss7_as *as) |
Get asp_protocol configuration of a given AS. More... | |
int | osmo_ss7_as_add_asp (struct osmo_ss7_as *as, const char *asp_name) |
Add given ASP to given AS. More... | |
int | osmo_ss7_as_del_asp (struct osmo_ss7_as *as, const char *asp_name) |
Delete given ASP from given AS. More... | |
void | osmo_ss7_as_destroy (struct osmo_ss7_as *as) |
Destroy given Application Server. More... | |
bool | osmo_ss7_as_has_asp (const struct osmo_ss7_as *as, const struct osmo_ss7_asp *asp) |
Determine if given AS contains ASP. More... | |
struct osmo_ss7_asp * | osmo_ss7_as_select_asp (struct osmo_ss7_as *as) |
Select an AS to transmit a message, according to AS configuration and ASP availability. More... | |
bool | osmo_ss7_as_down (const struct osmo_ss7_as *as) |
Determine if given AS is in the down state. More... | |
bool | osmo_ss7_as_active (const struct osmo_ss7_as *as) |
Determine if given AS is in the active state. More... | |
bool | osmo_ss7_as_tmode_compatible_xua (struct osmo_ss7_as *as, uint32_t m3ua_tmt) |
struct osmo_ss7_asp * | osmo_ss7_asp_find_by_name (struct osmo_ss7_instance *inst, const char *name) |
struct osmo_ss7_asp * | osmo_ss7_asp_find_by_proto (struct osmo_ss7_as *as, enum osmo_ss7_asp_protocol proto) |
Find an ASP that matches the given ASP protocol (xUA variant). More... | |
struct osmo_ss7_asp * | osmo_ss7_asp_find (struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto) OSMO_DEPRECATED("Use osmo_ss7_asp_find2() instead") |
struct osmo_ss7_asp * | osmo_ss7_asp_find2 (struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, int trans_proto, enum osmo_ss7_asp_protocol proto) |
struct osmo_ss7_asp * | osmo_ss7_asp_find_or_create (struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, enum osmo_ss7_asp_protocol proto) OSMO_DEPRECATED("Use osmo_ss7_asp_find_or_create2() instead") |
struct osmo_ss7_asp * | osmo_ss7_asp_find_or_create2 (struct osmo_ss7_instance *inst, const char *name, uint16_t remote_port, uint16_t local_port, int trans_proto, enum osmo_ss7_asp_protocol proto) |
void | osmo_ss7_asp_disconnect (struct osmo_ss7_asp *asp) |
void | osmo_ss7_asp_destroy (struct osmo_ss7_asp *asp) |
int | osmo_ss7_asp_send (struct osmo_ss7_asp *asp, struct msgb *msg) |
send a fully encoded msgb via a given ASP More... | |
int | osmo_ss7_asp_restart (struct osmo_ss7_asp *asp) |
int | osmo_ss7_asp_use_default_lm (struct osmo_ss7_asp *asp, int log_level) |
bool | osmo_ss7_asp_active (const struct osmo_ss7_asp *asp) |
int | osmo_ss7_asp_get_log_subsys (const struct osmo_ss7_asp *asp) |
Get the logging subsystem for a given ASP. More... | |
const char * | osmo_ss7_asp_get_name (const struct osmo_ss7_asp *asp) |
Get the name of a given ASP. More... | |
enum osmo_ss7_asp_protocol | osmo_ss7_asp_get_proto (const struct osmo_ss7_asp *asp) |
Get the proto of a given ASP. More... | |
int | osmo_ss7_asp_get_trans_proto (const struct osmo_ss7_asp *asp) |
Get the transport proto of a given ASP. More... | |
void | osmo_ss7_register_rx_unknown_cb (osmo_ss7_asp_rx_unknown_cb *cb) |
Register a call-back function for unknown SCTP PPID / IPA Stream ID. More... | |
struct osmo_sccp_instance * | osmo_sccp_simple_client (void *ctx, const char *name, uint32_t default_pc, enum osmo_ss7_asp_protocol prot, int default_local_port, const char *default_local_ip, int default_remote_port, const char *default_remote_ip) |
request an sccp client instance More... | |
struct osmo_sccp_instance * | osmo_sccp_simple_client_on_ss7_id (void *ctx, uint32_t ss7_id, const char *name, uint32_t default_pc, enum osmo_ss7_asp_protocol prot, int default_local_port, const char *default_local_ip, int default_remote_port, const char *default_remote_ip) |
request an sccp client instance More... | |
struct osmo_sccp_instance * | osmo_sccp_simple_server (void *ctx, uint32_t pc, enum osmo_ss7_asp_protocol prot, int local_port, const char *local_ip) |
struct osmo_sccp_instance * | osmo_sccp_simple_server_on_ss7_id (void *ctx, uint32_t ss7_id, uint32_t pc, enum osmo_ss7_asp_protocol prot, int local_port, const char *local_ip) |
struct osmo_sccp_instance * | osmo_sccp_simple_server_add_clnt (struct osmo_sccp_instance *inst, enum osmo_ss7_asp_protocol prot, const char *name, uint32_t pc, int local_port, int remote_port, const char *remote_ip) |
void | osmo_ss7_vty_init_asp (void *ctx) |
void | osmo_ss7_vty_init_sg (void *ctx) |
int | osmo_ss7_vty_go_parent (struct vty *vty) |
int | osmo_ss7_is_config_node (struct vty *vty, int node) |
Variables | |
struct llist_head | osmo_ss7_instances |
struct value_string | osmo_ss7_asp_protocol_vals [] |
struct value_string | osmo_ss7_as_traffic_mode_vals [] |
const struct value_string | osmo_ss7_asp_role_names [] |
#define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP 0x00000002 |
Accept DAUD in ASP role (RFC states only permitted in ASP->SG role)
#define OSMO_SS7_ASP_QUIRK_NO_NOTIFY 0x00000001 |
Peer SG doesn't send NTFY(AS-INACTIVE) after ASP-UP procedure.
#define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE 0x00000004 |
Accept SSNM even if ASP is in AS-INACTIVE state.
#define OSMO_SS7_PC_INVALID 0xffffffff |
typedef int osmo_ss7_asp_rx_unknown_cb(struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg) |
Weak function to handle payload for unknown/unsupported PPID or IPA StreamID.
This function can be overridden by application code to implement whatever handling it wants for such additional payloads/streams.
[in] | asp | Application Server Process through which data was received |
[in] | ppid_sid | SCTP PPID (in sigtran case) or IPA Stream ID |
[in] | msg | Message buffer containing received data. Continues to be owned by caller! |
enum osmo_ss7_asp_role |
void osmo_sccp_set_max_optional_data | ( | struct osmo_sccp_instance * | inst, |
int | val | ||
) |
Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages.
For any Optional Data part larger than this value in octets, send CR, CC, CREF and RLSD messages without any payload, and send the data payload in a separate Data Form 1 message. ITU-T Q.713 sections 4.2 thru 4.5 define a limit of 130 bytes for the 'Data' parameter. This limit can be adjusted here. May be useful for interop with nonstandard SCCP peers.
[in] | sccp | SCCP instance to reconfigure. |
[in] | val | Number of bytes to set as upper bound for the optional data length, or pass a negative value to set the standard value of SCCP_MAX_OPTIONAL_DATA == 130, which conforms to ITU-T Q.713. |
References osmo_xua_server::inst.
Referenced by DEFUN_ATTR().
struct osmo_sccp_instance * osmo_sccp_simple_client | ( | void * | ctx, |
const char * | name, | ||
uint32_t | default_pc, | ||
enum osmo_ss7_asp_protocol | prot, | ||
int | default_local_port, | ||
const char * | default_local_ip, | ||
int | default_remote_port, | ||
const char * | default_remote_ip | ||
) |
request an sccp client instance
[in] | ctx | talloc context |
[in] | name | human readable name |
[in] | default_pc | pointcode to be used on missing VTY setting |
[in] | prot | protocol to be used (e.g OSMO_SS7_ASP_PROT_M3UA) |
[in] | default_local_port | local port to be used on missing VTY setting |
[in] | default_local_ip | local IP-address to be used on missing VTY setting |
[in] | default_remote_port | remote port to be used on missing VTY setting |
[in] | default_remote_ip | remote IP-address to be used on missing VTY setting |
This is simplified version of osmo_sccp_simple_client_on_ss7_id(). the only difference is that the ID of the CS7 instance will be set to 0 statically
References osmo_sccp_simple_client_on_ss7_id().
struct osmo_sccp_instance * osmo_sccp_simple_client_on_ss7_id | ( | void * | ctx, |
uint32_t | ss7_id, | ||
const char * | name, | ||
uint32_t | default_pc, | ||
enum osmo_ss7_asp_protocol | prot, | ||
int | default_local_port, | ||
const char * | default_local_ip, | ||
int | default_remote_port, | ||
const char * | default_remote_ip | ||
) |
request an sccp client instance
[in] | ctx | talloc context |
[in] | ss7_id | of the SS7/CS7 instance |
[in] | name | human readable name |
[in] | default_pc | pointcode to be used on missing VTY setting |
[in] | prot | protocol to be used (e.g OSMO_SS7_ASP_PROT_M3UA) |
[in] | default_local_port | local port to be used on missing VTY setting |
[in] | default_local_ip | local IP-address to be used on missing VTY setting (NULL: use library own defaults) |
[in] | default_remote_port | remote port to be used on missing VTY setting |
[in] | default_remote_ip | remote IP-address to be used on missing VTY setting (NULL: use library own defaults) |
The function will examine the given CS7 instance and its sub components (as, asp, etc.). If necessary it will allocate the missing components. If no CS7 instance can be detected under the caller supplied ID, a new instance will be created beforehand.
References osmo_ss7_instance::as_list, osmo_ss7_instance::asp_list, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_instance::cfg, osmo_ss7_instance::id, osmo_ss7_asp::is_server, osmo_ss7_as::list, osmo_ss7_asp::list, osmo_ss7_asp::local, osmo_ss7_as::name, osmo_ss7_asp::name, osmo_ss7_as_add_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_or_create(), osmo_ss7_as_has_asp(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find_by_proto(), osmo_ss7_asp_find_or_create2(), OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp_protocol_name(), osmo_ss7_asp_protocol_port(), osmo_ss7_asp_restart(), OSMO_SS7_ASP_ROLE_ASP, osmo_ss7_asp_use_default_lm(), osmo_ss7_ensure_sccp(), osmo_ss7_instance_destroy(), osmo_ss7_instance_find(), osmo_ss7_instance_find_or_create(), osmo_ss7_pc_is_valid(), osmo_ss7_pointcode_print(), osmo_ss7_routing_key::pc, osmo_ss7_asp_peer::port, osmo_ss7_instance::primary_pc, osmo_ss7_asp::proto, osmo_ss7_asp::remote, osmo_ss7_asp::role, osmo_ss7_asp::role_set_by_vty, osmo_ss7_as::routing_key, osmo_ss7_instance::rtable_system, osmo_ss7_instance::sccp, osmo_ss7_as::simple_client_allocated, osmo_ss7_asp::simple_client_allocated, ss7_asp_peer_set_hosts(), ss7_asp_set_default_peer_hosts(), ss7_default_trans_proto_for_asp_proto(), ss7_route_create(), ss7_route_destroy(), ss7_route_table_find_route_by_dpc_mask(), ss7_xua_server_find2(), osmo_ss7_asp::trans_proto, and osmo_ss7_asp::trans_role_set_by_vty.
Referenced by osmo_sccp_simple_client().
struct osmo_sccp_instance * osmo_sccp_simple_server | ( | void * | ctx, |
uint32_t | pc, | ||
enum osmo_ss7_asp_protocol | prot, | ||
int | local_port, | ||
const char * | local_ip | ||
) |
References osmo_sccp_simple_server_on_ss7_id().
struct osmo_sccp_instance * osmo_sccp_simple_server_add_clnt | ( | struct osmo_sccp_instance * | inst, |
enum osmo_ss7_asp_protocol | prot, | ||
const char * | name, | ||
uint32_t | pc, | ||
int | local_port, | ||
int | remote_port, | ||
const char * | remote_ip | ||
) |
References osmo_ss7_asp::cfg, osmo_xua_server::cfg, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp::is_server, osmo_ss7_asp::local, osmo_xua_server::local, osmo_ss7_as_add_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_or_create(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find_or_create2(), osmo_ss7_asp_protocol_port(), osmo_ss7_asp_restart(), OSMO_SS7_ASP_ROLE_SG, osmo_ss7_asp::remote, osmo_ss7_asp::role, osmo_ss7_instance::rtable_system, osmo_ss7_instance::sccp, osmo_sccp_instance::ss7, ss7_asp_peer_add_host(), ss7_asp_peer_set_hosts(), ss7_default_trans_proto_for_asp_proto(), ss7_route_create(), ss7_route_destroy(), ss7_xua_server_find2(), osmo_ss7_asp::trans_proto, and osmo_xua_server::trans_proto.
struct osmo_sccp_instance * osmo_sccp_simple_server_on_ss7_id | ( | void * | ctx, |
uint32_t | ss7_id, | ||
uint32_t | pc, | ||
enum osmo_ss7_asp_protocol | prot, | ||
int | local_port, | ||
const char * | local_ip | ||
) |
References osmo_ss7_instance::cfg, osmo_ss7_asp_protocol_port(), osmo_ss7_ensure_sccp(), osmo_ss7_instance_destroy(), osmo_ss7_instance_find_or_create(), osmo_ss7_instance::primary_pc, osmo_ss7_instance::sccp, ss7_default_trans_proto_for_asp_proto(), ss7_xua_server_bind(), ss7_xua_server_create2(), ss7_xua_server_destroy(), and osmo_xua_server::trans_proto.
Referenced by osmo_sccp_simple_server().
bool osmo_ss7_as_active | ( | const struct osmo_ss7_as * | as | ) |
Determine if given AS is in the active state.
[in] | as | Application Server. |
References osmo_ss7_as::fi, and XUA_AS_S_ACTIVE.
Referenced by DEFUN().
int osmo_ss7_as_add_asp | ( | struct osmo_ss7_as * | as, |
const char * | asp_name | ||
) |
Add given ASP to given AS.
[in] | as | Application Server to which asp is added |
[in] | asp | Application Server Process to be added to as |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_asp::fi, osmo_ss7_as::inst, LOGPAS, osmo_ss7_asp::name, osmo_ss7_as_has_asp(), osmo_ss7_asp_find_by_name(), ss7_initialized, and XUA_ASP_E_AS_ASSIGNED.
Referenced by DEFUN_ATTR(), handle_rkey_reg(), ipa_asp_fsm_wait_id_resp(), osmo_sccp_simple_client_on_ss7_id(), and osmo_sccp_simple_server_add_clnt().
int osmo_ss7_as_del_asp | ( | struct osmo_ss7_as * | as, |
const char * | asp_name | ||
) |
Delete given ASP from given AS.
[in] | as | Application Server from which asp is deleted |
[in] | asp | Application Server Process to delete from as |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_as::inst, LOGPAS, osmo_ss7_asp::name, osmo_ss7_asp_find_by_name(), and ss7_initialized.
Referenced by DEFUN_ATTR(), and handle_rkey_dereg().
void osmo_ss7_as_destroy | ( | struct osmo_ss7_as * | as | ) |
Destroy given Application Server.
[in] | as | Application Server to destroy |
References osmo_ss7_as::ctrg, osmo_ss7_as::fi, osmo_ss7_as::inst, osmo_ss7_as::list, LOGPAS, osmo_ss7_instance::rtable_system, ss7_initialized, and ss7_route_table_del_routes_by_as().
Referenced by DEFUN_ATTR(), handle_rkey_dereg(), handle_rkey_reg(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_ss7_instance_destroy(), and xua_rkm_cleanup_dyn_as_for_asp().
bool osmo_ss7_as_down | ( | const struct osmo_ss7_as * | as | ) |
Determine if given AS is in the down state.
[in] | as | Application Server. |
References osmo_ss7_as::fi, and XUA_AS_S_DOWN.
Referenced by hmrt_message_for_routing().
struct osmo_ss7_as * osmo_ss7_as_find_by_l_rk_id | ( | struct osmo_ss7_instance * | inst, |
uint32_t | l_rk_id | ||
) |
Find Application Server by given local routing key ID.
[in] | inst | SS7 Instance on which we operate |
[in] | l_rk_id | Local Routing Key ID |
References osmo_ss7_instance::as_list, osmo_ss7_as::cfg, osmo_ss7_as::inst, osmo_ss7_routing_key::l_rk_id, osmo_ss7_as::list, osmo_ss7_as::routing_key, and ss7_initialized.
Referenced by handle_reg_conf(), and ss7_find_free_l_rk_id().
struct osmo_ss7_as * osmo_ss7_as_find_by_name | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
Find Application Server by given name.
[in] | inst | SS7 Instance on which we operate |
[in] | name | Name of AS |
References osmo_ss7_instance::as_list, osmo_ss7_as::cfg, osmo_ss7_as::inst, osmo_ss7_as::list, osmo_ss7_as::name, and ss7_initialized.
Referenced by DEFUN_ATTR(), ipa_asp_fsm_wait_id_resp(), osmo_ss7_as_find_or_create(), and ss7_route_set_linkset().
struct osmo_ss7_as * osmo_ss7_as_find_by_proto | ( | struct osmo_ss7_instance * | inst, |
enum osmo_ss7_asp_protocol | proto | ||
) |
Find Application Server (AS) by given protocol.
[in] | inst | SS7 Instance on which we operate |
[in] | proto | Protocol identifier that must match |
References osmo_ss7_instance::as_list, osmo_ss7_as::cfg, osmo_ss7_as::inst, osmo_ss7_as::list, osmo_ss7_asp_find_by_proto(), osmo_ss7_as::proto, and ss7_initialized.
Referenced by osmo_sccp_simple_client_on_ss7_id().
struct osmo_ss7_as * osmo_ss7_as_find_by_rctx | ( | struct osmo_ss7_instance * | inst, |
uint32_t | rctx | ||
) |
Find Application Server by given routing context.
[in] | inst | SS7 Instance on which we operate |
[in] | rctx | Routing Context |
References osmo_ss7_instance::as_list, osmo_ss7_as::cfg, osmo_ss7_routing_key::context, osmo_ss7_as::inst, osmo_ss7_as::list, osmo_ss7_as::routing_key, and ss7_initialized.
Referenced by handle_rkey_dereg(), handle_rkey_reg(), osmo_ss7_find_free_rctx(), xua_asp_fsm_inactive(), and xua_find_as_for_asp().
struct osmo_ss7_as * osmo_ss7_as_find_or_create | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
enum osmo_ss7_asp_protocol | proto | ||
) |
Find or Create Application Server.
[in] | inst | SS7 Instance on which we operate |
[in] | name | Name of Application Server |
[in] | proto | Protocol of Application Server |
References osmo_ss7_as::cfg, osmo_ss7_as::inst, LOGPAS, osmo_ss7_as::name, osmo_ss7_as_find_by_name(), osmo_ss7_as::proto, ss7_as_alloc(), and ss7_initialized.
Referenced by DEFUN_ATTR(), handle_rkey_reg(), osmo_sccp_simple_client_on_ss7_id(), and osmo_sccp_simple_server_add_clnt().
enum osmo_ss7_asp_protocol osmo_ss7_as_get_asp_protocol | ( | const struct osmo_ss7_as * | as | ) |
Get asp_protocol configuration of a given AS.
[in] | as | Application Server in which to look for asp_protocol |
References osmo_ss7_as::cfg, and osmo_ss7_as::proto.
bool osmo_ss7_as_has_asp | ( | const struct osmo_ss7_as * | as, |
const struct osmo_ss7_asp * | asp | ||
) |
Determine if given AS contains ASP.
[in] | as | Application Server in which to look for asp |
[in] | asp | Application Server Process to look for in as |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, and ss7_initialized.
Referenced by as_list_for_asp(), determine_traf_mode(), dispatch_to_all_as(), find_single_as_for_asp(), get_all_rctx_for_asp(), handle_rkey_dereg(), ipa_find_as_for_asp(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_as_add_asp(), xua_asp_fsm_inactive(), xua_find_as_for_asp(), xua_msg_add_asp_rctx(), and xua_rkm_cleanup_dyn_as_for_asp().
struct osmo_ss7_asp * osmo_ss7_as_select_asp | ( | struct osmo_ss7_as * | as | ) |
Select an AS to transmit a message, according to AS configuration and ASP availability.
[in] | as | Application Server. |
This function returns NULL too if multiple ASPs would be selected, ie. AS is configured in broadcast mode and more than one ASP is configured.
References _NUM_OSMO_SS7_ASP_TMOD, osmo_ss7_as::cfg, osmo_ss7_as::fi, osmo_ss7_as::mode, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, OSMO_SS7_AS_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_ROUNDROBIN, ss7_as_select_asp_broadcast(), ss7_as_select_asp_override(), and ss7_as_select_asp_roundrobin().
Referenced by xua_as_transmit_msg().
bool osmo_ss7_as_tmode_compatible_xua | ( | struct osmo_ss7_as * | as, |
uint32_t | m3ua_tmt | ||
) |
References osmo_ss7_as::cfg, M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, osmo_ss7_as::mode, osmo_ss7_as::mode_set_by_peer, osmo_ss7_as::mode_set_by_vty, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, OSMO_SS7_AS_TMOD_OVERRIDE, and OSMO_SS7_AS_TMOD_ROUNDROBIN.
Referenced by handle_rkey_reg(), and xua_asp_fsm_inactive().
|
inlinestatic |
References osmo_ss7_as_traffic_mode_vals.
Referenced by DEFUN(), handle_rkey_reg(), write_one_as(), and xua_asp_fsm_inactive().
bool osmo_ss7_asp_active | ( | const struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::fi, and XUA_ASP_S_ACTIVE.
Referenced by notify_any_other_active_asp_as_inactive(), ss7_as_select_asp_broadcast(), ss7_as_select_asp_override(), ss7_as_select_asp_roundrobin(), sua_snm_ssn_available(), xua_as_transmit_msg_broadcast(), xua_snm_pc_available(), xua_snm_scon(), and xua_snm_upu().
void osmo_ss7_asp_destroy | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_instance::as_list, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::client, osmo_ss7_asp::ctrg, osmo_ss7_asp::fi, osmo_ss7_asp::inst, osmo_ss7_as::list, osmo_ss7_asp::list, LOGPASP, osmo_ss7_asp::server, osmo_ss7_asp::siblings, ss7_initialized, and osmo_ss7_asp::xua_server.
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_ss7_instance_destroy(), ss7_asp_xua_srv_conn_closed_cb(), and ss7_xua_server_destroy().
void osmo_ss7_asp_disconnect | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::client, osmo_ss7_asp::server, and xua_cli_close_and_reconnect().
Referenced by DEFUN(), ipa_asp_fsm_timer_cb(), ipa_asp_fsm_wait_id_resp(), and ipa_pong_timer_cb().
struct osmo_ss7_asp * osmo_ss7_asp_find | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
uint16_t | remote_port, | ||
uint16_t | local_port, | ||
enum osmo_ss7_asp_protocol | proto | ||
) |
struct osmo_ss7_asp * osmo_ss7_asp_find2 | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
uint16_t | remote_port, | ||
uint16_t | local_port, | ||
int | trans_proto, | ||
enum osmo_ss7_asp_protocol | proto | ||
) |
struct osmo_ss7_asp * osmo_ss7_asp_find_by_name | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
References osmo_ss7_instance::asp_list, osmo_ss7_asp::cfg, osmo_ss7_asp::inst, osmo_ss7_asp::list, osmo_ss7_asp::name, and ss7_initialized.
Referenced by DEFUN(), DEFUN_ATTR(), osmo_ss7_as_add_asp(), osmo_ss7_as_del_asp(), osmo_ss7_asp_find2(), osmo_ss7_asp_find_or_create2(), show_asp(), show_asp_assoc_status(), and show_asp_remaddr().
struct osmo_ss7_asp * osmo_ss7_asp_find_by_proto | ( | struct osmo_ss7_as * | as, |
enum osmo_ss7_asp_protocol | proto | ||
) |
Find an ASP that matches the given ASP protocol (xUA variant).
[in] | as | Application Server in which to look for asp |
[in] | proto | ASP protocol (xUA variant) to match |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, and osmo_ss7_asp::proto.
Referenced by osmo_sccp_simple_client_on_ss7_id(), and osmo_ss7_as_find_by_proto().
struct osmo_ss7_asp * osmo_ss7_asp_find_or_create | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
uint16_t | remote_port, | ||
uint16_t | local_port, | ||
enum osmo_ss7_asp_protocol | proto | ||
) |
struct osmo_ss7_asp * osmo_ss7_asp_find_or_create2 | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
uint16_t | remote_port, | ||
uint16_t | local_port, | ||
int | trans_proto, | ||
enum osmo_ss7_asp_protocol | proto | ||
) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::inst, osmo_ss7_asp::local, osmo_ss7_asp::name, osmo_ss7_asp_find_by_name(), osmo_ss7_asp_peer::port, osmo_ss7_asp::proto, osmo_ss7_asp::remote, ss7_asp_alloc(), ss7_initialized, and osmo_ss7_asp::trans_proto.
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_ss7_asp_find_or_create(), and xua_accept_cb().
int osmo_ss7_asp_get_log_subsys | ( | const struct osmo_ss7_asp * | asp | ) |
Get the logging subsystem for a given ASP.
Used by generic code.
References osmo_ss7_asp::cfg, OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_SUA, and osmo_ss7_asp::proto.
Referenced by xua_find_as_for_asp(), xua_snm_rx_daud(), xua_snm_rx_dava(), xua_snm_rx_duna(), xua_snm_rx_dupu(), and xua_snm_rx_scon().
const char * osmo_ss7_asp_get_name | ( | const struct osmo_ss7_asp * | asp | ) |
Get the name of a given ASP.
[in] | asp | The ASP for which the name is requested |
References osmo_ss7_asp::cfg, and osmo_ss7_asp::name.
enum osmo_ss7_asp_protocol osmo_ss7_asp_get_proto | ( | const struct osmo_ss7_asp * | asp | ) |
Get the proto of a given ASP.
[in] | asp | The ASP for which the proto is requested |
References osmo_ss7_asp::cfg, and osmo_ss7_asp::proto.
int osmo_ss7_asp_get_trans_proto | ( | const struct osmo_ss7_asp * | asp | ) |
Get the transport proto of a given ASP.
[in] | asp | The ASP for which the transport proto is requested |
References osmo_ss7_asp::cfg, and osmo_ss7_asp::trans_proto.
|
inlinestatic |
References osmo_ss7_asp_protocol_vals.
Referenced by osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_route_name(), ss7_asp_alloc(), ss7_xua_server_create2(), write_one_as(), and write_one_asp().
int osmo_ss7_asp_protocol_port | ( | enum osmo_ss7_asp_protocol | prot | ) |
References prot2port.
Referenced by osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), and osmo_sccp_simple_server_on_ss7_id().
int osmo_ss7_asp_restart | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::fi, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, ipa_cli_read_cb(), osmo_ss7_asp::is_server, osmo_ss7_asp::local, LOGPASP, m3ua_tcp_cli_read_cb(), osmo_ss7_asp::max_attempts_present, osmo_ss7_asp::max_attempts_value, osmo_ss7_asp::max_init_timeo_present, osmo_ss7_asp::max_init_timeo_value, osmo_ss7_asp::max_instreams_present, osmo_ss7_asp::max_instreams_value, osmo_ss7_asp::name, osmo_ss7_asp::num_ostreams_present, osmo_ss7_asp::num_ostreams_value, OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, osmo_ss7_asp_peer::port, osmo_ss7_asp::proto, osmo_ss7_asp::remote, osmo_ss7_asp::role, osmo_ss7_asp::sctp_init, osmo_ss7_asp::server, ss7_asp_peer_snprintf(), ss7_initialized, osmo_ss7_asp::trans_proto, xua_asp_fsm_start(), xua_cli_close_and_reconnect(), xua_cli_connect_cb(), xua_cli_read_cb(), and xua_tcp_segmentation_cb().
Referenced by osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_ss7_vty_go_parent(), restart_asp(), and xua_accept_cb().
int osmo_ss7_asp_send | ( | struct osmo_ss7_asp * | asp, |
struct msgb * | msg | ||
) |
send a fully encoded msgb via a given ASP
[in] | asp | Application Server Process through which to send |
[in] | msg | message buffer to transmit. Ownership transferred. |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::ctrg, osmo_ss7_asp::is_server, LOGPASP, M3UA_PPID, OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_SUA, osmo_ss7_asp::proto, osmo_ss7_asp::server, SS7_ASP_CTR_PKT_TX_TOTAL, ss7_initialized, and SUA_PPID.
Referenced by as_notify_all_asp(), ipa_asp_fsm_wait_id_get(), m3ua_rx_rkm_dereg_req(), m3ua_rx_rkm_reg_req(), m3ua_tx_xua_asp(), notify_any_other_active_asp_as_inactive(), peer_send(), peer_send_error(), sua_tx_xua_asp(), xua_as_transmit_msg(), xua_as_transmit_msg_broadcast(), xua_rkm_send_dereg_req(), and xua_rkm_send_reg_req().
int osmo_ss7_asp_use_default_lm | ( | struct osmo_ss7_asp * | asp, |
int | log_level | ||
) |
References lm_fsm_priv::asp, osmo_ss7_asp::cfg, default_layer_manager, osmo_ss7_asp::lm, osmo_ss7_asp::lm_priv, osmo_ss7_asp::name, and xua_default_lm_fsm.
Referenced by osmo_sccp_simple_client_on_ss7_id(), and restart_asp().
struct osmo_sccp_instance * osmo_ss7_ensure_sccp | ( | struct osmo_ss7_instance * | inst | ) |
Allocate an SCCP instance, if not present yet.
References LOGSS7, osmo_sccp_instance_create(), and osmo_ss7_instance::sccp.
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_on_ss7_id(), ss7_asp_alloc(), and ss7_xua_server_create2().
int osmo_ss7_find_free_rctx | ( | struct osmo_ss7_instance * | inst | ) |
References next_rctx, and osmo_ss7_as_find_by_rctx().
Referenced by handle_rkey_reg().
struct osmo_sccp_instance * osmo_ss7_get_sccp | ( | const struct osmo_ss7_instance * | inst | ) |
Get the SCCP instance, if present.
[in] | inst | SS7 Instance on which we operate |
References osmo_ss7_instance::sccp.
int osmo_ss7_init | ( | void | ) |
References ipa_asp_fsm, sccp_scoc_fsm, ss7_initialized, xua_as_fsm, xua_asp_fsm, and xua_default_lm_fsm.
void osmo_ss7_instance_destroy | ( | struct osmo_ss7_instance * | inst | ) |
Destroy a SS7 Instance.
[in] | inst | SS7 Instance to be destroyed |
References osmo_ss7_instance::as_list, osmo_ss7_instance::asp_list, osmo_ss7_asp::inst, osmo_ss7_instance::linksets, osmo_ss7_asp::list, osmo_ss7_instance::list, LOGSS7, osmo_ss7_as_destroy(), osmo_ss7_asp_destroy(), ss7_initialized, and ss7_linkset_destroy().
Referenced by osmo_sccp_simple_client_on_ss7_id(), and osmo_sccp_simple_server_on_ss7_id().
struct osmo_ss7_instance * osmo_ss7_instance_find | ( | uint32_t | id | ) |
Find a SS7 Instance with given ID.
[in] | id | ID for which to search |
References osmo_ss7_instance::cfg, osmo_ss7_instance::id, osmo_ss7_instance::list, osmo_ss7_instances, and ss7_initialized.
Referenced by DEFUN(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_instance_find_or_create(), show_asp(), show_asp_assoc_status(), and show_asp_remaddr().
struct osmo_ss7_instance * osmo_ss7_instance_find_or_create | ( | void * | ctx, |
uint32_t | id | ||
) |
Find or create a SS7 Instance.
[in] | ctx | talloc allocation context to use for allocations |
[in] | id | ID of SS7 Instance |
References osmo_ss7_instance_find(), ss7_initialized, and ss7_instance_alloc().
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), and osmo_sccp_simple_server_on_ss7_id().
uint32_t osmo_ss7_instance_get_id | ( | const struct osmo_ss7_instance * | inst | ) |
References osmo_ss7_instance::cfg, osmo_ss7_instance::id, and osmo_ss7_asp::inst.
const char * osmo_ss7_instance_get_name | ( | const struct osmo_ss7_instance * | inst | ) |
References osmo_ss7_instance::cfg, osmo_ss7_asp::inst, and osmo_ss7_instance::name.
const struct osmo_ss7_pc_fmt * osmo_ss7_instance_get_pc_fmt | ( | const struct osmo_ss7_instance * | inst | ) |
References osmo_ss7_instance::cfg, and osmo_ss7_instance::pc_fmt.
uint32_t osmo_ss7_instance_get_primary_pc | ( | const struct osmo_ss7_instance * | inst | ) |
References osmo_ss7_instance::cfg, osmo_ss7_asp::inst, and osmo_ss7_instance::primary_pc.
int osmo_ss7_instance_set_pc_fmt | ( | struct osmo_ss7_instance * | inst, |
uint8_t | c0, | ||
uint8_t | c1, | ||
uint8_t | c2 | ||
) |
Set the point code format used in given SS7 instance.
References osmo_ss7_instance::cfg, osmo_ss7_pc_fmt::component_len, osmo_ss7_asp::inst, LOGSS7, and osmo_ss7_instance::pc_fmt.
struct osmo_ss7_instance * osmo_ss7_instances_llist_entry | ( | struct llist_head * | list | ) |
References osmo_ss7_instance::list.
int osmo_ss7_is_config_node | ( | struct vty * | vty, |
int | node | ||
) |
bool osmo_ss7_pc_is_local | ( | const struct osmo_ss7_instance * | inst, |
uint32_t | pc | ||
) |
|
inlinestatic |
uint32_t osmo_ss7_pc_normalize | ( | const struct osmo_ss7_pc_fmt * | pc_fmt, |
uint32_t | pc | ||
) |
References osmo_ss7_pc_width().
Referenced by ss7_route_alloc(), ss7_route_table_find_route_by_dpc(), and ss7_route_table_find_route_by_dpc_mask().
uint8_t osmo_ss7_pc_width | ( | const struct osmo_ss7_pc_fmt * | pc_fmt | ) |
References osmo_ss7_pc_fmt::component_len.
Referenced by get_pc_comp_shift(), osmo_ss7_pc_normalize(), osmo_ss7_pointcode_parse_mask_or_len(), and osmo_ss7_route_print().
int osmo_ss7_pointcode_parse | ( | const struct osmo_ss7_instance * | inst, |
const char * | str | ||
) |
References osmo_ss7_instance::cfg, osmo_ss7_pc_fmt::component_len, default_pc_fmt, gen_pc_fmtstr(), get_pc_comp_shift(), LOGSS7, num_pc_comp_exp(), and osmo_ss7_instance::pc_fmt.
Referenced by _rout_key(), DEFUN_ATTR(), and osmo_ss7_pointcode_parse_mask_or_len().
int osmo_ss7_pointcode_parse_mask_or_len | ( | const struct osmo_ss7_instance * | inst, |
const char * | in | ||
) |
References osmo_ss7_instance::cfg, default_pc_fmt, osmo_ss7_pc_width(), osmo_ss7_pointcode_parse(), and osmo_ss7_instance::pc_fmt.
Referenced by DEFUN_ATTR().
const char * osmo_ss7_pointcode_print | ( | const struct osmo_ss7_instance * | inst, |
uint32_t | pc | ||
) |
References MAX_PC_STR_LEN, and osmo_ss7_pointcode_print_buf().
Referenced by DEFUN(), format_affected_pcs_c(), handle_rkey_dereg(), handle_rkey_reg(), hmrt_message_for_routing(), ipa_del_route(), m3ua_hmdc_rx_from_l2(), m3ua_rx_xfer(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_user_unbind(), osmo_ss7_route_name(), osmo_ss7_route_print(), sccp_addr_to_str_buf(), sccp_scoc_rx_inval_opc(), sccp_user_bind_pc(), scrc_node_6(), show_user(), ss7_route_destroy(), ss7_route_insert(), ss7_route_set_linkset(), vty_show_connection(), write_one_as(), write_one_cs7(), write_one_rtable(), write_sccp_addressbook(), and xua_snm_rx_dupu().
const char * osmo_ss7_pointcode_print2 | ( | const struct osmo_ss7_instance * | inst, |
uint32_t | pc | ||
) |
References MAX_PC_STR_LEN, and osmo_ss7_pointcode_print_buf().
Referenced by m3ua_rx_xfer(), osmo_ss7_route_name(), osmo_ss7_route_print(), sccp_scoc_rx_inval_opc(), and write_one_rtable().
const char * osmo_ss7_pointcode_print_buf | ( | char * | buf, |
size_t | buf_len, | ||
const struct osmo_ss7_instance * | inst, | ||
uint32_t | pc | ||
) |
References osmo_ss7_instance::cfg, default_pc_fmt, gen_pc_fmtstr(), len, num_pc_comp_exp(), osmo_ss7_pc_is_valid(), pc_comp_shift_and_mask(), and osmo_ss7_instance::pc_fmt.
Referenced by osmo_ss7_pointcode_print(), and osmo_ss7_pointcode_print2().
void osmo_ss7_register_rx_unknown_cb | ( | osmo_ss7_asp_rx_unknown_cb * | cb | ) |
Register a call-back function for unknown SCTP PPID / IPA Stream ID.
References g_osmo_ss7_asp_rx_unknown_cb.
struct osmo_ss7_as * osmo_ss7_route_get_dest_as | ( | struct osmo_ss7_route * | rt | ) |
Get destination AS of route.
[in] | rt | Route entry holding the AS destination |
References osmo_ss7_route::as, and osmo_ss7_route::dest.
struct osmo_ss7_route * osmo_ss7_route_lookup | ( | struct osmo_ss7_instance * | inst, |
uint32_t | dpc | ||
) |
Find a SS7 route for given destination point code in given SS7.
References dpc, osmo_ss7_instance::rtable_system, ss7_initialized, and ss7_route_table_find_route_by_dpc().
Referenced by gen_mtp_transfer_req_xua(), hmrt_message_for_routing(), and xua_snm_rx_daud().
const char * osmo_ss7_route_name | ( | struct osmo_ss7_route * | rt, |
bool | list_asps | ||
) |
Return human readable representation of the route, in a static buffer.
This uses both osmo_ss7_pointcode_print() and osmo_ss7_pointcode_print2(), so pairing osmo_ss7_route_name() with osmo_ss7_pointcode_print() in the same printf statement is likely to conflict.
[in] | rt | The route information to print, or NULL. |
[in] | list_asps | If true, append info for all ASPs for the route's AS. |
References APPEND, osmo_ss7_route::as, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_linkset::cfg, osmo_ss7_route::cfg, osmo_ss7_route::dest, osmo_ss7_route_table::inst, osmo_ss7_route::linkset, osmo_ss7_route::mask, osmo_ss7_as::name, osmo_ss7_asp::name, osmo_ss7_linkset::name, osmo_ss7_asp_protocol_name(), osmo_ss7_pointcode_print(), osmo_ss7_pointcode_print2(), osmo_ss7_route::pc, osmo_ss7_as::proto, osmo_ss7_route::rtable, and osmo_ss7_asp::sock_name.
Referenced by hmrt_message_for_routing().
const char * osmo_ss7_route_print | ( | const struct osmo_ss7_route * | rt | ) |
References osmo_ss7_instance::cfg, osmo_ss7_route::cfg, osmo_ss7_route_table::inst, osmo_ss7_route::mask, osmo_ss7_pc_width(), osmo_ss7_pointcode_print(), osmo_ss7_pointcode_print2(), osmo_ss7_route::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_route::rtable, and u32_masklen().
Referenced by vty_dump_rtable().
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua | ( | uint32_t | in | ) |
References M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, and OSMO_SS7_AS_TMOD_OVERRIDE.
Referenced by handle_rkey_reg(), and xua_asp_fsm_inactive().
int osmo_ss7_tmode_to_xua | ( | enum osmo_ss7_as_traffic_mode | tmod | ) |
References M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, and OSMO_SS7_AS_TMOD_OVERRIDE.
Referenced by peer_send(), and xua_rkm_send_reg_req().
struct osmo_ss7_user * osmo_ss7_user_create | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
References osmo_ss7_user::inst, and osmo_ss7_user::name.
Referenced by osmo_sccp_instance_create().
void osmo_ss7_user_destroy | ( | struct osmo_ss7_user * | user | ) |
Referenced by osmo_sccp_instance_destroy().
struct osmo_ss7_instance * osmo_ss7_user_get_instance | ( | const struct osmo_ss7_user * | user | ) |
References osmo_ss7_user::inst, and osmo_ss7_instance::user.
void * osmo_ss7_user_get_priv | ( | const struct osmo_ss7_user * | user | ) |
References osmo_ss7_user::priv, and osmo_ss7_instance::user.
int osmo_ss7_user_mtp_xfer_req | ( | struct osmo_ss7_instance * | inst, |
struct osmo_mtp_prim * | omp | ||
) |
References m3ua_hmdc_rx_from_l2(), xua_msg::mtp, mtp_prim_to_m3ua(), MTP_SAP_USER, osmo_mtp_prim::oph, OSMO_MTP_PRIM_TRANSFER, osmo_mtp_prim::transfer, osmo_mtp_prim::u, and xua_msg_free().
Referenced by sua2sccp_tx_m3ua().
int osmo_ss7_user_register | ( | struct osmo_ss7_instance * | inst, |
uint8_t | service_ind, | ||
struct osmo_ss7_user * | user | ||
) |
Register a MTP user for a given service indicator.
[in] | inst | SS7 instance for which we register the user |
[in] | service_ind | Service (ISUP, SCCP, ...) |
[in] | user | SS7 user (including primitive call-back) |
References osmo_ss7_user::inst, osmo_ss7_user::name, osmo_ss7_user::priv, and osmo_ss7_instance::user.
Referenced by osmo_sccp_instance_create().
void osmo_ss7_user_set_prim_cb | ( | struct osmo_ss7_user * | user, |
osmo_prim_cb | prim_cb | ||
) |
References osmo_ss7_user::prim_cb, and osmo_ss7_instance::user.
Referenced by osmo_sccp_instance_create().
void osmo_ss7_user_set_priv | ( | struct osmo_ss7_user * | user, |
void * | priv | ||
) |
References osmo_ss7_user::priv, and osmo_ss7_instance::user.
Referenced by osmo_sccp_instance_create().
int osmo_ss7_user_unregister | ( | struct osmo_ss7_instance * | inst, |
uint8_t | service_ind, | ||
struct osmo_ss7_user * | user | ||
) |
Unregister a MTP user for a given service indicator.
[in] | inst | SS7 instance for which we register the user |
[in] | service_ind | Service (ISUP, SCCP, ...) |
[in] | user | (optional) SS7 user. If present, we will not unregister other users |
References osmo_ss7_user::inst, and osmo_ss7_instance::user.
Referenced by osmo_sccp_instance_destroy().
int osmo_ss7_vty_go_parent | ( | struct vty * | vty | ) |
void osmo_ss7_vty_init_asp | ( | void * | ctx | ) |
References cs7_role, CS7_ROLE_ASP, and vty_init_shared().
void osmo_ss7_vty_init_sg | ( | void * | ctx | ) |
References cs7_role, CS7_ROLE_SG, rtable_node, vty_init_shared(), and xua_node.
|
extern |
Referenced by DEFUN_USRATTR(), and osmo_ss7_as_traffic_mode_name().
|
extern |
|
extern |
Referenced by show_one_asp(), and write_one_asp().
|
extern |
Referenced by _show_cs7_xua(), osmo_ss7_instance_find(), ss7_asp_find_by_socket_addr(), ss7_instance_alloc(), and write_all_cs7().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <stdint.h>
#include <stdbool.h>
#include <osmocom/core/linuxlist.h>
Go to the source code of this file.
Data Structures | |
struct | osmo_ss7_pc_fmt |
struct | osmo_ss7_instance |
Macros | |
#define | _LOGSS7(inst, subsys, level, fmt, args ...) LOGP(subsys, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args) |
#define | LOGSS7(inst, level, fmt, args ...) _LOGSS7(inst, DLSS7, level, fmt, ## args) |
Functions | |
struct osmo_ss7_instance * | ss7_instance_alloc (void *ctx, uint32_t id) |
uint32_t | ss7_find_free_l_rk_id (struct osmo_ss7_instance *inst) |
#define _LOGSS7 | ( | inst, | |
subsys, | |||
level, | |||
fmt, | |||
args ... | |||
) | LOGP(subsys, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args) |
#define LOGSS7 | ( | inst, | |
level, | |||
fmt, | |||
args ... | |||
) | _LOGSS7(inst, DLSS7, level, fmt, ## args) |
uint32_t ss7_find_free_l_rk_id | ( | struct osmo_ss7_instance * | inst | ) |
References next_l_rk_id, and osmo_ss7_as_find_by_l_rk_id().
Referenced by ss7_as_alloc().
struct osmo_ss7_instance * ss7_instance_alloc | ( | void * | ctx, |
uint32_t | id | ||
) |
References osmo_ss7_instance::as_list, osmo_ss7_instance::asp_list, osmo_ss7_instance::cfg, osmo_ss7_pc_fmt::component_len, osmo_ss7_pc_fmt::delimiter, osmo_ss7_instance::id, osmo_ss7_instance::linksets, osmo_ss7_instance::list, LOGSS7, osmo_ss7_instances, OSMO_SS7_PC_INVALID, osmo_ss7_instance::pc_fmt, osmo_ss7_instance::primary_pc, osmo_ss7_instance::rtable_list, osmo_ss7_instance::rtable_system, osmo_ss7_instance::sccp_address_book, osmo_ss7_instance::secondary_pc, ss7_route_table_find_or_create(), and osmo_ss7_instance::xua_servers.
Referenced by osmo_ss7_instance_find_or_create().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <string.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/fsm.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/protocol/sccp_scmg.h>
#include <osmocom/sccp/sccp_types.h>
#include "xua_internal.h"
#include "sccp_internal.h"
Functions | |
void | sccp_scmg_rx_ssn_allowed (struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi) |
void | sccp_scmg_rx_ssn_prohibited (struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi) |
void | sccp_scmg_rx_mtp_pause (struct osmo_sccp_instance *inst, uint32_t dpc) |
brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service Q.714 5.2.2 More... | |
void | sccp_scmg_rx_mtp_resume (struct osmo_sccp_instance *inst, uint32_t dpc) |
brief MTP -> SNM (MTP-RESUME.ind) - ability of providing the MTP service Q.714 5.2.3 More... | |
void | sccp_scmg_rx_mtp_status (struct osmo_sccp_instance *inst, uint32_t dpc, enum mtp_unavail_cause cause) |
static int | sccp_scmg_tx (struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, uint8_t msg_type, uint8_t ssn, uint16_t pc, uint8_t smi, uint8_t *ssc_cong_lvl) |
static int | scmg_rx_ssa (struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, const struct sccp_scmg_msg *ssa) |
static int | scmg_rx_ssp (struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, const struct sccp_scmg_msg *ssp) |
static int | scmg_rx_sst (struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, const struct sccp_scmg_msg *sst) |
static int | scmg_rx (struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, const struct sccp_scmg_msg *scmg) |
static int | scmg_prim_cb (struct osmo_prim_hdr *oph, void *_scu) |
int | sccp_scmg_init (struct osmo_sccp_instance *inst) |
Variables | |
const struct value_string | sccp_scmg_msgt_names [] |
int sccp_scmg_init | ( | struct osmo_sccp_instance * | inst | ) |
References osmo_sccp_user::inst, osmo_sccp_user_bind(), and scmg_prim_cb().
Referenced by osmo_sccp_instance_create().
void sccp_scmg_rx_mtp_pause | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc | ||
) |
brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service Q.714 5.2.2
References osmo_scu_pcstate_param::affected_pc, dpc, OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN, OSMO_SCCP_SP_S_INACCESSIBLE, and sccp_lbcs_local_bcast_pcstate().
Referenced by xua_snm_pc_available_to_sccp().
void sccp_scmg_rx_mtp_resume | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc | ||
) |
brief MTP -> SNM (MTP-RESUME.ind) - ability of providing the MTP service Q.714 5.2.3
References osmo_scu_pcstate_param::affected_pc, dpc, OSMO_SCCP_REM_SCCP_S_AVAILABLE, OSMO_SCCP_SP_S_ACCESSIBLE, and sccp_lbcs_local_bcast_pcstate().
Referenced by xua_snm_pc_available_to_sccp().
void sccp_scmg_rx_mtp_status | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc, | ||
enum mtp_unavail_cause | cause | ||
) |
void sccp_scmg_rx_ssn_allowed | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc, | ||
uint32_t | ssn, | ||
uint32_t | smi | ||
) |
References osmo_scu_state_param::affected_pc, dpc, sccp_lbcs_local_bcast_state(), and smi.
Referenced by scmg_rx_ssa(), and sua_snm_ssn_available_to_sccp().
void sccp_scmg_rx_ssn_prohibited | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc, | ||
uint32_t | ssn, | ||
uint32_t | smi | ||
) |
References osmo_scu_state_param::affected_pc, dpc, sccp_lbcs_local_bcast_state(), and smi.
Referenced by scmg_rx_ssp(), and sua_snm_ssn_available_to_sccp().
|
static |
References sccp_scmg_msg::affected_pc, sccp_scmg_msg::affected_ssn, osmo_scu_unitdata_param::called_addr, osmo_scu_unitdata_param::calling_addr, msg_type, sccp_scmg_msg::msg_type, osmo_scu_prim::oph, osmo_sccp_user_sap_down(), OSMO_SCU_PRIM_N_UNITDATA, sccp_msgb_alloc(), SCCP_SAP_USER, SCCP_SCMG_MSGT_SSC, smi, sccp_scmg_msg::smi, sccp_scmg_msg::ssc_congestion_lvl, osmo_scu_prim::u, and osmo_scu_prim::unitdata.
Referenced by scmg_rx_sst().
|
static |
References sccp_scmg_msg::affected_pc, osmo_scu_unitdata_param::called_addr, osmo_scu_unitdata_param::calling_addr, sccp_scmg_msg::msg_type, osmo_scu_prim::oph, OSMO_SCU_PRIM_N_PCSTATE, OSMO_SCU_PRIM_N_UNITDATA, osmo_scu_prim_name(), SCCP_SCMG_MSGT_SSC, scmg_rx(), osmo_scu_prim::u, and osmo_scu_prim::unitdata.
Referenced by sccp_scmg_init().
|
static |
References sccp_scmg_msg::msg_type, sccp_scmg_msgt_name(), SCCP_SCMG_MSGT_SOG, SCCP_SCMG_MSGT_SOR, SCCP_SCMG_MSGT_SSA, SCCP_SCMG_MSGT_SSC, SCCP_SCMG_MSGT_SSP, SCCP_SCMG_MSGT_SST, scmg_rx_ssa(), scmg_rx_ssp(), and scmg_rx_sst().
Referenced by scmg_prim_cb().
|
static |
References sccp_scmg_msg::affected_pc, sccp_scmg_msg::affected_ssn, osmo_sccp_user::inst, sccp_scmg_rx_ssn_allowed(), and sccp_scmg_msg::smi.
Referenced by scmg_rx().
|
static |
References sccp_scmg_msg::affected_pc, sccp_scmg_msg::affected_ssn, osmo_sccp_user::inst, sccp_scmg_rx_ssn_prohibited(), and sccp_scmg_msg::smi.
Referenced by scmg_rx().
|
static |
References sccp_scmg_msg::affected_pc, sccp_scmg_msg::affected_ssn, osmo_sccp_user::inst, SCCP_SCMG_MSGT_SSA, sccp_scmg_tx(), and sccp_user_find().
Referenced by scmg_rx().
const struct value_string sccp_scmg_msgt_names[] |
Referenced by sccp_scmg_msgt_name().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <inttypes.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/protocol/mtp.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/select.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/core/osmo_io.h>
#include <osmocom/netif/stream.h>
#include <osmocom/netif/ipa.h>
#include <osmocom/netif/sctp.h>
#include "sccp_internal.h"
#include "xua_internal.h"
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
#include "ss7_xua_srv.h"
Functions | |
static int | xua_accept_cb (struct osmo_stream_srv_link *link, int fd) |
struct osmo_xua_server * | ss7_xua_server_create2 (struct osmo_ss7_instance *inst, int trans_proto, enum osmo_ss7_asp_protocol proto, uint16_t local_port, const char *local_host) |
create a new xUA server configured with given ip/port More... | |
struct osmo_xua_server * | ss7_xua_server_create (struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, uint16_t local_port, const char *local_host) |
create a new xUA server configured with given ip/port More... | |
int | ss7_xua_server_bind (struct osmo_xua_server *xs) |
Set the xUA server to bind/listen to the currently configured ip/port. More... | |
int | ss7_xua_server_set_local_host (struct osmo_xua_server *xs, const char *local_host) |
int | ss7_xua_server_set_local_hosts (struct osmo_xua_server *xs, const char **local_hosts, size_t local_host_cnt) |
int | ss7_xua_server_add_local_host (struct osmo_xua_server *xs, const char *local_host) |
int | ss7_xua_server_del_local_host (struct osmo_xua_server *xs, const char *local_host) |
bool | ss7_xua_server_set_default_local_hosts (struct osmo_xua_server *oxs) |
void | ss7_xua_server_destroy (struct osmo_xua_server *xs) |
struct osmo_xua_server * | ss7_xua_server_find2 (struct osmo_ss7_instance *inst, int trans_proto, enum osmo_ss7_asp_protocol proto, uint16_t local_port) |
find an xUA server with the given parameters More... | |
struct osmo_xua_server * | ss7_xua_server_find (struct osmo_ss7_instance *inst, enum osmo_ss7_asp_protocol proto, uint16_t local_port) |
find an xUA server with the given parameters More... | |
int ss7_xua_server_add_local_host | ( | struct osmo_xua_server * | xs, |
const char * | local_host | ||
) |
References osmo_xua_server::cfg, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_xua_server::local, osmo_xua_server::server, and ss7_asp_peer_add_host().
Referenced by DEFUN_ATTR().
int ss7_xua_server_bind | ( | struct osmo_xua_server * | xs | ) |
Set the xUA server to bind/listen to the currently configured ip/port.
[in] | xs | xUA server to operate |
References osmo_xua_server::cfg, osmo_xua_server::local, osmo_xua_server::max_instreams_present, osmo_xua_server::max_instreams_value, osmo_xua_server::num_ostreams_present, osmo_xua_server::num_ostreams_value, osmo_ss7_asp_protocol_vals, osmo_xua_server::proto, osmo_xua_server::sctp_init, osmo_xua_server::server, and ss7_asp_peer_snprintf().
Referenced by osmo_sccp_simple_server_on_ss7_id(), and osmo_ss7_vty_go_parent().
struct osmo_xua_server * ss7_xua_server_create | ( | struct osmo_ss7_instance * | inst, |
enum osmo_ss7_asp_protocol | proto, | ||
uint16_t | local_port, | ||
const char * | local_host | ||
) |
create a new xUA server configured with given ip/port
[in] | ctx | talloc allocation context |
[in] | proto | protocol (xUA variant) to use |
[in] | local_port | local SCTP port to bind/listen to |
[in] | local_host | local IP address to bind/listen to (optional) |
References osmo_xua_server::inst, osmo_xua_server::proto, ss7_default_trans_proto_for_asp_proto(), ss7_xua_server_create2(), and osmo_xua_server::trans_proto.
struct osmo_xua_server * ss7_xua_server_create2 | ( | struct osmo_ss7_instance * | inst, |
int | trans_proto, | ||
enum osmo_ss7_asp_protocol | proto, | ||
uint16_t | local_port, | ||
const char * | local_host | ||
) |
create a new xUA server configured with given ip/port
[in] | inst | SS7 Instance on which we operate |
[in] | trans_proto | transport protocol to use (one of IPPROTO_*) |
[in] | proto | protocol (xUA variant) to use |
[in] | local_port | local SCTP port to bind/listen to |
[in] | local_host | local IP address to bind/listen to (optional) |
References osmo_xua_server::asp_list, osmo_xua_server::cfg, osmo_xua_server::inst, osmo_xua_server::list, osmo_xua_server::local, OSMO_SS7_ASP_PROT_SUA, osmo_ss7_asp_protocol_name(), osmo_ss7_asp_protocol_vals, osmo_ss7_ensure_sccp(), osmo_ss7_asp_peer::port, osmo_xua_server::proto, osmo_xua_server::server, ss7_asp_protocol_check_trans_proto(), ss7_initialized, ss7_xua_server_set_local_host(), osmo_xua_server::trans_proto, xua_accept_cb(), and osmo_ss7_instance::xua_servers.
Referenced by DEFUN_ATTR(), osmo_sccp_simple_server_on_ss7_id(), and ss7_xua_server_create().
int ss7_xua_server_del_local_host | ( | struct osmo_xua_server * | xs, |
const char * | local_host | ||
) |
References osmo_xua_server::cfg, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_xua_server::local, osmo_xua_server::server, and ss7_asp_peer_del_host().
Referenced by DEFUN_ATTR().
void ss7_xua_server_destroy | ( | struct osmo_xua_server * | xs | ) |
References osmo_xua_server::asp_list, osmo_xua_server::list, osmo_ss7_asp_destroy(), osmo_xua_server::server, and osmo_ss7_asp::siblings.
Referenced by DEFUN_ATTR(), and osmo_sccp_simple_server_on_ss7_id().
struct osmo_xua_server * ss7_xua_server_find | ( | struct osmo_ss7_instance * | inst, |
enum osmo_ss7_asp_protocol | proto, | ||
uint16_t | local_port | ||
) |
find an xUA server with the given parameters
[in] | inst | SS7 Instance on which we operate |
[in] | proto | protocol (xUA variant) in use |
[in] | local_port | local port of the server |
References osmo_xua_server::inst, osmo_xua_server::proto, ss7_default_trans_proto_for_asp_proto(), ss7_xua_server_find2(), and osmo_xua_server::trans_proto.
struct osmo_xua_server * ss7_xua_server_find2 | ( | struct osmo_ss7_instance * | inst, |
int | trans_proto, | ||
enum osmo_ss7_asp_protocol | proto, | ||
uint16_t | local_port | ||
) |
find an xUA server with the given parameters
[in] | inst | SS7 Instance on which we operate |
[in] | trans_proto | transport protocol in use (one of IPPROTO_*) |
[in] | proto | protocol (xUA variant) in use |
[in] | local_port | local port of the server |
References osmo_xua_server::cfg, osmo_xua_server::inst, osmo_xua_server::list, osmo_xua_server::local, osmo_ss7_asp_peer::port, osmo_xua_server::proto, ss7_initialized, osmo_xua_server::trans_proto, and osmo_ss7_instance::xua_servers.
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), and ss7_xua_server_find().
bool ss7_xua_server_set_default_local_hosts | ( | struct osmo_xua_server * | oxs | ) |
References osmo_xua_server::cfg, osmo_ss7_asp_peer::host_cnt, osmo_xua_server::local, ss7_ipv6_sctp_supported(), and ss7_xua_server_set_local_host().
Referenced by osmo_ss7_vty_go_parent().
int ss7_xua_server_set_local_host | ( | struct osmo_xua_server * | xs, |
const char * | local_host | ||
) |
References ss7_xua_server_set_local_hosts().
Referenced by ss7_xua_server_create2(), and ss7_xua_server_set_default_local_hosts().
int ss7_xua_server_set_local_hosts | ( | struct osmo_xua_server * | xs, |
const char ** | local_hosts, | ||
size_t | local_host_cnt | ||
) |
References osmo_xua_server::cfg, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_xua_server::local, osmo_xua_server::server, ss7_asp_peer_set_hosts(), and ss7_initialized.
Referenced by DEFUN_ATTR(), and ss7_xua_server_set_local_host().
|
static |
References osmo_xua_server::accept_dyn_reg, osmo_xua_server::asp_list, osmo_ss7_asp::cfg, osmo_xua_server::cfg, osmo_ss7_asp::dyn_allocated, osmo_ss7_asp::fi, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_xua_server::inst, osmo_ss7_asp::is_server, osmo_ss7_asp::local, osmo_xua_server::local, LOGPASP, M3UA_MSG_HEADROOM, M3UA_MSG_SIZE, osmo_ss7_asp::name, osmo_ss7_asp_find_or_create2(), OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, osmo_ss7_asp_protocol_vals, osmo_ss7_asp_restart(), OSMO_SS7_ASP_ROLE_SG, OSMO_XLM_PRIM_M_SCTP_ESTABLISH, osmo_ss7_asp_peer::port, osmo_xua_server::proto, osmo_ss7_asp::remote, osmo_ss7_asp::role, osmo_ss7_asp::server, osmo_ss7_asp::siblings, osmo_ss7_asp::sock_name, ss7_asp_apply_peer_primary_address(), ss7_asp_apply_primary_address(), ss7_asp_find_by_socket_addr(), ss7_asp_ipa_srv_conn_rx_cb(), ss7_asp_m3ua_tcp_srv_conn_rx_cb(), ss7_asp_peer_set_hosts(), ss7_asp_xua_srv_conn_closed_cb(), ss7_asp_xua_srv_conn_rx_cb(), osmo_xua_server::trans_proto, XUA_ASP_E_SCTP_EST_IND, xua_asp_send_xlm_prim_simple(), osmo_ss7_asp::xua_server, and xua_tcp_segmentation_cb().
Referenced by ss7_xua_server_create2().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <osmocom/core/fsm.h>
#include <osmocom/core/prim.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/linuxrbtree.h>
#include <osmocom/core/tdef.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/protocol/mtp.h>
#include "ss7_user.h"
Go to the source code of this file.
Data Structures | |
struct | osmo_sccp_instance |
struct | osmo_sccp_user |
Macros | |
#define | SCCP_STR "Signalling Connection Control Part\n" |
Functions | |
static const char * | osmo_sccp_timer_name (enum osmo_sccp_timer val) |
struct osmo_sccp_user * | sccp_user_find (struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc) |
Find a SCCP User registered for given PC+SSN or SSN only First search all users with a valid PC for a full PC+SSN match. More... | |
int | sccp_scrc_rx_scoc_conn_msg (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
int | sccp_scrc_rx_sclc_msg (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
int | scrc_rx_mtp_xfer_ind_xua (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
void | sccp_scoc_rx_from_scrc (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
Main entrance function for primitives from the SCRC (Routing Control) More... | |
void | sccp_scoc_rx_scrc_rout_fail (struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t cause) |
SCOC: Receive SCRC Routing Failure. More... | |
void | sccp_scoc_flush_connections (struct osmo_sccp_instance *inst) |
int | sccp_sclc_rx_from_scrc (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
SCRC -> SCLC (connectionless message) More... | |
void | sccp_sclc_rx_scrc_rout_fail (struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t cause) |
SCRC -> SCLC (Routing Failure. More... | |
int | sccp_user_prim_up (struct osmo_sccp_user *scut, struct osmo_scu_prim *prim) |
Send a SCCP User SAP Primitive up to the User. More... | |
int | sccp_sclc_user_sap_down (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph) |
Main entrance function for primitives from SCCP User. More... | |
int | sccp_sclc_user_sap_down_nofree (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph) |
Main entrance function for primitives from SCCP User. More... | |
struct msgb * | sccp_msgb_alloc (const char *name) |
void | sccp_scoc_show_connections (struct vty *vty, struct osmo_sccp_instance *inst) |
void | osmo_sccp_vty_write_cs7_node (struct vty *vty, const char *indent, struct osmo_sccp_instance *inst) |
void | sccp_lbcs_local_bcast_pcstate (struct osmo_sccp_instance *inst, const struct osmo_scu_pcstate_param *pcstate) |
void | sccp_lbcs_local_bcast_state (struct osmo_sccp_instance *inst, const struct osmo_scu_state_param *state) |
void | sccp_scmg_rx_ssn_allowed (struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi) |
void | sccp_scmg_rx_ssn_prohibited (struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi) |
void | sccp_scmg_rx_mtp_pause (struct osmo_sccp_instance *inst, uint32_t dpc) |
brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service Q.714 5.2.2 More... | |
void | sccp_scmg_rx_mtp_resume (struct osmo_sccp_instance *inst, uint32_t dpc) |
brief MTP -> SNM (MTP-RESUME.ind) - ability of providing the MTP service Q.714 5.2.3 More... | |
void | sccp_scmg_rx_mtp_status (struct osmo_sccp_instance *inst, uint32_t dpc, enum mtp_unavail_cause cause) |
int | sccp_scmg_init (struct osmo_sccp_instance *inst) |
Variables | |
const struct osmo_tdef | osmo_sccp_timer_defaults [OSMO_SCCP_TIMERS_LEN] |
const struct value_string | osmo_sccp_timer_names [] |
int | DSCCP |
struct osmo_fsm | sccp_scoc_fsm |
#define SCCP_STR "Signalling Connection Control Part\n" |
enum osmo_sccp_timer |
|
inlinestatic |
References osmo_sccp_timer_names.
void osmo_sccp_vty_write_cs7_node | ( | struct vty * | vty, |
const char * | indent, | ||
struct osmo_sccp_instance * | inst | ||
) |
References osmo_sccp_instance::max_optional_data, and write_sccp_timers().
Referenced by write_one_cs7().
void sccp_lbcs_local_bcast_pcstate | ( | struct osmo_sccp_instance * | inst, |
const struct osmo_scu_pcstate_param * | pcstate | ||
) |
References osmo_sccp_user::inst, osmo_sccp_user::list, osmo_scu_prim::oph, OSMO_SCU_PRIM_N_PCSTATE, osmo_scu_prim::pcstate, sccp_msgb_alloc(), SCCP_SAP_USER, sccp_user_prim_up(), osmo_scu_prim::u, and osmo_sccp_instance::users.
Referenced by sccp_scmg_rx_mtp_pause(), sccp_scmg_rx_mtp_resume(), and sccp_scmg_rx_mtp_status().
void sccp_lbcs_local_bcast_state | ( | struct osmo_sccp_instance * | inst, |
const struct osmo_scu_state_param * | state | ||
) |
References osmo_sccp_user::inst, osmo_sccp_user::list, osmo_scu_prim::oph, OSMO_SCU_PRIM_N_STATE, sccp_msgb_alloc(), SCCP_SAP_USER, sccp_user_prim_up(), osmo_scu_prim::state, osmo_scu_prim::u, and osmo_sccp_instance::users.
Referenced by sccp_scmg_rx_ssn_allowed(), and sccp_scmg_rx_ssn_prohibited().
struct msgb * sccp_msgb_alloc | ( | const char * | name | ) |
References SCCP_MSG_HEADROOM, and SCCP_MSG_SIZE.
Referenced by osmo_sua_to_sccp(), sccp_lbcs_local_bcast_pcstate(), sccp_lbcs_local_bcast_state(), sccp_scmg_tx(), sclc_rx_cldr(), and sclc_rx_cldt().
int sccp_sclc_rx_from_scrc | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua | ||
) |
SCRC -> SCLC (connectionless message)
[in] | inst | SCCP Instance in which we operate |
[in] | xua | SUA connectionless message |
References xua_msg::hdr, xua_common_hdr::msg_class, xua_common_hdr::msg_type, sclc_rx_cldr(), sclc_rx_cldt(), SUA_CL_CLDR, SUA_CL_CLDT, SUA_MSGC_CL, xua_dialect_sua, and xua_hdr_dump().
Referenced by scrc_node_6(), and scrc_translate_node_9().
void sccp_sclc_rx_scrc_rout_fail | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua_in, | ||
uint32_t | cause | ||
) |
SCRC -> SCLC (Routing Failure.
[in] | inst | SCCP Instance in which we operate |
[in] | xua_in | Message that failed to be routed |
[in] | cause | SCCP Return Cause |
References gen_ret_msg(), xua_msg::hdr, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, osmo_ss7_pc_is_local(), sccp_scrc_rx_sclc_msg(), sclc_rx_cldr(), osmo_sccp_instance::ss7, SUA_CL_CLDR, SUA_CL_CLDT, and xua_msg_free().
Referenced by scrc_node_4(), scrc_node_6(), and scrc_translate_node_9().
int sccp_sclc_user_sap_down | ( | struct osmo_sccp_user * | scu, |
struct osmo_prim_hdr * | oph | ||
) |
Main entrance function for primitives from SCCP User.
Implies a msgb_free(oph->msg), otherwise the same as sccp_sclc_user_sap_down_nofree().
[in] | scu | SCCP User who is sending the primitive |
[on] | oph Osmocom primitive header of the primitive |
References osmo_scu_prim::oph, and sccp_sclc_user_sap_down_nofree().
int sccp_sclc_user_sap_down_nofree | ( | struct osmo_sccp_user * | scu, |
struct osmo_prim_hdr * | oph | ||
) |
Main entrance function for primitives from SCCP User.
The caller is required to free oph->msg, otherwise the same as sccp_sclc_user_sap_down().
[in] | scu | SCCP User who is sending the primitive |
[on] | oph Osmocom primitive header of the primitive |
References osmo_scu_prim::oph, OSMO_SCU_PRIM_N_UNITDATA, osmo_scu_prim_name(), SUA_CL_CLDT, and xua_gen_encode_and_send().
Referenced by osmo_sccp_user_sap_down_nofree(), and sccp_sclc_user_sap_down().
int sccp_scmg_init | ( | struct osmo_sccp_instance * | inst | ) |
References osmo_sccp_user::inst, osmo_sccp_user_bind(), and scmg_prim_cb().
Referenced by osmo_sccp_instance_create().
void sccp_scmg_rx_mtp_pause | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc | ||
) |
brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service Q.714 5.2.2
References osmo_scu_pcstate_param::affected_pc, dpc, OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN, OSMO_SCCP_SP_S_INACCESSIBLE, and sccp_lbcs_local_bcast_pcstate().
Referenced by xua_snm_pc_available_to_sccp().
void sccp_scmg_rx_mtp_resume | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc | ||
) |
brief MTP -> SNM (MTP-RESUME.ind) - ability of providing the MTP service Q.714 5.2.3
References osmo_scu_pcstate_param::affected_pc, dpc, OSMO_SCCP_REM_SCCP_S_AVAILABLE, OSMO_SCCP_SP_S_ACCESSIBLE, and sccp_lbcs_local_bcast_pcstate().
Referenced by xua_snm_pc_available_to_sccp().
void sccp_scmg_rx_mtp_status | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc, | ||
enum mtp_unavail_cause | cause | ||
) |
void sccp_scmg_rx_ssn_allowed | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc, | ||
uint32_t | ssn, | ||
uint32_t | smi | ||
) |
References osmo_scu_state_param::affected_pc, dpc, sccp_lbcs_local_bcast_state(), and smi.
Referenced by scmg_rx_ssa(), and sua_snm_ssn_available_to_sccp().
void sccp_scmg_rx_ssn_prohibited | ( | struct osmo_sccp_instance * | inst, |
uint32_t | dpc, | ||
uint32_t | ssn, | ||
uint32_t | smi | ||
) |
References osmo_scu_state_param::affected_pc, dpc, sccp_lbcs_local_bcast_state(), and smi.
Referenced by scmg_rx_ssp(), and sua_snm_ssn_available_to_sccp().
void sccp_scoc_flush_connections | ( | struct osmo_sccp_instance * | inst | ) |
References conn_destroy(), osmo_sccp_instance::connections, and sccp_connection::node.
Referenced by osmo_sccp_instance_destroy().
void sccp_scoc_rx_from_scrc | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua | ||
) |
Main entrance function for primitives from the SCRC (Routing Control)
[in] | inst | SCCP Instance in which we operate |
[in] | xua | SUA message in xua_msg format |
References conn_create(), conn_find_by_id(), sccp_connection::conn_id, sccp_connection::fi, xua_msg::hdr, sccp_connection::incoming, osmo_sccp_user::inst, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_connection::remote_pc, sccp_connection::remote_ref, sccp_find_user(), sccp_scoc_rx_inval_opc(), sccp_scoc_rx_inval_src_ref(), sccp_scoc_rx_unass_local_ref(), SUA_CO_COAK, SUA_CO_CORE, SUA_CO_COREF, SUA_IEI_DEST_REF, SUA_IEI_SRC_REF, sua_scoc_event_map, xua_dialect_sua, xua_hdr_dump(), xua_msg_event_map(), xua_msg_find_tag(), and xua_msg_get_u32().
Referenced by scrc_node_6(), scrc_rx_mtp_xfer_ind_xua(), and scrc_translate_node_9().
void sccp_scoc_rx_scrc_rout_fail | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua, | ||
uint32_t | return_cause | ||
) |
SCOC: Receive SCRC Routing Failure.
[in] | inst | SCCP Instance on which we operate |
[in] | xua | SUA message that was failed to route |
[in] | return_cause | Reason (cause) for routing failure |
References conn_find_by_id(), sccp_connection::conn_id, sccp_connection::fi, gen_coref_without_conn(), get_cref_cause_for_ret(), sccp_connection::inst, sccp_scrc_rx_scoc_conn_msg(), SCOC_E_RCOC_ROUT_FAIL_IND, SUA_IEI_DEST_REF, xua_dialect_sua, xua_hdr_dump(), xua_msg_free(), and xua_msg_get_u32().
Referenced by scrc_node_2(), scrc_node_4(), and scrc_node_6().
void sccp_scoc_show_connections | ( | struct vty * | vty, |
struct osmo_sccp_instance * | inst | ||
) |
References osmo_sccp_instance::connections, and vty_show_connection().
Referenced by DEFUN().
int sccp_scrc_rx_sclc_msg | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua | ||
) |
References xua_msg::hdr, xua_common_hdr::msg_type, OSMO_SCCP_RI_GT, osmo_sccp_addr::ri, scrc_local_out_common(), scrc_node_12(), scrc_node_7(), sua_addr_parse(), SUA_CL_CLDR, SUA_IEI_DEST_ADDR, xua_dialect_sua, and xua_msg_dump().
Referenced by sccp_sclc_rx_scrc_rout_fail(), and xua_gen_encode_and_send().
int sccp_scrc_rx_scoc_conn_msg | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua | ||
) |
References xua_msg::hdr, xua_common_hdr::msg_type, scrc_local_out_common(), scrc_node_2(), sua_addr_parse(), SUA_CO_CORE, SUA_IEI_DEST_ADDR, xua_dialect_sua, and xua_msg_dump().
Referenced by sccp_scoc_rx_scrc_rout_fail(), tx_coerr_from_xua(), tx_relco_from_xua(), tx_rlsd_from_xua_twoway(), xua_gen_encode_and_send(), and xua_gen_relre_and_send().
struct osmo_sccp_user * sccp_user_find | ( | struct osmo_sccp_instance * | inst, |
uint16_t | ssn, | ||
uint32_t | pc | ||
) |
Find a SCCP User registered for given PC+SSN or SSN only First search all users with a valid PC for a full PC+SSN match.
If no such match was found, search all users with an invalid PC for an SSN-only match.
[in] | inst | SCCP Instance in which to search |
[in] | ssn | Sub-System Number to search for |
[in] | pc | Point Code to search for |
References osmo_sccp_user::inst, osmo_sccp_user::list, osmo_ss7_pc_is_valid(), osmo_sccp_user::pc, osmo_sccp_user::ssn, and osmo_sccp_instance::users.
Referenced by DEFUN(), osmo_sccp_user_find(), sccp_find_user(), sccp_user_bind_pc(), sclc_rx_cldr(), sclc_rx_cldt(), scmg_rx_sst(), and scrc_node_6().
int sccp_user_prim_up | ( | struct osmo_sccp_user * | scu, |
struct osmo_scu_prim * | prim | ||
) |
Send a SCCP User SAP Primitive up to the User.
[in] | scu | SCCP User to whom to send the primitive |
[in] | prim | Primitive to send to the user |
References osmo_sccp_user::name, osmo_scu_prim::oph, osmo_scu_prim_name(), and osmo_sccp_user::prim_cb.
Referenced by sccp_lbcs_local_bcast_pcstate(), sccp_lbcs_local_bcast_state(), sclc_rx_cldr(), sclc_rx_cldt(), and scu_gen_encode_and_send().
int scrc_rx_mtp_xfer_ind_xua | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua | ||
) |
References xua_msg_part::dat, ensure_opc_in_calling_ssn(), OSMO_SCCP_RI_GT, osmo_sccp_addr::ri, sccp_scoc_rx_from_scrc(), scrc_node_4(), scrc_node_6(), scrc_translate_node_9(), sua_addr_parse(), SUA_IEI_DEST_ADDR, SUA_IEI_PROTO_CLASS, SUA_IEI_S7_HOP_CTR, sua_is_connectionless(), sua_is_cr(), xua_dialect_sua, xua_msg_dump(), xua_msg_find_tag(), xua_msg_get_u32(), and xua_msg_part_get_u32().
Referenced by mtp_user_prim_cb(), sua_rx_cl(), and sua_rx_co().
|
extern |
|
extern |
Referenced by gen_sccp_timer_cmd_strs(), and osmo_sccp_instance_create().
|
extern |
Referenced by DEFUN_ATTR(), gen_sccp_timer_cmd_strs(), osmo_sccp_timer_name(), and write_sccp_timers().
|
extern |
Referenced by conn_create_id(), and osmo_ss7_init().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <ss7_xua_srv.h>
Data Fields | |
osmo_prim_cb | prim_cb |
osmo_prim_cb osmo_xua_layer_manager::prim_cb |
Referenced by xua_asp_send_xlm_prim(), and xua_cli_connect_cb().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
Data Fields | |
struct llist_head | list |
struct llist_head | list_global |
struct osmo_ss7_instance * | inst |
char | name [32] |
struct osmo_sccp_addr | addr |
struct osmo_sccp_addr osmo_sccp_addr_entry::addr |
struct osmo_ss7_instance* osmo_sccp_addr_entry::inst |
struct llist_head osmo_sccp_addr_entry::list |
Referenced by addr_entry_by_name_local(), DEFUN(), and write_sccp_addressbook().
struct llist_head osmo_sccp_addr_entry::list_global |
Referenced by addr_entry_by_name_global(), and osmo_sccp_name_by_addr().
char osmo_sccp_addr_entry::name[32] |
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <sccp_sap.h>
Data Fields | |
uint32_t | presence |
enum osmo_sccp_routing_ind | ri |
struct osmo_sccp_gt | gt |
uint32_t | pc |
uint32_t | ssn |
union { | |
struct in_addr v4 | |
struct in6_addr v6 | |
} | ip |
struct osmo_sccp_gt osmo_sccp_addr::gt |
union { ... } osmo_sccp_addr::ip |
Referenced by DEFUN(), osmo_sccp_addr_cmp(), osmo_sccp_addr_dump(), sccp_addr_to_str_buf(), sua_addr_parse_part(), and xua_msg_add_sccp_addr().
uint32_t osmo_sccp_addr::pc |
Referenced by DEFUN(), DEFUN_ATTR(), ensure_opc_in_calling_ssn(), gen_mtp_transfer_req_xua(), gen_ret_msg(), osmo_sccp_addr_cmp(), osmo_sccp_addr_dump(), osmo_sccp_addr_encode(), osmo_sccp_addr_parse(), osmo_sccp_make_addr_pc_ssn(), patch_sccp_with_pc(), sccp_addr_to_str_buf(), sccp_find_user(), sclc_rx_cldr(), sclc_rx_cldt(), scoc_fsm_idle(), scrc_local_out_common(), scrc_node_2(), scrc_node_6(), scrc_translate_node_9(), sua_addr_parse_part(), write_sccp_addressbook(), and xua_msg_add_sccp_addr().
uint32_t osmo_sccp_addr::presence |
Referenced by DEFUN(), DEFUN_ATTR(), ensure_opc_in_calling_ssn(), gen_mtp_transfer_req_xua(), gen_ret_msg(), osmo_sccp_addr_cmp(), osmo_sccp_addr_dump(), osmo_sccp_addr_encode(), osmo_sccp_addr_parse(), osmo_sccp_addr_ri_cmp(), osmo_sccp_addr_set_ssn(), osmo_sccp_check_addr(), osmo_sccp_make_addr_pc_ssn(), patch_sccp_with_pc(), sccp_addr_to_str_buf(), sccp_find_user(), scoc_fsm_idle(), scrc_local_out_common(), sua_addr_parse_part(), write_sccp_addressbook(), xua_gen_msg_co(), and xua_msg_add_sccp_addr().
enum osmo_sccp_routing_ind osmo_sccp_addr::ri |
Referenced by DEFUN(), DEFUN_ATTR(), ensure_opc_in_calling_ssn(), gen_ret_msg(), osmo_sccp_addr_dump(), osmo_sccp_addr_encode(), osmo_sccp_addr_parse(), osmo_sccp_addr_ri_cmp(), osmo_sccp_check_addr(), sccp_addr_to_str_buf(), sccp_scrc_rx_sclc_msg(), scrc_rx_mtp_xfer_ind_xua(), scrc_translate_node_9(), sua_addr_parse_part(), write_sccp_addressbook(), and xua_msg_add_sccp_addr().
uint32_t osmo_sccp_addr::ssn |
Referenced by DEFUN(), DEFUN_ATTR(), osmo_sccp_addr_cmp(), osmo_sccp_addr_dump(), osmo_sccp_addr_encode(), osmo_sccp_addr_parse(), osmo_sccp_addr_set_ssn(), osmo_sccp_make_addr_pc_ssn(), sccp_addr_to_str_buf(), sccp_find_user(), sclc_rx_cldr(), sclc_rx_cldt(), scrc_node_6(), sua_addr_parse_part(), vty_show_connection(), write_sccp_addressbook(), and xua_msg_add_sccp_addr().
struct in_addr osmo_sccp_addr::v4 |
Referenced by DEFUN(), osmo_sccp_addr_cmp(), osmo_sccp_addr_dump(), sccp_addr_to_str_buf(), sua_addr_parse_part(), and xua_msg_add_sccp_addr().
struct in6_addr osmo_sccp_addr::v6 |
Referenced by DEFUN(), osmo_sccp_addr_cmp(), osmo_sccp_addr_dump(), sccp_addr_to_str_buf(), sua_addr_parse_part(), and xua_msg_add_sccp_addr().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
Go to the source code of this file.
Functions | |
int | osmo_sccp_tx_unitdata (struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, const uint8_t *data, unsigned int len) |
int | osmo_sccp_tx_unitdata_msg (struct osmo_sccp_user *scu, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, struct msgb *msg) |
void | osmo_sccp_make_addr_pc_ssn (struct osmo_sccp_addr *addr, uint32_t pc, uint32_t ssn) |
void | osmo_sccp_addr_set_ssn (struct osmo_sccp_addr *addr, uint32_t ssn) |
int | osmo_sccp_tx_unitdata_ranap (struct osmo_sccp_user *scu, uint32_t src_point_code, uint32_t dst_point_code, const uint8_t *data, unsigned int len) |
int | osmo_sccp_tx_conn_req (struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, const uint8_t *data, unsigned int len) |
int | osmo_sccp_tx_conn_req_msg (struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *calling_addr, const struct osmo_sccp_addr *called_addr, struct msgb *msg) |
int | osmo_sccp_tx_data (struct osmo_sccp_user *scu, uint32_t conn_id, const uint8_t *data, unsigned int len) |
int | osmo_sccp_tx_data_msg (struct osmo_sccp_user *scu, uint32_t conn_id, struct msgb *msg) |
int | osmo_sccp_tx_disconn (struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *resp_addr, uint32_t cause) |
int | osmo_sccp_tx_disconn_data (struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *resp_addr, uint32_t cause, const uint8_t *data, size_t len) |
int | osmo_sccp_tx_conn_resp_msg (struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *resp_addr, struct msgb *msg) |
int | osmo_sccp_tx_conn_resp (struct osmo_sccp_user *scu, uint32_t conn_id, const struct osmo_sccp_addr *resp_addr, const uint8_t *data, unsigned int len) |
char * | osmo_sccp_gt_dump (const struct osmo_sccp_gt *gt) |
char * | osmo_sccp_addr_dump (const struct osmo_sccp_addr *addr) |
int | osmo_sccp_inst_addr_to_str_buf (char *buf, size_t buf_len, const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr) |
char * | osmo_sccp_inst_addr_to_str_c (void *ctx, const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr) |
int | osmo_sccp_addr_to_str_buf (char *buf, size_t buf_len, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr) |
char * | osmo_sccp_addr_to_str_c (void *ctx, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr) |
int | osmo_sccp_addr_to_id_buf (char *buf, size_t buf_len, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr) |
like osmo_sccp_addr_to_str_buf, but using only characters passing osmo_identifier_valid(). More... | |
char * | osmo_sccp_addr_to_id_c (void *ctx, const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr) |
bool | osmo_sccp_conn_id_exists (const struct osmo_sccp_instance *inst, uint32_t id) |
char * | osmo_sccp_addr_name (const struct osmo_ss7_instance *ss7, const struct osmo_sccp_addr *addr) |
char * | osmo_sccp_inst_addr_name (const struct osmo_sccp_instance *sccp, const struct osmo_sccp_addr *addr) |
char * osmo_sccp_addr_dump | ( | const struct osmo_sccp_addr * | addr | ) |
References append_to_buf(), osmo_sccp_addr::gt, osmo_sccp_gt::gti, osmo_sccp_addr::ip, OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, osmo_sccp_gt_dump(), OSMO_SCCP_GTI_NO_GT, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, osmo_sccp_addr::ssn, osmo_sccp_addr::v4, and osmo_sccp_addr::v6.
Referenced by gen_mtp_transfer_req_xua(), and sccp_addr_to_sua().
char * osmo_sccp_addr_name | ( | const struct osmo_ss7_instance * | ss7, |
const struct osmo_sccp_addr * | addr | ||
) |
References osmo_sccp_addr_to_str_buf().
Referenced by osmo_sccp_inst_addr_name(), and osmo_sccp_user_name().
void osmo_sccp_addr_set_ssn | ( | struct osmo_sccp_addr * | addr, |
uint32_t | ssn | ||
) |
References OSMO_SCCP_ADDR_T_SSN, osmo_sccp_addr::presence, and osmo_sccp_addr::ssn.
int osmo_sccp_addr_to_id_buf | ( | char * | buf, |
size_t | buf_len, | ||
const struct osmo_ss7_instance * | ss7, | ||
const struct osmo_sccp_addr * | addr | ||
) |
like osmo_sccp_addr_to_str_buf, but using only characters passing osmo_identifier_valid().
Useful for FSM and CTRL IDs.
The advantage over using osmo_sccp_addr_to_str_buf() followed by osmo_identifier_sanitize_buf() is that here, the address elements are separated by ':', while osmo_identifier_sanitize_buf() would replace all characters with the same, e.g. '-'.
References sccp_addr_to_str_buf().
Referenced by osmo_sccp_addr_to_id_c().
char * osmo_sccp_addr_to_id_c | ( | void * | ctx, |
const struct osmo_ss7_instance * | ss7, | ||
const struct osmo_sccp_addr * | addr | ||
) |
References osmo_sccp_addr_to_id_buf().
int osmo_sccp_addr_to_str_buf | ( | char * | buf, |
size_t | buf_len, | ||
const struct osmo_ss7_instance * | ss7, | ||
const struct osmo_sccp_addr * | addr | ||
) |
References sccp_addr_to_str_buf().
Referenced by osmo_sccp_addr_name(), osmo_sccp_addr_to_str_c(), and osmo_sccp_inst_addr_to_str_buf().
char * osmo_sccp_addr_to_str_c | ( | void * | ctx, |
const struct osmo_ss7_instance * | ss7, | ||
const struct osmo_sccp_addr * | addr | ||
) |
References osmo_sccp_addr_to_str_buf().
bool osmo_sccp_conn_id_exists | ( | const struct osmo_sccp_instance * | inst, |
uint32_t | id | ||
) |
References conn_find_by_id(), and sccp_connection::inst.
Referenced by osmo_sccp_tx_conn_resp_msg(), osmo_sccp_tx_data(), and osmo_sccp_tx_disconn_data().
char * osmo_sccp_gt_dump | ( | const struct osmo_sccp_gt * | gt | ) |
References append_to_buf(), osmo_sccp_gt::digits, osmo_sccp_gt::gti, osmo_sccp_gt::nai, osmo_sccp_gt::npi, 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, and osmo_sccp_gt::tt.
Referenced by osmo_sccp_addr_dump(), and sccp_addr_to_str_buf().
char * osmo_sccp_inst_addr_name | ( | const struct osmo_sccp_instance * | sccp, |
const struct osmo_sccp_addr * | addr | ||
) |
References osmo_sccp_addr_name(), and osmo_sccp_instance::ss7.
int osmo_sccp_inst_addr_to_str_buf | ( | char * | buf, |
size_t | buf_len, | ||
const struct osmo_sccp_instance * | sccp, | ||
const struct osmo_sccp_addr * | addr | ||
) |
References osmo_sccp_addr_to_str_buf(), and osmo_sccp_instance::ss7.
Referenced by osmo_sccp_inst_addr_to_str_c().
char * osmo_sccp_inst_addr_to_str_c | ( | void * | ctx, |
const struct osmo_sccp_instance * | sccp, | ||
const struct osmo_sccp_addr * | addr | ||
) |
References osmo_sccp_inst_addr_to_str_buf().
void osmo_sccp_make_addr_pc_ssn | ( | struct osmo_sccp_addr * | addr, |
uint32_t | pc, | ||
uint32_t | ssn | ||
) |
int osmo_sccp_tx_conn_req | ( | struct osmo_sccp_user * | scu, |
uint32_t | conn_id, | ||
const struct osmo_sccp_addr * | calling_addr, | ||
const struct osmo_sccp_addr * | called_addr, | ||
const uint8_t * | data, | ||
unsigned int | len | ||
) |
References osmo_scu_connect_param::called_addr, osmo_scu_connect_param::calling_addr, osmo_scu_connect_param::conn_id, osmo_scu_prim::connect, data, len, osmo_scu_prim::oph, osmo_sccp_user_sap_down(), OSMO_SCU_PRIM_N_CONNECT, osmo_scu_connect_param::sccp_class, SCCP_SAP_USER, scu_msgb_alloc(), and osmo_scu_prim::u.
Referenced by osmo_sccp_tx_conn_req_msg().
int osmo_sccp_tx_conn_req_msg | ( | struct osmo_sccp_user * | scu, |
uint32_t | conn_id, | ||
const struct osmo_sccp_addr * | calling_addr, | ||
const struct osmo_sccp_addr * | called_addr, | ||
struct msgb * | msg | ||
) |
References osmo_sccp_tx_conn_req().
int osmo_sccp_tx_conn_resp | ( | struct osmo_sccp_user * | scu, |
uint32_t | conn_id, | ||
const struct osmo_sccp_addr * | resp_addr, | ||
const uint8_t * | data, | ||
unsigned int | len | ||
) |
References data, len, osmo_sccp_tx_conn_resp_msg(), and scu_msgb_alloc().
int osmo_sccp_tx_conn_resp_msg | ( | struct osmo_sccp_user * | scu, |
uint32_t | conn_id, | ||
const struct osmo_sccp_addr * | resp_addr, | ||
struct msgb * | msg | ||
) |
References osmo_scu_connect_param::conn_id, osmo_scu_prim::connect, osmo_sccp_user::inst, osmo_scu_prim::oph, osmo_sccp_conn_id_exists(), osmo_sccp_user_sap_down(), OSMO_SCU_PRIM_N_CONNECT, osmo_scu_connect_param::responding_addr, osmo_scu_connect_param::sccp_class, SCCP_SAP_USER, and osmo_scu_prim::u.
Referenced by osmo_sccp_tx_conn_resp().
int osmo_sccp_tx_data | ( | struct osmo_sccp_user * | scu, |
uint32_t | conn_id, | ||
const uint8_t * | data, | ||
unsigned int | len | ||
) |
References osmo_scu_data_param::conn_id, osmo_scu_prim::data, data, osmo_sccp_user::inst, len, osmo_scu_prim::oph, osmo_sccp_conn_id_exists(), osmo_sccp_user_sap_down(), OSMO_SCU_PRIM_N_DATA, SCCP_SAP_USER, scu_msgb_alloc(), and osmo_scu_prim::u.
Referenced by osmo_sccp_tx_data_msg(), xua_opt_data_length_lim(), and xua_opt_data_send_cache().
int osmo_sccp_tx_data_msg | ( | struct osmo_sccp_user * | scu, |
uint32_t | conn_id, | ||
struct msgb * | msg | ||
) |
References osmo_sccp_tx_data().
int osmo_sccp_tx_disconn | ( | struct osmo_sccp_user * | scu, |
uint32_t | conn_id, | ||
const struct osmo_sccp_addr * | resp_addr, | ||
uint32_t | cause | ||
) |
References osmo_sccp_tx_disconn_data().
int osmo_sccp_tx_disconn_data | ( | struct osmo_sccp_user * | scu, |
uint32_t | conn_id, | ||
const struct osmo_sccp_addr * | resp_addr, | ||
uint32_t | cause, | ||
const uint8_t * | data, | ||
size_t | len | ||
) |
References osmo_scu_disconn_param::cause, osmo_scu_disconn_param::conn_id, data, osmo_scu_prim::disconnect, osmo_sccp_user::inst, len, osmo_scu_prim::oph, osmo_scu_disconn_param::originator, osmo_sccp_conn_id_exists(), OSMO_SCCP_ORIG_NS_USER, osmo_sccp_user_sap_down(), OSMO_SCU_PRIM_N_DISCONNECT, osmo_scu_disconn_param::responding_addr, SCCP_SAP_USER, scu_msgb_alloc(), and osmo_scu_prim::u.
Referenced by osmo_sccp_tx_disconn().
int osmo_sccp_tx_unitdata | ( | struct osmo_sccp_user * | scu, |
const struct osmo_sccp_addr * | calling_addr, | ||
const struct osmo_sccp_addr * | called_addr, | ||
const uint8_t * | data, | ||
unsigned int | len | ||
) |
References osmo_scu_unitdata_param::called_addr, osmo_scu_unitdata_param::calling_addr, data, len, osmo_scu_prim::oph, osmo_sccp_user_sap_down(), OSMO_SCU_PRIM_N_UNITDATA, SCCP_SAP_USER, scu_msgb_alloc(), osmo_scu_prim::u, and osmo_scu_prim::unitdata.
Referenced by osmo_sccp_tx_unitdata_msg(), and osmo_sccp_tx_unitdata_ranap().
int osmo_sccp_tx_unitdata_msg | ( | struct osmo_sccp_user * | scu, |
const struct osmo_sccp_addr * | calling_addr, | ||
const struct osmo_sccp_addr * | called_addr, | ||
struct msgb * | msg | ||
) |
References osmo_sccp_tx_unitdata().
int osmo_sccp_tx_unitdata_ranap | ( | struct osmo_sccp_user * | scu, |
uint32_t | src_point_code, | ||
uint32_t | dst_point_code, | ||
const uint8_t * | data, | ||
unsigned int | len | ||
) |
References data, len, osmo_sccp_make_addr_pc_ssn(), OSMO_SCCP_SSN_RANAP, and osmo_sccp_tx_unitdata().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <xua_types.h>
Data Fields | |
uint8_t | version |
uint8_t | spare |
uint8_t | msg_class |
uint8_t | msg_type |
uint32_t | msg_length |
uint8_t | data [0] |
uint8_t xua_common_hdr::data[0] |
Referenced by m3ua_rx_msg(), m3ua_tcp_cli_read_cb(), ss7_asp_m3ua_tcp_srv_conn_rx_cb(), sua_rx_msg(), and xua_tcp_segmentation_cb().
uint8_t xua_common_hdr::msg_class |
Referenced by data_hdr_from_m3ua(), hmdt_message_for_distribution(), m3ua_rx_msg(), m3ua_tcp_cli_read_cb(), m3ua_to_msg(), msgb_push_m3ua_hdr(), osmo_sua_to_sccp(), sccp_sclc_rx_from_scrc(), scoc_fsm_conn_pend_out(), ss7_asp_m3ua_tcp_srv_conn_rx_cb(), sua_is_connectionless(), sua_is_cr(), sua_rx_cl(), sua_rx_co(), sua_rx_msg(), sua_to_msg(), xua_dialect_check_all_mand_ies(), xua_hdr_dump(), xua_msg_dump(), and xua_msg_event_map().
uint32_t xua_common_hdr::msg_length |
Referenced by msgb_push_m3ua_hdr(), xua_from_msg(), xua_msg_dump(), xua_tcp_segmentation_cb(), and xua_to_msg().
uint8_t xua_common_hdr::msg_type |
Referenced by data_hdr_from_m3ua(), hmdt_message_for_distribution(), m3ua_encode_dava(), m3ua_rx_mgmt(), m3ua_rx_rkm(), m3ua_rx_snm(), m3ua_rx_snm_asp(), m3ua_rx_snm_sg(), m3ua_rx_xfer(), msgb_push_m3ua_hdr(), osmo_sua_to_sccp(), sccp_sclc_rx_from_scrc(), sccp_sclc_rx_scrc_rout_fail(), sccp_scoc_rx_from_scrc(), sccp_scoc_rx_inval_opc(), sccp_scoc_rx_inval_src_ref(), sccp_scoc_rx_unass_local_ref(), sccp_scrc_rx_sclc_msg(), sccp_scrc_rx_scoc_conn_msg(), sua_encode_dava(), sua_is_cr(), sua_rx_cl(), sua_rx_co(), sua_rx_mgmt(), sua_rx_snm_asp(), sua_rx_snm_sg(), xua_dialect_check_all_mand_ies(), xua_hdr_dump(), and xua_msg_event_map().
uint8_t xua_common_hdr::spare |
Referenced by msgb_push_m3ua_hdr(), and xua_to_msg().
uint8_t xua_common_hdr::version |
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <mtp_sap.h>
Data Fields | |
uint32_t | affected_dpc |
uint32_t | cause |
uint32_t osmo_mtp_status_param::affected_dpc |
uint32_t osmo_mtp_status_param::cause |
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
Go to the source code of this file.
Functions | |
struct osmo_fsm_inst * | xua_asp_fsm_start (struct osmo_ss7_asp *asp, enum osmo_ss7_asp_role role, int log_level) |
Start a new ASP finite stae machine for given ASP. More... | |
Variables | |
struct osmo_fsm | xua_asp_fsm |
struct osmo_fsm | ipa_asp_fsm |
enum xua_asp_event |
enum xua_asp_state |
struct osmo_fsm_inst * xua_asp_fsm_start | ( | struct osmo_ss7_asp * | asp, |
enum osmo_ss7_asp_role | role, | ||
int | log_level | ||
) |
Start a new ASP finite stae machine for given ASP.
[in] | asp | Application Server Process for which to start FSM |
[in] | role | Role (ASP, SG, IPSP) of this FSM |
[in] | log_level | Logging Level for ASP FSM logging |
References xua_asp_fsm_priv::asp, osmo_ss7_asp::cfg, ipa_asp_fsm_start(), osmo_ss7_asp::name, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp::proto, xua_asp_fsm_priv::role, and xua_asp_fsm.
Referenced by osmo_ss7_asp_restart().
|
extern |
Referenced by ipa_asp_fsm_start(), and osmo_ss7_init().
|
extern |
Referenced by osmo_ss7_init(), and xua_asp_fsm_start().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include "xua_internal.h"
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_linkset.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "ss7_internal.h"
#include "ss7_user.h"
Macros | |
#define | APPEND(fmt, args ...) |
Functions | |
struct osmo_mtp_prim * | m3ua_to_xfer_ind (struct xua_msg *xua) |
static struct xua_msg * | mtp_prim_to_m3ua (struct osmo_mtp_prim *prim) |
static int | deliver_to_mtp_user (const struct osmo_ss7_user *osu, struct xua_msg *xua) |
static int | hmdt_message_for_distribution (struct osmo_ss7_instance *inst, struct xua_msg *xua) |
const char * | osmo_ss7_route_name (struct osmo_ss7_route *rt, bool list_asps) |
Return human readable representation of the route, in a static buffer. More... | |
static int | hmrt_message_for_routing (struct osmo_ss7_instance *inst, struct xua_msg *xua) |
int | m3ua_hmdc_rx_from_l2 (struct osmo_ss7_instance *inst, struct xua_msg *xua) |
int | osmo_ss7_user_mtp_xfer_req (struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp) |
#define APPEND | ( | fmt, | |
args ... | |||
) |
|
static |
References m3ua_to_xfer_ind(), xua_msg::mtp, osmo_mtp_prim::oph, osmo_ss7_user::prim_cb, osmo_ss7_user::priv, osmo_mtp_prim::transfer, and osmo_mtp_prim::u.
Referenced by hmdt_message_for_distribution().
|
static |
|
static |
References osmo_ss7_route::as, osmo_ss7_as::cfg, osmo_ss7_as::ctrg, osmo_ss7_route::dest, osmo_mtp_transfer_param::dpc, dpc, osmo_ss7_as::inst, ipa_tx_xua_as(), osmo_ss7_route::linkset, m3ua_tx_xua_as(), xua_msg::mtp, osmo_ss7_as::name, osmo_ss7_as_down(), OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, osmo_ss7_pointcode_print(), osmo_ss7_route_lookup(), osmo_ss7_route_name(), osmo_ss7_as::proto, and SS7_AS_CTR_TX_MSU_TOTAL.
Referenced by m3ua_hmdc_rx_from_l2().
int m3ua_hmdc_rx_from_l2 | ( | struct osmo_ss7_instance * | inst, |
struct xua_msg * | xua | ||
) |
struct osmo_mtp_prim * m3ua_to_xfer_ind | ( | struct xua_msg * | xua | ) |
|
static |
References m3ua_xfer_from_data(), mtp_xfer_param_to_m3ua_dh(), osmo_mtp_prim::oph, osmo_mtp_prim::transfer, and osmo_mtp_prim::u.
Referenced by osmo_ss7_user_mtp_xfer_req().
const char * osmo_ss7_route_name | ( | struct osmo_ss7_route * | rt, |
bool | list_asps | ||
) |
Return human readable representation of the route, in a static buffer.
This uses both osmo_ss7_pointcode_print() and osmo_ss7_pointcode_print2(), so pairing osmo_ss7_route_name() with osmo_ss7_pointcode_print() in the same printf statement is likely to conflict.
[in] | rt | The route information to print, or NULL. |
[in] | list_asps | If true, append info for all ASPs for the route's AS. |
References APPEND, osmo_ss7_route::as, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_linkset::cfg, osmo_ss7_route::cfg, osmo_ss7_route::dest, osmo_ss7_route_table::inst, osmo_ss7_route::linkset, osmo_ss7_route::mask, osmo_ss7_as::name, osmo_ss7_asp::name, osmo_ss7_linkset::name, osmo_ss7_asp_protocol_name(), osmo_ss7_pointcode_print(), osmo_ss7_pointcode_print2(), osmo_ss7_route::pc, osmo_ss7_as::proto, osmo_ss7_route::rtable, and osmo_ss7_asp::sock_name.
Referenced by hmrt_message_for_routing().
int osmo_ss7_user_mtp_xfer_req | ( | struct osmo_ss7_instance * | inst, |
struct osmo_mtp_prim * | omp | ||
) |
References m3ua_hmdc_rx_from_l2(), xua_msg::mtp, mtp_prim_to_m3ua(), MTP_SAP_USER, osmo_mtp_prim::oph, OSMO_MTP_PRIM_TRANSFER, osmo_mtp_prim::transfer, osmo_mtp_prim::u, and xua_msg_free().
Referenced by sua2sccp_tx_m3ua().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <sccp_sap.h>
Data Fields | |
uint32_t | conn_id |
uint32_t | importance |
uint32_t osmo_scu_data_param::conn_id |
Referenced by osmo_sccp_tx_data(), scu_gen_encode_and_send(), and scu_prim_conn_id().
uint32_t osmo_scu_data_param::importance |
Referenced by scu_gen_encode_and_send().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <mtp_sap.h>
Data Fields | |
uint32_t | opc |
uint32_t | dpc |
uint8_t | sls |
uint8_t | sio |
uint32_t osmo_mtp_transfer_param::dpc |
Referenced by gen_mtp_transfer_req_xua(), hmrt_message_for_routing(), m3ua_dh_to_xfer_param(), m3ua_hmdc_rx_from_l2(), m3ua_rx_xfer(), mtp_xfer_param_to_m3ua_dh(), sua2sccp_tx_m3ua(), sua_rx_msg(), tx_coerr_from_xua(), tx_relco_from_xua(), tx_rlsd_from_xua_twoway(), xua_gen_encode_and_send(), and xua_gen_relre_and_send().
uint32_t osmo_mtp_transfer_param::opc |
Referenced by ensure_opc_in_calling_ssn(), m3ua_dh_to_xfer_param(), m3ua_rx_xfer(), mtp_xfer_param_to_m3ua_dh(), sccp_sclc_rx_scrc_rout_fail(), sccp_scoc_rx_from_scrc(), sccp_scoc_rx_inval_opc(), scoc_fsm_conn_pend_out(), scoc_fsm_idle(), scoc_fsm_wait_conn_conf(), sua2sccp_tx_m3ua(), sua_rx_msg(), tx_coerr_from_xua(), tx_relco_from_xua(), and tx_rlsd_from_xua_twoway().
uint8_t osmo_mtp_transfer_param::sio |
uint8_t osmo_mtp_transfer_param::sls |
Referenced by m3ua_dh_to_xfer_param(), mtp_xfer_param_to_m3ua_dh(), and sua2sccp_tx_m3ua().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <string.h>
#include <arpa/inet.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/prim.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sigtran_sap.h>
#include "xua_msg.h"
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
#include "xua_internal.h"
Data Structures | |
struct | xua_as_fsm_priv |
Macros | |
#define | S(x) (1 << (x)) |
#define | MSEC_TO_S_US(x) (x/1000), ((x%1000)*10) |
Functions | |
static struct msgb * | encode_notify (const struct osmo_xlm_prim_notify *npar) |
static int | as_notify_all_asp (struct osmo_ss7_as *as, struct osmo_xlm_prim_notify *npar) |
static int | get_local_role (struct osmo_ss7_as *as) |
int | xua_as_transmit_msg_broadcast (struct osmo_ss7_as *as, struct msgb *msg) |
int | xua_as_transmit_msg (struct osmo_ss7_as *as, struct msgb *msg) |
static bool | is_single_ipa_asp (struct osmo_ss7_as *as) |
static void | ipa_add_route (struct osmo_fsm_inst *fi) |
static void | ipa_del_route (struct osmo_fsm_inst *fi) |
static bool | check_any_other_asp_not_down (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) |
static bool | check_any_other_asp_in_active (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) |
static void | notify_any_other_active_asp_as_inactive (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp_cmp) |
static void | t_r_callback (void *_fi) |
static void | xua_as_fsm_down (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_as_fsm_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | xua_as_fsm_inactive (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_as_fsm_active (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_as_fsm_pending (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_as_fsm_cleanup (struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) |
struct osmo_fsm_inst * | xua_as_fsm_start (struct osmo_ss7_as *as, int log_level) |
Start an AS FSM for a given Application Server. More... | |
Variables | |
static const struct value_string | xua_as_event_names [] |
static const struct osmo_fsm_state | xua_as_fsm_states [] |
struct osmo_fsm | xua_as_fsm |
#define MSEC_TO_S_US | ( | x | ) | (x/1000), ((x%1000)*10) |
#define S | ( | x | ) | (1 << (x)) |
|
static |
References osmo_xlm_prim_notify::asp_id, osmo_ss7_asp::asp_id, osmo_ss7_asp::asp_id_present, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, encode_notify(), osmo_ss7_asp::fi, NOTIFY_PAR_P_ASP_ID, OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_ROLE_ASP, osmo_ss7_asp_send(), osmo_xlm_prim_notify::presence, osmo_ss7_as::proto, osmo_ss7_asp::role, and XUA_ASP_S_DOWN.
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::fi, and XUA_ASP_S_ACTIVE.
Referenced by xua_as_fsm_active().
|
static |
References xua_as_fsm_priv::as, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::fi, and XUA_ASP_S_DOWN.
Referenced by xua_as_fsm_inactive(), and xua_as_fsm_pending().
|
static |
References m3ua_encode_notify(), M3UA_VERSION, xua_msg_free(), and xua_to_msg().
Referenced by as_notify_all_asp(), and notify_any_other_active_asp_as_inactive().
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, and osmo_ss7_asp::role.
|
static |
|
static |
|
static |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, OSMO_SS7_ASP_PROT_IPA, and osmo_ss7_asp::proto.
|
static |
References osmo_xlm_prim_notify::asp_id, osmo_ss7_asp::asp_id, osmo_ss7_asp::asp_id_present, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, encode_notify(), osmo_ss7_asp::fi, M3UA_NOTIFY_I_OT_ALT_ASP_ACT, M3UA_NOTIFY_T_OTHER, osmo_ss7_asp_active(), OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp_send(), osmo_ss7_asp::proto, osmo_xlm_prim_notify::status_type, and XUA_ASP_S_INACTIVE.
Referenced by xua_as_fsm_active().
|
static |
References XUA_AS_E_RECOVERY_EXPD.
Referenced by xua_as_fsm_start().
|
static |
References xua_as_fsm_priv::as, osmo_ss7_as::cfg, check_any_other_asp_in_active(), data, osmo_ss7_as::mode, MSEC_TO_S_US, notify_any_other_active_asp_as_inactive(), OSMO_SS7_AS_TMOD_OVERRIDE, xua_as_fsm_priv::recovery, osmo_ss7_as::recovery_timeout_msec, xua_as_fsm_priv::t_r, XUA_AS_E_TRANSFER_REQ, XUA_AS_S_PENDING, xua_as_transmit_msg(), XUA_ASPAS_ASP_ACTIVE_IND, XUA_ASPAS_ASP_DOWN_IND, and XUA_ASPAS_ASP_INACTIVE_IND.
|
static |
References xua_as_fsm_priv::recovery, and xua_as_fsm_priv::t_r.
|
static |
References XUA_AS_S_INACTIVE, XUA_ASPAS_ASP_DOWN_IND, and XUA_ASPAS_ASP_INACTIVE_IND.
|
static |
|
static |
References xua_as_fsm_priv::as, M3UA_NOTIFY_T_STATCHG, and osmo_xlm_prim_notify::status_type.
|
static |
References xua_as_fsm_priv::as, check_any_other_asp_not_down(), data, xua_as_fsm_priv::queued_msgs, xua_as_fsm_priv::recovery, xua_as_fsm_priv::t_r, XUA_AS_E_RECOVERY_EXPD, XUA_AS_E_TRANSFER_REQ, XUA_AS_S_ACTIVE, XUA_AS_S_DOWN, XUA_AS_S_INACTIVE, xua_as_transmit_msg(), XUA_ASPAS_ASP_ACTIVE_IND, XUA_ASPAS_ASP_DOWN_IND, and XUA_ASPAS_ASP_INACTIVE_IND.
struct osmo_fsm_inst * xua_as_fsm_start | ( | struct osmo_ss7_as * | as, |
int | log_level | ||
) |
Start an AS FSM for a given Application Server.
[in] | as | Application Server for which to start the AS FSM |
[in] | log_level | Logging level for logging of this FSM |
References xua_as_fsm_priv::as, osmo_ss7_as::cfg, osmo_ss7_as::name, xua_as_fsm_priv::queued_msgs, xua_as_fsm_priv::recovery, xua_as_fsm_priv::t_r, t_r_callback(), and xua_as_fsm.
Referenced by ss7_as_alloc().
int xua_as_transmit_msg | ( | struct osmo_ss7_as * | as, |
struct msgb * | msg | ||
) |
References _NUM_OSMO_SS7_ASP_TMOD, osmo_ss7_as::cfg, osmo_ss7_as::fi, osmo_ss7_as::mode, osmo_ss7_as_select_asp(), OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, OSMO_SS7_AS_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_ROUNDROBIN, osmo_ss7_asp_send(), and xua_as_transmit_msg_broadcast().
Referenced by ipa_tx_xua_as(), xua_as_fsm_active(), and xua_as_fsm_pending().
int xua_as_transmit_msg_broadcast | ( | struct osmo_ss7_as * | as, |
struct msgb * | msg | ||
) |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp_active(), and osmo_ss7_asp_send().
Referenced by xua_as_transmit_msg().
|
static |
struct osmo_fsm xua_as_fsm |
Referenced by osmo_ss7_init(), and xua_as_fsm_start().
|
static |
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <stdint.h>
#include <unistd.h>
#include <string.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include "xua_msg.h"
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include <osmocom/sigtran/protocol/sua.h>
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "xua_internal.h"
Functions | |
static struct osmo_ss7_as * | find_single_as_for_asp (const struct osmo_ss7_asp *asp) |
osmo_static_assert (M3UA_ERR_INVAL_ROUT_CTX==SUA_ERR_INVAL_ROUT_CTX, _err_rctx) | |
osmo_static_assert (M3UA_ERR_NO_CONFGD_AS_FOR_ASP==SUA_ERR_NO_CONFGD_AS_FOR_ASP, _err_as_for_asp) | |
int | xua_find_as_for_asp (struct osmo_ss7_as **as, const struct osmo_ss7_asp *asp, const struct xua_msg_part *rctx_ie) |
Find the AS for given ASP + optional routing context IE. More... | |
|
static |
References osmo_ss7_instance::as_list, osmo_ss7_asp::inst, osmo_ss7_as::list, and osmo_ss7_as_has_asp().
Referenced by xua_find_as_for_asp().
osmo_static_assert | ( | M3UA_ERR_INVAL_ROUT_CTX | = =SUA_ERR_INVAL_ROUT_CTX , |
_err_rctx | |||
) |
osmo_static_assert | ( | M3UA_ERR_NO_CONFGD_AS_FOR_ASP | = =SUA_ERR_NO_CONFGD_AS_FOR_ASP , |
_err_as_for_asp | |||
) |
int xua_find_as_for_asp | ( | struct osmo_ss7_as ** | as, |
const struct osmo_ss7_asp * | asp, | ||
const struct xua_msg_part * | rctx_ie | ||
) |
Find the AS for given ASP + optional routing context IE.
if rctx_ie == NULL, we assume that this ASP is only part of a single AS; if rctx_ie is given, then we look-up the ASP based on the routing context, and verify that this ASP is part of it.
[out] | as | caller-provided address-of-pointer to store the found AS |
[in] | asp | ASP for which we want to look-up the AS |
[in] | rctx_ie | routing context IE (may be NULL) to use for look-up |
References osmo_ss7_asp::cfg, find_single_as_for_asp(), osmo_ss7_asp::inst, LOGPASP, M3UA_ERR_INVAL_ROUT_CTX, M3UA_ERR_NO_CONFGD_AS_FOR_ASP, osmo_ss7_asp::name, osmo_ss7_as_find_by_rctx(), osmo_ss7_as_has_asp(), osmo_ss7_asp_get_log_subsys(), and xua_msg_part_get_u32().
Referenced by m3ua_rx_snm_asp(), m3ua_rx_xfer(), sua_rx_cl(), sua_rx_co(), and sua_rx_snm_asp().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <mtp_sap.h>
Data Fields | |
struct osmo_prim_hdr | oph |
union { | |
struct osmo_mtp_transfer_param transfer | |
struct osmo_mtp_pause_param pause | |
struct osmo_mtp_resume_param resume | |
struct osmo_mtp_status_param status | |
} | u |
struct osmo_prim_hdr osmo_mtp_prim::oph |
struct osmo_mtp_pause_param osmo_mtp_prim::pause |
struct osmo_mtp_resume_param osmo_mtp_prim::resume |
struct osmo_mtp_status_param osmo_mtp_prim::status |
struct osmo_mtp_transfer_param osmo_mtp_prim::transfer |
union { ... } osmo_mtp_prim::u |
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <inttypes.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/sctp.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/protocol/mtp.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/select.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/netif/stream.h>
#include <osmocom/netif/ipa.h>
#include <osmocom/netif/sctp.h>
#include "sccp_internal.h"
#include "xua_internal.h"
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "ss7_linkset.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
Functions | |
LLIST_HEAD (osmo_ss7_instances) | |
struct osmo_ss7_instance * | osmo_ss7_instances_llist_entry (struct llist_head *list) |
uint8_t | osmo_ss7_pc_width (const struct osmo_ss7_pc_fmt *pc_fmt) |
uint32_t | osmo_ss7_pc_normalize (const struct osmo_ss7_pc_fmt *pc_fmt, uint32_t pc) |
struct osmo_ss7_instance * | osmo_ss7_instance_find (uint32_t id) |
Find a SS7 Instance with given ID. More... | |
struct osmo_ss7_instance * | osmo_ss7_instance_find_or_create (void *ctx, uint32_t id) |
Find or create a SS7 Instance. More... | |
bool | ss7_ipv6_sctp_supported (const char *host, bool bind) |
int | osmo_ss7_init (void) |
int | osmo_ss7_tmode_to_xua (enum osmo_ss7_as_traffic_mode tmod) |
enum osmo_ss7_as_traffic_mode | osmo_ss7_tmode_from_xua (uint32_t in) |
Variables | |
bool | ss7_initialized = false |
const struct value_string | mtp_unavail_cause_vals [] |
LLIST_HEAD | ( | osmo_ss7_instances | ) |
int osmo_ss7_init | ( | void | ) |
References ipa_asp_fsm, sccp_scoc_fsm, ss7_initialized, xua_as_fsm, xua_asp_fsm, and xua_default_lm_fsm.
struct osmo_ss7_instance * osmo_ss7_instance_find | ( | uint32_t | id | ) |
Find a SS7 Instance with given ID.
[in] | id | ID for which to search |
References osmo_ss7_instance::cfg, osmo_ss7_instance::id, osmo_ss7_instance::list, osmo_ss7_instances, and ss7_initialized.
Referenced by DEFUN(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_instance_find_or_create(), show_asp(), show_asp_assoc_status(), and show_asp_remaddr().
struct osmo_ss7_instance * osmo_ss7_instance_find_or_create | ( | void * | ctx, |
uint32_t | id | ||
) |
Find or create a SS7 Instance.
[in] | ctx | talloc allocation context to use for allocations |
[in] | id | ID of SS7 Instance |
References osmo_ss7_instance_find(), ss7_initialized, and ss7_instance_alloc().
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), and osmo_sccp_simple_server_on_ss7_id().
struct osmo_ss7_instance * osmo_ss7_instances_llist_entry | ( | struct llist_head * | list | ) |
References osmo_ss7_instance::list.
uint32_t osmo_ss7_pc_normalize | ( | const struct osmo_ss7_pc_fmt * | pc_fmt, |
uint32_t | pc | ||
) |
References osmo_ss7_pc_width().
Referenced by ss7_route_alloc(), ss7_route_table_find_route_by_dpc(), and ss7_route_table_find_route_by_dpc_mask().
uint8_t osmo_ss7_pc_width | ( | const struct osmo_ss7_pc_fmt * | pc_fmt | ) |
References osmo_ss7_pc_fmt::component_len.
Referenced by get_pc_comp_shift(), osmo_ss7_pc_normalize(), osmo_ss7_pointcode_parse_mask_or_len(), and osmo_ss7_route_print().
enum osmo_ss7_as_traffic_mode osmo_ss7_tmode_from_xua | ( | uint32_t | in | ) |
References M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, and OSMO_SS7_AS_TMOD_OVERRIDE.
Referenced by handle_rkey_reg(), and xua_asp_fsm_inactive().
int osmo_ss7_tmode_to_xua | ( | enum osmo_ss7_as_traffic_mode | tmod | ) |
References M3UA_TMOD_BCAST, M3UA_TMOD_LOADSHARE, M3UA_TMOD_OVERRIDE, OSMO_SS7_AS_TMOD_BCAST, OSMO_SS7_AS_TMOD_LOADSHARE, and OSMO_SS7_AS_TMOD_OVERRIDE.
Referenced by peer_send(), and xua_rkm_send_reg_req().
bool ss7_ipv6_sctp_supported | ( | const char * | host, |
bool | bind | ||
) |
Referenced by ss7_asp_set_default_peer_hosts(), and ss7_xua_server_set_default_local_hosts().
const struct value_string mtp_unavail_cause_vals[] |
Referenced by mtp_unavail_cause_str().
bool ss7_initialized = false |
Referenced by osmo_ss7_as_add_asp(), osmo_ss7_as_del_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_l_rk_id(), osmo_ss7_as_find_by_name(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_by_rctx(), osmo_ss7_as_find_or_create(), osmo_ss7_as_has_asp(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find2(), osmo_ss7_asp_find_by_name(), osmo_ss7_asp_find_or_create2(), osmo_ss7_asp_restart(), osmo_ss7_asp_send(), osmo_ss7_init(), osmo_ss7_instance_destroy(), osmo_ss7_instance_find(), osmo_ss7_instance_find_or_create(), osmo_ss7_pc_is_local(), osmo_ss7_route_lookup(), ss7_asp_find_by_socket_addr(), ss7_link_destroy(), ss7_link_find_or_create(), ss7_linkset_destroy(), ss7_linkset_find_by_name(), ss7_linkset_find_or_create(), ss7_route_alloc(), ss7_route_destroy(), ss7_route_table_find(), ss7_route_table_find_or_create(), ss7_route_table_find_route_by_dpc(), ss7_route_table_find_route_by_dpc_mask(), ss7_xua_server_create2(), ss7_xua_server_find2(), and ss7_xua_server_set_local_hosts().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <xua_types.h>
Data Fields | |
uint16_t | tag |
uint16_t | len |
uint8_t | data [0] |
uint8_t xua_parameter_hdr::data[0] |
Referenced by xua_from_msg_common().
uint16_t xua_parameter_hdr::len |
Referenced by sua_addr_parse_part(), and xua_from_msg_common().
uint16_t xua_parameter_hdr::tag |
Referenced by sua_addr_parse_part(), and xua_from_msg_common().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
Directories | |
directory | protocol |
Files | |
file | mtp_sap.h [code] |
file | osmo_ss7.h [code] |
file | sccp_helpers.h [code] |
file | sccp_sap.h [code] |
file | sigtran_sap.h [code] |
file | xua_msg.h [code] |
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
Data Fields | |
struct osmo_ss7_asp * | asp |
struct osmo_ss7_asp* lm_fsm_priv::asp |
Referenced by handle_reg_conf(), lm_active(), lm_idle(), lm_rkm_reg(), lm_timer_cb(), lm_wait_notify(), osmo_ss7_asp_use_default_lm(), and restart_asp().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
Data Fields | |
struct osmo_ss7_as * | as |
struct { | |
struct osmo_timer_list t_r | |
struct llist_head queued_msgs | |
} | recovery |
bool | ipa_route_created |
struct osmo_ss7_as* xua_as_fsm_priv::as |
bool xua_as_fsm_priv::ipa_route_created |
Referenced by ipa_add_route(), and ipa_del_route().
struct llist_head xua_as_fsm_priv::queued_msgs |
Referenced by xua_as_fsm_pending(), and xua_as_fsm_start().
struct { ... } xua_as_fsm_priv::recovery |
Referenced by xua_as_fsm_active(), xua_as_fsm_cleanup(), xua_as_fsm_pending(), and xua_as_fsm_start().
struct osmo_timer_list xua_as_fsm_priv::t_r |
Referenced by xua_as_fsm_active(), xua_as_fsm_cleanup(), xua_as_fsm_pending(), and xua_as_fsm_start().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <errno.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/prim.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_user.h"
#include "ss7_internal.h"
Functions | |
struct osmo_ss7_user * | osmo_ss7_user_create (struct osmo_ss7_instance *inst, const char *name) |
void | osmo_ss7_user_destroy (struct osmo_ss7_user *user) |
struct osmo_ss7_instance * | osmo_ss7_user_get_instance (const struct osmo_ss7_user *user) |
void | osmo_ss7_user_set_prim_cb (struct osmo_ss7_user *user, osmo_prim_cb prim_cb) |
void | osmo_ss7_user_set_priv (struct osmo_ss7_user *user, void *priv) |
void * | osmo_ss7_user_get_priv (const struct osmo_ss7_user *user) |
int | osmo_ss7_user_register (struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user) |
Register a MTP user for a given service indicator. More... | |
int | osmo_ss7_user_unregister (struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user) |
Unregister a MTP user for a given service indicator. More... | |
int | ss7_mtp_to_user (struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp) |
struct osmo_ss7_user * osmo_ss7_user_create | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
References osmo_ss7_user::inst, and osmo_ss7_user::name.
Referenced by osmo_sccp_instance_create().
void osmo_ss7_user_destroy | ( | struct osmo_ss7_user * | user | ) |
Referenced by osmo_sccp_instance_destroy().
struct osmo_ss7_instance * osmo_ss7_user_get_instance | ( | const struct osmo_ss7_user * | user | ) |
References osmo_ss7_user::inst, and osmo_ss7_instance::user.
void * osmo_ss7_user_get_priv | ( | const struct osmo_ss7_user * | user | ) |
References osmo_ss7_user::priv, and osmo_ss7_instance::user.
int osmo_ss7_user_register | ( | struct osmo_ss7_instance * | inst, |
uint8_t | service_ind, | ||
struct osmo_ss7_user * | user | ||
) |
Register a MTP user for a given service indicator.
[in] | inst | SS7 instance for which we register the user |
[in] | service_ind | Service (ISUP, SCCP, ...) |
[in] | user | SS7 user (including primitive call-back) |
References osmo_ss7_user::inst, osmo_ss7_user::name, osmo_ss7_user::priv, and osmo_ss7_instance::user.
Referenced by osmo_sccp_instance_create().
void osmo_ss7_user_set_prim_cb | ( | struct osmo_ss7_user * | user, |
osmo_prim_cb | prim_cb | ||
) |
References osmo_ss7_user::prim_cb, and osmo_ss7_instance::user.
Referenced by osmo_sccp_instance_create().
void osmo_ss7_user_set_priv | ( | struct osmo_ss7_user * | user, |
void * | priv | ||
) |
References osmo_ss7_user::priv, and osmo_ss7_instance::user.
Referenced by osmo_sccp_instance_create().
int osmo_ss7_user_unregister | ( | struct osmo_ss7_instance * | inst, |
uint8_t | service_ind, | ||
struct osmo_ss7_user * | user | ||
) |
Unregister a MTP user for a given service indicator.
[in] | inst | SS7 instance for which we register the user |
[in] | service_ind | Service (ISUP, SCCP, ...) |
[in] | user | (optional) SS7 user. If present, we will not unregister other users |
References osmo_ss7_user::inst, and osmo_ss7_instance::user.
Referenced by osmo_sccp_instance_destroy().
int ss7_mtp_to_user | ( | struct osmo_ss7_instance * | inst, |
struct osmo_mtp_prim * | omp | ||
) |
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "ss7_internal.h"
Functions | |
static struct osmo_ss7_route_table * | ss7_route_table_alloc (struct osmo_ss7_instance *inst, const char *name) |
struct osmo_ss7_route_table * | ss7_route_table_find (struct osmo_ss7_instance *inst, const char *name) |
struct osmo_ss7_route_table * | ss7_route_table_find_or_create (struct osmo_ss7_instance *inst, const char *name) |
void | ss7_route_table_destroy (struct osmo_ss7_route_table *rtbl) |
struct osmo_ss7_route * | ss7_route_table_find_route_by_dpc (struct osmo_ss7_route_table *rtbl, uint32_t dpc) |
Find a SS7 route for given destination point code in given table. More... | |
struct osmo_ss7_route * | ss7_route_table_find_route_by_dpc_mask (struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask) |
Find a SS7 route for given destination point code + mask in given table. More... | |
void | ss7_route_table_del_routes_by_linkset (struct osmo_ss7_route_table *rtbl, struct osmo_ss7_linkset *lset) |
void | ss7_route_table_del_routes_by_as (struct osmo_ss7_route_table *rtbl, struct osmo_ss7_as *as) |
|
static |
void ss7_route_table_del_routes_by_as | ( | struct osmo_ss7_route_table * | rtbl, |
struct osmo_ss7_as * | as | ||
) |
References osmo_ss7_route::as, osmo_ss7_route::dest, osmo_ss7_route::list, osmo_ss7_route_table::routes, and ss7_route_destroy().
Referenced by osmo_ss7_as_destroy().
void ss7_route_table_del_routes_by_linkset | ( | struct osmo_ss7_route_table * | rtbl, |
struct osmo_ss7_linkset * | lset | ||
) |
References osmo_ss7_route::dest, osmo_ss7_route::linkset, osmo_ss7_route::list, osmo_ss7_route_table::routes, and ss7_route_destroy().
Referenced by ss7_linkset_destroy().
void ss7_route_table_destroy | ( | struct osmo_ss7_route_table * | rtbl | ) |
References osmo_ss7_route_table::list.
struct osmo_ss7_route_table * ss7_route_table_find | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
struct osmo_ss7_route_table * ss7_route_table_find_or_create | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
References osmo_ss7_route_table::inst, osmo_ss7_route_table::name, ss7_initialized, ss7_route_table_alloc(), and ss7_route_table_find().
Referenced by ss7_instance_alloc().
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc | ( | struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc | ||
) |
Find a SS7 route for given destination point code in given table.
References osmo_ss7_instance::cfg, osmo_ss7_route::cfg, dpc, osmo_ss7_route_table::inst, osmo_ss7_route::list, osmo_ss7_route::mask, osmo_ss7_pc_normalize(), osmo_ss7_route::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_route_table::routes, and ss7_initialized.
Referenced by handle_rkey_dereg(), and osmo_ss7_route_lookup().
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc_mask | ( | struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc, | ||
uint32_t | mask | ||
) |
Find a SS7 route for given destination point code + mask in given table.
References osmo_ss7_instance::cfg, osmo_ss7_route::cfg, dpc, osmo_ss7_route_table::inst, osmo_ss7_route::list, osmo_ss7_route::mask, osmo_ss7_pc_normalize(), osmo_ss7_route::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_route_table::routes, and ss7_initialized.
Referenced by _rout_key(), DEFUN_ATTR(), ipa_add_route(), ipa_del_route(), osmo_sccp_simple_client_on_ss7_id(), ss7_route_create(), and ss7_route_insert().
libosmo-sigtran 2.0.0.54-c4a0
Osmocom SIGTRAN library
|