sigtran/html/ 0000755 0001750 0001750 00000000000 15055653650 012463 5 ustar build build sigtran/html/structosmo__ss7__user.html 0000644 0001750 0001750 00000023437 15055653650 017734 0 ustar build build
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <ss7_user.h>
Data Fields | |
struct osmo_ss7_instance * | inst |
const char * | name |
osmo_prim_cb | prim_cb |
void * | priv |
struct osmo_ss7_instance* osmo_ss7_user::inst |
const char* osmo_ss7_user::name |
Referenced by DEFUN(), osmo_ss7_user_create(), osmo_ss7_user_register(), and ss7_mtp_to_user().
osmo_prim_cb osmo_ss7_user::prim_cb |
Referenced by deliver_to_mtp_user(), osmo_ss7_user_set_prim_cb(), and ss7_mtp_to_user().
void* osmo_ss7_user::priv |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <stdbool.h>
#include <errno.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/msgb.h>
#include <osmocom/sccp/sccp_types.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/sccp_helpers.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/protocol/mtp.h>
#include "sccp_instance.h"
#include "sccp_internal.h"
#include "ss7_as.h"
#include "ss7_instance.h"
#include "ss7_linkset.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "xua_internal.h"
Functions | |
static bool | sua_is_connectionless (struct xua_msg *xua) |
static bool | sua_is_cr (struct xua_msg *xua) |
static bool | dpc_accessible (struct osmo_sccp_instance *inst, uint32_t dpc) |
static bool | sccp_available (struct osmo_sccp_instance *inst, const struct osmo_sccp_addr *addr) |
static int | sua2sccp_tx_m3ua (struct osmo_sccp_instance *inst, struct xua_msg *sua) |
static int | gen_mtp_transfer_req_xua (struct osmo_sccp_instance *inst, struct xua_msg *xua, const struct osmo_sccp_addr *called) |
static int | translate (struct osmo_sccp_instance *inst, const struct osmo_sccp_addr *called, struct osmo_sccp_addr *translated) |
static int | scrc_local_out_common (struct osmo_sccp_instance *inst, struct xua_msg *xua, const struct osmo_sccp_addr *called) |
static int | scrc_node_12 (struct osmo_sccp_instance *inst, struct xua_msg *xua, const struct osmo_sccp_addr *called) |
static int | scrc_node_2 (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
static int | scrc_node_7 (struct osmo_sccp_instance *inst, struct xua_msg *xua, const struct osmo_sccp_addr *called) |
static int | scrc_node_4 (struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t return_cause) |
static int | scrc_translate_node_9 (struct osmo_sccp_instance *inst, struct xua_msg *xua, const struct osmo_sccp_addr *called) |
static int | scrc_node_6 (struct osmo_sccp_instance *inst, struct xua_msg *xua, const struct osmo_sccp_addr *called) |
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) |
static int | ensure_opc_in_calling_ssn (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) |
|
static |
References dpc, LOGPSCI, MAX_PC_STR_LEN, osmo_ss7_pc_is_local(), osmo_ss7_pointcode_print_buf(), osmo_ss7_instance::rtable_system, osmo_sccp_instance::ss7, and ss7_route_table_dpc_is_accessible().
Referenced by scrc_node_2().
|
static |
References LOGPSCI, xua_msg::mtp, osmo_mtp_transfer_param::opc, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, sua_addr_parse(), SUA_IEI_SRC_ADDR, xua_dialect_sua, xua_hdr_dump(), xua_msg_add_sccp_addr(), and xua_msg_free_tag().
Referenced by scrc_rx_mtp_xfer_ind_xua().
|
static |
References osmo_ss7_route::as, osmo_ss7_as::cfg, osmo_ss7_linkset::cfg, osmo_ss7_route::dest, osmo_mtp_transfer_param::dpc, xua_msg::hdr, osmo_ss7_as::inst, osmo_ss7_route::linkset, LOGPSCI, xua_common_hdr::msg_class, xua_msg::mtp, osmo_ss7_linkset::name, osmo_mtp_transfer_param::opc, osmo_ss7_route_label::opc, OSMO_SCCP_ADDR_T_PC, OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_SUA, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_ss7_as::proto, sccp_rout_fail_enqueue(), osmo_mtp_transfer_param::sls, osmo_sccp_instance::ss7, ss7_instance_lookup_route(), ss7_route_label_to_str(), sua2sccp_tx_m3ua(), sua_addr_parse(), SUA_IEI_SRC_ADDR, SUA_MSGC_CO, and sua_tx_xua_as().
Referenced by scrc_node_12().
|
static |
Referenced by scrc_node_2().
int sccp_scrc_rx_sclc_msg | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua | ||
) |
References xua_msg::hdr, LOGPSCI, 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, xua_hdr_dump(), 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, LOGPSCI, 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, xua_hdr_dump(), and xua_msg_dump().
Referenced by sccp_conn_xua_gen_encode_and_send(), sccp_conn_xua_gen_relre_and_send(), sccp_scoc_rx_scrc_rout_fail(), tx_coerr_from_xua(), tx_relco_from_xua(), and tx_rlsd_from_xua_twoway().
|
static |
References OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, osmo_ss7_pc_is_local(), osmo_sccp_addr::pc, osmo_sccp_addr::presence, scrc_node_12(), scrc_node_4(), scrc_node_6(), scrc_translate_node_9(), and osmo_sccp_instance::ss7.
Referenced by sccp_scrc_rx_sclc_msg(), and sccp_scrc_rx_scoc_conn_msg().
|
static |
References gen_mtp_transfer_req_xua(), and osmo_ss7_as::inst.
Referenced by sccp_scrc_rx_sclc_msg(), scrc_local_out_common(), scrc_node_2(), and scrc_node_7().
|
static |
References osmo_mtp_transfer_param::dpc, dpc_accessible(), LOGPSCI, xua_msg::mtp, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, sccp_available(), sccp_rout_fail_enqueue(), scrc_node_12(), sua_addr_parse(), SUA_IEI_DEST_ADDR, xua_dialect_sua, and xua_hdr_dump().
Referenced by sccp_scrc_rx_scoc_conn_msg().
|
static |
References sccp_rout_fail_enqueue(), and sua_is_connectionless().
Referenced by scrc_local_out_common(), scrc_node_6(), scrc_rx_mtp_xfer_ind_xua(), and scrc_translate_node_9().
|
static |
References osmo_sccp_user::inst, LOGPSCI, osmo_ss7_pointcode_print(), osmo_sccp_addr::pc, sccp_rout_fail_enqueue(), sccp_sclc_rx_from_scrc(), sccp_scoc_rx_from_scrc(), sccp_user_find(), scrc_node_4(), osmo_sccp_instance::ss7, osmo_sccp_addr::ssn, and sua_is_connectionless().
Referenced by scrc_local_out_common(), and scrc_rx_mtp_xfer_ind_xua().
|
static |
References scrc_node_12(), and sua_is_connectionless().
Referenced by sccp_scrc_rx_sclc_msg(), and scrc_translate_node_9().
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(), LOGPSCI, 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_hdr_dump(), 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().
|
static |
References LOGPSCI, OSMO_SCCP_RI_SSN_IP, OSMO_SCCP_RI_SSN_PC, osmo_ss7_pc_is_local(), osmo_sccp_addr::pc, osmo_sccp_addr::ri, sccp_rout_fail_enqueue(), sccp_sclc_rx_from_scrc(), sccp_scoc_rx_from_scrc(), scrc_node_4(), scrc_node_7(), osmo_sccp_instance::ss7, sua_is_connectionless(), and translate().
Referenced by scrc_local_out_common(), and scrc_rx_mtp_xfer_ind_xua().
|
static |
References osmo_ss7_instance::cfg, osmo_mtp_transfer_param::dpc, osmo_ss7_instance::id, LOGPSCI, xua_msg::mtp, MTP_SAP_USER, MTP_SI_SCCP, MTP_SIO, osmo_ss7_instance::network_indicator, osmo_mtp_transfer_param::opc, osmo_mtp_prim::oph, OSMO_MTP_PRIM_TRANSFER, osmo_ss7_pc_is_valid(), osmo_ss7_user_mtp_xfer_req(), osmo_sua_to_sccp(), osmo_ss7_instance::primary_pc, osmo_mtp_transfer_param::sio, osmo_mtp_transfer_param::sls, osmo_sccp_instance::ss7, osmo_mtp_prim::transfer, and osmo_mtp_prim::u.
Referenced by gen_mtp_transfer_req_xua().
|
static |
References xua_msg::hdr, xua_common_hdr::msg_class, and SUA_MSGC_CL.
Referenced by scrc_node_4(), scrc_node_6(), scrc_node_7(), scrc_rx_mtp_xfer_ind_xua(), and scrc_translate_node_9().
|
static |
References xua_msg::hdr, xua_common_hdr::msg_class, xua_common_hdr::msg_type, SUA_CO_CORE, and SUA_MSGC_CO.
Referenced by scrc_rx_mtp_xfer_ind_xua().
|
static |
Referenced by scrc_translate_node_9().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <stdint.h>
Go to the source code of this file.
Macros | |
#define | M2UA_VERSION 1 |
Types found in the M2UA RFC 3331. More... | |
#define | M2UA_SPARE 0 |
#define M2UA_SPARE 0 |
#define M2UA_VERSION 1 |
Types found in the M2UA RFC 3331.
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
3.3.3.1 Error (ERR)
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
MTP2 User Adaption = MAUP messages.
anonymous enum |
anonymous enum |
anonymous enum |
anonymous enum |
Tag Values for M2UA.
anonymous enum |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <errno.h>
#include <stdint.h>
#include <unistd.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/talloc.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sccp_sap.h>
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "ss7_instance.h"
#include "ss7_linkset.h"
#include "ss7_route_table.h"
#include "sccp_internal.h"
Functions | |
struct osmo_ss7_instance * | ss7_instance_alloc (void *ctx, uint32_t id) |
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) |
uint32_t | osmo_ss7_instance_get_primary_pc (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) |
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... | |
bool | osmo_ss7_pc_is_local (const struct osmo_ss7_instance *inst, uint32_t pc) |
int | osmo_ss7_find_free_rctx (struct osmo_ss7_instance *inst) |
uint32_t | ss7_find_free_l_rk_id (struct osmo_ss7_instance *inst) |
struct osmo_ss7_route * | ss7_instance_lookup_route (struct osmo_ss7_instance *inst, const struct osmo_ss7_route_label *rtlabel) |
Find a SS7 route for given destination point code in given SS7. More... | |
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... | |
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_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 (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) |
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) |
static int | strnappendchar (char *str, char c, size_t n) |
static const char * | gen_pc_fmtstr (const struct osmo_ss7_pc_fmt *pc_fmt, unsigned int *num_comp_exp) |
static unsigned int | num_pc_comp_exp (const struct osmo_ss7_pc_fmt *pc_fmt) |
static unsigned int | get_pc_comp_shift (const struct osmo_ss7_pc_fmt *pc_fmt, unsigned int comp_num) |
static uint32_t | pc_comp_shift_and_mask (const struct osmo_ss7_pc_fmt *pc_fmt, unsigned int comp_num, uint32_t pc) |
int | osmo_ss7_pointcode_parse (const struct osmo_ss7_instance *inst, const char *str) |
const char * | osmo_ss7_pointcode_print_buf (char *buf, size_t 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) |
int | osmo_ss7_pointcode_parse_mask_or_len (const struct osmo_ss7_instance *inst, const char *in) |
LLIST_HEAD (sccp_address_book_global) | |
static struct osmo_sccp_addr_entry * | addr_entry_alloc (struct osmo_ss7_instance *inst, const char *name, const struct osmo_sccp_addr *addr) |
int | osmo_sccp_addr_create (struct osmo_ss7_instance *inst, const char *name, const struct osmo_sccp_addr *dest_addr) |
Add an SCCP address entry to the addressbook. More... | |
int | osmo_sccp_addr_update (struct osmo_ss7_instance *inst, const char *name, const struct osmo_sccp_addr *dest_addr) |
Update the value of an SCCP address entry already present in the addressbook. More... | |
struct osmo_sccp_addr_entry * | addr_entry_by_name_local (const char *name, const struct osmo_ss7_instance *inst) |
struct osmo_sccp_addr_entry * | addr_entry_by_name_global (const char *name) |
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... | |
Variables | |
static int32_t | next_rctx = 1 |
static int32_t | next_l_rk_id = 1 |
static const struct osmo_ss7_pc_fmt | default_pc_fmt |
|
static |
struct osmo_sccp_addr_entry * addr_entry_by_name_global | ( | const char * | name | ) |
References osmo_sccp_addr_entry::list_global, osmo_sccp_addr_entry::name, NULL, and sccp_address_book_global.
Referenced by osmo_sccp_addr_by_name(), and osmo_sccp_addr_create().
struct osmo_sccp_addr_entry * addr_entry_by_name_local | ( | const char * | name, |
const struct osmo_ss7_instance * | inst | ||
) |
|
static |
References osmo_ss7_pc_fmt::component_len, osmo_ss7_pc_fmt::delimiter, MAX_PC_STR_LEN, and strnappendchar().
Referenced by osmo_ss7_pointcode_parse(), and osmo_ss7_pointcode_print_buf().
|
static |
References osmo_ss7_pc_fmt::component_len, and osmo_ss7_pc_width().
Referenced by osmo_ss7_pointcode_parse(), and pc_comp_shift_and_mask().
LLIST_HEAD | ( | sccp_address_book_global | ) |
|
static |
References osmo_ss7_pc_fmt::component_len.
Referenced by osmo_ss7_pointcode_parse(), and osmo_ss7_pointcode_print_buf().
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, osmo_sccp_addr_entry::name, and NULL.
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_create | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
const struct osmo_sccp_addr * | dest_addr | ||
) |
Add an SCCP address entry to the addressbook.
[int] | inst cs7 instance where this address belongs | |
[in] | name | of the address to create |
[in] | dest_addr | address value to add to the addressbook. |
Validates that the name is unique among all cs7 instances of the process, and that no such entry already exists.
References addr_entry_alloc(), addr_entry_by_name_global(), osmo_ss7_instance::cfg, osmo_ss7_instance::id, osmo_sccp_addr_entry::inst, LOGSS7, and osmo_sccp_addr_entry::name.
Referenced by DEFUN_ATTR().
int osmo_sccp_addr_update | ( | struct osmo_ss7_instance * | inst, |
const char * | name, | ||
const struct osmo_sccp_addr * | dest_addr | ||
) |
Update the value of an SCCP address entry already present in the addressbook.
[int] | inst cs7 instance where this address belongs | |
[in] | name | of the address to update |
[in] | dest_addr | address value to store in the addressbook. |
References osmo_sccp_addr_entry::addr, addr_entry_by_name_local(), osmo_ss7_instance::cfg, osmo_ss7_instance::id, osmo_sccp_addr_entry::inst, LOGSS7, and osmo_sccp_addr_entry::name.
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, osmo_sccp_addr_entry::name, NULL, and sccp_address_book_global.
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, NULL, 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, NULL, and ss7_initialized.
Referenced by DEFUN(), DEFUN_ATTR(), ipa_asp_fsm_wait_id_resp(), osmo_ss7_as_find_or_create(), show_as(), 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, NULL, 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, NULL, 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, NULL, 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().
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, NULL, 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, NULL, 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, NULL, 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().
struct osmo_sccp_instance * osmo_ss7_ensure_sccp | ( | struct osmo_ss7_instance * | inst | ) |
Allocate an SCCP instance, if not present yet.
References LOGSS7, NULL, 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.
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().
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.
bool osmo_ss7_pc_is_local | ( | const struct osmo_ss7_instance * | inst, |
uint32_t | pc | ||
) |
References osmo_ss7_instance::cfg, osmo_ss7_pc_is_valid(), osmo_ss7_instance::primary_pc, osmo_ss7_instance::secondary_pc, and ss7_initialized.
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), dpc_accessible(), m3ua_hmdc_rx_from_l2(), sccp_sclc_rx_scrc_rout_fail(), scrc_local_out_common(), scrc_translate_node_9(), ss7_vty_node_as_go_parent(), and xua_asp_tx_snm_daud_address_book().
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(), 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 as_snm_pc_available(), as_snm_pc_unavailable(), DEFUN(), format_affected_pcs_c(), handle_rkey_dereg(), handle_rkey_reg(), hmrt_message_for_routing(), m3ua_hmdc_rx_from_l2(), m3ua_rx_xfer(), osmo_sccp_simple_client_on_ss7_id(), sccp_user_bind_pc(), scrc_node_6(), show_one_as(), show_user(), ss7_as_select_asp_loadshare(), ss7_vty_write_one_as(), vty_show_connection(), write_one_cs7(), write_one_rtable(), write_sccp_addressbook(), xua_snm_rx_dupu(), and xua_snm_srm_pc_available_single().
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 DEFUN(), m3ua_rx_xfer(), write_one_rtable(), and xua_asp_tx_snm_daud_address_book().
const char * osmo_ss7_pointcode_print_buf | ( | char * | buf, |
size_t | 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 dpc_accessible(), osmo_ss7_pointcode_print(), osmo_ss7_pointcode_print2(), osmo_ss7_route_name(), osmo_ss7_route_print(), sccp_addr_to_str_buf(), sccp_scoc_rx_inval_opc(), ss7_route_label_to_str(), and tx_daud_pc().
|
static |
References osmo_ss7_pc_fmt::component_len, and get_pc_comp_shift().
Referenced by osmo_ss7_pointcode_print_buf().
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, NULL, 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().
struct osmo_ss7_route * ss7_instance_lookup_route | ( | struct osmo_ss7_instance * | inst, |
const struct osmo_ss7_route_label * | rtlabel | ||
) |
Find a SS7 route for given destination point code in given SS7.
References osmo_ss7_instance::rtable_system, ss7_initialized, and ss7_route_table_lookup_route().
Referenced by DEFUN(), gen_mtp_transfer_req_xua(), hmrt_message_for_routing(), and osmo_ss7_route_lookup().
|
static |
Referenced by gen_pc_fmtstr().
|
static |
Referenced by osmo_ss7_pointcode_parse(), osmo_ss7_pointcode_parse_mask_or_len(), and osmo_ss7_pointcode_print_buf().
|
static |
Referenced by ss7_find_free_l_rk_id().
|
static |
Referenced by osmo_ss7_find_free_rctx().
libosmo-sigtran 2.1.0.160-ddd3
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/core/utils.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/socket.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_asp_peer.h"
#include "ss7_internal.h"
Functions | |
void | ss7_asp_peer_init (struct osmo_ss7_asp_peer *peer) |
int | ss7_asp_peer_snprintf (char *buf, size_t buf_len, struct osmo_ss7_asp_peer *peer) |
int | ss7_asp_peer_set_hosts2 (struct osmo_ss7_asp_peer *peer, void *talloc_ctx, const char *const *hosts, size_t host_cnt, int idx_primary) |
Set (copy) addresses for a given ASP peer. More... | |
int | ss7_asp_peer_set_hosts (struct osmo_ss7_asp_peer *peer, void *talloc_ctx, const char *const *hosts, size_t host_cnt) |
Set (copy) addresses for a given ASP peer. More... | |
static bool | host_is_ip_anyaddr (const char *host, bool is_v6) |
int | ss7_asp_peer_add_host2 (struct osmo_ss7_asp_peer *peer, void *talloc_ctx, const char *host, bool is_primary_addr) |
Append (copy) address to a given ASP peer. More... | |
int | ss7_asp_peer_del_host (struct osmo_ss7_asp_peer *peer, const char *host) |
Remove address from a given ASP peer. More... | |
int | ss7_asp_peer_add_host (struct osmo_ss7_asp_peer *peer, void *talloc_ctx, const char *host) |
Append (copy) address to a given ASP peer. More... | |
bool | ss7_asp_peer_match_host (const struct osmo_ss7_asp_peer *peer, const char *host, bool host_is_v6) |
int | ss7_asp_peer_find_host (const struct osmo_ss7_asp_peer *peer, const char *host) |
Find the exact IP address match and return its index in the array. More... | |
|
inlinestatic |
Referenced by ss7_asp_peer_add_host2(), and ss7_asp_peer_match_host().
int ss7_asp_peer_add_host | ( | struct osmo_ss7_asp_peer * | peer, |
void * | talloc_ctx, | ||
const char * | host | ||
) |
Append (copy) address to a given ASP peer.
Previous addresses are kept.
[in] | peer | Application Server Process peer the address is appended to. |
[in] | talloc_ctx | talloc context used to allocate new address. |
[in] | host | string containing an IP address. |
References ss7_asp_peer_add_host2().
Referenced by osmo_sccp_simple_server_add_clnt(), ss7_asp_set_default_peer_hosts(), and ss7_xua_server_add_local_host().
int ss7_asp_peer_add_host2 | ( | struct osmo_ss7_asp_peer * | peer, |
void * | talloc_ctx, | ||
const char * | host, | ||
bool | is_primary_addr | ||
) |
Append (copy) address to a given ASP peer.
Previous addresses are kept.
[in] | peer | Application Server Process peer the address is appended to. |
[in] | talloc_ctx | talloc context used to allocate new address. |
[in] | host | string containing an IP address. |
[in] | is_primary_addr | whether this IP address is to be added as SCTP Primary Address |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, host_is_ip_anyaddr(), and osmo_ss7_asp_peer::idx_primary.
Referenced by DEFUN_ATTR(), and ss7_asp_peer_add_host().
int ss7_asp_peer_del_host | ( | struct osmo_ss7_asp_peer * | peer, |
const char * | host | ||
) |
Remove address from a given ASP peer.
[in] | peer | Application Server Process peer the address is removed from. |
[in] | host | string containing an IP address. |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, and NULL.
Referenced by DEFUN_ATTR(), and ss7_xua_server_del_local_host().
int ss7_asp_peer_find_host | ( | const struct osmo_ss7_asp_peer * | peer, |
const char * | host | ||
) |
Find the exact IP address match and return its index in the array.
[in] | peer | Application Server Process peer where the address is looked up. |
[in] | host | string containing an IP address. |
References osmo_ss7_asp_peer::host, and osmo_ss7_asp_peer::host_cnt.
Referenced by DEFUN_ATTR().
void ss7_asp_peer_init | ( | struct osmo_ss7_asp_peer * | peer | ) |
References osmo_ss7_asp_peer::idx_primary.
Referenced by ss7_asp_alloc().
bool ss7_asp_peer_match_host | ( | const struct osmo_ss7_asp_peer * | peer, |
const char * | host, | ||
bool | host_is_v6 | ||
) |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, and host_is_ip_anyaddr().
Referenced by ss7_asp_find_by_socket_addr().
int ss7_asp_peer_set_hosts | ( | struct osmo_ss7_asp_peer * | peer, |
void * | talloc_ctx, | ||
const char *const * | hosts, | ||
size_t | host_cnt | ||
) |
Set (copy) addresses for a given ASP peer.
Previous addresses are freed.
[in] | peer | Application Server Process peer whose addresses are to be set. |
[in] | talloc_ctx | talloc context used to allocate new addresses. |
[in] | hosts | Array of strings containing IP addresses. |
[in] | host_cnt | Number of strings in hosts |
References ss7_asp_peer_set_hosts2().
Referenced by osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), ss7_xua_server_set_local_hosts(), and xua_accept_cb().
int ss7_asp_peer_set_hosts2 | ( | struct osmo_ss7_asp_peer * | peer, |
void * | talloc_ctx, | ||
const char *const * | hosts, | ||
size_t | host_cnt, | ||
int | idx_primary | ||
) |
Set (copy) addresses for a given ASP peer.
Previous addresses are freed.
[in] | peer | Application Server Process peer whose addresses are to be set. |
[in] | talloc_ctx | talloc context used to allocate new addresses. |
[in] | hosts | Array of strings containing IP addresses. |
[in] | host_cnt | Number of strings in hosts |
[in] | idx_primary | Index in "hosts" array marking the SCTP Primary Address, -1 if no explicit Primary Address set |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, and NULL.
Referenced by ss7_asp_peer_set_hosts().
int ss7_asp_peer_snprintf | ( | char * | buf, |
size_t | buf_len, | ||
struct osmo_ss7_asp_peer * | peer | ||
) |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, len, and osmo_ss7_asp_peer::port.
Referenced by osmo_ss7_asp_restart(), show_one_asp(), ss7_xua_server_bind(), and vty_dump_xua_server().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <osmo_ss7.h>
Data Fields | |
uint32_t | context |
uint32_t | l_rk_id |
uint32_t | pc |
uint8_t | si |
uint32_t | ssn |
uint32_t osmo_ss7_routing_key::context |
Referenced by _rout_key(), _ss7_asp_get_all_rctx(), as_tx_duna_during_asp_act(), handle_reg_conf(), handle_rkey_dereg_resp(), handle_rkey_reg(), handle_rkey_reg_resp(), lm_rkm_reg(), m3ua_tx_xua_as(), osmo_ss7_as_find_by_rctx(), show_one_as(), ss7_vty_write_one_as(), sua_tx_xua_as(), and xua_rkm_send_reg_req().
uint32_t osmo_ss7_routing_key::l_rk_id |
Referenced by handle_rkey_reg_resp(), lm_rkm_reg(), osmo_ss7_as_find_by_l_rk_id(), ss7_as_alloc(), and xua_rkm_send_reg_req().
uint32_t osmo_ss7_routing_key::pc |
uint8_t osmo_ss7_routing_key::si |
Referenced by _rout_key(), and ss7_vty_write_one_as().
uint32_t osmo_ss7_routing_key::ssn |
Referenced by _rout_key(), and ss7_vty_write_one_as().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
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 as_snm_pc_available(), as_snm_pc_unavailable(), 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(), xua_asp_tx_snm_daud_address_book(), and xua_msg_add_sccp_addr().
uint32_t osmo_sccp_addr::presence |
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), 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(), scrc_node_2(), sua_addr_parse_part(), write_sccp_addressbook(), xua_asp_tx_snm_daud_address_book(), 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_node_2(), 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.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <inttypes.h>
#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>
Go to the source code of this file.
Data Structures | |
struct | osmo_sccp_addr_entry |
Macros | |
#define | SCCP_STR "Signalling Connection Control Part\n" |
Functions | |
struct osmo_sccp_addr_entry * | addr_entry_by_name_local (const char *name, const struct osmo_ss7_instance *inst) |
struct osmo_sccp_addr_entry * | addr_entry_by_name_global (const char *name) |
struct sccp_connection * | sccp_find_conn_by_id (const struct osmo_sccp_instance *inst, uint32_t id) |
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... | |
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... | |
void | sccp_rout_fail_enqueue (struct osmo_sccp_instance *inst, const struct xua_msg *xua, uint32_t cause, bool scoc) |
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 | 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 | |
struct llist_head | sccp_address_book_global |
int | DSCCP |
#define SCCP_STR "Signalling Connection Control Part\n" |
struct osmo_sccp_addr_entry * addr_entry_by_name_global | ( | const char * | name | ) |
References osmo_sccp_addr_entry::list_global, osmo_sccp_addr_entry::name, NULL, and sccp_address_book_global.
Referenced by osmo_sccp_addr_by_name(), and osmo_sccp_addr_create().
struct osmo_sccp_addr_entry * addr_entry_by_name_local | ( | const char * | name, |
const struct osmo_ss7_instance * | inst | ||
) |
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().
struct sccp_connection * sccp_find_conn_by_id | ( | const struct osmo_sccp_instance * | inst, |
uint32_t | id | ||
) |
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 NULL, 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().
void sccp_rout_fail_enqueue | ( | struct osmo_sccp_instance * | inst, |
const struct xua_msg * | xua, | ||
uint32_t | cause, | ||
bool | scoc | ||
) |
References sccp_pending_rout_fail::cause, sccp_pending_rout_fail::list, LOGPSCI, osmo_sccp_instance::queue, osmo_sccp_instance::rout_fail_pending, sccp_pending_rout_fail::scoc, osmo_sccp_instance::timer, sccp_pending_rout_fail::xua, xua_dialect_sua, xua_hdr_dump(), and xua_msg_copy().
Referenced by gen_mtp_transfer_req_xua(), scrc_node_2(), scrc_node_4(), scrc_node_6(), and scrc_translate_node_9().
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 _LOGPSCI, 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, LOGPSCI, 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, xua_dialect_sua, xua_hdr_dump(), and xua_msg_free().
Referenced by rout_fail_pending_cb().
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 LOGPSCU, 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_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(), sccp_connection::fi, xua_msg::hdr, sccp_connection::incoming, osmo_sccp_user::inst, LOGPSCC, LOGPSCI, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_connection::remote_pc, sccp_connection::remote_ref, sccp_find_conn_by_id(), 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 sccp_connection::conn_id, sccp_connection::fi, gen_coref_without_conn(), get_cref_cause_for_ret(), sccp_connection::inst, LOGPSCI, sccp_find_conn_by_id(), sccp_scrc_rx_scoc_conn_msg(), SCOC_E_RCOC_ROUT_FAIL_IND, SUA_IEI_SRC_REF, xua_dialect_sua, xua_hdr_dump(), xua_msg_free(), and xua_msg_get_u32().
Referenced by rout_fail_pending_cb().
int sccp_scrc_rx_sclc_msg | ( | struct osmo_sccp_instance * | inst, |
struct xua_msg * | xua | ||
) |
References xua_msg::hdr, LOGPSCI, 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, xua_hdr_dump(), 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, LOGPSCI, 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, xua_hdr_dump(), and xua_msg_dump().
Referenced by sccp_conn_xua_gen_encode_and_send(), sccp_conn_xua_gen_relre_and_send(), sccp_scoc_rx_scrc_rout_fail(), tx_coerr_from_xua(), tx_relco_from_xua(), and tx_rlsd_from_xua_twoway().
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(), LOGPSCI, 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_hdr_dump(), 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 addr_entry_alloc(), addr_entry_by_name_global(), and osmo_sccp_name_by_addr().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
Go to the source code of this file.
Functions | |
const char * | osmo_sua_sccp_cause_name (uint32_t sccp_cause, char *out_buf, size_t out_buf_len) |
#define SUA_ASPSM_BEAT 3 |
#define SUA_ASPSM_BEAT_ACK 6 |
#define SUA_ASPSM_DOWN 2 |
#define SUA_ASPSM_DOWN_ACK 5 |
#define SUA_ASPSM_UP 1 |
#define SUA_ASPSM_UP_ACK 4 |
#define SUA_ASPTM_ACTIVE 1 |
#define SUA_ASPTM_ACTIVE_ACK 3 |
#define SUA_ASPTM_INACTIVE 2 |
#define SUA_ASPTM_INACTIVE_ACK 4 |
#define SUA_CAUSE_T_ERROR 0x0500 |
#define SUA_CAUSE_T_MASK 0xff00 |
#define SUA_CAUSE_T_REFUSAL 0x0200 |
#define SUA_CAUSE_T_RELEASE 0x0300 |
#define SUA_CAUSE_T_RESET 0x0400 |
#define SUA_CAUSE_T_RETURN 0x0100 |
#define SUA_CL_CLDR 2 |
#define SUA_CL_CLDT 1 |
#define SUA_CO_COAK 2 |
#define SUA_CO_CODA 9 |
#define SUA_CO_CODT 8 |
#define SUA_CO_COERR 10 |
#define SUA_CO_COIT 11 /* Connection Oriented Inactiviy Test */ |
#define SUA_CO_CORE 1 |
#define SUA_CO_COREF 3 |
#define SUA_CO_RELCO 5 |
#define SUA_CO_RELRE 4 |
#define SUA_CO_RESCO 6 |
#define SUA_CO_RESRE 7 |
#define SUA_ERR_ASP_ID_REQD M3UA_ERR_ASP_ID_REQD |
#define SUA_ERR_DEST_STATUS_UNKN M3UA_ERR_DEST_STATUS_UNKN |
#define SUA_ERR_INVAL_ASP_ID M3UA_ERR_INVAL_ASP_ID |
#define SUA_ERR_INVAL_LOADSH_LEVEL 0x1c |
#define SUA_ERR_INVAL_NET_APPEAR M3UA_ERR_INVAL_NET_APPEAR |
#define SUA_ERR_INVAL_PARAM_VAL M3UA_ERR_INVAL_PARAM_VAL |
#define SUA_ERR_INVAL_ROUT_CTX M3UA_ERR_INVAL_ROUT_CTX |
#define SUA_ERR_INVAL_STREAM_ID M3UA_ERR_INVAL_STREAM_ID |
#define SUA_ERR_INVALID_VERSION M3UA_ERR_INVALID_VERSION |
#define SUA_ERR_MISSING_PARAM M3UA_ERR_MISSING_PARAM |
#define SUA_ERR_NO_CONFGD_AS_FOR_ASP M3UA_ERR_NO_CONFGD_AS_FOR_ASP |
#define SUA_ERR_PARAM_FIELD_ERR M3UA_ERR_PARAM_FIELD_ERR |
#define SUA_ERR_PROTOCOL_ERR M3UA_ERR_PROTOCOL_ERR |
#define SUA_ERR_REFUSED_MGMT_BLOCKING M3UA_ERR_REFUSED_MGMT_BLOCKING |
#define SUA_ERR_SUBSYS_STATUS_UNKN 0x1b |
#define SUA_ERR_UNEXP_PARAM M3UA_ERR_UNEXP_PARAM |
#define SUA_ERR_UNEXPECTED_MSG M3UA_ERR_UNEXPECTED_MSG |
#define SUA_ERR_UNSUPP_MSG_CLASS M3UA_ERR_UNSUPP_MSG_CLASS |
#define SUA_ERR_UNSUPP_MSG_TYPE M3UA_ERR_UNSUPP_MSG_TYPE |
#define SUA_ERR_UNSUPP_TRAF_MOD_TYP M3UA_ERR_UNSUPP_TRAF_MOD_TYP |
#define SUA_IEI_AFFECTED_PC M3UA_IEI_AFFECTED_PC |
#define SUA_IEI_ASP_CAPA 0x0109 |
#define SUA_IEI_ASP_ID M3UA_IEI_ASP_ID |
#define SUA_IEI_CAUSE 0x0106 |
#define SUA_IEI_CONG_LEVEL 0x0118 |
#define SUA_IEI_CORR_ID M3UA_IEI_CORR_ID |
#define SUA_IEI_CREDIT 0x010A |
#define SUA_IEI_DATA 0x010B |
#define SUA_IEI_DEREG_RESULT 0x0015 |
#define SUA_IEI_DEST_ADDR 0x0103 |
#define SUA_IEI_DEST_REF 0x0105 |
#define SUA_IEI_DIAG_INFO M3UA_IEI_DIAG_INFO |
#define SUA_IEI_DRN 0x010F |
#define SUA_IEI_ERR_CODE M3UA_IEI_ERR_CODE |
#define SUA_IEI_GT 0x8001 |
#define SUA_IEI_HEARTBT_DATA M3UA_IEI_HEARDBT_DATA |
#define SUA_IEI_HOST 0x8005 |
#define SUA_IEI_IMPORTANCE 0x0113 |
#define SUA_IEI_INFO_STRING M3UA_IEI_INFO_STRING |
#define SUA_IEI_IPv4 0x8004 |
#define SUA_IEI_IPv6 0x8006 |
#define SUA_IEI_MSG_PRIO 0x0114 |
#define SUA_IEI_NET_APPEARANCE 0x010D |
#define SUA_IEI_PC 0x8002 |
#define SUA_IEI_PROTO_CLASS 0x0115 |
#define SUA_IEI_REG_RESULT 0x0014 |
#define SUA_IEI_ROUTE_CTX M3UA_IEI_ROUTE_CTX |
#define SUA_IEI_ROUTING_KEY 0x010E |
#define SUA_IEI_RX_SEQ_NR 0x0108 |
#define SUA_IEI_S7_HOP_CTR 0x0101 |
#define SUA_IEI_SEGMENTATION 0x0117 |
#define SUA_IEI_SEQ_CTRL 0x0116 |
#define SUA_IEI_SEQ_NR 0x0107 |
#define SUA_IEI_SMI 0x0112 |
#define SUA_IEI_SRC_ADDR 0x0102 |
#define SUA_IEI_SRC_REF 0x0104 |
#define SUA_IEI_SSN 0x8003 |
#define SUA_IEI_STATUS M3UA_IEI_STATUS |
#define SUA_IEI_TID 0x0110 |
#define SUA_IEI_TRAF_MODE_TYP M3UA_IEI_TRAF_MODE_TYP |
#define SUA_IEI_USER_CAUSE 0x010C |
#define SUA_MGMT_ERR 0 |
#define SUA_MGMT_NTFY 1 |
#define SUA_MSGC_ASPSM 3 |
#define SUA_MSGC_ASPTM 4 |
#define SUA_MSGC_CL 7 |
#define SUA_MSGC_CO 8 |
#define SUA_MSGC_MGMT 0 |
#define SUA_MSGC_RKM 9 |
#define SUA_MSGC_SNM 2 |
#define SUA_PORT 14001 |
#define SUA_PPID 4 |
#define SUA_RI_GT 1 |
#define SUA_RI_HOST 3 |
#define SUA_RI_SSN_IP 4 |
#define SUA_RI_SSN_PC 2 |
#define SUA_RKM_DEREG_REQ 3 |
#define SUA_RKM_DEREG_RSP 4 |
#define SUA_RKM_REG_REQ 1 |
#define SUA_RKM_REG_RSP 2 |
#define SUA_SNM_DAUD 3 |
#define SUA_SNM_DAVA 2 |
#define SUA_SNM_DRST 6 |
#define SUA_SNM_DUNA 1 |
#define SUA_SNM_DUPU 5 |
#define SUA_SNM_SCON 4 |
#define SUA_VERSION 1 |
const char * osmo_sua_sccp_cause_name | ( | uint32_t | sccp_cause, |
char * | out_buf, | ||
size_t | out_buf_len | ||
) |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <sccp_scmg.h>
Data Fields | |
uint8_t | msg_type |
uint8_t | affected_ssn |
uint16_t | affected_pc |
uint8_t | smi |
uint8_t | ssc_congestion_lvl [0] |
uint16_t sccp_scmg_msg::affected_pc |
Referenced by sccp_scmg_tx(), scmg_prim_cb(), scmg_rx_ssa(), scmg_rx_ssp(), and scmg_rx_sst().
uint8_t sccp_scmg_msg::affected_ssn |
Referenced by sccp_scmg_tx(), scmg_rx_ssa(), scmg_rx_ssp(), and scmg_rx_sst().
uint8_t sccp_scmg_msg::msg_type |
Referenced by sccp_scmg_tx(), scmg_prim_cb(), and scmg_rx().
uint8_t sccp_scmg_msg::smi |
Referenced by sccp_scmg_tx(), scmg_rx_ssa(), and scmg_rx_ssp().
uint8_t sccp_scmg_msg::ssc_congestion_lvl[0] |
Referenced by sccp_scmg_tx().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <osmocom/core/utils.h>
Go to the source code of this file.
Enumerations | |
enum | mtp_si_ni00 { MTP_SI_SNM = 0 , MTP_SI_STM = 1 , MTP_SI_SCCP = 3 , MTP_SI_TUP = 4 , MTP_SI_ISUP = 5 , MTP_SI_DUP = 6 , MTP_SI_DUP_FAC = 7 , MTP_SI_TESTING = 8 , MTP_SI_B_ISUP = 9 , MTP_SI_SAT_ISUP = 10 , MTP_SI_SPEECH = 11 , MTP_SI_AAL2_SIG = 12 , MTP_SI_BICC = 13 , MTP_SI_GCP = 14 } |
enum | mtp_unavail_cause { MTP_UNAVAIL_C_UNKNOWN = 0x0 , MTP_UNAVAIL_C_UNEQUIP_REM_USER = 0x1 , MTP_UNAVAIL_C_INACC_REM_USER = 0x2 } |
Functions | |
static const char * | mtp_unavail_cause_str (enum mtp_unavail_cause cs) |
Variables | |
const struct value_string | mtp_si_vals [] |
const struct value_string | mtp_unavail_cause_vals [] |
enum mtp_si_ni00 |
enum mtp_unavail_cause |
|
inlinestatic |
References mtp_unavail_cause_vals.
|
extern |
Referenced by _rout_key(), ss7_vty_write_one_as(), and xua_snm_rx_dupu().
|
extern |
Referenced by mtp_unavail_cause_str().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | m3ua_data_hdr |
Functions | |
struct m3ua_data_hdr | __attribute__ ((packed)) |
Variables | |
uint32_t | opc |
uint32_t | dpc |
uint8_t | si |
uint8_t | ni |
uint8_t | mp |
uint8_t | sls |
enum m3ua_rkm_reg_status | __attribute__ |
#define M3UA_ASPSM_BEAT 3 |
#define M3UA_ASPSM_BEAT_ACK 6 |
#define M3UA_ASPSM_DOWN 2 |
#define M3UA_ASPSM_DOWN_ACK 5 |
#define M3UA_ASPSM_UP 1 |
#define M3UA_ASPSM_UP_ACK 4 |
#define M3UA_ASPTM_ACTIVE 1 |
#define M3UA_ASPTM_ACTIVE_ACK 3 |
#define M3UA_ASPTM_INACTIVE 2 |
#define M3UA_ASPTM_INACTIVE_ACK 4 |
#define M3UA_IEI_AFFECTED_PC 0x0012 |
#define M3UA_IEI_ASP_ID 0x0011 |
#define M3UA_IEI_CONC_DEST 0x0206 |
#define M3UA_IEI_CONG_IND 0x0205 |
#define M3UA_IEI_CORR_ID 0x0013 |
#define M3UA_IEI_DEREG_RESULT 0x0209 |
#define M3UA_IEI_DEREG_STATUS 0x0213 |
#define M3UA_IEI_DEST_PC 0x020b |
#define M3UA_IEI_DIAG_INFO 0x0007 |
#define M3UA_IEI_ERR_CODE 0x000c |
#define M3UA_IEI_HEARDBT_DATA 0x0009 |
#define M3UA_IEI_INFO_STRING 0x0004 |
#define M3UA_IEI_LOC_RKEY_ID 0x020a |
#define M3UA_IEI_NET_APPEAR 0x0200 |
#define M3UA_IEI_ORIG_PC 0x020e |
#define M3UA_IEI_PROT_DATA 0x0210 |
#define M3UA_IEI_REG_RESULT 0x0208 |
#define M3UA_IEI_REG_STATUS 0x0212 |
#define M3UA_IEI_ROUT_KEY 0x0207 |
#define M3UA_IEI_ROUTE_CTX 0x0006 |
#define M3UA_IEI_STATUS 0x000d |
#define M3UA_IEI_SVC_IND 0x020c |
#define M3UA_IEI_TRAF_MODE_TYP 0x000b |
#define M3UA_IEI_USER_CAUSE 0x0204 |
#define M3UA_MGMT_ERR 0 |
#define M3UA_MGMT_NTFY 1 |
#define M3UA_MSGC_ASPSM 3 |
#define M3UA_MSGC_ASPTM 4 |
#define M3UA_MSGC_MGMT 0 |
#define M3UA_MSGC_RKM 9 |
#define M3UA_MSGC_SNM 2 |
#define M3UA_MSGC_XFER 1 |
#define M3UA_NOTIFY | ( | type, | |
info | |||
) | ((info) << 16 | (type)) |
#define M3UA_NOTIFY_I_AS_ACT 3 |
#define M3UA_NOTIFY_I_AS_INACT 2 |
#define M3UA_NOTIFY_I_AS_PEND 4 |
#define M3UA_NOTIFY_I_OT_ALT_ASP_ACT 2 |
#define M3UA_NOTIFY_I_OT_ASP_FAILURE 3 |
#define M3UA_NOTIFY_I_OT_INS_RES 1 |
#define M3UA_NOTIFY_I_RESERVED 1 |
#define M3UA_NOTIFY_T_OTHER 2 |
#define M3UA_NOTIFY_T_STATCHG 1 |
#define M3UA_PORT 2905 |
#define M3UA_PPID 3 |
#define M3UA_RKM_DEREG_REQ 3 |
#define M3UA_RKM_DEREG_RSP 4 |
#define M3UA_RKM_REG_REQ 1 |
#define M3UA_RKM_REG_RSP 2 |
#define M3UA_SNM_DAUD 3 |
#define M3UA_SNM_DAVA 2 |
#define M3UA_SNM_DRST 6 |
#define M3UA_SNM_DUNA 1 |
#define M3UA_SNM_DUPU 5 |
#define M3UA_SNM_SCON 4 |
#define M3UA_VERSION 1 |
#define M3UA_XFER_DATA 1 |
enum m3ua_error_code |
enum m3ua_rkm_dereg_satus |
enum m3ua_rkm_reg_status |
enum m3ua_traffic_mode |
struct m3ua_data_hdr __attribute__ | ( | (packed) | ) |
struct xua_parameter_hdr __attribute__ |
uint32_t dpc |
Referenced by _rout_key(), DEFUN_ATTR(), dpc_accessible(), handle_rkey_reg(), hmrt_message_for_routing(), ipa_rx_msg_sccp(), m3ua_encode_dupu(), m3ua_hmdc_rx_from_l2(), m3ua_tx_dupu(), osmo_ss7_route_lookup(), patch_sccp_with_pc(), sccp_scmg_rx_mtp_pause(), sccp_scmg_rx_mtp_resume(), sccp_scmg_rx_mtp_status(), sccp_scmg_rx_ssn_allowed(), sccp_scmg_rx_ssn_prohibited(), ss7_route_table_dpc_is_accessible(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_combined_linkset(), ss7_route_table_find_combined_linkset_by_dpc(), ss7_route_table_find_combined_linkset_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_update_route_status_by_as(), sua_encode_dupu(), sua_tx_dupu(), xua_snm_upu(), and xua_tx_upu().
uint8_t mp |
uint8_t ni |
Referenced by DEFUN_ATTR().
uint32_t opc |
Referenced by ipa_rx_msg_sccp(), osmo_ss7_instance_calc_itu_as_ext_sls(), and patch_sccp_with_pc().
uint8_t si |
Referenced by _rout_key().
uint8_t sls |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
Go to the source code of this file.
Data Structures | |
struct | xua_msg |
struct | xua_msg_part |
struct | xua_msg_class |
struct | xua_dialect |
struct | xua_msg_event_map |
Macros | |
#define | XUA_HDR(class, type) ((struct xua_common_hdr) { .spare = 0, .msg_class = (class), .msg_type = (type) }) |
Functions | |
void | osmo_xua_msg_tall_ctx_init (void *ctx) |
struct xua_msg * | xua_msg_alloc (void) |
void | xua_msg_free (struct xua_msg *msg) |
struct xua_msg * | xua_msg_copy (const struct xua_msg *xua_in) |
int | xua_msg_add_data (struct xua_msg *msg, uint16_t tag, uint16_t len, const uint8_t *dat) |
int | xua_msg_add_u32_data (struct xua_msg *msg, uint16_t tag, uint16_t len, const uint8_t *dat) |
struct xua_msg_part * | xua_msg_find_tag (const struct xua_msg *msg, uint16_t tag) |
int | xua_msg_free_tag (struct xua_msg *xua, uint16_t tag) |
int | xua_msg_copy_part (struct xua_msg *xua_out, uint16_t tag_out, const struct xua_msg *xua_in, uint16_t tag_in) |
struct xua_msg * | xua_from_msg (const int version, uint16_t len, uint8_t *data) |
struct msgb * | xua_to_msg (const int version, struct xua_msg *msg) |
struct xua_msg * | xua_from_nested (struct xua_msg_part *outer) |
int | msgb_t16l16vp_put (struct msgb *msg, uint16_t tag, uint16_t len, const uint8_t *data) |
int | msgb_t16l16vp_put_u32 (struct msgb *msg, uint16_t tag, uint32_t val) |
int | xua_msg_add_u32 (struct xua_msg *xua, uint16_t iei, uint32_t val) |
uint32_t | xua_msg_part_get_u32 (const struct xua_msg_part *part) |
uint32_t | xua_msg_get_u32 (const struct xua_msg *xua, uint16_t iei) |
const uint32_t * | xua_msg_get_u32p (const struct xua_msg *xua, uint16_t iei, uint32_t *out) |
const char * | xua_msg_part_get_str (const struct xua_msg_part *part) |
const char * | xua_msg_get_str (const struct xua_msg *xua, uint16_t iei) |
int | xua_msg_get_len (const struct xua_msg *xua, uint16_t iei) |
void | xua_part_add_gt (struct msgb *msg, const struct osmo_sccp_gt *gt) |
int | xua_msg_add_sccp_addr (struct xua_msg *xua, uint16_t iei, const struct osmo_sccp_addr *addr) |
const char * | xua_class_msg_name (const struct xua_msg_class *xmc, uint16_t msg_type) |
const char * | xua_class_iei_name (const struct xua_msg_class *xmc, uint16_t iei) |
char * | xua_hdr_dump (const struct xua_msg *xua, const struct xua_dialect *dialect) |
char * | xua_msg_dump (const struct xua_msg *xua, const struct xua_dialect *dialect) |
int | xua_dialect_check_all_mand_ies (const struct xua_dialect *dialect, struct xua_msg *xua) |
int | xua_msg_event_map (const struct xua_msg *xua, const struct xua_msg_event_map *maps, unsigned int num_maps) |
Map from a xua_msg (class+type) to an event. More... | |
Variables | |
const struct xua_dialect | xua_dialect_sua |
const struct xua_dialect | xua_dialect_m3ua |
#define XUA_HDR | ( | class, | |
type | |||
) | ((struct xua_common_hdr) { .spare = 0, .msg_class = (class), .msg_type = (type) }) |
int msgb_t16l16vp_put | ( | struct msgb * | msg, |
uint16_t | tag, | ||
uint16_t | len, | ||
const uint8_t * | data | ||
) |
References data, len, and tag.
Referenced by msgb_t16l16vp_put_u32(), and xua_msg_add_sccp_addr().
int msgb_t16l16vp_put_u32 | ( | struct msgb * | msg, |
uint16_t | tag, | ||
uint32_t | val | ||
) |
References msgb_t16l16vp_put(), and tag.
Referenced by msgb_append_dereg_res(), msgb_append_reg_res(), xua_msg_add_sccp_addr(), xua_rkm_send_dereg_req(), and xua_rkm_send_reg_req().
void osmo_xua_msg_tall_ctx_init | ( | void * | ctx | ) |
const char * xua_class_iei_name | ( | const struct xua_msg_class * | xmc, |
uint16_t | iei | ||
) |
References xua_msg_class::iei_names.
Referenced by xua_dialect_check_all_mand_ies(), and xua_msg_dump().
const char * xua_class_msg_name | ( | const struct xua_msg_class * | xmc, |
uint16_t | msg_type | ||
) |
References msg_type, and xua_msg_class::msgt_names.
Referenced by sccp_conn_opt_data_send_cache(), xua_dialect_check_all_mand_ies(), and xua_hdr_dump().
int xua_dialect_check_all_mand_ies | ( | const struct xua_dialect * | dialect, |
struct xua_msg * | xua | ||
) |
References xua_dialect::class, xua_msg::hdr, xua_dialect::log_subsys, xua_msg_class::mand_ies, msg_class, xua_common_hdr::msg_class, msg_type, xua_common_hdr::msg_type, xua_msg_class::name, xua_dialect::name, xua_class_iei_name(), xua_class_msg_name(), and xua_msg_find_tag().
Referenced by m3ua_rx_msg(), and sua_rx_msg().
struct xua_msg * xua_from_msg | ( | const int | version, |
uint16_t | len, | ||
uint8_t * | data | ||
) |
References data, xua_msg::hdr, len, xua_common_hdr::msg_length, NULL, version, xua_common_hdr::version, xua_from_msg_common(), xua_msg_alloc(), and xua_msg_free().
Referenced by m3ua_gen_error_msg(), m3ua_rx_msg(), and sua_rx_msg().
struct xua_msg * xua_from_nested | ( | struct xua_msg_part * | outer | ) |
References xua_msg_part::dat, xua_msg_part::len, NULL, xua_from_msg_common(), xua_msg_alloc(), and xua_msg_free().
Referenced by m3ua_rx_rkm_dereg_rsp(), m3ua_rx_rkm_reg_req(), and m3ua_rx_rkm_reg_rsp().
char * xua_hdr_dump | ( | const struct xua_msg * | xua, |
const struct xua_dialect * | dialect | ||
) |
References xua_dialect::class, xua_msg::hdr, xua_common_hdr::msg_class, xua_common_hdr::msg_type, xua_msg_class::name, NULL, and xua_class_msg_name().
Referenced by ensure_opc_in_calling_ssn(), m3ua_rx_msg(), m3ua_rx_xfer(), osmo_sua_to_sccp(), sccp_conn_scu_gen_encode_and_send(), sccp_find_user(), sccp_rout_fail_enqueue(), 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_scrc_rout_fail(), sccp_scoc_rx_unass_local_ref(), sccp_scrc_rx_sclc_msg(), sccp_scrc_rx_scoc_conn_msg(), sclc_rx_cldr(), sclc_rx_cldt(), scoc_fsm_idle(), scrc_node_2(), scrc_rx_mtp_xfer_ind_xua(), sua_rx_msg(), and xua_msg_dump().
int xua_msg_add_data | ( | struct xua_msg * | msg, |
uint16_t | tag, | ||
uint16_t | len, | ||
const uint8_t * | dat | ||
) |
References xua_msg_part::dat, xua_msg_part::entry, xua_msg::headers, xua_msg_part::len, len, xua_msg_part::tag, and tag.
Referenced by m3ua_encode_duna(), m3ua_encode_dupu(), m3ua_encode_notify(), m3ua_gen_error_msg(), m3ua_tx_snm_congestion(), sccp_data_to_sua_ptr(), sccp_longdata_to_sua_ptr(), sua_encode_duna(), sua_encode_dupu(), sua_gen_error_msg(), sua_tx_snm_congestion(), xua_from_msg_common(), xua_gen_msg_cl(), xua_gen_msg_co(), xua_gen_relre(), xua_msg_add_asp_rctx(), xua_msg_add_sccp_addr(), xua_msg_add_sccp_opt(), xua_msg_add_u32(), xua_msg_copy(), and xua_msg_copy_part().
int xua_msg_add_sccp_addr | ( | struct xua_msg * | xua, |
uint16_t | iei, | ||
const struct osmo_sccp_addr * | addr | ||
) |
References osmo_sccp_addr::gt, osmo_sccp_addr::ip, msgb_t16l16vp_put(), msgb_t16l16vp_put_u32(), 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::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, osmo_sccp_addr::ssn, SUA_IEI_IPv4, SUA_IEI_IPv6, SUA_IEI_PC, SUA_IEI_SSN, SUA_RI_GT, SUA_RI_SSN_IP, SUA_RI_SSN_PC, osmo_sccp_addr::v4, osmo_sccp_addr::v6, xua_msg_add_data(), and xua_part_add_gt().
Referenced by ensure_opc_in_calling_ssn(), gen_ret_msg(), patch_sccp_with_pc(), sccp_addr_to_sua(), xua_gen_msg_cl(), and xua_gen_msg_co().
int xua_msg_add_u32 | ( | struct xua_msg * | xua, |
uint16_t | iei, | ||
uint32_t | val | ||
) |
References xua_msg_add_data().
Referenced by gen_coerr(), gen_coref_without_conn(), gen_relco(), gen_ret_msg(), gen_rlsd(), m3ua_encode_dupu(), m3ua_encode_notify(), m3ua_gen_error(), m3ua_tx_snm_congestion(), m3ua_tx_xua_as(), peer_send(), peer_send_error(), 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(), scoc_fsm_active(), sua_encode_duna(), sua_encode_dupu(), sua_gen_error(), sua_tx_snm_congestion(), sua_tx_xua_as(), xua_gen_msg_cl(), xua_gen_msg_co(), xua_gen_relre(), and xua_msg_add_sccp_opt().
int xua_msg_add_u32_data | ( | struct xua_msg * | msg, |
uint16_t | tag, | ||
uint16_t | len, | ||
const uint8_t * | dat | ||
) |
References xua_msg_part::dat, xua_msg_part::entry, xua_msg::headers, xua_msg_part::len, len, xua_msg_part::tag, and tag.
Referenced by m3ua_encode_notify().
struct xua_msg * xua_msg_alloc | ( | void | ) |
References xua_msg::headers, NULL, and tall_xua.
Referenced by gen_coerr(), gen_coref_without_conn(), gen_relco(), gen_ret_msg(), gen_rlsd(), m3ua_encode_duna(), m3ua_encode_dupu(), m3ua_encode_notify(), m3ua_gen_error(), m3ua_tx_snm_congestion(), m3ua_xfer_from_data(), osmo_sccp_to_xua(), peer_send(), peer_send_error(), scoc_fsm_active(), sua_encode_duna(), sua_encode_dupu(), sua_gen_error(), sua_tx_snm_congestion(), xua_from_msg(), xua_from_nested(), xua_gen_msg_cl(), xua_gen_msg_co(), xua_gen_relre(), and xua_msg_copy().
References xua_msg_part::dat, xua_msg::entry, xua_msg::hdr, xua_msg::headers, xua_msg_part::len, xua_msg::mtp, xua_msg_part::tag, xua_msg_add_data(), and xua_msg_alloc().
Referenced by sccp_rout_fail_enqueue().
int xua_msg_copy_part | ( | struct xua_msg * | xua_out, |
uint16_t | tag_out, | ||
const struct xua_msg * | xua_in, | ||
uint16_t | tag_in | ||
) |
References xua_msg_part::dat, xua_msg_part::len, xua_msg_add_data(), and xua_msg_find_tag().
Referenced by gen_coref_without_conn(), gen_ret_msg(), and peer_send().
char * xua_msg_dump | ( | const struct xua_msg * | xua, |
const struct xua_dialect * | dialect | ||
) |
References xua_dialect::class, xua_msg_part::dat, xua_msg::hdr, xua_msg::headers, xua_msg_part::len, xua_common_hdr::msg_class, xua_common_hdr::msg_length, NULL, xua_msg_part::tag, xua_common_hdr::version, xua_class_iei_name(), and xua_hdr_dump().
Referenced by m3ua_rx_mgmt_err(), sccp_scrc_rx_sclc_msg(), sccp_scrc_rx_scoc_conn_msg(), scrc_rx_mtp_xfer_ind_xua(), and sua_rx_mgmt_err().
int xua_msg_event_map | ( | const struct xua_msg * | xua, |
const struct xua_msg_event_map * | maps, | ||
unsigned int | num_maps | ||
) |
Map from a xua_msg (class+type) to an event.
[in] | xua | xUA message which is to be mapped |
[in] | maps | Table containing msg type+class -> event maps [aram[in] num_maps number of entries in maps |
References xua_msg_event_map::event, xua_msg::hdr, xua_msg_event_map::msg_class, xua_common_hdr::msg_class, xua_msg_event_map::msg_type, and xua_common_hdr::msg_type.
Referenced by m3ua_rx_asp(), sccp_scoc_rx_from_scrc(), and sua_rx_asp().
struct xua_msg_part * xua_msg_find_tag | ( | const struct xua_msg * | msg, |
uint16_t | tag | ||
) |
References xua_msg_part::entry, xua_msg::headers, NULL, xua_msg_part::tag, and tag.
Referenced by data_hdr_from_m3ua(), handle_rkey_dereg_resp(), handle_rkey_reg(), handle_rkey_reg_resp(), ipa_to_msg(), m3ua_decode_notify(), m3ua_gen_error_msg(), m3ua_rx_rkm_dereg_req(), m3ua_rx_snm(), m3ua_rx_snm_asp(), m3ua_rx_xfer(), m3ua_to_xfer_ind(), sccp_add_long_variable_part(), sccp_add_var_addr(), sccp_add_variable_part(), sccp_conn_scu_gen_encode_and_send(), sccp_scoc_rx_from_scrc(), sclc_rx_cldr(), sclc_rx_cldt(), scrc_rx_mtp_xfer_ind_xua(), sua_addr_parse(), sua_rx_cl(), sua_rx_co(), sua_rx_snm_asp(), sua_to_sccp_udt(), sua_to_sccp_udts(), xua_asp_fsm_down(), xua_asp_fsm_inactive(), xua_dialect_check_all_mand_ies(), xua_msg_copy_part(), xua_msg_get_len(), xua_msg_get_str(), xua_msg_get_u32(), xua_msg_get_u32p(), xua_snm_rx_daud(), xua_snm_rx_dava(), xua_snm_rx_duna(), and xua_snm_rx_scon().
void xua_msg_free | ( | struct xua_msg * | msg | ) |
Referenced by deliver_to_mtp_user(), encode_notify(), hmdt_message_for_distribution(), hmrt_message_for_routing(), m3ua_gen_error_msg(), m3ua_rx_asp(), m3ua_rx_mgmt(), m3ua_rx_msg(), m3ua_rx_rkm(), m3ua_rx_rkm_dereg_rsp(), m3ua_rx_rkm_reg_req(), m3ua_rx_rkm_reg_rsp(), m3ua_rx_snm_asp(), m3ua_rx_xfer(), m3ua_tx_xua_as(), m3ua_tx_xua_asp(), mtp_user_prim_cb(), osmo_sccp_to_xua(), patch_sccp_with_pc(), peer_send(), peer_send_error(), rout_fail_pending_cb(), sccp_conn_xua_gen_encode_and_send(), sccp_conn_xua_gen_relre_and_send(), sccp_sclc_rx_scrc_rout_fail(), sccp_scoc_rx_scrc_rout_fail(), scoc_fsm_active(), sua_rx_msg(), sua_tx_xua_as(), sua_tx_xua_asp(), tx_coerr_from_xua(), tx_relco_from_xua(), tx_rlsd_from_xua_twoway(), xua_as_fsm_pending(), xua_as_transmit_msg(), xua_as_transmit_msg_broadcast(), xua_from_msg(), xua_from_nested(), xua_gen_encode_and_send(), xua_gen_msg_cl(), and xua_gen_msg_co().
int xua_msg_free_tag | ( | struct xua_msg * | xua, |
uint16_t | tag | ||
) |
References xua_msg_part::entry, xua_msg::headers, xua_msg_part::tag, and tag.
Referenced by ensure_opc_in_calling_ssn(), gen_ret_msg(), m3ua_rx_xfer(), and patch_sccp_with_pc().
int xua_msg_get_len | ( | const struct xua_msg * | xua, |
uint16_t | iei | ||
) |
References xua_msg_part::len, and xua_msg_find_tag().
Referenced by sua_to_sccp_udt(), sua_to_sccp_udts(), and sua_to_sccp_xudt().
const char * xua_msg_get_str | ( | const struct xua_msg * | xua, |
uint16_t | iei | ||
) |
References NULL, xua_msg_find_tag(), and xua_msg_part_get_str().
Referenced by xua_snm_rx_daud(), xua_snm_rx_dava(), xua_snm_rx_duna(), xua_snm_rx_dupu(), and xua_snm_rx_scon().
uint32_t xua_msg_get_u32 | ( | const struct xua_msg * | xua, |
uint16_t | iei | ||
) |
References xua_msg_find_tag(), and xua_msg_part_get_u32().
Referenced by handle_rkey_dereg_resp(), handle_rkey_reg(), handle_rkey_reg_resp(), m3ua_rx_mgmt_err(), sccp_conn_scu_gen_encode_and_send(), sccp_scoc_rx_from_scrc(), sccp_scoc_rx_scrc_rout_fail(), sclc_rx_cldr(), sclc_rx_cldt(), scoc_fsm_active(), scoc_fsm_conn_pend_out(), scoc_fsm_idle(), scoc_fsm_wait_conn_conf(), scrc_rx_mtp_xfer_ind_xua(), store_local_ref(), sua_rx_mgmt_err(), 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_ludt(), sua_to_sccp_ludts(), sua_to_sccp_rlsd(), sua_to_sccp_udt(), sua_to_sccp_udts(), sua_to_sccp_xudt(), sua_to_sccp_xudts(), tx_coerr_from_xua(), tx_relco_from_xua(), tx_rlsd_from_xua_twoway(), xua_asp_fsm_inactive(), and xua_snm_rx_dupu().
const uint32_t * xua_msg_get_u32p | ( | const struct xua_msg * | xua, |
uint16_t | iei, | ||
uint32_t * | out | ||
) |
References NULL, xua_msg_find_tag(), and xua_msg_part_get_u32().
Referenced by xua_snm_rx_dava(), xua_snm_rx_duna(), and xua_snm_rx_scon().
const char * xua_msg_part_get_str | ( | const struct xua_msg_part * | part | ) |
References xua_msg_part::dat, and xua_msg_part::len.
Referenced by xua_msg_get_str().
uint32_t xua_msg_part_get_u32 | ( | const struct xua_msg_part * | part | ) |
void xua_part_add_gt | ( | struct msgb * | msg, |
const struct osmo_sccp_gt * | gt | ||
) |
References osmo_sccp_gt::digits, osmo_sccp_gt::gti, osmo_sccp_gt::nai, osmo_sccp_gt::npi, SUA_IEI_GT, and osmo_sccp_gt::tt.
Referenced by xua_msg_add_sccp_addr().
struct msgb * xua_to_msg | ( | const int | version, |
struct xua_msg * | msg | ||
) |
References xua_msg_part::dat, xua_msg::hdr, xua_msg::headers, xua_msg_part::len, xua_common_hdr::msg_length, NULL, xua_common_hdr::spare, xua_msg_part::tag, version, and xua_common_hdr::version.
Referenced by encode_notify(), m3ua_to_msg(), peer_send(), peer_send_error(), and sua_to_msg().
|
extern |
Referenced by m3ua_rx_mgmt_err(), and m3ua_rx_msg().
|
extern |
Referenced by ensure_opc_in_calling_ssn(), m3ua_rx_xfer(), osmo_sua_to_sccp(), sccp_conn_opt_data_send_cache(), sccp_conn_scu_gen_encode_and_send(), sccp_find_user(), sccp_rout_fail_enqueue(), 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_scrc_rout_fail(), sccp_scoc_rx_unass_local_ref(), sccp_scrc_rx_sclc_msg(), sccp_scrc_rx_scoc_conn_msg(), sclc_rx_cldr(), sclc_rx_cldt(), scoc_fsm_idle(), scrc_node_2(), scrc_rx_mtp_xfer_ind_xua(), sua_rx_mgmt_err(), and sua_rx_msg().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <ss7_asp_peer.h>
Data Fields | |
char * | host [OSMO_SOCK_MAX_ADDRS] |
size_t | host_cnt |
uint16_t | port |
int | idx_primary |
char* osmo_ss7_asp_peer::host[OSMO_SOCK_MAX_ADDRS] |
Referenced by DEFUN_ATTR(), osmo_sccp_simple_server_add_clnt(), sctp_peer_addr_change_ev_addr_matches_our_primary(), ss7_asp_apply_drop_local_address(), ss7_asp_apply_new_local_address(), ss7_asp_apply_peer_primary_address(), ss7_asp_apply_primary_address(), ss7_asp_peer_add_host2(), ss7_asp_peer_del_host(), ss7_asp_peer_find_host(), ss7_asp_peer_match_host(), ss7_asp_peer_set_hosts2(), ss7_asp_peer_snprintf(), ss7_asp_set_default_peer_hosts(), ss7_asp_start_client(), ss7_vty_write_one_asp(), ss7_vty_write_one_oxs(), ss7_xua_server_add_local_host(), ss7_xua_server_del_local_host(), ss7_xua_server_set_local_hosts(), and xua_accept_cb().
size_t osmo_ss7_asp_peer::host_cnt |
Referenced by DEFUN_ATTR(), osmo_sccp_simple_server_add_clnt(), ss7_asp_apply_peer_primary_address(), ss7_asp_apply_primary_address(), ss7_asp_find_by_socket_addr(), ss7_asp_peer_add_host2(), ss7_asp_peer_del_host(), ss7_asp_peer_find_host(), ss7_asp_peer_match_host(), ss7_asp_peer_set_hosts2(), ss7_asp_peer_snprintf(), ss7_asp_set_default_peer_hosts(), ss7_asp_start_client(), ss7_vty_write_one_asp(), ss7_vty_write_one_oxs(), ss7_xua_server_add_local_host(), ss7_xua_server_del_local_host(), ss7_xua_server_set_default_local_hosts(), ss7_xua_server_set_local_hosts(), and xua_accept_cb().
int osmo_ss7_asp_peer::idx_primary |
Referenced by asp_handle_sctp_notif_monitor_primary_address(), DEFUN_ATTR(), sctp_peer_addr_change_ev_addr_matches_our_primary(), ss7_asp_apply_peer_primary_address(), ss7_asp_apply_primary_address(), ss7_asp_peer_add_host2(), ss7_asp_peer_del_host(), ss7_asp_peer_init(), ss7_asp_peer_set_hosts2(), ss7_asp_peer_snprintf(), and ss7_vty_write_one_asp().
uint16_t osmo_ss7_asp_peer::port |
Referenced by _show_cs7_xua(), osmo_sccp_simple_client_on_ss7_id(), osmo_ss7_asp_find2(), osmo_ss7_asp_find_or_create2(), ss7_asp_alloc(), ss7_asp_apply_peer_primary_address(), ss7_asp_apply_primary_address(), ss7_asp_find_by_socket_addr(), ss7_asp_peer_snprintf(), ss7_asp_start_client(), ss7_vty_write_one_asp(), ss7_vty_write_one_oxs(), ss7_xua_server_create2(), ss7_xua_server_find2(), and xua_accept_cb().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <ss7_link.h>
Data Fields | |
struct osmo_ss7_linkset * | linkset |
osmo_ss7_linkset to which we belong More... | |
struct { | |
char * name | |
char * description | |
uint32_t id | |
enum osmo_ss7_link_adm_state adm_state | |
} | cfg |
enum osmo_ss7_link_adm_state osmo_ss7_link::adm_state |
Referenced by ss7_link_is_available().
struct { ... } osmo_ss7_link::cfg |
Referenced by ss7_link_destroy(), ss7_link_find_or_create(), and ss7_link_is_available().
char* osmo_ss7_link::description |
uint32_t osmo_ss7_link::id |
Referenced by ss7_link_destroy(), and ss7_link_find_or_create().
struct osmo_ss7_linkset* osmo_ss7_link::linkset |
osmo_ss7_linkset to which we belong
Referenced by ss7_link_destroy(), and ss7_link_find_or_create().
char* osmo_ss7_link::name |
libosmo-sigtran 2.1.0.160-ddd3
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_as.h"
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "ss7_xua_srv.h"
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
Functions | |
static int | _setsockopt_peer_primary_addr (int fd, const struct osmo_sockaddr *saddr) |
static int | _setsockopt_primary_addr (int fd, const struct osmo_sockaddr *saddr) |
osmo_static_assert (ARRAY_SIZE(ss7_asp_xua_timer_defaults)==(SS7_ASP_XUA_TIMERS_LEN) &&ARRAY_SIZE(ss7_asp_xua_timer_names)==(SS7_ASP_XUA_TIMERS_LEN), assert_ss7_asp_xua_timer_count) | |
bool | ss7_asp_protocol_check_trans_proto (enum osmo_ss7_asp_protocol proto, int trans_proto) |
int | ss7_default_trans_proto_for_asp_proto (enum osmo_ss7_asp_protocol proto) |
int | osmo_ss7_asp_protocol_port (enum osmo_ss7_asp_protocol prot) |
static int | ss7_asp_apply_tcp_keepalive (const struct osmo_ss7_asp *asp) |
static int | ss7_asp_apply_tcp_user_timeout (const struct osmo_ss7_asp *asp) |
int | ss7_asp_apply_tcp_pars (const struct osmo_ss7_asp *asp) |
int | ss7_asp_apply_new_local_address (const struct osmo_ss7_asp *asp, unsigned int loc_idx) |
int | ss7_asp_apply_drop_local_address (const struct osmo_ss7_asp *asp, unsigned int loc_idx) |
int | ss7_asp_apply_peer_primary_address (const struct osmo_ss7_asp *asp) |
int | ss7_asp_apply_primary_address (const struct osmo_ss7_asp *asp) |
static bool | sctp_peer_addr_change_ev_addr_matches_our_primary (const struct osmo_ss7_asp *asp, const union sctp_notification *notif) |
static void | asp_handle_sctp_notif_monitor_primary_address (const struct osmo_ss7_asp *asp, const union sctp_notification *notif) |
static int | asp_client_apply_sctp_init_pars (struct osmo_ss7_asp *asp) |
bool | ss7_asp_set_default_peer_hosts (struct osmo_ss7_asp *asp) |
static uint16_t | get_in_port (struct sockaddr *sa) |
static void | chop_v4_mapped_on_v6_prefix (char *buf) |
struct osmo_ss7_asp * | ss7_asp_find_by_socket_addr (int fd, int trans_proto) |
Find an ASP definition matching the local+remote IP/PORT of given fd. More... | |
struct osmo_ss7_asp * | ss7_asp_alloc (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_destroy (struct osmo_ss7_asp *asp) |
static int | xua_cli_read_cb (struct osmo_stream_cli *conn, int res, struct msgb *msg) |
static int | ipa_cli_read_cb (struct osmo_stream_cli *conn, int res, struct msgb *msg) |
static int | m3ua_tcp_cli_read_cb (struct osmo_stream_cli *conn, int res, struct msgb *msg) |
static int | xua_cli_connect_cb (struct osmo_stream_cli *cli) |
static int | xua_cli_disconnect_cb (struct osmo_stream_cli *cli) |
static int | xua_cli_close_and_reconnect (struct osmo_stream_cli *cli) |
static int | ss7_asp_start_client (struct osmo_ss7_asp *asp) |
int | ss7_asp_disconnect_stream (struct osmo_ss7_asp *asp) |
int | osmo_ss7_asp_restart (struct osmo_ss7_asp *asp) |
bool | osmo_ss7_asp_active (const struct osmo_ss7_asp *asp) |
bool | ss7_asp_is_started (const struct osmo_ss7_asp *asp) |
static int | get_logevel_by_sn_type (int sn_type) |
static void | log_sctp_notification (struct osmo_ss7_asp *asp, const char *pfx, union sctp_notification *notif) |
int | ss7_asp_ipa_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg) |
int | ss7_asp_xua_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg) |
int | xua_tcp_segmentation_cb (struct msgb *msg) |
int | ss7_asp_m3ua_tcp_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg) |
static void | xua_cli_close (struct osmo_stream_cli *cli) |
int | ss7_asp_xua_srv_conn_closed_cb (struct osmo_stream_srv *srv) |
int | osmo_ss7_asp_send (struct osmo_ss7_asp *asp, struct msgb *msg) |
send a fully encoded msgb via a given ASP More... | |
void | osmo_ss7_asp_disconnect (struct osmo_ss7_asp *asp) |
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... | |
int | ss7_asp_rx_unknown (struct osmo_ss7_asp *asp, int ppid_mux, struct msgb *msg) |
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... | |
int | ss7_asp_get_fd (const struct osmo_ss7_asp *asp) |
Get the fd of a given ASP. More... | |
void | ss7_asp_restart_after_reconfigure (struct osmo_ss7_asp *asp) |
static unsigned int | _ss7_asp_get_all_rctx (const struct osmo_ss7_asp *asp, uint32_t *rctx, unsigned int rctx_size, const struct osmo_ss7_as *excl_as, bool network_byte_order) |
unsigned int | ss7_asp_get_all_rctx_be (const struct osmo_ss7_asp *asp, uint32_t *rctx, unsigned int rctx_size, const struct osmo_ss7_as *excl_as) |
unsigned int | ss7_asp_get_all_rctx (const struct osmo_ss7_asp *asp, uint32_t *rctx, unsigned int rctx_size, const struct osmo_ss7_as *excl_as) |
int | ss7_asp_determine_traf_mode (const struct osmo_ss7_asp *asp) |
Variables | |
const struct osmo_tdef | ss7_asp_xua_timer_defaults [SS7_ASP_XUA_TIMERS_LEN] |
const struct value_string | ss7_asp_xua_timer_names [] |
struct value_string | osmo_ss7_asp_protocol_vals [] |
const struct value_string | osmo_ss7_asp_admin_state_names [] |
const struct value_string | osmo_ss7_asp_role_names [] |
static const uint16_t | prot2port [] |
static const struct rate_ctr_desc | ss7_asp_rcd [] |
static const struct rate_ctr_group_desc | ss7_asp_rcgd |
static unsigned int | g_ss7_asp_rcg_idx |
static osmo_ss7_asp_rx_unknown_cb * | g_osmo_ss7_asp_rx_unknown_cb |
|
static |
Referenced by ss7_asp_apply_peer_primary_address().
|
static |
Referenced by ss7_asp_apply_primary_address().
|
static |
References osmo_ss7_instance::as_list, osmo_ss7_as::cfg, osmo_ss7_routing_key::context, osmo_ss7_asp::inst, osmo_ss7_as::list, osmo_ss7_as_has_asp(), and osmo_ss7_as::routing_key.
Referenced by ss7_asp_get_all_rctx(), and ss7_asp_get_all_rctx_be().
|
static |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, 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::num_ostreams_present, osmo_ss7_asp::num_ostreams_value, and osmo_ss7_asp::sctp_init.
Referenced by ss7_asp_start_client().
|
static |
|
static |
References len.
Referenced by ss7_asp_find_by_socket_addr().
|
static |
Referenced by ss7_asp_find_by_socket_addr().
|
static |
Referenced by log_sctp_notification().
|
static |
References osmo_ss7_asp::ctrg, osmo_ss7_asp::ipa, ipa_rx_msg(), osmo_ss7_asp::sls, SS7_ASP_CTR_PKT_RX_TOTAL, and xua_cli_close_and_reconnect().
Referenced by ss7_asp_start_client().
|
static |
References get_logevel_by_sn_type(), and LOGPASP.
Referenced by ss7_asp_xua_srv_conn_rx_cb(), and xua_cli_read_cb().
|
static |
References xua_common_hdr::data, M3UA_MSGC_XFER, M3UA_PPID, xua_common_hdr::msg_class, and xua_cli_read_cb().
Referenced by ss7_asp_start_client().
bool osmo_ss7_asp_active | ( | const struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::fi, and XUA_ASP_S_ACTIVE.
Referenced by current_asp(), DEFUN(), notify_any_other_active_asp_as_inactive(), ss7_as_select_asp_broadcast(), ss7_as_select_asp_loadshare(), 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, NULL, 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(), ss7_xua_server_destroy(), and xua_accept_cb().
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(), and ipa_asp_fsm_wait_id_resp().
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.
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::adm_state, osmo_ss7_asp::cfg, osmo_ss7_asp::dyn_allocated, osmo_ss7_asp::fi, osmo_ss7_asp::is_server, osmo_ss7_asp::local, LOGPASP, osmo_ss7_asp::name, NULL, OSMO_SS7_ASP_ADM_S_SHUTDOWN, osmo_ss7_asp_admin_state_names, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp_remove_default_lm(), OSMO_SS7_ASP_ROLE_ASP, osmo_ss7_asp_use_default_lm(), osmo_ss7_asp::proto, osmo_ss7_asp::remote, osmo_ss7_asp::role, ss7_asp_disconnect_stream(), ss7_asp_peer_snprintf(), ss7_asp_start_client(), ss7_initialized, and xua_asp_fsm_start().
Referenced by osmo_sccp_simple_server_add_clnt(), and ss7_asp_restart_after_reconfigure().
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(), ipa_t_beat_send(), 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(), tx_notify(), xua_as_transmit_msg(), xua_as_transmit_msg_broadcast(), xua_rkm_send_dereg_req(), and xua_rkm_send_reg_req().
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.
osmo_static_assert | ( | ARRAY_SIZE(ss7_asp_xua_timer_defaults) | = =(SS7_ASP_XUA_TIMERS_LEN) &&ARRAY_SIZE(ss7_asp_xua_timer_names)==(SS7_ASP_XUA_TIMERS_LEN) , |
assert_ss7_asp_xua_timer_count | |||
) |
|
static |
References osmo_ss7_asp::cfg, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::idx_primary, and osmo_ss7_asp::remote.
Referenced by asp_handle_sctp_notif_monitor_primary_address().
struct osmo_ss7_asp * ss7_asp_alloc | ( | 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::adm_state, osmo_ss7_instance::asp_list, osmo_ss7_asp::cfg, osmo_ss7_asp::ctrg, g_ss7_asp_rcg_idx, osmo_ss7_asp::inst, osmo_ss7_asp::list, osmo_ss7_asp::local, osmo_ss7_asp::name, NULL, OSMO_SS7_ASP_ADM_S_ENABLED, OSMO_SS7_ASP_PROT_SUA, osmo_ss7_asp_protocol_name(), osmo_ss7_ensure_sccp(), osmo_ss7_asp_peer::port, osmo_ss7_asp::proto, osmo_ss7_asp::remote, ss7_asp_lm_timer_defaults, ss7_asp_peer_init(), ss7_asp_protocol_check_trans_proto(), ss7_asp_rcgd, ss7_asp_xua_timer_defaults, osmo_ss7_asp::T_defs_lm, osmo_ss7_asp::T_defs_xua, and osmo_ss7_asp::trans_proto.
Referenced by osmo_ss7_asp_find_or_create2().
int ss7_asp_apply_drop_local_address | ( | const struct osmo_ss7_asp * | asp, |
unsigned int | loc_idx | ||
) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp::is_server, osmo_ss7_asp::local, LOGPASP, and osmo_ss7_asp::server.
Referenced by DEFUN_ATTR().
int ss7_asp_apply_new_local_address | ( | const struct osmo_ss7_asp * | asp, |
unsigned int | loc_idx | ||
) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp::is_server, osmo_ss7_asp::local, LOGPASP, and osmo_ss7_asp::server.
Referenced by DEFUN_ATTR().
int ss7_asp_apply_peer_primary_address | ( | const struct osmo_ss7_asp * | asp | ) |
References _setsockopt_peer_primary_addr(), osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, osmo_ss7_asp::is_server, osmo_ss7_asp::local, LOGPASP, osmo_ss7_asp_peer::port, and osmo_ss7_asp::server.
Referenced by DEFUN_ATTR(), xua_accept_cb(), and xua_cli_connect_cb().
int ss7_asp_apply_primary_address | ( | const struct osmo_ss7_asp * | asp | ) |
References _setsockopt_primary_addr(), osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, osmo_ss7_asp::is_server, LOGPASP, osmo_ss7_asp_peer::port, osmo_ss7_asp::remote, and osmo_ss7_asp::server.
Referenced by asp_handle_sctp_notif_monitor_primary_address(), DEFUN_ATTR(), xua_accept_cb(), and xua_cli_connect_cb().
|
static |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::keepalive_enable, osmo_ss7_asp::keepalive_intvl_present, osmo_ss7_asp::keepalive_intvl_value, osmo_ss7_asp::keepalive_probes_present, osmo_ss7_asp::keepalive_probes_value, osmo_ss7_asp::keepalive_time_present, osmo_ss7_asp::keepalive_time_value, LOGPASP, osmo_ss7_asp::server, and osmo_ss7_asp::tcp.
Referenced by ss7_asp_apply_tcp_pars().
int ss7_asp_apply_tcp_pars | ( | const struct osmo_ss7_asp * | asp | ) |
References ss7_asp_apply_tcp_keepalive(), and ss7_asp_apply_tcp_user_timeout().
Referenced by ss7_asp_start_client(), and xua_accept_cb().
|
static |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, LOGPASP, osmo_ss7_asp::server, osmo_ss7_asp::tcp, osmo_ss7_asp::user_timeout_present, and osmo_ss7_asp::user_timeout_value.
Referenced by ss7_asp_apply_tcp_pars().
int ss7_asp_determine_traf_mode | ( | const struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_instance::as_list, osmo_ss7_as::cfg, osmo_ss7_asp::inst, osmo_ss7_as::list, osmo_ss7_as::mode, osmo_ss7_as::mode_set_by_vty, and osmo_ss7_as_has_asp().
Referenced by lm_wait_notify(), and peer_send().
int ss7_asp_disconnect_stream | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::is_server, NULL, and osmo_ss7_asp::server.
Referenced by ipa_t_beat_cb(), lm_rkm_reg(), lm_timer_cb(), osmo_ss7_asp_restart(), and xua_t_beat_cb().
struct osmo_ss7_asp * ss7_asp_find_by_socket_addr | ( | int | fd, |
int | trans_proto | ||
) |
Find an ASP definition matching the local+remote IP/PORT of given fd.
[in] | fd | socket descriptor of given socket |
References osmo_ss7_instance::asp_list, osmo_ss7_asp::cfg, chop_v4_mapped_on_v6_prefix(), get_in_port(), osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp::inst, osmo_ss7_asp::list, osmo_ss7_asp::local, NULL, osmo_ss7_instances, osmo_ss7_asp_peer::port, osmo_ss7_asp::remote, ss7_asp_peer_match_host(), ss7_initialized, and osmo_ss7_asp::trans_proto.
Referenced by xua_accept_cb().
unsigned int ss7_asp_get_all_rctx | ( | const struct osmo_ss7_asp * | asp, |
uint32_t * | rctx, | ||
unsigned int | rctx_size, | ||
const struct osmo_ss7_as * | excl_as | ||
) |
References _ss7_asp_get_all_rctx().
Referenced by fill_notify_route_ctx().
unsigned int ss7_asp_get_all_rctx_be | ( | const struct osmo_ss7_asp * | asp, |
uint32_t * | rctx, | ||
unsigned int | rctx_size, | ||
const struct osmo_ss7_as * | excl_as | ||
) |
References _ss7_asp_get_all_rctx().
Referenced by sua_snm_ssn_available(), tx_daud_pc(), xua_asp_tx_snm_daud_address_book(), xua_msg_add_asp_rctx(), xua_snm_pc_available(), xua_snm_rx_daud(), xua_snm_scon(), and xua_snm_upu().
int ss7_asp_get_fd | ( | const struct osmo_ss7_asp * | asp | ) |
Get the fd of a given ASP.
[in] | asp | The ASP for which the fd is requested |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::is_server, and osmo_ss7_asp::server.
Referenced by show_one_asp(), show_one_asp_assoc_status_tcp(), and show_one_asp_remaddr_tcp().
int ss7_asp_ipa_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn, |
int | res, | ||
struct msgb * | msg | ||
) |
References osmo_ss7_asp::ctrg, osmo_ss7_asp::ipa, ipa_rx_msg(), osmo_ss7_asp::sls, and SS7_ASP_CTR_PKT_RX_TOTAL.
Referenced by xua_accept_cb().
bool ss7_asp_is_started | ( | const struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp::is_server, and osmo_ss7_asp::server.
Referenced by DEFUN_ATTR().
int ss7_asp_m3ua_tcp_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn, |
int | res, | ||
struct msgb * | msg | ||
) |
References osmo_ss7_asp::ctrg, xua_common_hdr::data, M3UA_MSGC_XFER, m3ua_rx_msg(), xua_common_hdr::msg_class, and SS7_ASP_CTR_PKT_RX_TOTAL.
Referenced by xua_accept_cb().
bool ss7_asp_protocol_check_trans_proto | ( | enum osmo_ss7_asp_protocol | proto, |
int | trans_proto | ||
) |
References OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_NONE, and OSMO_SS7_ASP_PROT_SUA.
Referenced by ss7_asp_alloc(), and ss7_xua_server_create2().
void ss7_asp_restart_after_reconfigure | ( | struct osmo_ss7_asp * | asp | ) |
References osmo_ss7_asp_restart(), and ss7_asp_set_default_peer_hosts().
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), and ss7_vty_node_asp_go_parent().
int ss7_asp_rx_unknown | ( | struct osmo_ss7_asp * | asp, |
int | ppid_mux, | ||
struct msgb * | msg | ||
) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::ctrg, g_osmo_ss7_asp_rx_unknown_cb, LOGPASP, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp::proto, and SS7_ASP_CTR_PKT_RX_UNKNOWN.
Referenced by ipa_rx_msg(), ss7_asp_xua_srv_conn_rx_cb(), and xua_cli_read_cb().
bool ss7_asp_set_default_peer_hosts | ( | struct osmo_ss7_asp * | asp | ) |
|
static |
References asp_client_apply_sctp_init_pars(), osmo_ss7_asp::cfg, osmo_ss7_asp::client, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, ipa_cli_read_cb(), osmo_ss7_asp::local, LOGPASP, m3ua_tcp_cli_read_cb(), osmo_ss7_asp::name, NULL, OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, osmo_ss7_asp_peer::port, osmo_ss7_asp::proto, osmo_ss7_asp::remote, ss7_asp_apply_tcp_pars(), osmo_ss7_asp::trans_proto, xua_cli_connect_cb(), xua_cli_disconnect_cb(), xua_cli_read_cb(), and xua_tcp_segmentation_cb().
Referenced by osmo_ss7_asp_restart().
int ss7_asp_xua_srv_conn_closed_cb | ( | struct osmo_stream_srv * | srv | ) |
References osmo_ss7_asp::cfg, osmo_ss7_asp::dyn_allocated, osmo_ss7_asp::fi, osmo_ss7_asp::name, NULL, osmo_ss7_asp_destroy(), OSMO_XLM_PRIM_M_SCTP_RELEASE, osmo_ss7_asp::server, XUA_ASP_E_SCTP_COMM_DOWN_IND, xua_asp_send_xlm_prim_simple(), and xua_rkm_cleanup_dyn_as_for_asp().
Referenced by xua_accept_cb().
int ss7_asp_xua_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn, |
int | res, | ||
struct msgb * | msg | ||
) |
References asp_handle_sctp_notif_monitor_primary_address(), osmo_ss7_asp::cfg, osmo_ss7_asp::ctrg, log_sctp_notification(), LOGPASP, M3UA_PPID, m3ua_rx_msg(), OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_SUA, OSMO_XLM_PRIM_M_SCTP_RESTART, osmo_ss7_asp::proto, SS7_ASP_CTR_PKT_RX_TOTAL, ss7_asp_rx_unknown(), SUA_PPID, sua_rx_msg(), and xua_asp_send_xlm_prim_simple().
Referenced by xua_accept_cb().
int ss7_default_trans_proto_for_asp_proto | ( | enum osmo_ss7_asp_protocol | proto | ) |
References OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, and OSMO_SS7_ASP_PROT_SUA.
Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_sccp_simple_server_on_ss7_id(), osmo_ss7_asp_find(), osmo_ss7_asp_find_or_create(), ss7_vty_write_one_asp(), ss7_vty_write_one_oxs(), ss7_xua_server_create(), and ss7_xua_server_find().
|
static |
References osmo_ss7_asp::fi, OSMO_XLM_PRIM_M_SCTP_RELEASE, XUA_ASP_E_SCTP_COMM_DOWN_IND, and xua_asp_send_xlm_prim_simple().
Referenced by xua_cli_close_and_reconnect().
|
static |
References osmo_ss7_asp::adm_state, osmo_ss7_asp::cfg, LOGPASP, OSMO_SS7_ASP_ADM_S_SHUTDOWN, and xua_cli_close().
Referenced by ipa_cli_read_cb(), osmo_ss7_asp_disconnect(), xua_cli_disconnect_cb(), and xua_cli_read_cb().
|
static |
References osmo_ss7_asp::cfg, osmo_ss7_asp::fi, osmo_ss7_asp::lm, LOGPASP, M3UA_MSG_HEADROOM, M3UA_MSG_SIZE, NULL, OSMO_XLM_PRIM_M_SCTP_ESTABLISH, osmo_xua_layer_manager::prim_cb, osmo_ss7_asp::sock_name, ss7_asp_apply_peer_primary_address(), ss7_asp_apply_primary_address(), osmo_ss7_asp::trans_proto, XUA_ASP_E_M_ASP_UP_REQ, and xua_asp_send_xlm_prim_simple().
Referenced by ss7_asp_start_client().
|
static |
References LOGPASP, and xua_cli_close_and_reconnect().
Referenced by ss7_asp_start_client().
|
static |
References asp_handle_sctp_notif_monitor_primary_address(), osmo_ss7_asp::cfg, osmo_ss7_asp::ctrg, log_sctp_notification(), LOGPASP, M3UA_PPID, m3ua_rx_msg(), OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_SUA, OSMO_XLM_PRIM_M_SCTP_RESTART, osmo_ss7_asp::proto, SS7_ASP_CTR_PKT_RX_TOTAL, ss7_asp_rx_unknown(), SUA_PPID, sua_rx_msg(), xua_asp_send_xlm_prim_simple(), and xua_cli_close_and_reconnect().
Referenced by m3ua_tcp_cli_read_cb(), and ss7_asp_start_client().
int xua_tcp_segmentation_cb | ( | struct msgb * | msg | ) |
References xua_common_hdr::data, msg_length, and xua_common_hdr::msg_length.
Referenced by ss7_asp_start_client(), and xua_accept_cb().
|
static |
Referenced by osmo_ss7_register_rx_unknown_cb(), and ss7_asp_rx_unknown().
|
static |
Referenced by ss7_asp_alloc().
const struct value_string osmo_ss7_asp_admin_state_names[] |
Referenced by DEFUN_ATTR(), osmo_ss7_asp_restart(), and xua_accept_cb().
struct value_string osmo_ss7_asp_protocol_vals[] |
Referenced by osmo_ss7_asp_protocol_name(), parse_asp_proto(), show_one_asp(), ss7_vty_write_one_oxs(), ss7_xua_server_bind(), ss7_xua_server_create2(), vty_dump_xua_server(), and xua_accept_cb().
const struct value_string osmo_ss7_asp_role_names[] |
Referenced by DEFUN_ATTR(), show_one_asp(), and ss7_vty_write_one_asp().
|
static |
Referenced by osmo_ss7_asp_protocol_port().
|
static |
|
static |
Referenced by ss7_asp_alloc().
const struct osmo_tdef ss7_asp_xua_timer_defaults[SS7_ASP_XUA_TIMERS_LEN] |
Referenced by gen_asp_timer_xua_cmd_strs(), and ss7_asp_alloc().
const struct value_string ss7_asp_xua_timer_names[] |
Referenced by DEFUN_ATTR(), gen_asp_timer_xua_cmd_strs(), and write_asp_timers_xua().
libosmo-sigtran 2.1.0.160-ddd3
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, NULL, 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, NULL, 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(), NULL, 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(), NULL, 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 NULL, 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 NULL, 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, NULL, 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 NULL, 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 NULL, 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 NULL, 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 NULL, 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.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <errno.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/core/select.h>
#include <osmocom/gsm/ipa.h>
#include <osmocom/netif/stream.h>
#include <osmocom/netif/ipa.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sigtran_sap.h>
#include "xua_msg.h"
#include <osmocom/sigtran/protocol/sua.h>
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_internal.h"
#include "ss7_xua_srv.h"
#include "sccp_internal.h"
#include "xua_asp_fsm.h"
#include "xua_as_fsm.h"
#include "xua_internal.h"
Data Structures | |
struct | xua_asp_fsm_priv |
struct | ipa_asp_fsm_priv |
Macros | |
#define | S(x) (1 << (x)) |
#define | ENSURE_ASP_OR_IPSP(fi, event) |
#define | ENSURE_SG_OR_IPSP(fi, event) |
Enumerations | |
enum | ipa_asp_state { IPA_ASP_S_DOWN = XUA_ASP_S_DOWN , IPA_ASP_S_INACTIVE = XUA_ASP_S_INACTIVE , IPA_ASP_S_ACTIVE = XUA_ASP_S_ACTIVE , IPA_ASP_S_WAIT_ID_RESP , IPA_ASP_S_WAIT_ID_GET , IPA_ASP_S_WAIT_ID_ACK , IPA_ASP_S_WAIT_ID_ACK2 } |
enum | ipa_asp_fsm_t { T_WAIT_ID_RESP = 1 , T_WAIT_ID_ACK , T_WAIT_ID_GET } |
Functions | |
struct osmo_xlm_prim * | xua_xlm_prim_alloc (enum osmo_xlm_prim_type prim_type, enum osmo_prim_operation op) |
void | xua_asp_send_xlm_prim (struct osmo_ss7_asp *asp, struct osmo_xlm_prim *prim) |
void | xua_asp_send_xlm_prim_simple (struct osmo_ss7_asp *asp, enum osmo_xlm_prim_type prim_type, enum osmo_prim_operation op) |
static void | send_xlm_prim_simple (struct osmo_fsm_inst *fi, enum osmo_xlm_prim_type prim_type, enum osmo_prim_operation op) |
static void | xua_asp_tx_snm_daud_address_book (struct osmo_ss7_asp *asp) |
static int | xua_msg_add_asp_rctx (struct xua_msg *xua, struct osmo_ss7_asp *asp) |
static int | peer_send (struct osmo_fsm_inst *fi, int out_event, struct xua_msg *in) |
static int | peer_send_error (struct osmo_fsm_inst *fi, uint32_t err_code) |
static void | xua_t_ack_cb (void *data) |
static int | peer_send_and_start_t_ack (struct osmo_fsm_inst *fi, int out_event) |
static void | dispatch_to_all_as (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | check_stop_t_ack (struct osmo_fsm_inst *fi, uint32_t event) |
static void | xua_t_beat_stop (struct osmo_fsm_inst *fi) |
static void | xua_t_beat_send (struct osmo_fsm_inst *fi) |
static void | xua_t_beat_cb (void *_fi) |
static void | xua_asp_fsm_down_onenter (struct osmo_fsm_inst *fi, uint32_t prev_state) |
static void | xua_asp_fsm_down (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_asp_fsm_inactive_onenter (struct osmo_fsm_inst *fi, uint32_t prev_state) |
static void | xua_asp_fsm_inactive (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_asp_fsm_active_onenter (struct osmo_fsm_inst *fi, uint32_t prev_state) |
static void | xua_asp_fsm_active (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | xua_asp_allstate (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static int | xua_asp_fsm_timer_cb (struct osmo_fsm_inst *fi) |
static void | xua_asp_fsm_cleanup (struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) |
static int | ipa_asp_fsm_start (struct osmo_ss7_asp *asp, enum osmo_ss7_asp_role role, int log_level) |
Start a new ASP finite state machine for given ASP (stored on asp->fi) More... | |
int | xua_asp_fsm_start (struct osmo_ss7_asp *asp, enum osmo_ss7_asp_role role, int log_level) |
Start a new ASP finite state machine for given ASP (stored in asp->fi) More... | |
static int | get_fd_from_iafp (struct ipa_asp_fsm_priv *iafp) |
static void | ipa_t_beat_stop (struct osmo_fsm_inst *fi) |
static void | ipa_t_beat_send (struct osmo_fsm_inst *fi) |
static void | ipa_t_beat_cb (void *_fi) |
static void | ipa_asp_fsm_down_onenter (struct osmo_fsm_inst *fi, uint32_t prev_state) |
static void | ipa_asp_fsm_down (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ipa_asp_fsm_wait_id_resp (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ipa_asp_fsm_wait_id_ack2 (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ipa_asp_fsm_wait_id_get (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ipa_asp_fsm_wait_id_ack (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ipa_asp_fsm_active_onenter (struct osmo_fsm_inst *fi, uint32_t prev_state) |
static void | ipa_asp_fsm_active (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | ipa_asp_fsm_inactive_onenter (struct osmo_fsm_inst *fi, uint32_t prev_state) |
static void | ipa_asp_fsm_inactive (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | _ipa_asp_pick_unused_sls (struct osmo_ss7_asp *asp, const struct osmo_ss7_as *as) |
static void | ipa_asp_allstate (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static int | ipa_asp_fsm_timer_cb (struct osmo_fsm_inst *fi) |
static void | ipa_asp_fsm_cleanup (struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause) |
Variables | |
static const struct value_string | xua_asp_event_names [] |
static const uint32_t | evt_ack_map [_NUM_XUA_ASP_E] |
static const struct osmo_fsm_state | xua_asp_states [] |
struct osmo_fsm | xua_asp_fsm |
static const struct osmo_fsm_state | ipa_asp_states [] |
struct osmo_fsm | ipa_asp_fsm |
#define ENSURE_ASP_OR_IPSP | ( | fi, | |
event | |||
) |
#define ENSURE_SG_OR_IPSP | ( | fi, | |
event | |||
) |
#define S | ( | x | ) | (1 << (x)) |
enum ipa_asp_fsm_t |
enum ipa_asp_state |
|
static |
References xua_as_event_asp_inactive_ind_pars::asp, osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::ipa, LOGPASP, sls, osmo_ss7_asp::sls, and osmo_ss7_asp::sls_assigned.
Referenced by ipa_asp_allstate(), and ipa_asp_fsm_start().
|
static |
References evt_ack_map, xua_asp_fsm_priv::out_event, xua_asp_fsm_priv::t_ack, and xua_asp_fsm_priv::timer.
Referenced by xua_asp_fsm_active(), xua_asp_fsm_down(), and xua_asp_fsm_inactive().
|
static |
References osmo_ss7_instance::as_list, xua_asp_fsm_priv::asp, data, osmo_ss7_as::fi, osmo_ss7_as::inst, osmo_ss7_asp::inst, osmo_ss7_as::list, and osmo_ss7_as_has_asp().
Referenced by ipa_asp_fsm_active_onenter(), ipa_asp_fsm_down_onenter(), ipa_asp_fsm_inactive_onenter(), xua_asp_fsm_active_onenter(), xua_asp_fsm_down_onenter(), and xua_asp_fsm_inactive_onenter().
|
static |
References ipa_asp_fsm_priv::asp, osmo_ss7_asp::client, and osmo_ss7_asp::server.
Referenced by ipa_asp_allstate(), ipa_asp_fsm_down(), ipa_asp_fsm_wait_id_ack(), ipa_asp_fsm_wait_id_get(), and ipa_asp_fsm_wait_id_resp().
|
static |
References _ipa_asp_pick_unused_sls(), ipa_asp_fsm_priv::asp, osmo_ss7_as::cfg, data, osmo_ss7_as::fi, get_fd_from_iafp(), IPA_ASP_S_DOWN, ipa_asp_fsm_priv::ipa_unit, osmo_ss7_as::name, NULL, OSMO_SS7_ASP_ROLE_ASP, OSMO_XLM_PRIM_M_ASP_DOWN, ipa_asp_fsm_priv::role, send_xlm_prim_simple(), ipa_asp_fsm_priv::t_beat, ipa_asp_fsm_priv::unacked_beats, XUA_ASP_E_AS_ASSIGNED, XUA_ASP_E_ASPSM_BEAT, XUA_ASP_E_ASPSM_BEAT_ACK, XUA_ASP_E_M_ASP_UP_REQ, XUA_ASP_E_SCTP_COMM_DOWN_IND, and XUA_ASP_E_SCTP_RESTART_IND.
|
static |
References IPA_ASP_S_DOWN, XUA_ASP_E_M_ASP_DOWN_REQ, and XUA_ASP_E_M_ASP_INACTIVE_REQ.
|
static |
|
static |
References ipa_asp_fsm_priv::asp, osmo_ss7_asp::fi, ipa_t_beat_stop(), and NULL.
|
static |
|
static |
References xua_asp_fsm_priv::asp, dispatch_to_all_as(), osmo_ss7_asp::fi, ipa_t_beat_stop(), and XUA_ASPAS_ASP_DOWN_IND.
|
static |
References IPA_ASP_S_DOWN, and XUA_ASP_E_M_ASP_DOWN_REQ.
|
static |
|
static |
Start a new ASP finite state machine for given ASP (stored on asp->fi)
[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 _ipa_asp_pick_unused_sls(), ipa_asp_fsm_priv::asp, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_asp::dyn_allocated, osmo_ss7_as::fi, osmo_ss7_asp::fi, ipa_asp_fsm, ipa_find_as_for_asp(), ipa_t_beat_cb(), ipa_asp_fsm_priv::ipa_unit, osmo_ss7_as::name, osmo_ss7_asp::name, NULL, OSMO_SS7_ASP_ROLE_ASP, ipa_asp_fsm_priv::role, ipa_asp_fsm_priv::t_beat, ipa_asp_fsm_priv::timer, and XUA_ASP_E_M_ASP_UP_REQ.
Referenced by xua_asp_fsm_start().
|
static |
References ipa_asp_fsm_priv::asp, and osmo_ss7_asp_disconnect().
|
static |
References get_fd_from_iafp(), IPA_ASP_E_ID_ACK, and IPA_ASP_S_ACTIVE.
|
static |
References IPA_ASP_E_ID_ACK, and IPA_ASP_S_ACTIVE.
|
static |
|
static |
References ipa_asp_fsm_priv::asp, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, data, get_fd_from_iafp(), osmo_ss7_asp::inst, IPA_ASP_E_ID_ACK, IPA_ASP_E_ID_RESP, IPA_ASP_S_WAIT_ID_ACK2, ipa_asp_fsm_priv::ipa_id_ack_rcvd, ipa_asp_fsm_priv::ipa_unit, osmo_ss7_as::name, osmo_ss7_asp::name, NULL, osmo_ss7_as_find_by_name(), osmo_ss7_asp_disconnect(), ss7_as_add_asp(), and T_WAIT_ID_ACK.
|
static |
References ipa_asp_fsm_priv::asp, ipa_t_beat_send(), ss7_asp_disconnect_stream(), ipa_asp_fsm_priv::t_beat, and ipa_asp_fsm_priv::unacked_beats.
Referenced by ipa_asp_fsm_start().
|
static |
References ipa_asp_fsm_priv::asp, osmo_ss7_asp::cfg, ipa_gen_ping(), ipa_t_beat_stop(), osmo_ss7_asp_send(), SS7_ASP_XUA_T_BEAT, ipa_asp_fsm_priv::t_beat, osmo_ss7_asp::T_defs_xua, ipa_asp_fsm_priv::timer, and ipa_asp_fsm_priv::unacked_beats.
Referenced by ipa_asp_fsm_active_onenter(), and ipa_t_beat_cb().
|
static |
References ipa_asp_fsm_priv::t_beat, ipa_asp_fsm_priv::timer, and ipa_asp_fsm_priv::unacked_beats.
Referenced by ipa_asp_fsm_cleanup(), ipa_asp_fsm_down_onenter(), and ipa_t_beat_send().
|
static |
References xua_asp_fsm_priv::asp, xua_msg::hdr, M3UA_IEI_HEARDBT_DATA, M3UA_IEI_ROUTE_CTX, M3UA_IEI_TRAF_MODE_TYP, osmo_ss7_asp_send(), osmo_ss7_tmode_to_xua(), ss7_asp_determine_traf_mode(), SUA_ASPSM_BEAT, SUA_ASPSM_BEAT_ACK, SUA_ASPSM_DOWN, SUA_ASPSM_DOWN_ACK, SUA_ASPSM_UP, SUA_ASPSM_UP_ACK, SUA_ASPTM_ACTIVE, SUA_ASPTM_ACTIVE_ACK, SUA_ASPTM_INACTIVE, SUA_ASPTM_INACTIVE_ACK, SUA_IEI_ASP_ID, SUA_MSGC_ASPSM, SUA_MSGC_ASPTM, SUA_VERSION, XUA_ASP_E_ASPSM_ASPDN, XUA_ASP_E_ASPSM_ASPDN_ACK, XUA_ASP_E_ASPSM_ASPUP, XUA_ASP_E_ASPSM_ASPUP_ACK, XUA_ASP_E_ASPSM_BEAT, XUA_ASP_E_ASPSM_BEAT_ACK, XUA_ASP_E_ASPTM_ASPAC, XUA_ASP_E_ASPTM_ASPAC_ACK, XUA_ASP_E_ASPTM_ASPIA, XUA_ASP_E_ASPTM_ASPIA_ACK, XUA_HDR, xua_msg_add_asp_rctx(), xua_msg_add_u32(), xua_msg_alloc(), xua_msg_copy_part(), xua_msg_free(), and xua_to_msg().
Referenced by peer_send_and_start_t_ack(), xua_asp_allstate(), xua_asp_fsm_active(), xua_asp_fsm_down(), xua_asp_fsm_inactive(), xua_t_ack_cb(), and xua_t_beat_send().
|
static |
|
static |
References xua_asp_fsm_priv::asp, xua_msg::hdr, m3ua_err_names, osmo_ss7_asp_send(), SUA_IEI_ERR_CODE, SUA_MGMT_ERR, SUA_MSGC_MGMT, SUA_VERSION, xua_common_hdr::version, XUA_HDR, xua_msg_add_u32(), xua_msg_alloc(), xua_msg_free(), and xua_to_msg().
Referenced by xua_asp_fsm_active(), and xua_asp_fsm_inactive().
|
static |
References xua_asp_fsm_priv::asp, and xua_asp_send_xlm_prim_simple().
Referenced by ipa_asp_allstate(), xua_asp_allstate(), xua_asp_fsm_active(), xua_asp_fsm_down(), and xua_asp_fsm_inactive().
|
static |
References data, OSMO_XLM_PRIM_M_ASP_DOWN, peer_send(), send_xlm_prim_simple(), xua_asp_fsm_priv::t_ack, xua_asp_fsm_priv::t_beat, xua_asp_fsm_priv::timer, xua_asp_fsm_priv::unacked_beats, XUA_ASP_E_AS_ASSIGNED, XUA_ASP_E_ASPSM_BEAT, XUA_ASP_E_ASPSM_BEAT_ACK, XUA_ASP_E_SCTP_COMM_DOWN_IND, XUA_ASP_E_SCTP_RESTART_IND, and XUA_ASP_S_DOWN.
|
static |
References check_stop_t_ack(), data, ENSURE_ASP_OR_IPSP, ENSURE_SG_OR_IPSP, M3UA_ERR_UNEXPECTED_MSG, NULL, OSMO_XLM_PRIM_M_ASP_DOWN, OSMO_XLM_PRIM_M_ASP_INACTIVE, peer_send(), peer_send_and_start_t_ack(), peer_send_error(), send_xlm_prim_simple(), XUA_ASP_E_ASPSM_ASPDN, XUA_ASP_E_ASPSM_ASPDN_ACK, XUA_ASP_E_ASPSM_ASPUP, XUA_ASP_E_ASPSM_ASPUP_ACK, XUA_ASP_E_ASPTM_ASPAC, XUA_ASP_E_ASPTM_ASPAC_ACK, XUA_ASP_E_ASPTM_ASPIA, XUA_ASP_E_ASPTM_ASPIA_ACK, XUA_ASP_E_M_ASP_DOWN_REQ, XUA_ASP_E_M_ASP_INACTIVE_REQ, XUA_ASP_S_DOWN, and XUA_ASP_S_INACTIVE.
|
static |
|
static |
References xua_asp_fsm_priv::asp, osmo_ss7_asp::fi, NULL, xua_asp_fsm_priv::t_ack, xua_asp_fsm_priv::timer, and xua_t_beat_stop().
|
static |
References xua_asp_fsm_priv::asp, check_stop_t_ack(), data, ENSURE_ASP_OR_IPSP, ENSURE_SG_OR_IPSP, osmo_ss7_asp::lm, NULL, OSMO_XLM_PRIM_M_ASP_UP, peer_send(), peer_send_and_start_t_ack(), osmo_ss7_asp::remote_asp_id, osmo_ss7_asp::remote_asp_id_present, send_xlm_prim_simple(), SUA_IEI_ASP_ID, XUA_ASP_E_ASPSM_ASPDN, XUA_ASP_E_ASPSM_ASPDN_ACK, XUA_ASP_E_ASPSM_ASPUP, XUA_ASP_E_ASPSM_ASPUP_ACK, XUA_ASP_E_M_ASP_ACTIVE_REQ, XUA_ASP_E_M_ASP_UP_REQ, XUA_ASP_E_SCTP_EST_IND, XUA_ASP_S_INACTIVE, xua_msg_find_tag(), and xua_msg_part_get_u32().
|
static |
References xua_asp_fsm_priv::asp, dispatch_to_all_as(), osmo_ss7_asp::fi, XUA_ASPAS_ASP_DOWN_IND, and xua_t_beat_stop().
|
static |
References osmo_ss7_instance::as_list, xua_asp_fsm_priv::asp, osmo_ss7_as::cfg, check_stop_t_ack(), xua_msg_part::dat, data, ENSURE_ASP_OR_IPSP, ENSURE_SG_OR_IPSP, osmo_ss7_asp::inst, xua_msg_part::len, LOGPAS, M3UA_ERR_INVAL_ROUT_CTX, M3UA_ERR_UNSUPP_TRAF_MOD_TYP, M3UA_IEI_ROUTE_CTX, M3UA_IEI_TRAF_MODE_TYP, 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, NULL, osmo_ss7_as_find_by_rctx(), osmo_ss7_as_has_asp(), osmo_ss7_as_tmode_compatible_xua(), osmo_ss7_as_traffic_mode_name(), osmo_ss7_tmode_from_xua(), OSMO_XLM_PRIM_M_ASP_ACTIVE, OSMO_XLM_PRIM_M_ASP_DOWN, peer_send(), peer_send_and_start_t_ack(), peer_send_error(), send_xlm_prim_simple(), XUA_ASP_E_ASPSM_ASPDN, XUA_ASP_E_ASPSM_ASPDN_ACK, XUA_ASP_E_ASPSM_ASPUP, XUA_ASP_E_ASPSM_ASPUP_ACK, XUA_ASP_E_ASPTM_ASPAC, XUA_ASP_E_ASPTM_ASPAC_ACK, XUA_ASP_E_ASPTM_ASPIA, XUA_ASP_E_ASPTM_ASPIA_ACK, XUA_ASP_E_M_ASP_ACTIVE_REQ, XUA_ASP_E_M_ASP_DOWN_REQ, XUA_ASP_S_ACTIVE, XUA_ASP_S_DOWN, xua_msg_find_tag(), and xua_msg_get_u32().
|
static |
int xua_asp_fsm_start | ( | struct osmo_ss7_asp * | asp, |
enum osmo_ss7_asp_role | role, | ||
int | log_level | ||
) |
Start a new ASP finite state machine for given ASP (stored in asp->fi)
[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, osmo_ss7_asp::fi, ipa_asp_fsm_start(), osmo_ss7_asp::name, NULL, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp::proto, xua_asp_fsm_priv::role, xua_asp_fsm_priv::t_beat, xua_asp_fsm_priv::timer, xua_asp_fsm, and xua_t_beat_cb().
Referenced by osmo_ss7_asp_restart(), and xua_accept_cb().
|
static |
void xua_asp_send_xlm_prim | ( | struct osmo_ss7_asp * | asp, |
struct osmo_xlm_prim * | prim | ||
) |
void xua_asp_send_xlm_prim_simple | ( | struct osmo_ss7_asp * | asp, |
enum osmo_xlm_prim_type | prim_type, | ||
enum osmo_prim_operation | op | ||
) |
References xua_asp_send_xlm_prim(), and xua_xlm_prim_alloc().
Referenced by send_xlm_prim_simple(), ss7_asp_xua_srv_conn_closed_cb(), ss7_asp_xua_srv_conn_rx_cb(), xua_accept_cb(), xua_cli_close(), xua_cli_connect_cb(), and xua_cli_read_cb().
|
static |
References osmo_sccp_addr_entry::addr, osmo_ss7_instance::cfg, osmo_sccp_addr_entry::inst, osmo_ss7_asp::inst, osmo_sccp_addr_entry::list, LOGPASP, NULL, OSMO_SCCP_ADDR_T_PC, OSMO_SS7_MAX_RCTX_COUNT, osmo_ss7_pc_is_local(), osmo_ss7_pointcode_print2(), osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_ss7_instance::sccp_address_book, ss7_asp_get_all_rctx_be(), and xua_tx_snm_daud().
Referenced by xua_asp_fsm_active_onenter().
|
static |
References M3UA_IEI_ROUTE_CTX, NULL, OSMO_SS7_MAX_RCTX_COUNT, ss7_asp_get_all_rctx_be(), and xua_msg_add_data().
Referenced by peer_send().
|
static |
References xua_asp_fsm_priv::asp, osmo_ss7_asp::cfg, data, NULL, xua_asp_fsm_priv::out_event, peer_send(), SS7_ASP_XUA_T_ACK, xua_asp_fsm_priv::t_ack, osmo_ss7_asp::T_defs_xua, and xua_asp_fsm_priv::timer.
Referenced by peer_send_and_start_t_ack().
|
static |
References xua_asp_fsm_priv::asp, ss7_asp_disconnect_stream(), xua_asp_fsm_priv::t_beat, xua_asp_fsm_priv::unacked_beats, and xua_t_beat_send().
Referenced by xua_asp_fsm_start().
|
static |
References xua_asp_fsm_priv::asp, osmo_ss7_asp::cfg, NULL, peer_send(), SS7_ASP_XUA_T_BEAT, xua_asp_fsm_priv::t_beat, osmo_ss7_asp::T_defs_xua, xua_asp_fsm_priv::timer, xua_asp_fsm_priv::unacked_beats, XUA_ASP_E_ASPSM_BEAT, and xua_t_beat_stop().
Referenced by xua_asp_fsm_inactive_onenter(), and xua_t_beat_cb().
|
static |
References xua_asp_fsm_priv::t_beat, xua_asp_fsm_priv::timer, and xua_asp_fsm_priv::unacked_beats.
Referenced by xua_asp_fsm_cleanup(), xua_asp_fsm_down_onenter(), and xua_t_beat_send().
struct osmo_xlm_prim * xua_xlm_prim_alloc | ( | enum osmo_xlm_prim_type | prim_type, |
enum osmo_prim_operation | op | ||
) |
References NULL, osmo_xlm_prim::oph, and XUA_SAP_LM.
Referenced by handle_rkey_dereg_resp(), handle_rkey_reg_resp(), lm_timer_cb(), m3ua_rx_mgmt_err(), m3ua_rx_mgmt_ntfy(), and xua_asp_send_xlm_prim_simple().
|
static |
Referenced by check_stop_t_ack().
struct osmo_fsm ipa_asp_fsm |
Referenced by ipa_asp_fsm_start(), and osmo_ss7_init().
|
static |
|
static |
struct osmo_fsm xua_asp_fsm |
Referenced by osmo_ss7_init(), and xua_asp_fsm_start().
|
static |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include "xua_msg.h"
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/talloc.h>
#include <arpa/inet.h>
#include <string.h>
#include <errno.h>
Functions | |
void | osmo_xua_msg_tall_ctx_init (void *ctx) |
struct xua_msg * | xua_msg_alloc (void) |
void | xua_msg_free (struct xua_msg *msg) |
struct xua_msg * | xua_msg_copy (const struct xua_msg *xua_in) |
int | xua_msg_add_data (struct xua_msg *msg, uint16_t tag, uint16_t len, const uint8_t *dat) |
int | xua_msg_add_u32_data (struct xua_msg *msg, uint16_t tag, uint16_t len, const uint8_t *dat) |
struct xua_msg_part * | xua_msg_find_tag (const struct xua_msg *xua, uint16_t tag) |
int | xua_msg_free_tag (struct xua_msg *xua, uint16_t tag) |
int | xua_msg_copy_part (struct xua_msg *xua_out, uint16_t tag_out, const struct xua_msg *xua_in, uint16_t tag_in) |
static int | xua_from_msg_common (struct xua_msg *msg, const uint8_t *data, uint16_t pos, uint16_t len) |
struct xua_msg * | xua_from_msg (const int version, uint16_t len, uint8_t *data) |
struct xua_msg * | xua_from_nested (struct xua_msg_part *outer) |
struct msgb * | xua_to_msg (const int version, struct xua_msg *xua) |
int | msgb_t16l16vp_put (struct msgb *msg, uint16_t tag, uint16_t len, const uint8_t *data) |
int | msgb_t16l16vp_put_u32 (struct msgb *msg, uint16_t tag, uint32_t val) |
int | xua_msg_add_u32 (struct xua_msg *xua, uint16_t iei, uint32_t val) |
uint32_t | xua_msg_part_get_u32 (const struct xua_msg_part *part) |
uint32_t | xua_msg_get_u32 (const struct xua_msg *xua, uint16_t iei) |
const uint32_t * | xua_msg_get_u32p (const struct xua_msg *xua, uint16_t iei, uint32_t *out) |
const char * | xua_msg_part_get_str (const struct xua_msg_part *part) |
const char * | xua_msg_get_str (const struct xua_msg *xua, uint16_t iei) |
int | xua_msg_get_len (const struct xua_msg *xua, uint16_t iei) |
void | xua_part_add_gt (struct msgb *msg, const struct osmo_sccp_gt *gt) |
int | xua_msg_add_sccp_addr (struct xua_msg *xua, uint16_t iei, const struct osmo_sccp_addr *addr) |
int | xua_msg_event_map (const struct xua_msg *xua, const struct xua_msg_event_map *maps, unsigned int num_maps) |
Map from a xua_msg (class+type) to an event. More... | |
const char * | xua_class_msg_name (const struct xua_msg_class *xmc, uint16_t msg_type) |
const char * | xua_class_iei_name (const struct xua_msg_class *xmc, uint16_t iei) |
char * | xua_hdr_dump (const struct xua_msg *xua, const struct xua_dialect *dialect) |
int | xua_dialect_check_all_mand_ies (const struct xua_dialect *dialect, struct xua_msg *xua) |
char * | xua_msg_dump (const struct xua_msg *xua, const struct xua_dialect *dialect) |
Variables | |
static void * | tall_xua = NULL |
int msgb_t16l16vp_put | ( | struct msgb * | msg, |
uint16_t | tag, | ||
uint16_t | len, | ||
const uint8_t * | data | ||
) |
References data, len, and tag.
Referenced by msgb_t16l16vp_put_u32(), and xua_msg_add_sccp_addr().
int msgb_t16l16vp_put_u32 | ( | struct msgb * | msg, |
uint16_t | tag, | ||
uint32_t | val | ||
) |
References msgb_t16l16vp_put(), and tag.
Referenced by msgb_append_dereg_res(), msgb_append_reg_res(), xua_msg_add_sccp_addr(), xua_rkm_send_dereg_req(), and xua_rkm_send_reg_req().
void osmo_xua_msg_tall_ctx_init | ( | void * | ctx | ) |
References tall_xua.
const char * xua_class_iei_name | ( | const struct xua_msg_class * | xmc, |
uint16_t | iei | ||
) |
References xua_msg_class::iei_names.
Referenced by xua_dialect_check_all_mand_ies(), and xua_msg_dump().
const char * xua_class_msg_name | ( | const struct xua_msg_class * | xmc, |
uint16_t | msg_type | ||
) |
References msg_type, and xua_msg_class::msgt_names.
Referenced by sccp_conn_opt_data_send_cache(), xua_dialect_check_all_mand_ies(), and xua_hdr_dump().
int xua_dialect_check_all_mand_ies | ( | const struct xua_dialect * | dialect, |
struct xua_msg * | xua | ||
) |
References xua_dialect::class, xua_msg::hdr, xua_dialect::log_subsys, xua_msg_class::mand_ies, msg_class, xua_common_hdr::msg_class, msg_type, xua_common_hdr::msg_type, xua_msg_class::name, xua_dialect::name, xua_class_iei_name(), xua_class_msg_name(), and xua_msg_find_tag().
Referenced by m3ua_rx_msg(), and sua_rx_msg().
struct xua_msg * xua_from_msg | ( | const int | version, |
uint16_t | len, | ||
uint8_t * | data | ||
) |
References data, xua_msg::hdr, len, xua_common_hdr::msg_length, NULL, version, xua_common_hdr::version, xua_from_msg_common(), xua_msg_alloc(), and xua_msg_free().
Referenced by m3ua_gen_error_msg(), m3ua_rx_msg(), and sua_rx_msg().
|
static |
References data, xua_parameter_hdr::data, len, xua_parameter_hdr::len, xua_parameter_hdr::tag, and xua_msg_add_data().
Referenced by xua_from_msg(), and xua_from_nested().
struct xua_msg * xua_from_nested | ( | struct xua_msg_part * | outer | ) |
References xua_msg_part::dat, xua_msg_part::len, NULL, xua_from_msg_common(), xua_msg_alloc(), and xua_msg_free().
Referenced by m3ua_rx_rkm_dereg_rsp(), m3ua_rx_rkm_reg_req(), and m3ua_rx_rkm_reg_rsp().
char * xua_hdr_dump | ( | const struct xua_msg * | xua, |
const struct xua_dialect * | dialect | ||
) |
References xua_dialect::class, xua_msg::hdr, xua_common_hdr::msg_class, xua_common_hdr::msg_type, xua_msg_class::name, NULL, and xua_class_msg_name().
Referenced by ensure_opc_in_calling_ssn(), m3ua_rx_msg(), m3ua_rx_xfer(), osmo_sua_to_sccp(), sccp_conn_scu_gen_encode_and_send(), sccp_find_user(), sccp_rout_fail_enqueue(), 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_scrc_rout_fail(), sccp_scoc_rx_unass_local_ref(), sccp_scrc_rx_sclc_msg(), sccp_scrc_rx_scoc_conn_msg(), sclc_rx_cldr(), sclc_rx_cldt(), scoc_fsm_idle(), scrc_node_2(), scrc_rx_mtp_xfer_ind_xua(), sua_rx_msg(), and xua_msg_dump().
int xua_msg_add_data | ( | struct xua_msg * | msg, |
uint16_t | tag, | ||
uint16_t | len, | ||
const uint8_t * | dat | ||
) |
References xua_msg_part::dat, xua_msg_part::entry, xua_msg::headers, xua_msg_part::len, len, xua_msg_part::tag, and tag.
Referenced by m3ua_encode_duna(), m3ua_encode_dupu(), m3ua_encode_notify(), m3ua_gen_error_msg(), m3ua_tx_snm_congestion(), sccp_data_to_sua_ptr(), sccp_longdata_to_sua_ptr(), sua_encode_duna(), sua_encode_dupu(), sua_gen_error_msg(), sua_tx_snm_congestion(), xua_from_msg_common(), xua_gen_msg_cl(), xua_gen_msg_co(), xua_gen_relre(), xua_msg_add_asp_rctx(), xua_msg_add_sccp_addr(), xua_msg_add_sccp_opt(), xua_msg_add_u32(), xua_msg_copy(), and xua_msg_copy_part().
int xua_msg_add_sccp_addr | ( | struct xua_msg * | xua, |
uint16_t | iei, | ||
const struct osmo_sccp_addr * | addr | ||
) |
References osmo_sccp_addr::gt, osmo_sccp_addr::ip, msgb_t16l16vp_put(), msgb_t16l16vp_put_u32(), 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::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ri, osmo_sccp_addr::ssn, SUA_IEI_IPv4, SUA_IEI_IPv6, SUA_IEI_PC, SUA_IEI_SSN, SUA_RI_GT, SUA_RI_SSN_IP, SUA_RI_SSN_PC, osmo_sccp_addr::v4, osmo_sccp_addr::v6, xua_msg_add_data(), and xua_part_add_gt().
Referenced by ensure_opc_in_calling_ssn(), gen_ret_msg(), patch_sccp_with_pc(), sccp_addr_to_sua(), xua_gen_msg_cl(), and xua_gen_msg_co().
int xua_msg_add_u32 | ( | struct xua_msg * | xua, |
uint16_t | iei, | ||
uint32_t | val | ||
) |
References xua_msg_add_data().
Referenced by gen_coerr(), gen_coref_without_conn(), gen_relco(), gen_ret_msg(), gen_rlsd(), m3ua_encode_dupu(), m3ua_encode_notify(), m3ua_gen_error(), m3ua_tx_snm_congestion(), m3ua_tx_xua_as(), peer_send(), peer_send_error(), 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(), scoc_fsm_active(), sua_encode_duna(), sua_encode_dupu(), sua_gen_error(), sua_tx_snm_congestion(), sua_tx_xua_as(), xua_gen_msg_cl(), xua_gen_msg_co(), xua_gen_relre(), and xua_msg_add_sccp_opt().
int xua_msg_add_u32_data | ( | struct xua_msg * | msg, |
uint16_t | tag, | ||
uint16_t | len, | ||
const uint8_t * | dat | ||
) |
References xua_msg_part::dat, xua_msg_part::entry, xua_msg::headers, xua_msg_part::len, len, xua_msg_part::tag, and tag.
Referenced by m3ua_encode_notify().
struct xua_msg * xua_msg_alloc | ( | void | ) |
References xua_msg::headers, NULL, and tall_xua.
Referenced by gen_coerr(), gen_coref_without_conn(), gen_relco(), gen_ret_msg(), gen_rlsd(), m3ua_encode_duna(), m3ua_encode_dupu(), m3ua_encode_notify(), m3ua_gen_error(), m3ua_tx_snm_congestion(), m3ua_xfer_from_data(), osmo_sccp_to_xua(), peer_send(), peer_send_error(), scoc_fsm_active(), sua_encode_duna(), sua_encode_dupu(), sua_gen_error(), sua_tx_snm_congestion(), xua_from_msg(), xua_from_nested(), xua_gen_msg_cl(), xua_gen_msg_co(), xua_gen_relre(), and xua_msg_copy().
References xua_msg_part::dat, xua_msg::entry, xua_msg::hdr, xua_msg::headers, xua_msg_part::len, xua_msg::mtp, xua_msg_part::tag, xua_msg_add_data(), and xua_msg_alloc().
Referenced by sccp_rout_fail_enqueue().
int xua_msg_copy_part | ( | struct xua_msg * | xua_out, |
uint16_t | tag_out, | ||
const struct xua_msg * | xua_in, | ||
uint16_t | tag_in | ||
) |
References xua_msg_part::dat, xua_msg_part::len, xua_msg_add_data(), and xua_msg_find_tag().
Referenced by gen_coref_without_conn(), gen_ret_msg(), and peer_send().
char * xua_msg_dump | ( | const struct xua_msg * | xua, |
const struct xua_dialect * | dialect | ||
) |
References xua_dialect::class, xua_msg_part::dat, xua_msg::hdr, xua_msg::headers, xua_msg_part::len, xua_common_hdr::msg_class, xua_common_hdr::msg_length, NULL, xua_msg_part::tag, xua_common_hdr::version, xua_class_iei_name(), and xua_hdr_dump().
Referenced by m3ua_rx_mgmt_err(), sccp_scrc_rx_sclc_msg(), sccp_scrc_rx_scoc_conn_msg(), scrc_rx_mtp_xfer_ind_xua(), and sua_rx_mgmt_err().
int xua_msg_event_map | ( | const struct xua_msg * | xua, |
const struct xua_msg_event_map * | maps, | ||
unsigned int | num_maps | ||
) |
Map from a xua_msg (class+type) to an event.
[in] | xua | xUA message which is to be mapped |
[in] | maps | Table containing msg type+class -> event maps [aram[in] num_maps number of entries in maps |
References xua_msg_event_map::event, xua_msg::hdr, xua_msg_event_map::msg_class, xua_common_hdr::msg_class, xua_msg_event_map::msg_type, and xua_common_hdr::msg_type.
Referenced by m3ua_rx_asp(), sccp_scoc_rx_from_scrc(), and sua_rx_asp().
struct xua_msg_part * xua_msg_find_tag | ( | const struct xua_msg * | xua, |
uint16_t | tag | ||
) |
References xua_msg_part::entry, xua_msg::headers, NULL, xua_msg_part::tag, and tag.
Referenced by data_hdr_from_m3ua(), handle_rkey_dereg_resp(), handle_rkey_reg(), handle_rkey_reg_resp(), ipa_to_msg(), m3ua_decode_notify(), m3ua_gen_error_msg(), m3ua_rx_rkm_dereg_req(), m3ua_rx_snm(), m3ua_rx_snm_asp(), m3ua_rx_xfer(), m3ua_to_xfer_ind(), sccp_add_long_variable_part(), sccp_add_var_addr(), sccp_add_variable_part(), sccp_conn_scu_gen_encode_and_send(), sccp_scoc_rx_from_scrc(), sclc_rx_cldr(), sclc_rx_cldt(), scrc_rx_mtp_xfer_ind_xua(), sua_addr_parse(), sua_rx_cl(), sua_rx_co(), sua_rx_snm_asp(), sua_to_sccp_udt(), sua_to_sccp_udts(), xua_asp_fsm_down(), xua_asp_fsm_inactive(), xua_dialect_check_all_mand_ies(), xua_msg_copy_part(), xua_msg_get_len(), xua_msg_get_str(), xua_msg_get_u32(), xua_msg_get_u32p(), xua_snm_rx_daud(), xua_snm_rx_dava(), xua_snm_rx_duna(), and xua_snm_rx_scon().
void xua_msg_free | ( | struct xua_msg * | msg | ) |
Referenced by deliver_to_mtp_user(), encode_notify(), hmdt_message_for_distribution(), hmrt_message_for_routing(), m3ua_gen_error_msg(), m3ua_rx_asp(), m3ua_rx_mgmt(), m3ua_rx_msg(), m3ua_rx_rkm(), m3ua_rx_rkm_dereg_rsp(), m3ua_rx_rkm_reg_req(), m3ua_rx_rkm_reg_rsp(), m3ua_rx_snm_asp(), m3ua_rx_xfer(), m3ua_tx_xua_as(), m3ua_tx_xua_asp(), mtp_user_prim_cb(), osmo_sccp_to_xua(), patch_sccp_with_pc(), peer_send(), peer_send_error(), rout_fail_pending_cb(), sccp_conn_xua_gen_encode_and_send(), sccp_conn_xua_gen_relre_and_send(), sccp_sclc_rx_scrc_rout_fail(), sccp_scoc_rx_scrc_rout_fail(), scoc_fsm_active(), sua_rx_msg(), sua_tx_xua_as(), sua_tx_xua_asp(), tx_coerr_from_xua(), tx_relco_from_xua(), tx_rlsd_from_xua_twoway(), xua_as_fsm_pending(), xua_as_transmit_msg(), xua_as_transmit_msg_broadcast(), xua_from_msg(), xua_from_nested(), xua_gen_encode_and_send(), xua_gen_msg_cl(), and xua_gen_msg_co().
int xua_msg_free_tag | ( | struct xua_msg * | xua, |
uint16_t | tag | ||
) |
References xua_msg_part::entry, xua_msg::headers, xua_msg_part::tag, and tag.
Referenced by ensure_opc_in_calling_ssn(), gen_ret_msg(), m3ua_rx_xfer(), and patch_sccp_with_pc().
int xua_msg_get_len | ( | const struct xua_msg * | xua, |
uint16_t | iei | ||
) |
References xua_msg_part::len, and xua_msg_find_tag().
Referenced by sua_to_sccp_udt(), sua_to_sccp_udts(), and sua_to_sccp_xudt().
const char * xua_msg_get_str | ( | const struct xua_msg * | xua, |
uint16_t | iei | ||
) |
References NULL, xua_msg_find_tag(), and xua_msg_part_get_str().
Referenced by xua_snm_rx_daud(), xua_snm_rx_dava(), xua_snm_rx_duna(), xua_snm_rx_dupu(), and xua_snm_rx_scon().
uint32_t xua_msg_get_u32 | ( | const struct xua_msg * | xua, |
uint16_t | iei | ||
) |
References xua_msg_find_tag(), and xua_msg_part_get_u32().
Referenced by handle_rkey_dereg_resp(), handle_rkey_reg(), handle_rkey_reg_resp(), m3ua_rx_mgmt_err(), sccp_conn_scu_gen_encode_and_send(), sccp_scoc_rx_from_scrc(), sccp_scoc_rx_scrc_rout_fail(), sclc_rx_cldr(), sclc_rx_cldt(), scoc_fsm_active(), scoc_fsm_conn_pend_out(), scoc_fsm_idle(), scoc_fsm_wait_conn_conf(), scrc_rx_mtp_xfer_ind_xua(), store_local_ref(), sua_rx_mgmt_err(), 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_ludt(), sua_to_sccp_ludts(), sua_to_sccp_rlsd(), sua_to_sccp_udt(), sua_to_sccp_udts(), sua_to_sccp_xudt(), sua_to_sccp_xudts(), tx_coerr_from_xua(), tx_relco_from_xua(), tx_rlsd_from_xua_twoway(), xua_asp_fsm_inactive(), and xua_snm_rx_dupu().
const uint32_t * xua_msg_get_u32p | ( | const struct xua_msg * | xua, |
uint16_t | iei, | ||
uint32_t * | out | ||
) |
References NULL, xua_msg_find_tag(), and xua_msg_part_get_u32().
Referenced by xua_snm_rx_dava(), xua_snm_rx_duna(), and xua_snm_rx_scon().
const char * xua_msg_part_get_str | ( | const struct xua_msg_part * | part | ) |
References xua_msg_part::dat, and xua_msg_part::len.
Referenced by xua_msg_get_str().
uint32_t xua_msg_part_get_u32 | ( | const struct xua_msg_part * | part | ) |
void xua_part_add_gt | ( | struct msgb * | msg, |
const struct osmo_sccp_gt * | gt | ||
) |
References osmo_sccp_gt::digits, osmo_sccp_gt::gti, osmo_sccp_gt::nai, osmo_sccp_gt::npi, SUA_IEI_GT, and osmo_sccp_gt::tt.
Referenced by xua_msg_add_sccp_addr().
struct msgb * xua_to_msg | ( | const int | version, |
struct xua_msg * | xua | ||
) |
References xua_msg_part::dat, xua_msg::hdr, xua_msg::headers, xua_msg_part::len, xua_common_hdr::msg_length, NULL, xua_common_hdr::spare, xua_msg_part::tag, version, and xua_common_hdr::version.
Referenced by encode_notify(), m3ua_to_msg(), peer_send(), peer_send_error(), and sua_to_msg().
|
static |
Referenced by osmo_xua_msg_tall_ctx_init(), and xua_msg_alloc().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <ss7_route.h>
Data Fields | |
struct llist_head | list |
member in osmo_ss7_combined_linkset::routes More... | |
struct osmo_ss7_route_table * | rtable |
osmo_ss7_route_table to which we belong More... | |
struct osmo_ss7_combined_linkset * | clset |
enum osmo_ss7_route_status | status |
struct { | |
struct osmo_ss7_linkset * linkset | |
pointer to linkset (destination) of route More... | |
struct osmo_ss7_as * as | |
pointer to Application Server More... | |
} | dest |
struct { | |
uint32_t pc | |
uint32_t mask | |
char * linkset_name | |
human-specified linkset name More... | |
uint32_t priority | |
lower priority is higher More... | |
uint8_t qos_class | |
bool dyn_allocated | |
} | cfg |
struct osmo_ss7_as* osmo_ss7_route::as |
pointer to Application Server
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), gen_mtp_transfer_req_xua(), handle_rkey_dereg(), handle_rkey_reg(), hmrt_message_for_routing(), osmo_ss7_route_get_dest_as(), osmo_ss7_route_name(), ss7_combined_linkset_lookup_route(), ss7_route_dest_is_available(), ss7_route_set_linkset(), ss7_route_table_del_routes_by_as(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_update_route_status_by_as(), xua_snm_srm_pc_available(), and xua_snm_srm_pc_available_single().
struct { ... } osmo_ss7_route::cfg |
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), DEFUN_ATTR(), osmo_ss7_route_name(), osmo_ss7_route_print(), ss7_route_alloc(), ss7_route_insert(), ss7_route_is_fully_qualified(), ss7_route_set_linkset(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_update_route_status_by_as(), vty_dump_rtable(), and write_one_rtable().
struct osmo_ss7_combined_linkset* osmo_ss7_route::clset |
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), ss7_combined_linkset_add_route(), ss7_combined_linkset_assign_route_roundrobin(), ss7_combined_linkset_del_route(), ss7_combined_linkset_is_available(), ss7_combined_linkset_select_route_roundrobin(), ss7_route_insert(), ss7_route_table_del_routes_by_as(), ss7_route_table_del_routes_by_linkset(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_update_route_status_by_as(), vty_dump_rtable(), and write_one_rtable().
struct { ... } osmo_ss7_route::dest |
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), gen_mtp_transfer_req_xua(), hmrt_message_for_routing(), osmo_ss7_route_get_dest_as(), osmo_ss7_route_name(), ss7_combined_linkset_lookup_route(), ss7_route_dest_is_available(), ss7_route_set_linkset(), ss7_route_table_del_routes_by_as(), ss7_route_table_del_routes_by_linkset(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_route_by_dpc_mask_as(), and ss7_route_table_update_route_status_by_as().
bool osmo_ss7_route::dyn_allocated |
struct osmo_ss7_linkset* osmo_ss7_route::linkset |
pointer to linkset (destination) of route
Referenced by gen_mtp_transfer_req_xua(), hmrt_message_for_routing(), osmo_ss7_route_name(), ss7_route_dest_is_available(), ss7_route_set_linkset(), and ss7_route_table_del_routes_by_linkset().
char* osmo_ss7_route::linkset_name |
human-specified linkset name
Referenced by ss7_route_create(), ss7_route_insert(), ss7_route_set_linkset(), vty_dump_rtable(), and write_one_rtable().
struct llist_head osmo_ss7_route::list |
member in osmo_ss7_combined_linkset::routes
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), ss7_combined_linkset_add_route(), ss7_combined_linkset_assign_route_roundrobin(), ss7_combined_linkset_del_route(), ss7_combined_linkset_is_available(), ss7_combined_linkset_select_route_roundrobin(), ss7_route_alloc(), ss7_route_insert(), ss7_route_inserted(), ss7_route_table_del_routes_by_as(), ss7_route_table_del_routes_by_linkset(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_update_route_status_by_as(), vty_dump_rtable(), and write_one_rtable().
uint32_t osmo_ss7_route::mask |
Referenced by DEFUN_ATTR(), osmo_ss7_route_name(), osmo_ss7_route_print(), ss7_route_alloc(), ss7_route_create(), ss7_route_insert(), ss7_route_is_fully_qualified(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), u32_masklen(), write_one_rtable(), and xua_snm_srm_pc_available().
uint32_t osmo_ss7_route::pc |
uint32_t osmo_ss7_route::priority |
lower priority is higher
Referenced by DEFUN_ATTR(), osmo_ss7_route_name(), ss7_route_alloc(), ss7_route_insert(), vty_dump_rtable(), and write_one_rtable().
uint8_t osmo_ss7_route::qos_class |
Referenced by DEFUN_ATTR(), vty_dump_rtable(), and write_one_rtable().
struct osmo_ss7_route_table* osmo_ss7_route::rtable |
osmo_ss7_route_table to which we belong
Referenced by DEFUN_ATTR(), osmo_ss7_route_name(), osmo_ss7_route_print(), ss7_route_alloc(), ss7_route_insert(), ss7_route_is_fully_qualified(), ss7_route_set_linkset(), and write_one_rtable().
enum osmo_ss7_route_status osmo_ss7_route::status |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
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... | |
bool | ss7_linkset_is_available (const struct osmo_ss7_linkset *lset) |
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, NULL, 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, NULL, ss7_initialized, and ss7_linkset_find_by_name().
bool ss7_linkset_is_available | ( | const struct osmo_ss7_linkset * | lset | ) |
References osmo_ss7_linkset::links, and ss7_link_is_available().
Referenced by ss7_route_dest_is_available().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <xua_msg.h>
Data Fields | |
const char * | name |
const struct value_string * | msgt_names |
const struct value_string * | iei_names |
const uint16_t * | mand_ies [256] |
const struct value_string* xua_msg_class::iei_names |
Referenced by xua_class_iei_name().
const uint16_t* xua_msg_class::mand_ies[256] |
Referenced by xua_dialect_check_all_mand_ies().
const struct value_string* xua_msg_class::msgt_names |
Referenced by xua_class_msg_name().
const char* xua_msg_class::name |
Referenced by xua_dialect_check_all_mand_ies(), and xua_hdr_dump().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
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(), and osmo_ss7_asp_use_default_lm().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <ss7_combined_linkset.h>
Data Fields | |
struct llist_head | list |
member in osmo_ss7_route_table::combined_linksets More... | |
struct osmo_ss7_route_table * | rtable |
osmo_ss7_route_table to which we belong More... | |
struct osmo_ss7_esls_entry | esls_table [NUM_EXT_SLS] |
struct llist_head | routes |
list of osmo_ss7_route More... | |
unsigned int | num_routes |
void * | last_route_roundrobin_ass |
void * | last_route_roundrobin_tx |
struct { | |
uint32_t pc | |
uint32_t mask | |
uint32_t priority | |
lower priority is higher More... | |
} | cfg |
struct { ... } osmo_ss7_combined_linkset::cfg |
Referenced by DEFUN(), ss7_combined_linkset_alloc(), ss7_combined_linkset_insert(), ss7_route_table_dpc_is_accessible(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_combined_linkset(), ss7_route_table_find_combined_linkset_by_dpc(), ss7_route_table_find_combined_linkset_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_lookup_route(), and vty_dump_rtable().
struct osmo_ss7_esls_entry osmo_ss7_combined_linkset::esls_table[NUM_EXT_SLS] |
Referenced by DEFUN(), ss7_combined_linkset_del_route(), and ss7_combined_linkset_lookup_route().
void* osmo_ss7_combined_linkset::last_route_roundrobin_ass |
Referenced by ss7_combined_linkset_assign_route_roundrobin(), and ss7_combined_linkset_del_route().
void* osmo_ss7_combined_linkset::last_route_roundrobin_tx |
Referenced by ss7_combined_linkset_del_route(), and ss7_combined_linkset_select_route_roundrobin().
struct llist_head osmo_ss7_combined_linkset::list |
member in osmo_ss7_route_table::combined_linksets
Referenced by DEFUN(), ss7_combined_linkset_del_route(), ss7_combined_linkset_free(), ss7_combined_linkset_insert(), ss7_route_table_del_routes_by_as(), ss7_route_table_del_routes_by_linkset(), ss7_route_table_dpc_is_accessible(), ss7_route_table_find_combined_linkset(), ss7_route_table_find_combined_linkset_by_dpc(), ss7_route_table_find_combined_linkset_by_dpc_mask(), and ss7_route_table_update_route_status_by_as().
uint32_t osmo_ss7_combined_linkset::mask |
Referenced by DEFUN(), ss7_combined_linkset_alloc(), ss7_combined_linkset_insert(), ss7_route_table_dpc_is_accessible(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_combined_linkset(), ss7_route_table_find_combined_linkset_by_dpc(), ss7_route_table_find_combined_linkset_by_dpc_mask(), ss7_route_table_find_or_create_combined_linkset(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_lookup_route(), and vty_dump_rtable().
unsigned int osmo_ss7_combined_linkset::num_routes |
uint32_t osmo_ss7_combined_linkset::pc |
Referenced by DEFUN(), ss7_combined_linkset_alloc(), ss7_route_table_dpc_is_accessible(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_combined_linkset(), ss7_route_table_find_combined_linkset_by_dpc(), ss7_route_table_find_combined_linkset_by_dpc_mask(), ss7_route_table_find_or_create_combined_linkset(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_lookup_route(), and vty_dump_rtable().
uint32_t osmo_ss7_combined_linkset::priority |
lower priority is higher
Referenced by ss7_combined_linkset_alloc(), ss7_combined_linkset_insert(), and ss7_route_table_find_combined_linkset().
struct llist_head osmo_ss7_combined_linkset::routes |
list of osmo_ss7_route
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), ss7_combined_linkset_add_route(), ss7_combined_linkset_alloc(), ss7_combined_linkset_assign_route_roundrobin(), ss7_combined_linkset_del_route(), ss7_combined_linkset_is_available(), ss7_combined_linkset_select_route_roundrobin(), ss7_route_insert(), ss7_route_table_del_routes_by_as(), ss7_route_table_del_routes_by_linkset(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_update_route_status_by_as(), vty_dump_rtable(), and write_one_rtable().
struct osmo_ss7_route_table* osmo_ss7_combined_linkset::rtable |
osmo_ss7_route_table to which we belong
Referenced by DEFUN(), ss7_combined_linkset_alloc(), ss7_combined_linkset_insert(), ss7_combined_linkset_lookup_route(), and ss7_route_table_find_or_create_combined_linkset().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
Go to the source code of this file.
Data Structures | |
struct | osmo_xlm_prim_notify |
struct | osmo_xlm_prim_error |
struct | osmo_xlm_prim_rk_reg |
struct | osmo_xlm_prim_rk_dereg |
struct | osmo_xlm_prim |
Macros | |
#define | NOTIFY_PAR_P_ASP_ID (1 << 0) |
#define | NOTIFY_PAR_P_ROUTE_CTX (1 << 1) |
#define | msgb_xlm_prim(msg) ((struct osmo_xlm_prim *)(msg)->l1h) |
Functions | |
char * | osmo_xlm_prim_name (struct osmo_prim_hdr *oph) |
int | osmo_xlm_sap_down (struct osmo_ss7_asp *asp, struct osmo_prim_hdr *oph) |
#define msgb_xlm_prim | ( | msg | ) | ((struct osmo_xlm_prim *)(msg)->l1h) |
#define NOTIFY_PAR_P_ASP_ID (1 << 0) |
#define NOTIFY_PAR_P_ROUTE_CTX (1 << 1) |
enum osmo_sigtran_sap |
enum osmo_xlm_prim_type |
char * osmo_xlm_prim_name | ( | struct osmo_prim_hdr * | oph | ) |
References osmo_xlm_prim_names, and prim_name_buf.
Referenced by default_lm_prim_cb(), osmo_xlm_sap_down(), and xua_asp_send_xlm_prim().
int osmo_xlm_sap_down | ( | struct osmo_ss7_asp * | asp, |
struct osmo_prim_hdr * | oph | ||
) |
References osmo_xlm_prim_rk_reg::key, LOGPASP, osmo_xlm_prim::oph, OSMO_XLM_PRIM_M_RK_DEREG, OSMO_XLM_PRIM_M_RK_REG, osmo_xlm_prim_name(), osmo_xlm_prim::rk_dereg, osmo_xlm_prim::rk_reg, osmo_xlm_prim_rk_dereg::route_ctx, osmo_xlm_prim_rk_reg::traf_mode, osmo_xlm_prim::u, xua_rkm_send_dereg_req(), and xua_rkm_send_reg_req().
Referenced by lm_timer_cb().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <errno.h>
#include <string.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/linuxrbtree.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/fsm.h>
#include <osmocom/sigtran/sccp_helpers.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sccp/sccp_types.h>
#include "xua_internal.h"
#include "sccp_connection.h"
#include "sccp_scoc_fsm.h"
#include "sccp_instance.h"
#include "sccp_internal.h"
#include "sccp_user.h"
#include "ss7_internal.h"
#include "ss7_instance.h"
Functions | |
struct sccp_connection * | sccp_find_conn_by_id (const struct osmo_sccp_instance *inst, uint32_t id) |
bool | osmo_sccp_conn_id_exists (const struct osmo_sccp_instance *inst, uint32_t id) |
int | osmo_sccp_instance_next_conn_id (struct osmo_sccp_instance *sccp) |
static struct sccp_connection * | conn_create (struct osmo_sccp_user *user) |
static struct xua_msg * | xua_gen_relre (struct sccp_connection *conn, uint32_t cause, struct osmo_scu_prim *prim) |
int | sccp_conn_xua_gen_relre_and_send (struct sccp_connection *conn, uint32_t cause, struct osmo_scu_prim *prim) |
static bool | xua_opt_data_check_drop (const struct osmo_scu_prim *prim, unsigned lim, const char *message) |
static bool | xua_opt_data_cache_keep (struct sccp_connection *conn, const struct osmo_scu_prim *prim, int msg_type) |
static bool | xua_opt_data_length_lim (struct sccp_connection *conn, const struct osmo_scu_prim *prim, int msg_type) |
static struct xua_msg * | xua_gen_msg_co (struct sccp_connection *conn, uint32_t event, const struct osmo_scu_prim *prim, int msg_type) |
int | sccp_conn_xua_gen_encode_and_send (struct sccp_connection *conn, uint32_t event, const struct osmo_scu_prim *prim, int msg_type) |
static uint8_t | get_cref_cause_for_ret (uint8_t ret_cause) |
static struct xua_msg * | gen_coref_without_conn (struct osmo_sccp_instance *inst, struct xua_msg *xua_in, uint32_t ref_cause) |
static struct osmo_sccp_user * | sccp_find_user (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
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. More... | |
static struct xua_msg * | gen_coerr (uint32_t route_ctx, uint32_t dest_ref, uint32_t err_cause) |
static void | tx_coerr_from_xua (struct osmo_sccp_instance *inst, struct xua_msg *in, uint32_t err_cause) |
static struct xua_msg * | gen_relco (uint32_t route_ctx, uint32_t dest_ref, uint32_t src_ref) |
static void | tx_relco_from_xua (struct osmo_sccp_instance *inst, struct xua_msg *in) |
static struct xua_msg * | gen_rlsd (uint32_t route_ctx, uint32_t dest_ref, uint32_t src_ref) |
static void | tx_rlsd_from_xua_twoway (struct sccp_connection *conn, struct xua_msg *in) |
static void | sccp_scoc_rx_unass_local_ref (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
static void | sccp_scoc_rx_inval_src_ref (struct sccp_connection *conn, struct xua_msg *xua, uint32_t inval_src_ref) |
static void | sccp_scoc_rx_inval_opc (struct sccp_connection *conn, 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... | |
Variables | |
static const struct xua_msg_event_map | sua_scoc_event_map [] |
static const uint8_t | cause_map_cref [] |
|
static |
References sccp_connection::conn_id, osmo_sccp_user::inst, NULL, osmo_sccp_instance_next_conn_id(), sccp_conn_alloc(), and sccp_connection::user.
Referenced by sccp_scoc_rx_from_scrc().
|
static |
References xua_msg::hdr, SUA_CAUSE_T_ERROR, SUA_CO_COERR, SUA_IEI_CAUSE, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_MSGC_CO, XUA_HDR, xua_msg_add_u32(), and xua_msg_alloc().
Referenced by tx_coerr_from_xua().
|
static |
References xua_msg::hdr, osmo_sccp_instance::route_ctx, SUA_CAUSE_T_REFUSAL, SUA_CO_COREF, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_DEST_REF, SUA_IEI_IMPORTANCE, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_ADDR, SUA_IEI_SRC_REF, SUA_MSGC_CO, XUA_HDR, xua_msg_add_u32(), xua_msg_alloc(), and xua_msg_copy_part().
Referenced by sccp_scoc_rx_scrc_rout_fail().
|
static |
References xua_msg::hdr, SUA_CO_RELCO, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, SUA_MSGC_CO, XUA_HDR, xua_msg_add_u32(), and xua_msg_alloc().
Referenced by tx_relco_from_xua().
|
static |
References xua_msg::hdr, SUA_CO_RELRE, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, SUA_MSGC_CO, XUA_HDR, xua_msg_add_u32(), and xua_msg_alloc().
Referenced by tx_rlsd_from_xua_twoway().
|
static |
References cause_map_cref.
Referenced by sccp_scoc_rx_scrc_rout_fail().
bool osmo_sccp_conn_id_exists | ( | const struct osmo_sccp_instance * | inst, |
uint32_t | id | ||
) |
References sccp_find_conn_by_id().
Referenced by osmo_sccp_tx_conn_resp_msg(), osmo_sccp_tx_data(), and osmo_sccp_tx_disconn_data().
int osmo_sccp_instance_next_conn_id | ( | struct osmo_sccp_instance * | sccp | ) |
References osmo_sccp_instance::next_id, and sccp_find_conn_by_id().
Referenced by conn_create().
int sccp_conn_xua_gen_encode_and_send | ( | struct sccp_connection * | conn, |
uint32_t | event, | ||
const struct osmo_scu_prim * | prim, | ||
int | msg_type | ||
) |
References sccp_connection::inst, msg_type, sccp_scrc_rx_scoc_conn_msg(), xua_gen_msg_co(), and xua_msg_free().
Referenced by scoc_fsm_active(), scoc_fsm_conn_pend_in(), scoc_fsm_conn_pend_out(), scoc_fsm_idle(), and scoc_fsm_wait_conn_conf().
int sccp_conn_xua_gen_relre_and_send | ( | struct sccp_connection * | conn, |
uint32_t | cause, | ||
struct osmo_scu_prim * | prim | ||
) |
struct sccp_connection * sccp_find_conn_by_id | ( | const struct osmo_sccp_instance * | inst, |
uint32_t | id | ||
) |
|
static |
References LOGPSCI, NULL, OSMO_SCCP_ADDR_T_SSN, osmo_sccp_addr::pc, osmo_sccp_addr::presence, sccp_user_find(), osmo_sccp_addr::ssn, sua_addr_parse(), SUA_IEI_DEST_ADDR, xua_dialect_sua, and xua_hdr_dump().
Referenced by sccp_scoc_rx_from_scrc().
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(), sccp_connection::fi, xua_msg::hdr, sccp_connection::incoming, osmo_sccp_user::inst, LOGPSCC, LOGPSCI, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_connection::remote_pc, sccp_connection::remote_ref, sccp_find_conn_by_id(), 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().
|
static |
References xua_msg::hdr, sccp_connection::inst, LOGPSCC, MAX_PC_STR_LEN, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, osmo_ss7_pointcode_print_buf(), osmo_sccp_instance::ss7, SUA_CO_CODA, SUA_CO_CODT, SUA_CO_COERR, SUA_CO_RELCO, SUA_CO_RELRE, SUA_CO_RESCO, SUA_CO_RESRE, tx_coerr_from_xua(), xua_dialect_sua, and xua_hdr_dump().
Referenced by sccp_scoc_rx_from_scrc().
|
static |
References xua_msg::hdr, sccp_connection::inst, LOGPSCC, xua_common_hdr::msg_type, sccp_connection::remote_ref, SUA_CO_COIT, SUA_CO_RELCO, SUA_CO_RELRE, SUA_CO_RESCO, SUA_CO_RESRE, tx_coerr_from_xua(), tx_rlsd_from_xua_twoway(), xua_dialect_sua, and xua_hdr_dump().
Referenced by sccp_scoc_rx_from_scrc().
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 sccp_connection::conn_id, sccp_connection::fi, gen_coref_without_conn(), get_cref_cause_for_ret(), sccp_connection::inst, LOGPSCI, sccp_find_conn_by_id(), sccp_scrc_rx_scoc_conn_msg(), SCOC_E_RCOC_ROUT_FAIL_IND, SUA_IEI_SRC_REF, xua_dialect_sua, xua_hdr_dump(), xua_msg_free(), and xua_msg_get_u32().
Referenced by rout_fail_pending_cb().
|
static |
References xua_msg::hdr, LOGPSCI, xua_common_hdr::msg_type, SUA_CO_COAK, SUA_CO_CODA, SUA_CO_CODT, SUA_CO_COERR, SUA_CO_COIT, SUA_CO_COREF, SUA_CO_RELCO, SUA_CO_RELRE, SUA_CO_RESCO, SUA_CO_RESRE, tx_coerr_from_xua(), tx_relco_from_xua(), xua_dialect_sua, and xua_hdr_dump().
Referenced by sccp_scoc_rx_from_scrc().
|
static |
References osmo_mtp_transfer_param::dpc, gen_coerr(), xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_scrc_rx_scoc_conn_msg(), osmo_mtp_transfer_param::sio, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, xua_msg_free(), and xua_msg_get_u32().
Referenced by sccp_scoc_rx_inval_opc(), sccp_scoc_rx_inval_src_ref(), and sccp_scoc_rx_unass_local_ref().
|
static |
|
static |
References sccp_connection::conn_id, osmo_mtp_transfer_param::dpc, sccp_connection::fi, gen_rlsd(), sccp_connection::inst, xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_connection::remote_pc, sccp_connection::remote_ref, osmo_sccp_instance::route_ctx, sccp_scrc_rx_scoc_conn_msg(), SCOC_E_RCOC_RLSD_IND, osmo_mtp_transfer_param::sio, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, xua_msg_free(), and xua_msg_get_u32().
Referenced by sccp_scoc_rx_inval_src_ref().
|
static |
References sccp_connection::called_addr, sccp_connection::calling_addr, osmo_scu_disconn_param::cause, sccp_connection::conn_id, osmo_scu_prim::disconnect, osmo_mtp_transfer_param::dpc, xua_msg::hdr, sccp_connection::inst, LOGPSCC, msg_type, xua_msg::mtp, NULL, osmo_scu_prim::oph, osmo_sccp_addr::presence, sccp_connection::remote_pc, sccp_connection::remote_ref, osmo_sccp_instance::route_ctx, sccp_connection::sccp_class, osmo_mtp_transfer_param::sls, SUA_CAUSE_T_REFUSAL, SUA_CAUSE_T_RELEASE, SUA_CO_COAK, SUA_CO_CODT, SUA_CO_COIT, SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELCO, SUA_CO_RELRE, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_DEST_REF, SUA_IEI_PROTO_CLASS, SUA_IEI_ROUTE_CTX, SUA_IEI_SEQ_CTRL, SUA_IEI_SRC_ADDR, SUA_IEI_SRC_REF, SUA_MSGC_CO, sccp_connection::tx_co_mtp_sls, osmo_scu_prim::u, XUA_HDR, xua_msg_add_data(), xua_msg_add_sccp_addr(), xua_msg_add_u32(), xua_msg_alloc(), xua_msg_free(), and xua_opt_data_length_lim().
Referenced by sccp_conn_xua_gen_encode_and_send().
|
static |
References sccp_connection::conn_id, xua_msg::hdr, sccp_connection::inst, NULL, osmo_scu_prim::oph, sccp_connection::remote_ref, osmo_sccp_instance::route_ctx, SUA_CAUSE_T_RELEASE, SUA_CO_RELRE, SUA_IEI_CAUSE, SUA_IEI_DATA, SUA_IEI_DEST_REF, SUA_IEI_ROUTE_CTX, SUA_IEI_SRC_REF, SUA_MSGC_CO, XUA_HDR, xua_msg_add_data(), xua_msg_add_u32(), and xua_msg_alloc().
Referenced by sccp_conn_xua_gen_relre_and_send().
|
static |
|
static |
References osmo_scu_prim::oph, and osmo_scu_prim_name().
Referenced by xua_opt_data_cache_keep(), and xua_opt_data_length_lim().
|
static |
References sccp_connection::conn_id, sccp_connection::inst, osmo_sccp_instance::max_optional_data, msg_type, osmo_scu_prim::oph, osmo_sccp_tx_data(), SUA_CO_COAK, SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELRE, sccp_connection::user, xua_opt_data_cache_keep(), and xua_opt_data_check_drop().
Referenced by xua_gen_msg_co().
|
static |
Referenced by get_cref_cause_for_ret().
|
static |
Referenced by sccp_scoc_rx_from_scrc().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <stdbool.h>
#include <stdint.h>
#include <osmocom/vty/vty.h>
#include <osmocom/netif/stream.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_instance.h"
Go to the source code of this file.
Macros | |
#define | CS7_STR "ITU-T Signaling System 7\n" |
#define | PC_STR "Point Code\n" |
#define | INST_STR "An instance of the SS7 stack\n" |
#define | XUA_VAR_STR "(sua|m3ua|ipa)" |
#define | XUA_VAR_HELP_STR |
#define | IPPROTO_VAR_STR "(sctp|tcp)" |
#define | IPPROTO_VAR_HELP_STR |
#define | QOS_CLASS_RANGE_STR "<0-7>" |
#define | QOS_CLASS_RANGE_HELP_STR "QoS Class\n" |
#define | QOS_CLASS_VAR_STR "(" QOS_CLASS_RANGE_STR "|default)" |
#define | QOS_CLASS_VAR_HELP_STR |
Enumerations | |
enum | cs7_role_t { CS7_ROLE_SG , CS7_ROLE_ASP } |
Functions | |
int | parse_trans_proto (const char *protocol) |
enum osmo_ss7_asp_protocol | parse_asp_proto (const char *protocol) |
void | ss7_vty_init_node_asp (void) |
void | ss7_vty_write_one_asp (struct vty *vty, struct osmo_ss7_asp *asp, bool show_dyn_config) |
int | ss7_vty_node_asp_go_parent (struct vty *vty) |
void | ss7_vty_init_node_as (void) |
void | ss7_vty_write_one_as (struct vty *vty, struct osmo_ss7_as *as, bool show_dyn_config) |
int | ss7_vty_node_as_go_parent (struct vty *vty) |
void | ss7_vty_init_node_oxs (void) |
void | ss7_vty_init_show_oxs (void) |
void | ss7_vty_write_one_oxs (struct vty *vty, struct osmo_xua_server *xs) |
int | ss7_vty_node_oxs_go_parent (struct vty *vty) |
Variables | |
void * | g_ctx |
enum cs7_role_t | cs7_role |
const struct value_string | ipproto_vals [] |
#define CS7_STR "ITU-T Signaling System 7\n" |
#define INST_STR "An instance of the SS7 stack\n" |
#define IPPROTO_VAR_HELP_STR |
#define IPPROTO_VAR_STR "(sctp|tcp)" |
#define PC_STR "Point Code\n" |
#define QOS_CLASS_RANGE_HELP_STR "QoS Class\n" |
#define QOS_CLASS_RANGE_STR "<0-7>" |
#define QOS_CLASS_VAR_HELP_STR |
#define QOS_CLASS_VAR_STR "(" QOS_CLASS_RANGE_STR "|default)" |
#define XUA_VAR_HELP_STR |
#define XUA_VAR_STR "(sua|m3ua|ipa)" |
enum cs7_role_t |
enum osmo_ss7_asp_protocol parse_asp_proto | ( | const char * | protocol | ) |
References osmo_ss7_asp_protocol_vals.
Referenced by DEFUN(), and DEFUN_ATTR().
int parse_trans_proto | ( | const char * | protocol | ) |
References ipproto_vals.
Referenced by DEFUN(), and DEFUN_ATTR().
void ss7_vty_init_node_as | ( | void | ) |
Referenced by vty_init_shared().
void ss7_vty_init_node_asp | ( | void | ) |
References asp_node, asp_quirk_descs, asp_quirk_names, g_ctx, gen_asp_timer_lm_cmd_strs(), gen_asp_timer_xua_cmd_strs(), and NULL.
Referenced by vty_init_shared().
void ss7_vty_init_node_oxs | ( | void | ) |
References NULL, and xua_node.
Referenced by osmo_ss7_vty_init_sg().
void ss7_vty_init_show_oxs | ( | void | ) |
Referenced by vty_init_shared().
int ss7_vty_node_as_go_parent | ( | struct vty * | vty | ) |
References osmo_ss7_as::cfg, cs7_role, CS7_ROLE_ASP, osmo_ss7_as::dpc_enabled, osmo_ss7_as::inst, osmo_ss7_as::name, osmo_ss7_as::opc_enabled, OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_ROLE_ASP, OSMO_SS7_ASP_ROLE_SG, osmo_ss7_pc_is_local(), osmo_ss7_routing_key::pc, osmo_ss7_as::pc_override, osmo_ss7_as::proto, osmo_ss7_as::routing_key, and ss7_as_get_local_role().
Referenced by osmo_ss7_vty_go_parent().
int ss7_vty_node_asp_go_parent | ( | struct vty * | vty | ) |
int ss7_vty_node_oxs_go_parent | ( | struct vty * | vty | ) |
References osmo_xua_server::inst, ss7_xua_server_bind(), and ss7_xua_server_set_default_local_hosts().
Referenced by osmo_ss7_vty_go_parent().
void ss7_vty_write_one_as | ( | struct vty * | vty, |
struct osmo_ss7_as * | as, | ||
bool | show_dyn_config | ||
) |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_routing_key::context, osmo_ss7_as::description, osmo_ss7_as::dpc, osmo_ss7_as::dpc_enabled, osmo_ss7_asp::dyn_allocated, osmo_ss7_as::inst, osmo_ss7_as::loadshare, osmo_ss7_as::mode, osmo_ss7_as::mode_set_by_vty, mtp_si_vals, osmo_ss7_as::name, osmo_ss7_asp::name, osmo_ss7_as::opc, osmo_ss7_as::opc_enabled, osmo_ss7_as::opc_shift, osmo_ss7_as::opc_sls, OSMO_SS7_AS_TMOD_LOADSHARE, osmo_ss7_as_traffic_mode_name(), osmo_ss7_asp_protocol_name(), osmo_ss7_pointcode_print(), osmo_ss7_routing_key::pc, osmo_ss7_as::pc_override, osmo_ss7_as::proto, osmo_ss7_as::qos_class, osmo_ss7_as::recovery_timeout_msec, osmo_ss7_as::rkm_dyn_allocated, osmo_ss7_as::routing_key, osmo_ss7_as::sccp_mode, osmo_ss7_routing_key::si, osmo_ss7_as::simple_client_allocated, osmo_ss7_asp::simple_client_allocated, osmo_ss7_as::sls_shift, and osmo_ss7_routing_key::ssn.
Referenced by write_one_cs7().
void ss7_vty_write_one_asp | ( | struct vty * | vty, |
struct osmo_ss7_asp * | asp, | ||
bool | show_dyn_config | ||
) |
References osmo_ss7_asp::adm_state, asp_quirk_names, osmo_ss7_asp::cfg, osmo_ss7_asp::daud_act, osmo_ss7_asp::description, osmo_ss7_asp::dyn_allocated, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, ipproto_vals, osmo_ss7_asp::is_server, osmo_ss7_asp::keepalive_enable, osmo_ss7_asp::keepalive_intvl_present, osmo_ss7_asp::keepalive_intvl_value, osmo_ss7_asp::keepalive_probes_present, osmo_ss7_asp::keepalive_probes_value, osmo_ss7_asp::keepalive_time_present, osmo_ss7_asp::keepalive_time_value, osmo_ss7_asp::local, 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_ADM_S_BLOCKED, OSMO_SS7_ASP_ADM_S_ENABLED, OSMO_SS7_ASP_ADM_S_SHUTDOWN, osmo_ss7_asp_protocol_name(), osmo_ss7_asp_role_names, osmo_ss7_asp_peer::port, osmo_ss7_asp::proto, osmo_ss7_asp::qos_class, osmo_ss7_asp::quirks, osmo_ss7_asp::remote, osmo_ss7_asp::role, osmo_ss7_asp::sctp_init, osmo_ss7_asp::simple_client_allocated, ss7_default_trans_proto_for_asp_proto(), osmo_ss7_asp::tcp, osmo_ss7_asp::trans_proto, osmo_ss7_asp::user_timeout_present, osmo_ss7_asp::user_timeout_value, write_asp_timers_lm(), and write_asp_timers_xua().
Referenced by write_one_cs7().
void ss7_vty_write_one_oxs | ( | struct vty * | vty, |
struct osmo_xua_server * | xs | ||
) |
References osmo_xua_server::accept_dyn_reg, osmo_xua_server::cfg, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, ipproto_vals, 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_ss7_asp_peer::port, osmo_xua_server::proto, osmo_xua_server::sctp_init, ss7_default_trans_proto_for_asp_proto(), and osmo_xua_server::trans_proto.
Referenced by write_one_cs7().
|
extern |
Referenced by DEFUN_ATTR(), osmo_ss7_vty_init_asp(), osmo_ss7_vty_init_sg(), ss7_vty_node_as_go_parent(), and write_one_cs7().
|
extern |
Referenced by DEFUN_ATTR(), ss7_vty_init_node_asp(), and vty_init_shared().
|
extern |
Referenced by parse_trans_proto(), ss7_vty_write_one_asp(), ss7_vty_write_one_oxs(), and vty_dump_xua_server().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
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, osmo_ss7_user::name, and NULL.
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, NULL, 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.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
Go to the source code of this file.
Macros | |
#define | LIBOSMO_SIGTRAN_VERSION 2.1.0 |
#define | LIBOSMO_SIGTRAN_VERSION_STR "2.1.0" |
#define | LIBOSMO_SIGTRAN_VERSION_MAJOR 2 |
#define | LIBOSMO_SIGTRAN_VERSION_MINOR 1 |
#define | LIBOSMO_SIGTRAN_VERSION_PATCH 0 |
#define | LIBOSMO_SIGTRAN_VERSION_GREATER_EQUAL(major, minor, patch) |
#define LIBOSMO_SIGTRAN_VERSION 2.1.0 |
#define LIBOSMO_SIGTRAN_VERSION_GREATER_EQUAL | ( | major, | |
minor, | |||
patch | |||
) |
#define LIBOSMO_SIGTRAN_VERSION_MAJOR 2 |
#define LIBOSMO_SIGTRAN_VERSION_MINOR 1 |
#define LIBOSMO_SIGTRAN_VERSION_PATCH 0 |
#define LIBOSMO_SIGTRAN_VERSION_STR "2.1.0" |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
Go to the source code of this file.
Data Structures | |
struct | sccp_scmg_msg |
Enumerations | |
enum | sccp_scmg_msg_type { SCCP_SCMG_MSGT_SSA = 0x01 , SCCP_SCMG_MSGT_SSP = 0x02 , SCCP_SCMG_MSGT_SST = 0x03 , SCCP_SCMG_MSGT_SOR = 0x04 , SCCP_SCMG_MSGT_SOG = 0x05 , SCCP_SCMG_MSGT_SSC = 0x06 } |
Functions | |
struct sccp_scmg_msg | __attribute__ ((packed)) |
static const char * | sccp_scmg_msgt_name (enum sccp_scmg_msg_type msgt) |
Variables | |
uint8_t | msg_type |
uint8_t | affected_ssn |
uint16_t | affected_pc |
uint8_t | smi |
uint8_t | ssc_congestion_lvl [0] |
const struct value_string | sccp_scmg_msgt_names [] |
enum sccp_scmg_msg_type |
struct sccp_scmg_msg __attribute__ | ( | (packed) | ) |
|
inlinestatic |
References sccp_scmg_msgt_names.
Referenced by scmg_rx().
uint16_t affected_pc |
uint8_t affected_ssn |
uint8_t msg_type |
|
extern |
Referenced by sccp_scmg_msgt_name().
uint8_t smi |
uint8_t ssc_congestion_lvl[0] |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <ss7_route_table.h>
Data Fields | |
struct llist_head | list |
member in list of routing tables More... | |
struct osmo_ss7_instance * | inst |
osmo_ss7_instance to which we belong More... | |
struct llist_head | combined_linksets |
list of osmo_ss7_combined_linksets More... | |
struct { | |
char * name | |
char * description | |
} | cfg |
struct { ... } osmo_ss7_route_table::cfg |
Referenced by DEFUN_ATTR(), ss7_route_table_alloc(), ss7_route_table_find(), vty_dump_rtable(), and write_one_rtable().
struct llist_head osmo_ss7_route_table::combined_linksets |
list of osmo_ss7_combined_linksets
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), DEFUN(), ss7_combined_linkset_insert(), ss7_route_table_alloc(), ss7_route_table_del_routes_by_as(), ss7_route_table_del_routes_by_linkset(), ss7_route_table_dpc_is_accessible(), ss7_route_table_dpc_is_accessible_skip_as(), ss7_route_table_dpc_is_accessible_via_as(), ss7_route_table_find_combined_linkset(), ss7_route_table_find_combined_linkset_by_dpc(), ss7_route_table_find_combined_linkset_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_lookup_route(), ss7_route_table_update_route_status_by_as(), vty_dump_rtable(), and write_one_rtable().
char* osmo_ss7_route_table::description |
Referenced by DEFUN_ATTR(), and write_one_rtable().
struct osmo_ss7_instance* osmo_ss7_route_table::inst |
osmo_ss7_instance to which we belong
Referenced by as_tx_duna_during_asp_act(), DEFUN(), DEFUN_ATTR(), osmo_ss7_route_name(), osmo_ss7_route_print(), osmo_ss7_vty_go_parent(), ss7_combined_linkset_alloc(), ss7_combined_linkset_lookup_route(), ss7_route_alloc(), ss7_route_is_fully_qualified(), ss7_route_set_linkset(), ss7_route_table_alloc(), ss7_route_table_find(), ss7_route_table_find_combined_linkset_by_dpc(), ss7_route_table_find_combined_linkset_by_dpc_mask(), ss7_route_table_find_or_create(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_route_table_lookup_route(), and write_one_rtable().
struct llist_head osmo_ss7_route_table::list |
member in list of routing tables
Referenced by ss7_route_table_alloc(), ss7_route_table_destroy(), and ss7_route_table_find().
char* osmo_ss7_route_table::name |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <stdio.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_combined_linkset.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "ss7_internal.h"
char * ss7_route_label_to_str | ( | char * | buf, |
size_t | buf_len, | ||
const struct osmo_ss7_instance * | inst, | ||
const struct osmo_ss7_route_label * | rtlb | ||
) |
References osmo_ss7_route_label::dpc, MAX_PC_STR_LEN, NULL, osmo_ss7_route_label::opc, osmo_ss7_pointcode_print_buf(), and osmo_ss7_route_label::sls.
Referenced by DEFUN(), gen_mtp_transfer_req_xua(), and ss7_combined_linkset_lookup_route().
|
static |
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_destroy | ( | struct osmo_ss7_route_table * | rtbl | ) |
References osmo_ss7_route_table::list.
bool ss7_route_table_dpc_is_accessible | ( | const struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc | ||
) |
References osmo_ss7_combined_linkset::cfg, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, osmo_ss7_combined_linkset::pc, and ss7_combined_linkset_is_available().
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), dpc_accessible(), and xua_snm_rx_daud().
bool ss7_route_table_dpc_is_accessible_skip_as | ( | const struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc, | ||
const struct osmo_ss7_as * | as | ||
) |
References osmo_ss7_route::as, osmo_ss7_combined_linkset::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, dpc, osmo_ss7_route::list, osmo_ss7_combined_linkset::mask, osmo_ss7_combined_linkset::pc, osmo_ss7_combined_linkset::routes, and ss7_route_is_available().
Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), and as_tx_duna_during_asp_act().
bool ss7_route_table_dpc_is_accessible_via_as | ( | const struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc, | ||
const struct osmo_ss7_as * | as | ||
) |
References osmo_ss7_route::as, osmo_ss7_combined_linkset::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, dpc, osmo_ss7_route::list, osmo_ss7_combined_linkset::mask, osmo_ss7_combined_linkset::pc, osmo_ss7_combined_linkset::routes, and ss7_route_is_available().
Referenced by as_snm_pc_available().
struct osmo_ss7_route_table * ss7_route_table_find | ( | struct osmo_ss7_instance * | inst, |
const char * | name | ||
) |
struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset | ( | const struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc, | ||
uint32_t | mask, | ||
uint32_t | prio | ||
) |
References osmo_ss7_combined_linkset::cfg, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_combined_linkset::pc, and osmo_ss7_combined_linkset::priority.
Referenced by ss7_route_insert(), and ss7_route_table_find_or_create_combined_linkset().
struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset_by_dpc | ( | const struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc | ||
) |
References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_route_table::inst, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, and ss7_initialized.
struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset_by_dpc_mask | ( | const struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc, | ||
uint32_t | mask | ||
) |
References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_route_table::inst, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, and ss7_initialized.
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_combined_linkset * ss7_route_table_find_or_create_combined_linkset | ( | struct osmo_ss7_route_table * | rtable, |
uint32_t | pc, | ||
uint32_t | mask, | ||
uint32_t | prio | ||
) |
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc_mask | ( | const struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc, | ||
uint32_t | mask, | ||
bool | dynamic | ||
) |
Find a SS7 route for given destination point code + mask in given table.
This function is used for route management procedures, not for packet routing lookup procedures!
References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_route::dyn_allocated, osmo_ss7_route_table::inst, osmo_ss7_route::list, osmo_ss7_combined_linkset::mask, osmo_ss7_route::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_combined_linkset::routes, and ss7_initialized.
Referenced by DEFUN_ATTR(), handle_rkey_dereg(), osmo_sccp_simple_client_on_ss7_id(), and ss7_route_create().
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc_mask_as | ( | const struct osmo_ss7_route_table * | rtbl, |
uint32_t | dpc, | ||
uint32_t | mask, | ||
const struct osmo_ss7_as * | as, | ||
bool | dynamic | ||
) |
Find a SS7 route for given destination point code + mask in given table via given AS.
This function is used for route management procedures, not for packet routing lookup procedures!
References osmo_ss7_route::as, osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, dpc, osmo_ss7_route::dyn_allocated, osmo_ss7_route_table::inst, osmo_ss7_route::list, osmo_ss7_combined_linkset::mask, osmo_ss7_route::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_combined_linkset::routes, and ss7_initialized.
Referenced by xua_snm_srm_pc_available_single().
struct osmo_ss7_route * ss7_route_table_lookup_route | ( | const struct osmo_ss7_route_table * | rtbl, |
const struct osmo_ss7_route_label * | rtlabel | ||
) |
References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route_table::combined_linksets, osmo_ss7_route_label::dpc, osmo_ss7_route_table::inst, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_route_label::opc, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_route_label::sls, and ss7_combined_linkset_lookup_route().
Referenced by ss7_instance_lookup_route().
void ss7_route_table_update_route_status_by_as | ( | const struct osmo_ss7_route_table * | rtbl, |
enum osmo_ss7_route_status | status, | ||
const struct osmo_ss7_as * | as, | ||
uint32_t | dpc | ||
) |
References osmo_ss7_route::as, osmo_ss7_route::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, dpc, osmo_ss7_combined_linkset::list, osmo_ss7_route::list, osmo_ss7_route::pc, osmo_ss7_combined_linkset::routes, ss7_route_is_summary(), ss7_route_update_route_status(), and osmo_ss7_route::status.
Referenced by xua_snm_srm_pc_available_single().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | osmo_ss7_asp_peer |
Functions | |
int | ss7_asp_peer_snprintf (char *buf, size_t buf_len, struct osmo_ss7_asp_peer *peer) |
void | ss7_asp_peer_init (struct osmo_ss7_asp_peer *peer) |
int | ss7_asp_peer_set_hosts (struct osmo_ss7_asp_peer *peer, void *talloc_ctx, const char *const *hosts, size_t host_cnt) |
Set (copy) addresses for a given ASP peer. More... | |
int | ss7_asp_peer_set_hosts2 (struct osmo_ss7_asp_peer *peer, void *talloc_ctx, const char *const *hosts, size_t host_cnt, int idx_primary) |
Set (copy) addresses for a given ASP peer. More... | |
int | ss7_asp_peer_add_host (struct osmo_ss7_asp_peer *peer, void *talloc_ctx, const char *host) |
Append (copy) address to a given ASP peer. More... | |
int | ss7_asp_peer_add_host2 (struct osmo_ss7_asp_peer *peer, void *talloc_ctx, const char *host, bool is_primary_addr) |
Append (copy) address to a given ASP peer. More... | |
int | ss7_asp_peer_del_host (struct osmo_ss7_asp_peer *peer, const char *host) |
Remove address from a given ASP peer. More... | |
bool | ss7_asp_peer_match_host (const struct osmo_ss7_asp_peer *peer, const char *host, bool host_is_v6) |
int | ss7_asp_peer_find_host (const struct osmo_ss7_asp_peer *peer, const char *host) |
Find the exact IP address match and return its index in the array. More... | |
int ss7_asp_peer_add_host | ( | struct osmo_ss7_asp_peer * | peer, |
void * | talloc_ctx, | ||
const char * | host | ||
) |
Append (copy) address to a given ASP peer.
Previous addresses are kept.
[in] | peer | Application Server Process peer the address is appended to. |
[in] | talloc_ctx | talloc context used to allocate new address. |
[in] | host | string containing an IP address. |
References ss7_asp_peer_add_host2().
Referenced by osmo_sccp_simple_server_add_clnt(), ss7_asp_set_default_peer_hosts(), and ss7_xua_server_add_local_host().
int ss7_asp_peer_add_host2 | ( | struct osmo_ss7_asp_peer * | peer, |
void * | talloc_ctx, | ||
const char * | host, | ||
bool | is_primary_addr | ||
) |
Append (copy) address to a given ASP peer.
Previous addresses are kept.
[in] | peer | Application Server Process peer the address is appended to. |
[in] | talloc_ctx | talloc context used to allocate new address. |
[in] | host | string containing an IP address. |
[in] | is_primary_addr | whether this IP address is to be added as SCTP Primary Address |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, host_is_ip_anyaddr(), and osmo_ss7_asp_peer::idx_primary.
Referenced by DEFUN_ATTR(), and ss7_asp_peer_add_host().
int ss7_asp_peer_del_host | ( | struct osmo_ss7_asp_peer * | peer, |
const char * | host | ||
) |
Remove address from a given ASP peer.
[in] | peer | Application Server Process peer the address is removed from. |
[in] | host | string containing an IP address. |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, and NULL.
Referenced by DEFUN_ATTR(), and ss7_xua_server_del_local_host().
int ss7_asp_peer_find_host | ( | const struct osmo_ss7_asp_peer * | peer, |
const char * | host | ||
) |
Find the exact IP address match and return its index in the array.
[in] | peer | Application Server Process peer where the address is looked up. |
[in] | host | string containing an IP address. |
References osmo_ss7_asp_peer::host, and osmo_ss7_asp_peer::host_cnt.
Referenced by DEFUN_ATTR().
void ss7_asp_peer_init | ( | struct osmo_ss7_asp_peer * | peer | ) |
References osmo_ss7_asp_peer::idx_primary.
Referenced by ss7_asp_alloc().
bool ss7_asp_peer_match_host | ( | const struct osmo_ss7_asp_peer * | peer, |
const char * | host, | ||
bool | host_is_v6 | ||
) |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, and host_is_ip_anyaddr().
Referenced by ss7_asp_find_by_socket_addr().
int ss7_asp_peer_set_hosts | ( | struct osmo_ss7_asp_peer * | peer, |
void * | talloc_ctx, | ||
const char *const * | hosts, | ||
size_t | host_cnt | ||
) |
Set (copy) addresses for a given ASP peer.
Previous addresses are freed.
[in] | peer | Application Server Process peer whose addresses are to be set. |
[in] | talloc_ctx | talloc context used to allocate new addresses. |
[in] | hosts | Array of strings containing IP addresses. |
[in] | host_cnt | Number of strings in hosts |
References ss7_asp_peer_set_hosts2().
Referenced by osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), ss7_xua_server_set_local_hosts(), and xua_accept_cb().
int ss7_asp_peer_set_hosts2 | ( | struct osmo_ss7_asp_peer * | peer, |
void * | talloc_ctx, | ||
const char *const * | hosts, | ||
size_t | host_cnt, | ||
int | idx_primary | ||
) |
Set (copy) addresses for a given ASP peer.
Previous addresses are freed.
[in] | peer | Application Server Process peer whose addresses are to be set. |
[in] | talloc_ctx | talloc context used to allocate new addresses. |
[in] | hosts | Array of strings containing IP addresses. |
[in] | host_cnt | Number of strings in hosts |
[in] | idx_primary | Index in "hosts" array marking the SCTP Primary Address, -1 if no explicit Primary Address set |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, and NULL.
Referenced by ss7_asp_peer_set_hosts().
int ss7_asp_peer_snprintf | ( | char * | buf, |
size_t | buf_len, | ||
struct osmo_ss7_asp_peer * | peer | ||
) |
References osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp_peer::idx_primary, len, and osmo_ss7_asp_peer::port.
Referenced by osmo_ss7_asp_restart(), show_one_asp(), ss7_xua_server_bind(), and vty_dump_xua_server().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <sigtran_sap.h>
Data Fields | |
uint32_t | route_ctx |
uint32_t | status |
uint32_t osmo_xlm_prim_rk_dereg::route_ctx |
Referenced by handle_rkey_dereg_resp(), and osmo_xlm_sap_down().
uint32_t osmo_xlm_prim_rk_dereg::status |
Referenced by handle_rkey_dereg_resp().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <sccp_sap.h>
Data Fields | |
enum osmo_sccp_originator | originator |
uint32_t | cause |
uint32_t | conn_id |
uint32_t osmo_scu_reset_param::cause |
uint32_t osmo_scu_reset_param::conn_id |
Referenced by scu_prim_conn_id().
enum osmo_sccp_originator osmo_scu_reset_param::originator |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <errno.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_link.h"
#include "ss7_linkset.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "ss7_internal.h"
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... | |
bool | ss7_linkset_is_available (const struct osmo_ss7_linkset *lset) |
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, NULL, 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, NULL, ss7_initialized, and ss7_linkset_find_by_name().
bool ss7_linkset_is_available | ( | const struct osmo_ss7_linkset * | lset | ) |
References osmo_ss7_linkset::links, and ss7_link_is_available().
Referenced by ss7_route_dest_is_available().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <sccp_sap.h>
Data Fields | |
struct osmo_prim_hdr | oph |
union { | |
struct osmo_scu_connect_param connect | |
struct osmo_scu_data_param data | |
struct osmo_scu_disconn_param disconnect | |
struct osmo_scu_reset_param reset | |
struct osmo_scu_unitdata_param unitdata | |
struct osmo_scu_notice_param notice | |
struct osmo_scu_state_param state | |
struct osmo_scu_pcstate_param pcstate | |
} | u |
struct osmo_scu_connect_param osmo_scu_prim::connect |
struct osmo_scu_data_param osmo_scu_prim::data |
Referenced by osmo_sccp_tx_data(), sccp_conn_scu_gen_encode_and_send(), and scu_prim_conn_id().
struct osmo_scu_disconn_param osmo_scu_prim::disconnect |
struct osmo_scu_notice_param osmo_scu_prim::notice |
Referenced by sclc_rx_cldr().
struct osmo_prim_hdr osmo_scu_prim::oph |
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(), osmo_sccp_user_sap_down(), osmo_sccp_user_sap_down_nofree(), sccp_conn_scu_gen_encode_and_send(), sccp_lbcs_local_bcast_pcstate(), sccp_lbcs_local_bcast_state(), sccp_sclc_user_sap_down(), sccp_sclc_user_sap_down_nofree(), sccp_scmg_tx(), sccp_user_prim_up(), sclc_rx_cldr(), sclc_rx_cldt(), scmg_prim_cb(), scu_prim_alloc(), scu_prim_conn_id(), xua_gen_msg_cl(), xua_gen_msg_co(), xua_gen_relre(), xua_opt_data_cache_keep(), xua_opt_data_check_drop(), and xua_opt_data_length_lim().
struct osmo_scu_pcstate_param osmo_scu_prim::pcstate |
Referenced by sccp_lbcs_local_bcast_pcstate().
struct osmo_scu_reset_param osmo_scu_prim::reset |
Referenced by scu_prim_conn_id().
struct osmo_scu_state_param osmo_scu_prim::state |
Referenced by sccp_lbcs_local_bcast_state().
union { ... } osmo_scu_prim::u |
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(), osmo_sccp_user_sap_down_nofree(), sccp_conn_scu_gen_encode_and_send(), sccp_lbcs_local_bcast_pcstate(), sccp_lbcs_local_bcast_state(), sccp_scmg_tx(), sclc_rx_cldr(), sclc_rx_cldt(), scmg_prim_cb(), scoc_fsm_conn_pend_out(), scoc_fsm_idle(), scu_prim_conn_id(), xua_gen_msg_cl(), and xua_gen_msg_co().
struct osmo_scu_unitdata_param osmo_scu_prim::unitdata |
Referenced by osmo_sccp_tx_unitdata(), sccp_scmg_tx(), sclc_rx_cldt(), scmg_prim_cb(), and xua_gen_msg_cl().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
Go to the source code of this file.
Functions | |
int | xua_asp_fsm_start (struct osmo_ss7_asp *asp, enum osmo_ss7_asp_role role, int log_level) |
Start a new ASP finite state machine for given ASP (stored in asp->fi) More... | |
Variables | |
struct osmo_fsm | xua_asp_fsm |
struct osmo_fsm | ipa_asp_fsm |
enum xua_asp_event |
enum xua_asp_state |
int xua_asp_fsm_start | ( | struct osmo_ss7_asp * | asp, |
enum osmo_ss7_asp_role | role, | ||
int | log_level | ||
) |
Start a new ASP finite state machine for given ASP (stored in asp->fi)
[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, osmo_ss7_asp::fi, ipa_asp_fsm_start(), osmo_ss7_asp::name, NULL, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp::proto, xua_asp_fsm_priv::role, xua_asp_fsm_priv::t_beat, xua_asp_fsm_priv::timer, xua_asp_fsm, and xua_t_beat_cb().
Referenced by osmo_ss7_asp_restart(), and xua_accept_cb().
|
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.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
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_instance.h"
#include "ss7_internal.h"
#include "sccp_internal.h"
#include "sccp_user.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, const uint32_t *seq_ctrl, 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, osmo_scu_unitdata_param::in_sequence_control, msg_type, sccp_scmg_msg::msg_type, osmo_scu_prim::oph, osmo_sccp_user_sap_down(), OSMO_SCU_PRIM_N_UNITDATA, OSMO_SCU_UNITDATA_REQ_P_SEQUENCE_CONTROL_NOT_PRESENT, 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, LOGPSCU, 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 LOGPSCU, 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, NULL, 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.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <errno.h>
#include <string.h>
#include <osmocom/core/msgb.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/linuxrbtree.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/fsm.h>
#include <osmocom/sigtran/sccp_helpers.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/protocol/sua.h>
#include <osmocom/sccp/sccp_types.h>
#include "xua_internal.h"
#include "sccp_connection.h"
#include "sccp_instance.h"
#include "sccp_internal.h"
#include "sccp_scoc_fsm.h"
#include "sccp_user.h"
#include "ss7_internal.h"
#include "ss7_instance.h"
Macros | |
#define | S(x) (1 << (x)) |
Functions | |
static void | scoc_fsm_idle (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | scoc_fsm_idle_onenter (struct osmo_fsm_inst *fi, uint32_t old_state) |
static void | scoc_fsm_conn_pend_in (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | scoc_fsm_conn_pend_out (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | scoc_fsm_wait_conn_conf (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | scoc_fsm_active (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
static void | scoc_fsm_disconn_pend (struct osmo_fsm_inst *fi, uint32_t event, void *data) |
Variables | |
static const struct value_string | scoc_event_names [] |
static const struct osmo_fsm_state | sccp_scoc_states [] |
struct osmo_fsm | sccp_scoc_fsm |
#define S | ( | x | ) | (1 << (x)) |
|
static |
References data, sccp_connection::fi, sccp_connection::importance, NULL, OSMO_SCU_PRIM_N_DATA, OSMO_SCU_PRIM_N_DISCONNECT, sccp_connection::remote_ref, S_DISCONN_PEND, S_IDLE, sccp_connection::sccp_class, sccp_conn_restart_rx_inact_timer(), sccp_conn_restart_tx_inact_timer(), sccp_conn_scu_gen_encode_and_send(), sccp_conn_start_rel_timer(), sccp_conn_stop_inact_timers(), sccp_conn_xua_gen_encode_and_send(), sccp_conn_xua_gen_relre_and_send(), SCOC_E_RCOC_CC_IND, SCOC_E_RCOC_CREF_IND, SCOC_E_RCOC_DT1_IND, SCOC_E_RCOC_ERROR_IND, SCOC_E_RCOC_IT_IND, SCOC_E_RCOC_REL_COMPL_IND, SCOC_E_RCOC_RLSD_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SCOC_E_SCU_N_DATA_REQ, SCOC_E_SCU_N_DISC_REQ, SCOC_E_SCU_N_EXP_DATA_REQ, SCOC_E_T_IAR_EXP, SCOC_E_T_IAS_EXP, SUA_CAUSE_T_RELEASE, SUA_CO_CODT, SUA_CO_COIT, SUA_CO_RELCO, SUA_CO_RELRE, SUA_IEI_CAUSE, SUA_IEI_IMPORTANCE, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_REF, xua_msg_add_u32(), xua_msg_alloc(), xua_msg_free(), and xua_msg_get_u32().
|
static |
|
static |
References osmo_scu_disconn_param::cause, data, osmo_scu_prim::disconnect, sccp_connection::fi, xua_msg::hdr, xua_common_hdr::msg_class, xua_msg::mtp, NULL, osmo_mtp_transfer_param::opc, OSMO_SCU_PRIM_N_CONNECT, OSMO_SCU_PRIM_N_DISCONNECT, sccp_connection::release_cause, sccp_connection::remote_pc, sccp_connection::remote_ref, S_ACTIVE, S_IDLE, S_WAIT_CONN_CONF, sccp_conn_opt_data_send_cache(), sccp_conn_scu_gen_encode_and_send(), sccp_conn_start_connect_timer(), sccp_conn_start_inact_timers(), sccp_conn_stop_connect_timer(), sccp_conn_xua_gen_encode_and_send(), SCOC_E_CONN_TMR_EXP, SCOC_E_RCOC_CC_IND, SCOC_E_RCOC_CREF_IND, SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_RLSD_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SCOC_E_SCU_N_DISC_REQ, SUA_CO_CORE, SUA_CO_RELCO, SUA_IEI_SRC_REF, osmo_scu_prim::u, and xua_msg_get_u32().
|
static |
References sccp_connection::fi, NULL, S_IDLE, sccp_conn_start_int_timer(), sccp_conn_start_rep_rel_timer(), sccp_conn_stop_release_timers(), sccp_conn_xua_gen_relre_and_send(), SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_REL_COMPL_IND, SCOC_E_RCOC_RLSD_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SCOC_E_T_INT_EXP, SCOC_E_T_REL_EXP, and SCOC_E_T_REP_REL_EXP.
|
static |
References osmo_scu_connect_param::called_addr, sccp_connection::called_addr, osmo_scu_connect_param::calling_addr, sccp_connection::calling_addr, osmo_scu_prim::connect, data, sccp_connection::fi, sccp_connection::importance, LOGPSCC, xua_msg::mtp, NULL, osmo_mtp_transfer_param::opc, OSMO_SCCP_ADDR_T_PC, OSMO_SCU_PRIM_N_CONNECT, osmo_sccp_addr::pc, osmo_sccp_addr::presence, sccp_connection::remote_pc, sccp_connection::remote_ref, S_CONN_PEND_IN, S_CONN_PEND_OUT, S_IDLE, osmo_scu_connect_param::sccp_class, sccp_connection::sccp_class, sccp_conn_scu_gen_encode_and_send(), sccp_conn_start_connect_timer(), sccp_conn_xua_gen_encode_and_send(), SCOC_E_RCOC_CONN_IND, SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_REL_COMPL_IND, SCOC_E_RCOC_RLSD_IND, SCOC_E_SCU_N_CONN_REQ, sua_addr_parse(), SUA_CO_CORE, SUA_CO_COREF, SUA_CO_RELCO, SUA_IEI_DEST_ADDR, SUA_IEI_IMPORTANCE, SUA_IEI_PROTO_CLASS, SUA_IEI_SRC_ADDR, SUA_IEI_SRC_REF, osmo_scu_prim::u, xua_dialect_sua, xua_hdr_dump(), and xua_msg_get_u32().
|
static |
References sccp_conn_free().
|
static |
References data, sccp_connection::fi, xua_msg::mtp, NULL, osmo_mtp_transfer_param::opc, sccp_connection::release_cause, sccp_connection::remote_pc, sccp_connection::remote_ref, S_DISCONN_PEND, S_IDLE, sccp_conn_start_rel_timer(), sccp_conn_stop_connect_timer(), sccp_conn_xua_gen_encode_and_send(), sccp_conn_xua_gen_relre_and_send(), SCOC_E_CONN_TMR_EXP, SCOC_E_RCOC_CC_IND, SCOC_E_RCOC_CREF_IND, SCOC_E_RCOC_OTHER_NPDU, SCOC_E_RCOC_RLSD_IND, SCOC_E_RCOC_ROUT_FAIL_IND, SUA_CO_RELCO, SUA_IEI_SRC_REF, and xua_msg_get_u32().
struct osmo_fsm sccp_scoc_fsm |
Referenced by osmo_ss7_init(), and sccp_conn_alloc().
|
static |
|
static |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | xua_common_hdr |
struct | xua_parameter_hdr |
Enumerations | |
enum | { MUA_TAG_RESERVED , MUA_TAG_IDENT_INT , MUA_TAG_UNUSED1 , MUA_TAG_IDENT_TEXT , MUA_TAG_INFO , MUA_TAG_UNUSED2 , MUA_TAG_ROUTING_CTX , MUA_TAG_DIAG_INF , MUA_TAG_IDENT_RANGE , MUA_TAG_BEAT_DATA , MUA_TAG_UNUSED4 , MUA_TAG_TRA_MODE , MUA_TAG_ERR_CODE , MUA_TAG_STATUS , MUA_TAG_UNUSED5 , MUA_TAG_UNUSED6 , MUA_TAG_UNUSED7 , MUA_TAG_ASP_IDENT , MUA_TAG_AFF_PC , MUA_TAG_CORREL_ID } |
Common tag values used by all user adaption layers. More... | |
Functions | |
struct xua_common_hdr | __attribute__ ((packed)) |
Variables | |
uint8_t | version |
uint8_t | spare |
uint8_t | msg_class |
uint8_t | msg_type |
uint32_t | msg_length |
uint8_t | data [0] |
uint16_t | tag |
uint16_t | len |
anonymous enum |
Common tag values used by all user adaption layers.
struct xua_common_hdr __attribute__ | ( | (packed) | ) |
uint8_t data |
Referenced by conn_tmr_cb(), dispatch_to_all_as(), int_tmr_cb(), ipa_asp_allstate(), ipa_asp_fsm_wait_id_get(), ipa_asp_fsm_wait_id_resp(), lm_active(), lm_rkm_reg(), lm_wait_notify(), load_24be(), m3ua_xfer_from_data(), msgb_put_sccp_opt(), msgb_t16l16vp_put(), osmo_sccp_tx_conn_req(), osmo_sccp_tx_conn_resp(), osmo_sccp_tx_data(), osmo_sccp_tx_disconn_data(), osmo_sccp_tx_unitdata(), osmo_sccp_tx_unitdata_ranap(), rel_tmr_cb(), rep_rel_tmr_cb(), rx_inact_tmr_cb(), sccp_longptr_part_consistent(), sccp_ptr_part_consistent(), sccp_to_xua_opt(), scoc_fsm_active(), scoc_fsm_conn_pend_in(), scoc_fsm_conn_pend_out(), scoc_fsm_idle(), scoc_fsm_wait_conn_conf(), sua_parse_gt(), tx_inact_tmr_cb(), xua_as_fsm_active(), xua_as_fsm_inactive(), xua_as_fsm_pending(), xua_asp_allstate(), xua_asp_fsm_active(), xua_asp_fsm_down(), xua_asp_fsm_inactive(), xua_from_msg(), xua_from_msg_common(), and xua_t_ack_cb().
uint16_t len |
Referenced by chop_v4_mapped_on_v6_prefix(), msgb_put_sccp_opt(), msgb_put_sccp_opt_hdr(), msgb_t16l16vp_put(), osmo_sccp_tx_conn_req(), osmo_sccp_tx_conn_resp(), osmo_sccp_tx_data(), osmo_sccp_tx_disconn_data(), osmo_sccp_tx_unitdata(), osmo_sccp_tx_unitdata_ranap(), osmo_ss7_pointcode_print_buf(), sccp_longptr_part_consistent(), show_one_asp_assoc_status_tcp(), show_one_asp_remaddr_tcp(), ss7_asp_peer_snprintf(), xua_from_msg(), xua_from_msg_common(), xua_msg_add_data(), and xua_msg_add_u32_data().
uint8_t msg_class |
Referenced by msgb_push_m3ua_hdr(), sccp_conn_opt_data_send_cache(), and xua_dialect_check_all_mand_ies().
uint32_t msg_length |
Referenced by xua_tcp_segmentation_cb().
uint8_t msg_type |
uint8_t spare |
uint16_t tag |
uint8_t version |
Referenced by xua_from_msg(), and xua_to_msg().
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <sigtran_sap.h>
Data Fields | |
struct osmo_prim_hdr | oph |
union { | |
struct osmo_xlm_prim_notify notify | |
struct osmo_xlm_prim_error error | |
struct osmo_xlm_prim_rk_reg rk_reg | |
struct osmo_xlm_prim_rk_dereg rk_dereg | |
} | u |
struct osmo_xlm_prim_error osmo_xlm_prim::error |
Referenced by m3ua_rx_mgmt_err().
struct osmo_xlm_prim_notify osmo_xlm_prim::notify |
Referenced by lm_active(), lm_wait_notify(), and m3ua_rx_mgmt_ntfy().
struct osmo_prim_hdr osmo_xlm_prim::oph |
Referenced by lm_active(), lm_timer_cb(), lm_wait_notify(), osmo_xlm_sap_down(), xua_asp_send_xlm_prim(), and xua_xlm_prim_alloc().
struct osmo_xlm_prim_rk_dereg osmo_xlm_prim::rk_dereg |
Referenced by handle_rkey_dereg_resp(), and osmo_xlm_sap_down().
struct osmo_xlm_prim_rk_reg osmo_xlm_prim::rk_reg |
Referenced by handle_rkey_dereg_resp(), handle_rkey_reg_resp(), lm_rkm_reg(), lm_timer_cb(), and osmo_xlm_sap_down().
union { ... } osmo_xlm_prim::u |
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
libosmo-sigtran 2.1.0.160-ddd3
Osmocom SIGTRAN library
|
#include <ss7_as.h>
Data Fields | |
struct osmo_ss7_asp * | normal_asp |
struct osmo_ss7_asp * | alt_asp |
struct osmo_ss7_asp* osmo_ss7_as_esls_entry::alt_asp |
Referenced by current_asp(), DEFUN(), osmo_ss7_as_del_asp(), and ss7_as_select_asp_loadshare().
struct osmo_ss7_asp* osmo_ss7_as_esls_entry::normal_asp |
Referenced by current_asp(), DEFUN(), osmo_ss7_as_del_asp(), and ss7_as_select_asp_loadshare().