libosmo-sigtran 2.2.1.64-e866 Osmocom SIGTRAN library

Data Structures | Macros | Functions
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_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. 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()

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.

Parameters

  asp |
  msg | the message buffer. It is kept owned by the caller.

Returns
  0 on success

References tcap_range::asp, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, cs7_role, CS7_ROLE_SG, ipa_tx_tcap_routing_ack(), ipa_tx_tcap_routing_nack(), osmo_ss7_as::loadshare, LOGPASP, osmo_ss7_as::mode, ipa_tcap_routing_hdr::mt, MT_TID_ACK, MT_TID_ADD_RANGE, MT_TID_NACK, NACK_ERR_EALREADY, NACK_ERR_SYS_FAILURE, osmo_ss7_as::name, osmo_ss7_asp::name, OSMO_SS7_AS_TMOD_LOADSHARE, osmo_ss7_as_traffic_mode_name(), ipa_tcap_routing_add_range::pc, ipa_tcap_routing_hdr::seq, ss7_asp_get_first_as(), ipa_tcap_routing_add_range::ssn, tcap_overlap_tid(), TCAP_PC_WILDCARD, tcap_range_alloc(), TCAP_SSN_WILDCARD, ipa_tcap_routing_add_range::tid_end, tcap_range::tid_end, ipa_tcap_routing_add_range::tid_start, and tcap_range::tid_start.

Referenced by ipa_rx_msg().

## ◆ tcap_as_del_asp()

void tcap_as_del_asp | ( | struct osmo_ss7_as * | as,
|  | struct osmo_ss7_asp * | asp
| ) |  |

References _tcap_range_asp_down(), osmo_ss7_as::cfg, osmo_ss7_as::last_asp_idx_sent, osmo_ss7_as::loadshare, ss7_as_del_asp_update_llist_round_robin(), and tcap_range_as_update_pc_ssn().

Referenced by common_asp_fsm_down_onenter(), and ss7_as_del_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 |
  asp | asp sent the sccp_msg message towards osmo-stp
  opc | M3UA opc
  dpc | M3UA DPC
  sccp_msg | pointer to a msg.

Returns
  0 on successful handling (TCAP fully processed, non-TCAP ignored), < 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] | asp | Result 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()

void tcap_disable | ( | struct osmo_ss7_as * | as | ) |

References osmo_ss7_as::cfg, osmo_ss7_as::last_asp_idx_sent, osmo_ss7_as::loadshare, NULL, tcap_trans_track_entries_free_all(), and tcap_trans_track_garbage_collect_stop().

Referenced by osmo_ss7_as_destroy().

## ◆ tcap_enable()

void tcap_enable | ( | struct osmo_ss7_as * | as | ) |

References osmo_ss7_as::cfg, osmo_ss7_as::loadshare, and tcap_trans_track_garbage_collect_start().

## ◆ 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().