libosmo-sigtran 2.2.1.4-74d0
Osmocom SIGTRAN library
tcap_as_loadshare.h File Reference
#include <stdint.h>
#include <osmocom/core/msgb.h>
#include <osmocom/sigtran/osmo_ss7.h>

Go to the source code of this file.

Data Structures

struct  tcap_range
 

Macros

#define TCAP_PC_WILDCARD   0xffffffff
 
#define TCAP_SSN_WILDCARD   0
 

Functions

int ipa_rx_msg_osmo_ext_tcap_routing (struct osmo_ss7_asp *asp, struct msgb *msg)
 Entrypoint for IPA TCAP Routing messages, parses and handles those. More...
 
struct tcap_rangetcap_range_alloc (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp, uint32_t tid_start, uint32_t tid_end, uint32_t pc, uint8_t ssn)
 Create and alloc a new TCAP range entry. More...
 
void tcap_range_free (struct tcap_range *tcrng)
 Remove and free a single TCAP range entry. More...
 
bool tcap_range_matches (const struct tcap_range *tcrng, uint32_t tid)
 Checks if a tid matches to a specific range. More...
 
bool tcap_range_overlaps (const struct tcap_range *a, uint32_t tid_min, uint32_t tid_max)
 Checks if a tid rnage overlaps with another range. More...
 
int tcap_as_rx_sccp_asp (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp, uint32_t opc, uint32_t dpc, struct msgb *sccp_msg)
 Traffic from the TCAP ASP -> AS -> osmo-stp, only used to update transaction tracking. More...
 
int tcap_as_select_asp_loadshare (struct osmo_ss7_asp **asp, struct osmo_ss7_as *as, const struct xua_msg *xua)
 Entrypoint for M3UA messages towards the TCAP nodes. More...
 
void tcap_as_del_asp (struct osmo_ss7_as *as, struct osmo_ss7_asp *asp)
 
void tcap_enable (struct osmo_ss7_as *as)
 
void tcap_disable (struct osmo_ss7_as *as)
 

Macro Definition Documentation

◆ TCAP_PC_WILDCARD

#define TCAP_PC_WILDCARD   0xffffffff

◆ TCAP_SSN_WILDCARD

#define TCAP_SSN_WILDCARD   0

Function Documentation

◆ ipa_rx_msg_osmo_ext_tcap_routing()

◆ tcap_as_del_asp()

void tcap_as_del_asp ( struct osmo_ss7_as as,
struct osmo_ss7_asp asp 
)

◆ tcap_as_rx_sccp_asp()

int tcap_as_rx_sccp_asp ( struct osmo_ss7_as as,
struct osmo_ss7_asp asp,
uint32_t  opc,
uint32_t  dpc,
struct msgb *  sccp_msg 
)

Traffic from the TCAP ASP -> AS -> osmo-stp, only used to update transaction tracking.

Parameters
as
aspasp sent the sccp_msg message towards osmo-stp
opcM3UA opc
dpcM3UA DPC
sccp_msgpointer to a msg.
Returns
0 on successful handling, < 0 on error cases (missing IE, decoding errors)

References xua_msg_part::dat, dpc, tcap_parsed::dtid, DTID_SET, xua_msg::hdr, xua_msg_part::len, LOGPAS, xua_common_hdr::msg_class, NULL, opc, OSMO_SCCP_ADDR_T_PC, osmo_sccp_to_xua(), tcap_parsed::otid, OTID_SET, parse_tcap(), osmo_sccp_addr::pc, osmo_sccp_addr::presence, tcap_parsed::present, osmo_sccp_addr::ssn, ssn_contains_tcap(), sua_addr_parse(), SUA_CL_CLDT, SUA_IEI_DATA, SUA_IEI_DEST_ADDR, SUA_IEI_SRC_ADDR, SUA_MSGC_CL, tcap_trans_track_continue(), tcap_trans_track_end(), tcap_trans_track_entry_create(), and xua_msg_find_tag().

Referenced by ipa_rx_msg_up().

◆ tcap_as_select_asp_loadshare()

int tcap_as_select_asp_loadshare ( struct osmo_ss7_asp **  asp,
struct osmo_ss7_as as,
const struct xua_msg xua 
)

Entrypoint for M3UA messages towards the TCAP nodes.

Parameters
[out]aspResult pointer of the selected asp. Set to NULL if return code is != 0
[in]as
[in]xua
Returns
0: on succcess (msg handled by the callee), -EPROTONOSUPPORT: let caller (regular loadsharing) handle those.

Referenced by ss7_as_select_asp().

◆ tcap_disable()

◆ tcap_enable()

◆ tcap_range_alloc()

struct tcap_range * tcap_range_alloc ( struct osmo_ss7_as as,
struct osmo_ss7_asp asp,
uint32_t  tid_start,
uint32_t  tid_end,
uint32_t  pc,
uint8_t  ssn 
)

Create and alloc a new TCAP range entry.

Parameters
[in]as
[in]asp
[in]tid_start
[in]tid_end
[in]pc
[in]ssn
Returns
the TCAP range entry or NULL

References tcap_range::asp, tcap_range::list, NULL, pc, tcap_range::pc, ssn, tcap_range::ssn, tcap_gen_hash(), tid_end, tcap_range::tid_end, tid_start, and tcap_range::tid_start.

Referenced by ipa_rx_msg_osmo_ext_tcap_routing().

◆ tcap_range_free()

void tcap_range_free ( struct tcap_range tcrng)

Remove and free a single TCAP range entry.

Parameters
[in]tcrng

References tcap_range::list.

Referenced by _tcap_range_asp_down().

◆ tcap_range_matches()

bool tcap_range_matches ( const struct tcap_range tcrng,
uint32_t  tid 
)

Checks if a tid matches to a specific range.

Parameters
tcrng
tid
Returns
true if tid is included in the range

References tcap_range::tid_end, and tcap_range::tid_start.

Referenced by tcap_hlist_get(), and tcap_range_overlaps().

◆ tcap_range_overlaps()

bool tcap_range_overlaps ( const struct tcap_range a,
uint32_t  tid_start,
uint32_t  tid_end 
)

Checks if a tid rnage overlaps with another range.

Parameters
a
tid_start
tid_end
Returns

References tcap_range_matches(), tid_end, tcap_range::tid_end, tid_start, and tcap_range::tid_start.

Referenced by tcap_overlap_tid().