libosmo-sigtran: include/osmocom/sigtran/sigtran_sap.h Source File

libosmo-sigtran 2.2.1.95-893c Osmocom SIGTRAN library

sigtran_sap.h
Go to the documentation of this file.
1#pragma once
2#include <osmocom/core/prim.h>
3#include <osmocom/sigtran/osmo_ss7.h>
4
5
6 enum osmo_sigtran_sap {
7 SCCP_SAP_USER = _SAP_SS7_BASE,
8 /* xUA Layer Manager */
9 XUA_SAP_LM,
10 MTP_SAP_USER,
11};
12
13/* RFC4666 1.6.3 (M3UA), RFC3868 1.6.3 (SUA) */
14 enum osmo_xlm_prim_type {
15 OSMO_XLM_PRIM_M_SCTP_ESTABLISH,
16 OSMO_XLM_PRIM_M_SCTP_RELEASE,
17 OSMO_XLM_PRIM_M_SCTP_RESTART,
18 OSMO_XLM_PRIM_M_SCTP_STATUS,
19 OSMO_XLM_PRIM_M_ASP_STATUS,
20 OSMO_XLM_PRIM_M_AS_STATUS,
21 OSMO_XLM_PRIM_M_NOTIFY,
22 OSMO_XLM_PRIM_M_ERROR,
23 OSMO_XLM_PRIM_M_ASP_UP,
24 OSMO_XLM_PRIM_M_ASP_DOWN,
25 OSMO_XLM_PRIM_M_ASP_ACTIVE,
26 OSMO_XLM_PRIM_M_ASP_INACTIVE,
27 OSMO_XLM_PRIM_M_AS_ACTIVE,
28 OSMO_XLM_PRIM_M_AS_INACTIVE,
29 OSMO_XLM_PRIM_M_AS_DOWN,
30 /* optional as per spec: */
31 OSMO_XLM_PRIM_M_RK_REG,
32 OSMO_XLM_PRIM_M_RK_DEREG,
33};
34
35#define NOTIFY_PAR_P_ASP_ID (1 << 0)
36#define NOTIFY_PAR_P_ROUTE_CTX (1 << 1)
37
38 struct osmo_xlm_prim_notify {
39 uint32_t presence;
40 uint16_t status_type;
41 uint16_t status_info;
42 uint32_t asp_id;
43 uint32_t route_ctx_count;
44 uint32_t route_ctx[OSMO_SS7_MAX_RCTX_COUNT];
45 char *info_string;
46};
47
48 struct osmo_xlm_prim_error {
49 uint32_t code;
50};
51
52 struct osmo_xlm_prim_rk_reg {
53 /* routing key */
54 struct osmo_ss7_routing_key key;
55 enum osmo_ss7_as_traffic_mode traf_mode;
56
57 /* Status: Confirm only */
58 uint32_t status;
59};
60
61 struct osmo_xlm_prim_rk_dereg {
62 uint32_t route_ctx;
63
64 /* Status: Confirm only */
65 uint32_t status;
66};
67
68 struct osmo_xlm_prim {
69 struct osmo_prim_hdr oph;
70 union {
71 struct osmo_xlm_prim_notify notify;
72 struct osmo_xlm_prim_error error;
73 struct osmo_xlm_prim_rk_reg rk_reg;
74 struct osmo_xlm_prim_rk_dereg rk_dereg;
75 } u;
76};
77
78#define msgb_xlm_prim(msg) ((struct osmo_xlm_prim *)(msg)->l1h)
79
80char *osmo_xlm_prim_name(struct osmo_prim_hdr *oph);
81
82/* XUA LM-SAP towards stack */
83int osmo_xlm_sap_down(struct osmo_ss7_asp *asp, struct osmo_prim_hdr *oph);
osmo_ss7.h
osmo_ss7_as_traffic_mode
osmo_ss7_as_traffic_mode
Definition: osmo_ss7.h:183
OSMO_SS7_MAX_RCTX_COUNT
#define OSMO_SS7_MAX_RCTX_COUNT
Definition: osmo_ss7.h:15
osmo_xlm_sap_down
int osmo_xlm_sap_down(struct osmo_ss7_asp *asp, struct osmo_prim_hdr *oph)
Definition: xua_lm_sap.c:138
osmo_xlm_prim_type
osmo_xlm_prim_type
Definition: sigtran_sap.h:14
OSMO_XLM_PRIM_M_ASP_STATUS
@ OSMO_XLM_PRIM_M_ASP_STATUS
Definition: sigtran_sap.h:19
OSMO_XLM_PRIM_M_AS_ACTIVE
@ OSMO_XLM_PRIM_M_AS_ACTIVE
Definition: sigtran_sap.h:27
OSMO_XLM_PRIM_M_ASP_DOWN
@ OSMO_XLM_PRIM_M_ASP_DOWN
Definition: sigtran_sap.h:24
OSMO_XLM_PRIM_M_SCTP_RELEASE
@ OSMO_XLM_PRIM_M_SCTP_RELEASE
Definition: sigtran_sap.h:16
OSMO_XLM_PRIM_M_ASP_ACTIVE
@ OSMO_XLM_PRIM_M_ASP_ACTIVE
Definition: sigtran_sap.h:25
OSMO_XLM_PRIM_M_RK_DEREG
@ OSMO_XLM_PRIM_M_RK_DEREG
Definition: sigtran_sap.h:32
OSMO_XLM_PRIM_M_ASP_INACTIVE
@ OSMO_XLM_PRIM_M_ASP_INACTIVE
Definition: sigtran_sap.h:26
OSMO_XLM_PRIM_M_SCTP_RESTART
@ OSMO_XLM_PRIM_M_SCTP_RESTART
Definition: sigtran_sap.h:17
OSMO_XLM_PRIM_M_ERROR
@ OSMO_XLM_PRIM_M_ERROR
Definition: sigtran_sap.h:22
OSMO_XLM_PRIM_M_SCTP_ESTABLISH
@ OSMO_XLM_PRIM_M_SCTP_ESTABLISH
Definition: sigtran_sap.h:15
OSMO_XLM_PRIM_M_SCTP_STATUS
@ OSMO_XLM_PRIM_M_SCTP_STATUS
Definition: sigtran_sap.h:18
OSMO_XLM_PRIM_M_RK_REG
@ OSMO_XLM_PRIM_M_RK_REG
Definition: sigtran_sap.h:31
OSMO_XLM_PRIM_M_AS_DOWN
@ OSMO_XLM_PRIM_M_AS_DOWN
Definition: sigtran_sap.h:29
OSMO_XLM_PRIM_M_ASP_UP
@ OSMO_XLM_PRIM_M_ASP_UP
Definition: sigtran_sap.h:23
OSMO_XLM_PRIM_M_NOTIFY
@ OSMO_XLM_PRIM_M_NOTIFY
Definition: sigtran_sap.h:21
OSMO_XLM_PRIM_M_AS_STATUS
@ OSMO_XLM_PRIM_M_AS_STATUS
Definition: sigtran_sap.h:20
OSMO_XLM_PRIM_M_AS_INACTIVE
@ OSMO_XLM_PRIM_M_AS_INACTIVE
Definition: sigtran_sap.h:28
osmo_sigtran_sap
osmo_sigtran_sap
Definition: sigtran_sap.h:6
XUA_SAP_LM
@ XUA_SAP_LM
Definition: sigtran_sap.h:9
MTP_SAP_USER
@ MTP_SAP_USER
Definition: sigtran_sap.h:10
SCCP_SAP_USER
@ SCCP_SAP_USER
Definition: sigtran_sap.h:7
osmo_xlm_prim_name
char * osmo_xlm_prim_name(struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:103
osmo_ss7_asp
Definition: ss7_asp.h:55
osmo_ss7_routing_key
Definition: osmo_ss7.h:142
osmo_xlm_prim_error
Definition: sigtran_sap.h:48
osmo_xlm_prim_error::code
uint32_t code
Definition: sigtran_sap.h:49
osmo_xlm_prim_notify
Definition: sigtran_sap.h:38
osmo_xlm_prim_notify::route_ctx
uint32_t route_ctx[OSMO_SS7_MAX_RCTX_COUNT]
Definition: sigtran_sap.h:44
osmo_xlm_prim_notify::asp_id
uint32_t asp_id
Definition: sigtran_sap.h:42
osmo_xlm_prim_notify::status_info
uint16_t status_info
Definition: sigtran_sap.h:41
osmo_xlm_prim_notify::info_string
char * info_string
Definition: sigtran_sap.h:45
osmo_xlm_prim_notify::route_ctx_count
uint32_t route_ctx_count
Definition: sigtran_sap.h:43
osmo_xlm_prim_notify::status_type
uint16_t status_type
Definition: sigtran_sap.h:40
osmo_xlm_prim_notify::presence
uint32_t presence
Definition: sigtran_sap.h:39
osmo_xlm_prim_rk_dereg
Definition: sigtran_sap.h:61
osmo_xlm_prim_rk_dereg::route_ctx
uint32_t route_ctx
Definition: sigtran_sap.h:62
osmo_xlm_prim_rk_dereg::status
uint32_t status
Definition: sigtran_sap.h:65
osmo_xlm_prim_rk_reg
Definition: sigtran_sap.h:52
osmo_xlm_prim_rk_reg::status
uint32_t status
Definition: sigtran_sap.h:58
osmo_xlm_prim_rk_reg::key
struct osmo_ss7_routing_key key
Definition: sigtran_sap.h:54
osmo_xlm_prim_rk_reg::traf_mode
enum osmo_ss7_as_traffic_mode traf_mode
Definition: sigtran_sap.h:55
osmo_xlm_prim
Definition: sigtran_sap.h:68
osmo_xlm_prim::u
union osmo_xlm_prim::@21 u
osmo_xlm_prim::notify
struct osmo_xlm_prim_notify notify
Definition: sigtran_sap.h:71
osmo_xlm_prim::rk_dereg
struct osmo_xlm_prim_rk_dereg rk_dereg
Definition: sigtran_sap.h:74
osmo_xlm_prim::oph
struct osmo_prim_hdr oph
Definition: sigtran_sap.h:69
osmo_xlm_prim::rk_reg
struct osmo_xlm_prim_rk_reg rk_reg
Definition: sigtran_sap.h:73
osmo_xlm_prim::error
struct osmo_xlm_prim_error error
Definition: sigtran_sap.h:72