|
libosmo-sigtran
1.6.0.17-bd92
Osmocom SIGTRAN library
|
#include <osmocom/core/fsm.h>#include <osmocom/core/prim.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_timer_val |
| struct | osmo_sccp_instance |
| struct | osmo_sccp_user |
Macros | |
| #define | SCCP_STR "Signalling Connection Control Part\n" |
Functions | |
| static const char * | osmo_sccp_timer_name (enum osmo_sccp_timer val) |
| static const char * | osmo_sccp_timer_description (enum osmo_sccp_timer val) |
| struct osmo_sccp_user * | sccp_user_find (struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc) |
| Find a SCCP User registered for given PC+SSN or SSN only First search all users with a valid PC for a full PC+SSN match. More... | |
| int | sccp_scrc_rx_scoc_conn_msg (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
| int | sccp_scrc_rx_sclc_msg (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
| int | scrc_rx_mtp_xfer_ind_xua (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
| void | sccp_scoc_rx_from_scrc (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
| Main entrance function for primitives from the SCRC (Routing Control) More... | |
| void | sccp_scoc_rx_scrc_rout_fail (struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t cause) |
| SCOC: Receive SCRC Routing Failure. More... | |
| void | sccp_scoc_flush_connections (struct osmo_sccp_instance *inst) |
| int | sccp_sclc_rx_from_scrc (struct osmo_sccp_instance *inst, struct xua_msg *xua) |
| SCRC -> SCLC (connectionless message) More... | |
| void | sccp_sclc_rx_scrc_rout_fail (struct osmo_sccp_instance *inst, struct xua_msg *xua, uint32_t cause) |
| SCRC -> SCLC (Routing Failure. More... | |
| int | sccp_user_prim_up (struct osmo_sccp_user *scut, struct osmo_scu_prim *prim) |
| Send a SCCP User SAP Primitive up to the User. More... | |
| int | sccp_sclc_user_sap_down (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph) |
| Main entrance function for primitives from SCCP User. More... | |
| int | sccp_sclc_user_sap_down_nofree (struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph) |
| Main entrance function for primitives from SCCP User. More... | |
| struct msgb * | sccp_msgb_alloc (const char *name) |
| void | sccp_scoc_show_connections (struct vty *vty, struct osmo_sccp_instance *inst) |
| const struct osmo_sccp_timer_val * | osmo_sccp_timer_get (const struct osmo_sccp_instance *inst, enum osmo_sccp_timer timer, bool default_if_unset) |
| void | osmo_sccp_vty_write_cs7_node (struct vty *vty, const char *indent, struct osmo_sccp_instance *inst) |
| void | sccp_lbcs_local_bcast_pcstate (struct osmo_sccp_instance *inst, const struct osmo_scu_pcstate_param *pcstate) |
| void | sccp_lbcs_local_bcast_state (struct osmo_sccp_instance *inst, const struct osmo_scu_state_param *state) |
| void | sccp_scmg_rx_ssn_allowed (struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi) |
| void | sccp_scmg_rx_ssn_prohibited (struct osmo_sccp_instance *inst, uint32_t dpc, uint32_t ssn, uint32_t smi) |
| void | sccp_scmg_rx_mtp_pause (struct osmo_sccp_instance *inst, uint32_t dpc) |
| brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service Q.714 5.2.2 More... | |
| void | sccp_scmg_rx_mtp_resume (struct osmo_sccp_instance *inst, uint32_t dpc) |
| brief MTP -> SNM (MTP-RESUME.ind) - ability of providing the MTP service Q.714 5.2.3 More... | |
| void | sccp_scmg_rx_mtp_status (struct osmo_sccp_instance *inst, uint32_t dpc, enum mtp_unavail_cause cause) |
| int | sccp_scmg_init (struct osmo_sccp_instance *inst) |
Variables | |
| const struct osmo_sccp_timer_val | osmo_sccp_timer_defaults [] |
| const struct value_string | osmo_sccp_timer_names [] |
| const struct value_string | osmo_sccp_timer_descriptions [] |
| int | DSCCP |
| struct osmo_fsm | sccp_scoc_fsm |
| #define SCCP_STR "Signalling Connection Control Part\n" |
| enum osmo_sccp_timer |
|
inlinestatic |
References osmo_sccp_timer_descriptions.
Referenced by gen_sccp_timer_cmd_strs().
| const struct osmo_sccp_timer_val* osmo_sccp_timer_get | ( | const struct osmo_sccp_instance * | inst, |
| enum osmo_sccp_timer | timer, | ||
| bool | default_if_unset | ||
| ) |
References osmo_sccp_timer_val::s, osmo_sccp_instance::timers, and osmo_sccp_timer_val::us.
Referenced by sccp_timer_schedule(), and write_sccp_timers().
|
inlinestatic |
References osmo_sccp_timer_descriptions, and osmo_sccp_timer_names.
Referenced by gen_sccp_timer_cmd_strs(), and write_sccp_timers().
| void osmo_sccp_vty_write_cs7_node | ( | struct vty * | vty, |
| const char * | indent, | ||
| struct osmo_sccp_instance * | inst | ||
| ) |
References write_sccp_timers().
Referenced by write_one_cs7().
| void sccp_lbcs_local_bcast_pcstate | ( | struct osmo_sccp_instance * | inst, |
| const struct osmo_scu_pcstate_param * | pcstate | ||
| ) |
References osmo_sccp_user::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 | ||
| ) |
| struct msgb* sccp_msgb_alloc | ( | const char * | name | ) |
References SCCP_MSG_HEADROOM, and SCCP_MSG_SIZE.
Referenced by osmo_sua_to_sccp(), sccp_lbcs_local_bcast_pcstate(), sccp_lbcs_local_bcast_state(), sccp_scmg_tx(), sclc_rx_cldr(), and sclc_rx_cldt().
| int sccp_sclc_rx_from_scrc | ( | struct osmo_sccp_instance * | inst, |
| struct xua_msg * | xua | ||
| ) |
SCRC -> SCLC (connectionless message)
| [in] | inst | SCCP Instance in which we operate |
| [in] | xua | SUA connectionless message |
References xua_msg::hdr, xua_common_hdr::msg_class, xua_common_hdr::msg_type, sclc_rx_cldr(), sclc_rx_cldt(), SUA_CL_CLDR, SUA_CL_CLDT, SUA_MSGC_CL, xua_dialect_sua, and xua_hdr_dump().
Referenced by scrc_node_6(), and scrc_translate_node_9().
| void sccp_sclc_rx_scrc_rout_fail | ( | struct osmo_sccp_instance * | inst, |
| struct xua_msg * | xua_in, | ||
| uint32_t | cause | ||
| ) |
SCRC -> SCLC (Routing Failure.
| [in] | inst | SCCP Instance in which we operate |
| [in] | xua_in | Message that failed to be routed |
| [in] | cause | SCCP Return Cause |
References gen_ret_msg(), xua_msg::hdr, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, osmo_ss7_pc_is_local(), sccp_scrc_rx_sclc_msg(), sclc_rx_cldr(), osmo_sccp_instance::ss7, SUA_CL_CLDR, SUA_CL_CLDT, and xua_msg_free().
Referenced by scrc_node_4(), scrc_node_6(), and scrc_translate_node_9().
| int sccp_sclc_user_sap_down | ( | struct osmo_sccp_user * | scu, |
| struct osmo_prim_hdr * | oph | ||
| ) |
Main entrance function for primitives from SCCP User.
Implies a msgb_free(oph->msg), otherwise the same as sccp_sclc_user_sap_down_nofree().
| [in] | scu | SCCP User who is sending the primitive |
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 |
References osmo_scu_prim::oph, OSMO_SCU_PRIM_N_UNITDATA, osmo_scu_prim_name(), SUA_CL_CLDT, and xua_gen_encode_and_send().
Referenced by osmo_sccp_user_sap_down_nofree(), and sccp_sclc_user_sap_down().
| int sccp_scmg_init | ( | struct osmo_sccp_instance * | inst | ) |
References osmo_sccp_user_bind(), and scmg_prim_cb().
Referenced by osmo_sccp_instance_create().
| void sccp_scmg_rx_mtp_pause | ( | struct osmo_sccp_instance * | inst, |
| uint32_t | dpc | ||
| ) |
brief MTP -> SNM (MTP-PAUSE.ind) - inability to providing MTP service Q.714 5.2.2
References osmo_scu_pcstate_param::affected_pc, dpc, OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN, OSMO_SCCP_SP_S_INACCESSIBLE, and sccp_lbcs_local_bcast_pcstate().
Referenced by xua_snm_pc_available_to_sccp().
| void sccp_scmg_rx_mtp_resume | ( | struct osmo_sccp_instance * | inst, |
| uint32_t | dpc | ||
| ) |
brief MTP -> SNM (MTP-RESUME.ind) - ability of providing the MTP service Q.714 5.2.3
References osmo_scu_pcstate_param::affected_pc, dpc, OSMO_SCCP_REM_SCCP_S_AVAILABLE, OSMO_SCCP_SP_S_ACCESSIBLE, and sccp_lbcs_local_bcast_pcstate().
Referenced by xua_snm_pc_available_to_sccp().
| void sccp_scmg_rx_mtp_status | ( | struct osmo_sccp_instance * | inst, |
| uint32_t | dpc, | ||
| enum mtp_unavail_cause | cause | ||
| ) |
| void sccp_scmg_rx_ssn_allowed | ( | struct osmo_sccp_instance * | inst, |
| uint32_t | dpc, | ||
| uint32_t | ssn, | ||
| uint32_t | smi | ||
| ) |
References osmo_scu_state_param::affected_pc, dpc, sccp_lbcs_local_bcast_state(), and smi.
Referenced by scmg_rx_ssa(), and sua_snm_ssn_available_to_sccp().
| void sccp_scmg_rx_ssn_prohibited | ( | struct osmo_sccp_instance * | inst, |
| uint32_t | dpc, | ||
| uint32_t | ssn, | ||
| uint32_t | smi | ||
| ) |
References osmo_scu_state_param::affected_pc, dpc, sccp_lbcs_local_bcast_state(), and smi.
Referenced by scmg_rx_ssp(), and sua_snm_ssn_available_to_sccp().
| void sccp_scoc_flush_connections | ( | struct osmo_sccp_instance * | inst | ) |
References conn_destroy(), osmo_sccp_instance::connections, and sccp_connection::list.
Referenced by osmo_sccp_instance_destroy().
| void sccp_scoc_rx_from_scrc | ( | struct osmo_sccp_instance * | inst, |
| struct xua_msg * | xua | ||
| ) |
Main entrance function for primitives from the SCRC (Routing Control)
| [in] | inst | SCCP Instance in which we operate |
| [in] | xua | SUA message in xua_msg format |
References conn_create(), conn_find_by_id(), sccp_connection::conn_id, sccp_connection::fi, xua_msg::hdr, sccp_connection::incoming, xua_common_hdr::msg_type, xua_msg::mtp, osmo_mtp_transfer_param::opc, sccp_connection::remote_pc, sccp_connection::remote_ref, sccp_find_user(), sccp_scoc_rx_inval_opc(), sccp_scoc_rx_inval_src_ref(), sccp_scoc_rx_unass_local_ref(), SUA_CO_COAK, SUA_CO_CORE, SUA_CO_COREF, SUA_IEI_DEST_REF, SUA_IEI_SRC_REF, xua_dialect_sua, xua_hdr_dump(), xua_msg_event_map(), xua_msg_find_tag(), and xua_msg_get_u32().
Referenced by scrc_node_6(), scrc_rx_mtp_xfer_ind_xua(), and scrc_translate_node_9().
| void sccp_scoc_rx_scrc_rout_fail | ( | struct osmo_sccp_instance * | inst, |
| struct xua_msg * | xua, | ||
| uint32_t | return_cause | ||
| ) |
SCOC: Receive SCRC Routing Failure.
| [in] | inst | SCCP Instance on which we operate |
| [in] | xua | SUA message that was failed to route |
| [in] | return_cause | Reason (cause) for routing failure |
References conn_find_by_id(), sccp_connection::conn_id, sccp_connection::fi, gen_coref_without_conn(), get_cref_cause_for_ret(), sccp_scrc_rx_scoc_conn_msg(), SCOC_E_RCOC_ROUT_FAIL_IND, SUA_IEI_DEST_REF, xua_dialect_sua, xua_hdr_dump(), xua_msg_free(), and xua_msg_get_u32().
Referenced by scrc_node_2(), scrc_node_4(), and scrc_node_6().
| void sccp_scoc_show_connections | ( | struct vty * | vty, |
| struct osmo_sccp_instance * | inst | ||
| ) |
References osmo_sccp_instance::connections, sccp_connection::list, and vty_show_connection().
Referenced by DEFUN().
| int sccp_scrc_rx_sclc_msg | ( | struct osmo_sccp_instance * | inst, |
| struct xua_msg * | xua | ||
| ) |
References xua_msg::hdr, xua_common_hdr::msg_type, OSMO_SCCP_RI_GT, osmo_sccp_addr::ri, scrc_local_out_common(), scrc_node_12(), scrc_node_7(), sua_addr_parse(), SUA_CL_CLDR, SUA_IEI_DEST_ADDR, xua_dialect_sua, and xua_msg_dump().
Referenced by sccp_sclc_rx_scrc_rout_fail(), and xua_gen_encode_and_send().
| int sccp_scrc_rx_scoc_conn_msg | ( | struct osmo_sccp_instance * | inst, |
| struct xua_msg * | xua | ||
| ) |
References xua_msg::hdr, xua_common_hdr::msg_type, scrc_local_out_common(), scrc_node_2(), sua_addr_parse(), SUA_CO_CORE, SUA_IEI_DEST_ADDR, xua_dialect_sua, and xua_msg_dump().
Referenced by sccp_scoc_rx_scrc_rout_fail(), tx_coerr_from_xua(), tx_relco_from_xua(), tx_rlsd_from_xua_twoway(), xua_gen_encode_and_send(), and xua_gen_relre_and_send().
| struct osmo_sccp_user* sccp_user_find | ( | struct osmo_sccp_instance * | inst, |
| uint16_t | ssn, | ||
| uint32_t | pc | ||
| ) |
Find a SCCP User registered for given PC+SSN or SSN only First search all users with a valid PC for a full PC+SSN match.
If no such match was found, search all users with an invalid PC for an SSN-only match.
| [in] | inst | SCCP Instance in which to search |
| [in] | ssn | Sub-System Number to search for |
| [in] | pc | Point Code to search for |
References osmo_sccp_user::list, osmo_ss7_pc_is_valid(), osmo_sccp_user::pc, osmo_sccp_user::ssn, and osmo_sccp_instance::users.
Referenced by DEFUN(), osmo_sccp_user_find(), sccp_find_user(), sccp_user_bind_pc(), sclc_rx_cldr(), sclc_rx_cldt(), scmg_rx_sst(), and scrc_node_6().
| int sccp_user_prim_up | ( | struct osmo_sccp_user * | scu, |
| struct osmo_scu_prim * | prim | ||
| ) |
Send a SCCP User SAP Primitive up to the User.
| [in] | scu | SCCP User to whom to send the primitive |
| [in] | prim | Primitive to send to the user |
References osmo_sccp_user::name, osmo_scu_prim::oph, osmo_scu_prim_name(), and osmo_sccp_user::prim_cb.
Referenced by sccp_lbcs_local_bcast_pcstate(), sccp_lbcs_local_bcast_state(), sclc_rx_cldr(), sclc_rx_cldt(), and scu_gen_encode_and_send().
| int scrc_rx_mtp_xfer_ind_xua | ( | struct osmo_sccp_instance * | inst, |
| struct xua_msg * | xua | ||
| ) |
References xua_msg_part::dat, ensure_opc_in_calling_ssn(), OSMO_SCCP_RI_GT, osmo_sccp_addr::ri, sccp_scoc_rx_from_scrc(), scrc_node_4(), scrc_node_6(), scrc_translate_node_9(), sua_addr_parse(), SUA_IEI_DEST_ADDR, SUA_IEI_PROTO_CLASS, SUA_IEI_S7_HOP_CTR, sua_is_connectionless(), sua_is_cr(), xua_dialect_sua, xua_msg_dump(), xua_msg_find_tag(), xua_msg_get_u32(), and xua_msg_part_get_u32().
Referenced by mtp_user_prim_cb(), sua_rx_cl(), and sua_rx_co().
| int DSCCP |
| const struct osmo_sccp_timer_val osmo_sccp_timer_defaults[] |
Referenced by gen_sccp_timer_cmd_strs().
| const struct value_string osmo_sccp_timer_descriptions[] |
Referenced by osmo_sccp_timer_description(), and osmo_sccp_timer_name().
| const struct value_string osmo_sccp_timer_names[] |
Referenced by DEFUN_ATTR(), gen_sccp_timer_cmd_strs(), and osmo_sccp_timer_name().
| struct osmo_fsm sccp_scoc_fsm |
Referenced by conn_create_id(), and osmo_ss7_init().