libosmo-sigtran 2.2.1.56-7580 Osmocom SIGTRAN library

tcap_as_loadshare.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4
5#include <osmocom/core/msgb.h>
6#include <osmocom/sigtran/osmo_ss7.h>
7
8 struct xua_msg;
9
10#define TCAP_PC_WILDCARD 0xffffffff
11#define TCAP_SSN_WILDCARD 0
12
13 struct tcap_range {
14 struct hlist_node list;
15 struct osmo_ss7_asp *asp;
16 uint32_t tid_start;
17 uint32_t tid_end;
18 uint32_t pc;
19 uint8_t ssn;
20};
21
22/* IPA entry point */
23 int ipa_rx_msg_osmo_ext_tcap_routing(struct osmo_ss7_asp *asp, struct msgb *msg);
24
25 struct tcap_range *tcap_range_alloc(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp,
26 uint32_t tid_start, uint32_t tid_end, uint32_t pc, uint8_t ssn);
27 void tcap_range_free(struct tcap_range *tcrng);
28
29 bool tcap_range_matches(const struct tcap_range *tcrng, uint32_t tid);
30 bool tcap_range_overlaps(const struct tcap_range *a, uint32_t tid_min, uint32_t tid_max);
31
32/* Traffic ASP -> AS -> STP (Rx path) From TCAP Routing AS, only used for connection tracking */
33 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);
34
35/* Traffic STP -> AS -> ASP (Tx path) Loadshare towards the TCAP routing AS */
36 int tcap_as_select_asp_loadshare(struct osmo_ss7_asp **asp, struct osmo_ss7_as *as, const struct xua_msg *xua);
37
38/* When the ASP got removed */
39 void tcap_as_del_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp);
40
41 void tcap_enable(struct osmo_ss7_as *as);
42 void tcap_disable(struct osmo_ss7_as *as);
dpc
uint32_t dpc
Definition: m3ua.h:1
opc
uint32_t opc
Definition: m3ua.h:0
osmo_ss7.h
osmo_ss7_as
Definition: ss7_as.h:95
osmo_ss7_asp
Definition: ss7_asp.h:55
tcap_range
Definition: tcap_as_loadshare.h:13
tcap_range::ssn
uint8_t ssn
Definition: tcap_as_loadshare.h:19
tcap_range::tid_start
uint32_t tid_start
Definition: tcap_as_loadshare.h:16
tcap_range::tid_end
uint32_t tid_end
Definition: tcap_as_loadshare.h:17
tcap_range::asp
struct osmo_ss7_asp * asp
Definition: tcap_as_loadshare.h:15
tcap_range::list
struct hlist_node list
Definition: tcap_as_loadshare.h:14
tcap_range::pc
uint32_t pc
Definition: tcap_as_loadshare.h:18
xua_msg
Definition: xua_msg.h:31
tid_start
uint32_t tid_start
Definition: tcap_as_loadshare.c:0
ssn
uint8_t ssn
Definition: tcap_as_loadshare.c:3
tid_end
uint32_t tid_end
Definition: tcap_as_loadshare.c:1
pc
uint32_t pc
Definition: tcap_as_loadshare.c:2
tcap_disable
void tcap_disable(struct osmo_ss7_as *as)
Definition: tcap_as_loadshare.c:938
tcap_enable
void tcap_enable(struct osmo_ss7_as *as)
Definition: tcap_as_loadshare.c:929
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.
Definition: tcap_as_loadshare.c:275
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.
Definition: tcap_as_loadshare.c:595
tcap_range_overlaps
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.
Definition: tcap_as_loadshare.c:892
tcap_range_matches
bool tcap_range_matches(const struct tcap_range *tcrng, uint32_t tid)
Checks if a tid matches to a specific range.
Definition: tcap_as_loadshare.c:880
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.
Definition: tcap_as_loadshare.c:842
tcap_range_free
void tcap_range_free(struct tcap_range *tcrng)
Remove and free a single TCAP range entry.
Definition: tcap_as_loadshare.c:868
tcap_as_del_asp
void tcap_as_del_asp(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp)
Definition: tcap_as_loadshare.c:917
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.
Definition: tcap_as_loadshare.c:705