libosmo-sigtran 2.0.0.52-6412
Osmocom SIGTRAN library
|
#include <stdbool.h>
#include <string.h>
#include <limits.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/sccp_sap.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/protocol/mtp.h>
#include <osmocom/sigtran/sccp_helpers.h>
#include <osmocom/sccp/sccp_types.h>
#include "sccp_internal.h"
#include "xua_internal.h"
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "ss7_internal.h"
#include "ss7_xua_srv.h"
Functions | |
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... | |
struct osmo_sccp_user * | osmo_sccp_user_find (struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc) |
Find a SCCP User registered for given PC+SSN or SSN only. More... | |
static struct osmo_sccp_user * | sccp_user_bind_pc (struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc) |
Bind a SCCP User to a given Point Code. More... | |
struct osmo_sccp_user * | osmo_sccp_user_bind_pc (struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc) |
Bind a given SCCP User to a given SSN+PC. More... | |
struct osmo_sccp_user * | osmo_sccp_user_bind (struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn) |
Bind a given SCCP User to a given SSN (at any PC) More... | |
void | osmo_sccp_user_unbind (struct osmo_sccp_user *scu) |
Unbind a given SCCP user. More... | |
void | osmo_sccp_user_set_priv (struct osmo_sccp_user *scu, void *priv) |
void * | osmo_sccp_user_get_priv (struct osmo_sccp_user *scu) |
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. More... | |
static int | mtp_user_prim_cb (struct osmo_prim_hdr *oph, void *ctx) |
static | LLIST_HEAD (sccp_instances) |
struct osmo_sccp_instance * | osmo_sccp_instance_create (struct osmo_ss7_instance *ss7, void *priv) |
create a SCCP Instance and register it as user with SS7 inst More... | |
void | osmo_sccp_instance_destroy (struct osmo_sccp_instance *inst) |
void | osmo_sccp_set_priv (struct osmo_sccp_instance *sccp, void *priv) |
void * | osmo_sccp_get_priv (struct osmo_sccp_instance *sccp) |
void | osmo_sccp_local_addr_by_instance (struct osmo_sccp_addr *dest_addr, const struct osmo_sccp_instance *inst, uint32_t ssn) |
derive a basic local SCCP-Address from a given SCCP instance. More... | |
bool | osmo_sccp_check_addr (struct osmo_sccp_addr *addr, uint32_t presence) |
check whether a given SCCP-Address is consistent. More... | |
int | osmo_sccp_gt_cmp (const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b) |
Compare two SCCP Global Titles. More... | |
int | osmo_sccp_addr_cmp (const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria) |
Compare two SCCP addresses by given presence criteria. More... | |
int | osmo_sccp_addr_ri_cmp (const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b) |
Compare the routing information of two SCCP addresses. More... | |
const char * | osmo_sccp_user_name (struct osmo_sccp_user *scu) |
Compose a human readable string to describe the SCCP user's connection. More... | |
struct osmo_sccp_instance * | osmo_sccp_simple_client_on_ss7_id (void *ctx, uint32_t ss7_id, const char *name, uint32_t default_pc, enum osmo_ss7_asp_protocol prot, int default_local_port, const char *default_local_ip, int default_remote_port, const char *default_remote_ip) |
request an sccp client instance More... | |
struct osmo_sccp_instance * | osmo_sccp_simple_client (void *ctx, const char *name, uint32_t default_pc, enum osmo_ss7_asp_protocol prot, int default_local_port, const char *default_local_ip, int default_remote_port, const char *default_remote_ip) |
request an sccp client instance More... | |
struct osmo_sccp_instance * | osmo_sccp_simple_server_on_ss7_id (void *ctx, uint32_t ss7_id, uint32_t pc, enum osmo_ss7_asp_protocol prot, int local_port, const char *local_ip) |
struct osmo_sccp_instance * | osmo_sccp_simple_server (void *ctx, uint32_t pc, enum osmo_ss7_asp_protocol prot, int local_port, const char *local_ip) |
struct osmo_sccp_instance * | osmo_sccp_simple_server_add_clnt (struct osmo_sccp_instance *inst, enum osmo_ss7_asp_protocol prot, const char *name, uint32_t pc, int local_port, int remote_port, const char *remote_ip) |
void | osmo_sccp_set_max_optional_data (struct osmo_sccp_instance *inst, int val) |
Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages. More... | |
struct osmo_ss7_instance * | osmo_sccp_get_ss7 (const struct osmo_sccp_instance *sccp) |
get the SS7 instance that is related to the given SCCP instance More... | |
struct osmo_sccp_instance * | osmo_sccp_get_sccp (const struct osmo_sccp_user *scu) |
get the SCCP instance that is related to the given sccp user More... | |
|
static |
|
static |
References xua_msg::mtp, MTP_SAP_USER, osmo_mtp_prim::oph, OSMO_MTP_PRIM_TRANSFER, osmo_sccp_to_xua(), scrc_rx_mtp_xfer_ind_xua(), osmo_mtp_prim::transfer, osmo_mtp_prim::u, and xua_msg_free().
Referenced by osmo_sccp_instance_create().
int osmo_sccp_addr_cmp | ( | const struct osmo_sccp_addr * | a, |
const struct osmo_sccp_addr * | b, | ||
uint32_t | presence_criteria | ||
) |
Compare two SCCP addresses by given presence criteria.
Any OSMO_SCCP_ADDR_T_* type not set in presence_criteria is ignored. In case all bits are set in presence_criteria, the comparison is in the order of: OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_SSN. The SCCP addresses' Routing Indicator is not compared, see osmo_sccp_addr_ri_cmp().
[in] | a | left side. |
[in] | b | right side. |
[in] | presence_criteria | A bitmask of OSMO_SCCP_ADDR_T_* values, or OSMO_SCCP_ADDR_T_MASK to compare all parts, except the routing indicator. |
References osmo_sccp_addr::gt, osmo_sccp_addr::ip, OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, osmo_sccp_gt_cmp(), osmo_sccp_addr::pc, osmo_sccp_addr::presence, osmo_sccp_addr::ssn, osmo_sccp_addr::v4, and osmo_sccp_addr::v6.
Referenced by osmo_sccp_addr_ri_cmp().
int osmo_sccp_addr_ri_cmp | ( | const struct osmo_sccp_addr * | a, |
const struct osmo_sccp_addr * | b | ||
) |
Compare the routing information of two SCCP addresses.
Compare the ri of a and b, and, if equal, return osmo_sccp_addr_cmp() with presence criteria selected according to ri.
[in] | a | left side. |
[in] | b | right side. |
References osmo_sccp_addr_cmp(), OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_NONE, OSMO_SCCP_RI_SSN_IP, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::presence, and osmo_sccp_addr::ri.
bool osmo_sccp_check_addr | ( | struct osmo_sccp_addr * | addr, |
uint32_t | presence | ||
) |
check whether a given SCCP-Address is consistent.
[in] | addr | SCCP address to check |
[in] | presence | mask with minimum required address components |
References osmo_sccp_addr::gt, osmo_sccp_gt::gti, osmo_sccp_gt::nai, osmo_sccp_gt::npi, OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_SSN, OSMO_SCCP_RI_GT, OSMO_SCCP_RI_SSN_IP, OSMO_SCCP_RI_SSN_PC, osmo_sccp_addr::presence, and osmo_sccp_addr::ri.
void * osmo_sccp_get_priv | ( | struct osmo_sccp_instance * | sccp | ) |
References osmo_sccp_instance::priv.
struct osmo_sccp_instance * osmo_sccp_get_sccp | ( | const struct osmo_sccp_user * | scu | ) |
get the SCCP instance that is related to the given sccp user
[in] | scu | SCCP user |
References osmo_sccp_user::inst.
struct osmo_ss7_instance * osmo_sccp_get_ss7 | ( | const struct osmo_sccp_instance * | sccp | ) |
get the SS7 instance that is related to the given SCCP instance
[in] | sccp | SCCP instance |
References osmo_ss7_instance::sccp, and osmo_sccp_instance::ss7.
int osmo_sccp_gt_cmp | ( | const struct osmo_sccp_gt * | a, |
const struct osmo_sccp_gt * | b | ||
) |
Compare two SCCP Global Titles.
[in] | a | left side. |
[in] | b | right side. |
Referenced by osmo_sccp_addr_cmp().
struct osmo_sccp_instance * osmo_sccp_instance_create | ( | struct osmo_ss7_instance * | ss7, |
void * | priv | ||
) |
create a SCCP Instance and register it as user with SS7 inst
[in] | ss7 | SS7 instance to which this SCCP instance belongs |
[in] | priv | private data to be stored within SCCP instance |
References osmo_sccp_instance::list, osmo_sccp_instance::max_optional_data, MTP_SI_SCCP, mtp_user_prim_cb(), osmo_sccp_timer_defaults, osmo_ss7_user_create(), osmo_ss7_user_register(), osmo_ss7_user_set_prim_cb(), osmo_ss7_user_set_priv(), osmo_sccp_instance::priv, sccp_scmg_init(), osmo_sccp_instance::ss7, osmo_sccp_instance::ss7_user, osmo_sccp_instance::tdefs, and osmo_sccp_instance::users.
Referenced by osmo_ss7_ensure_sccp().
void osmo_sccp_instance_destroy | ( | struct osmo_sccp_instance * | inst | ) |
References osmo_sccp_user::inst, osmo_sccp_instance::list, osmo_sccp_user::list, MTP_SI_SCCP, osmo_sccp_user_unbind(), osmo_ss7_user_destroy(), osmo_ss7_user_unregister(), osmo_ss7_instance::sccp, sccp_scoc_flush_connections(), osmo_sccp_instance::ss7, osmo_sccp_instance::ss7_user, and osmo_sccp_instance::users.
void osmo_sccp_local_addr_by_instance | ( | struct osmo_sccp_addr * | dest_addr, |
const struct osmo_sccp_instance * | inst, | ||
uint32_t | ssn | ||
) |
derive a basic local SCCP-Address from a given SCCP instance.
[out] | dest_addr | pointer to output address memory |
[in] | inst | SCCP instance |
[in] | ssn | Subsystem Number |
References osmo_ss7_instance::cfg, osmo_sccp_make_addr_pc_ssn(), osmo_ss7_instance::primary_pc, and osmo_sccp_instance::ss7.
void osmo_sccp_set_max_optional_data | ( | struct osmo_sccp_instance * | inst, |
int | val | ||
) |
Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages.
For any Optional Data part larger than this value in octets, send CR, CC, CREF and RLSD messages without any payload, and send the data payload in a separate Data Form 1 message. ITU-T Q.713 sections 4.2 thru 4.5 define a limit of 130 bytes for the 'Data' parameter. This limit can be adjusted here. May be useful for interop with nonstandard SCCP peers.
[in] | sccp | SCCP instance to reconfigure. |
[in] | val | Number of bytes to set as upper bound for the optional data length, or pass a negative value to set the standard value of SCCP_MAX_OPTIONAL_DATA == 130, which conforms to ITU-T Q.713. |
References osmo_xua_server::inst.
Referenced by DEFUN_ATTR().
void osmo_sccp_set_priv | ( | struct osmo_sccp_instance * | sccp, |
void * | priv | ||
) |
References osmo_sccp_instance::priv, and osmo_sccp_user::priv.
struct osmo_sccp_instance * osmo_sccp_simple_client | ( | void * | ctx, |
const char * | name, | ||
uint32_t | default_pc, | ||
enum osmo_ss7_asp_protocol | prot, | ||
int | default_local_port, | ||
const char * | default_local_ip, | ||
int | default_remote_port, | ||
const char * | default_remote_ip | ||
) |
request an sccp client instance
[in] | ctx | talloc context |
[in] | name | human readable name |
[in] | default_pc | pointcode to be used on missing VTY setting |
[in] | prot | protocol to be used (e.g OSMO_SS7_ASP_PROT_M3UA) |
[in] | default_local_port | local port to be used on missing VTY setting |
[in] | default_local_ip | local IP-address to be used on missing VTY setting |
[in] | default_remote_port | remote port to be used on missing VTY setting |
[in] | default_remote_ip | remote IP-address to be used on missing VTY setting |
This is simplified version of osmo_sccp_simple_client_on_ss7_id(). the only difference is that the ID of the CS7 instance will be set to 0 statically
References osmo_sccp_simple_client_on_ss7_id().
struct osmo_sccp_instance * osmo_sccp_simple_client_on_ss7_id | ( | void * | ctx, |
uint32_t | ss7_id, | ||
const char * | name, | ||
uint32_t | default_pc, | ||
enum osmo_ss7_asp_protocol | prot, | ||
int | default_local_port, | ||
const char * | default_local_ip, | ||
int | default_remote_port, | ||
const char * | default_remote_ip | ||
) |
request an sccp client instance
[in] | ctx | talloc context |
[in] | ss7_id | of the SS7/CS7 instance |
[in] | name | human readable name |
[in] | default_pc | pointcode to be used on missing VTY setting |
[in] | prot | protocol to be used (e.g OSMO_SS7_ASP_PROT_M3UA) |
[in] | default_local_port | local port to be used on missing VTY setting |
[in] | default_local_ip | local IP-address to be used on missing VTY setting (NULL: use library own defaults) |
[in] | default_remote_port | remote port to be used on missing VTY setting |
[in] | default_remote_ip | remote IP-address to be used on missing VTY setting (NULL: use library own defaults) |
The function will examine the given CS7 instance and its sub components (as, asp, etc.). If necessary it will allocate the missing components. If no CS7 instance can be detected under the caller supplied ID, a new instance will be created beforehand.
References osmo_ss7_instance::as_list, osmo_ss7_instance::asp_list, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_instance::cfg, osmo_ss7_instance::id, osmo_ss7_asp::is_server, osmo_ss7_as::list, osmo_ss7_asp::list, osmo_ss7_asp::local, osmo_ss7_as::name, osmo_ss7_asp::name, osmo_ss7_as_add_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_or_create(), osmo_ss7_as_has_asp(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find_by_proto(), osmo_ss7_asp_find_or_create2(), OSMO_SS7_ASP_PROT_IPA, osmo_ss7_asp_protocol_name(), osmo_ss7_asp_protocol_port(), osmo_ss7_asp_restart(), OSMO_SS7_ASP_ROLE_ASP, osmo_ss7_asp_use_default_lm(), osmo_ss7_ensure_sccp(), osmo_ss7_instance_destroy(), osmo_ss7_instance_find(), osmo_ss7_instance_find_or_create(), osmo_ss7_pc_is_valid(), osmo_ss7_pointcode_print(), osmo_ss7_routing_key::pc, osmo_ss7_asp_peer::port, osmo_ss7_instance::primary_pc, osmo_ss7_asp::proto, osmo_ss7_asp::remote, osmo_ss7_asp::role, osmo_ss7_asp::role_set_by_vty, osmo_ss7_as::routing_key, osmo_ss7_instance::rtable_system, osmo_ss7_instance::sccp, osmo_ss7_as::simple_client_allocated, osmo_ss7_asp::simple_client_allocated, ss7_asp_peer_set_hosts(), ss7_asp_set_default_peer_hosts(), ss7_default_trans_proto_for_asp_proto(), ss7_route_create(), ss7_route_destroy(), ss7_route_table_find_route_by_dpc_mask(), ss7_xua_server_find2(), osmo_ss7_asp::trans_proto, and osmo_ss7_asp::trans_role_set_by_vty.
Referenced by osmo_sccp_simple_client().
struct osmo_sccp_instance * osmo_sccp_simple_server | ( | void * | ctx, |
uint32_t | pc, | ||
enum osmo_ss7_asp_protocol | prot, | ||
int | local_port, | ||
const char * | local_ip | ||
) |
References osmo_sccp_simple_server_on_ss7_id().
struct osmo_sccp_instance * osmo_sccp_simple_server_add_clnt | ( | struct osmo_sccp_instance * | inst, |
enum osmo_ss7_asp_protocol | prot, | ||
const char * | name, | ||
uint32_t | pc, | ||
int | local_port, | ||
int | remote_port, | ||
const char * | remote_ip | ||
) |
References osmo_ss7_asp::cfg, osmo_xua_server::cfg, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp::is_server, osmo_ss7_asp::local, osmo_xua_server::local, osmo_ss7_as_add_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_or_create(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find_or_create2(), osmo_ss7_asp_protocol_port(), osmo_ss7_asp_restart(), OSMO_SS7_ASP_ROLE_SG, osmo_ss7_asp::remote, osmo_ss7_asp::role, osmo_ss7_instance::rtable_system, osmo_ss7_instance::sccp, osmo_sccp_instance::ss7, ss7_asp_peer_add_host(), ss7_asp_peer_set_hosts(), ss7_default_trans_proto_for_asp_proto(), ss7_route_create(), ss7_route_destroy(), ss7_xua_server_find2(), osmo_ss7_asp::trans_proto, and osmo_xua_server::trans_proto.
struct osmo_sccp_instance * osmo_sccp_simple_server_on_ss7_id | ( | void * | ctx, |
uint32_t | ss7_id, | ||
uint32_t | pc, | ||
enum osmo_ss7_asp_protocol | prot, | ||
int | local_port, | ||
const char * | local_ip | ||
) |
References osmo_ss7_instance::cfg, osmo_ss7_asp_protocol_port(), osmo_ss7_ensure_sccp(), osmo_ss7_instance_destroy(), osmo_ss7_instance_find_or_create(), osmo_ss7_instance::primary_pc, osmo_ss7_instance::sccp, ss7_default_trans_proto_for_asp_proto(), ss7_xua_server_bind(), ss7_xua_server_create2(), ss7_xua_server_destroy(), and osmo_xua_server::trans_proto.
Referenced by osmo_sccp_simple_server().
struct osmo_sccp_user * osmo_sccp_user_bind | ( | struct osmo_sccp_instance * | inst, |
const char * | name, | ||
osmo_prim_cb | prim_cb, | ||
uint16_t | ssn | ||
) |
Bind a given SCCP User to a given SSN (at any PC)
[in] | inst | SCCP Instance |
[in] | name | human-readable name |
[in] | ssn | Sub-System Number to bind to |
References osmo_sccp_user::inst, osmo_sccp_user::name, OSMO_SS7_PC_INVALID, osmo_sccp_user::prim_cb, sccp_user_bind_pc(), and osmo_sccp_user::ssn.
Referenced by sccp_scmg_init().
struct osmo_sccp_user * osmo_sccp_user_bind_pc | ( | struct osmo_sccp_instance * | inst, |
const char * | name, | ||
osmo_prim_cb | prim_cb, | ||
uint16_t | ssn, | ||
uint32_t | pc | ||
) |
Bind a given SCCP User to a given SSN+PC.
[in] | inst | SCCP Instance |
[in] | name | human-readable name |
[in] | ssn | Sub-System Number to bind to |
[in] | pc | Point Code to bind to |
References osmo_sccp_user::inst, osmo_sccp_user::name, osmo_sccp_user::pc, osmo_sccp_user::prim_cb, sccp_user_bind_pc(), and osmo_sccp_user::ssn.
struct osmo_sccp_user * osmo_sccp_user_find | ( | struct osmo_sccp_instance * | inst, |
uint16_t | ssn, | ||
uint32_t | pc | ||
) |
Find a SCCP User registered for given PC+SSN or SSN only.
First search all users with a valid PC for a full PC+SSN match. If no match was found, search all users with an invalid PC for an SSN-only match.
[in] | inst | SCCP Instance in which to search. |
[in] | ssn | Sub-System Number to search for. |
[in] | pc | Point Code to search for. |
References osmo_sccp_user::inst, osmo_sccp_user::pc, sccp_user_find(), and osmo_sccp_user::ssn.
void * osmo_sccp_user_get_priv | ( | struct osmo_sccp_user * | scu | ) |
References osmo_sccp_user::priv.
const char * osmo_sccp_user_name | ( | struct osmo_sccp_user * | scu | ) |
Compose a human readable string to describe the SCCP user's connection.
The output follows ['<scu.name>':]<local-sccp-addr>, e.g. "'OsmoHNBW':RI=SSN_PC,PC=0.23.5,SSN=RANAP", or just "RI=SSN_PC,PC=0.23.5,SSN=RANAP" if no scu->name is set. This calls osmo_sccp_addr_name(), which returns a static buffer; hence calling this function and osmo_sccp_addr_name() in the same printf statement is likely to conflict.
References osmo_sccp_user::inst, osmo_sccp_user::name, osmo_sccp_addr_name(), osmo_sccp_make_addr_pc_ssn(), osmo_sccp_user::pc, osmo_sccp_instance::ss7, and osmo_sccp_user::ssn.
void osmo_sccp_user_set_priv | ( | struct osmo_sccp_user * | scu, |
void * | priv | ||
) |
References osmo_sccp_user::priv.
void osmo_sccp_user_unbind | ( | struct osmo_sccp_user * | scu | ) |
Unbind a given SCCP user.
[in] | scu | SCCP User which is to be un-bound. Will be destroyed at the time this function returns. |
References osmo_sccp_user::inst, osmo_sccp_user::list, osmo_sccp_user::name, osmo_ss7_pointcode_print(), osmo_sccp_user::pc, osmo_sccp_instance::ss7, and osmo_sccp_user::ssn.
Referenced by osmo_sccp_instance_destroy().
|
static |
Bind a SCCP User to a given Point Code.
[in] | inst | SCCP Instance |
[in] | name | human-readable name |
[in] | ssn | Sub-System Number to bind to |
[in] | pc | Point Code to bind to, or OSMO_SS7_PC_INVALID if none. |
References osmo_sccp_user::inst, osmo_sccp_user::list, osmo_sccp_user::name, osmo_ss7_pointcode_print(), osmo_sccp_user::pc, osmo_sccp_user::prim_cb, sccp_user_find(), osmo_sccp_instance::ss7, osmo_sccp_user::ssn, and osmo_sccp_instance::users.
Referenced by osmo_sccp_user_bind(), and osmo_sccp_user_bind_pc().
struct osmo_sccp_user * sccp_user_find | ( | struct osmo_sccp_instance * | inst, |
uint16_t | ssn, | ||
uint32_t | pc | ||
) |
Find a SCCP User registered for given PC+SSN or SSN only First search all users with a valid PC for a full PC+SSN match.
If no such match was found, search all users with an invalid PC for an SSN-only match.
[in] | inst | SCCP Instance in which to search |
[in] | ssn | Sub-System Number to search for |
[in] | pc | Point Code to search for |
References osmo_sccp_user::inst, osmo_sccp_user::list, osmo_ss7_pc_is_valid(), osmo_sccp_user::pc, osmo_sccp_user::ssn, and osmo_sccp_instance::users.
Referenced by DEFUN(), osmo_sccp_user_find(), sccp_find_user(), sccp_user_bind_pc(), sclc_rx_cldr(), sclc_rx_cldt(), scmg_rx_sst(), and scrc_node_6().
int sccp_user_prim_up | ( | struct osmo_sccp_user * | scu, |
struct osmo_scu_prim * | prim | ||
) |
Send a SCCP User SAP Primitive up to the User.
[in] | scu | SCCP User to whom to send the primitive |
[in] | prim | Primitive to send to the user |
References osmo_sccp_user::name, osmo_scu_prim::oph, osmo_scu_prim_name(), and osmo_sccp_user::prim_cb.
Referenced by sccp_lbcs_local_bcast_pcstate(), sccp_lbcs_local_bcast_state(), sclc_rx_cldr(), sclc_rx_cldt(), and scu_gen_encode_and_send().