libosmo-sigtran 2.1.0.164-775d 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 enum osmo_xlm_prim_type {
14 OSMO_XLM_PRIM_M_SCTP_ESTABLISH,
15 OSMO_XLM_PRIM_M_SCTP_RELEASE,
16 OSMO_XLM_PRIM_M_SCTP_RESTART,
17 OSMO_XLM_PRIM_M_SCTP_STATUS,
18 OSMO_XLM_PRIM_M_ASP_STATUS,
19 OSMO_XLM_PRIM_M_AS_STATUS,
20 OSMO_XLM_PRIM_M_NOTIFY,
21 OSMO_XLM_PRIM_M_ERROR,
22 OSMO_XLM_PRIM_M_ASP_UP,
23 OSMO_XLM_PRIM_M_ASP_DOWN,
24 OSMO_XLM_PRIM_M_ASP_ACTIVE,
25 OSMO_XLM_PRIM_M_ASP_INACTIVE,
26 OSMO_XLM_PRIM_M_AS_ACTIVE,
27 OSMO_XLM_PRIM_M_AS_INACTIVE,
28 OSMO_XLM_PRIM_M_AS_DOWN,
29 /* optional as per spec, not implemented yet */
30 OSMO_XLM_PRIM_M_RK_REG,
31 OSMO_XLM_PRIM_M_RK_DEREG,
32};
33
34#define NOTIFY_PAR_P_ASP_ID (1 << 0)
35#define NOTIFY_PAR_P_ROUTE_CTX (1 << 1)
36
37 struct osmo_xlm_prim_notify {
38 uint32_t presence;
39 uint16_t status_type;
40 uint16_t status_info;
41 uint32_t asp_id;
42 uint32_t route_ctx_count;
43 uint32_t route_ctx[OSMO_SS7_MAX_RCTX_COUNT];
44 char *info_string;
45};
46
47 struct osmo_xlm_prim_error {
48 uint32_t code;
49};
50
51 struct osmo_xlm_prim_rk_reg {
52 /* routing key */
53 struct osmo_ss7_routing_key key;
54 enum osmo_ss7_as_traffic_mode traf_mode;
55
56 /* Status: Confirm only */
57 uint32_t status;
58};
59
60 struct osmo_xlm_prim_rk_dereg {
61 uint32_t route_ctx;
62
63 /* Status: Confirm only */
64 uint32_t status;
65};
66
67 struct osmo_xlm_prim {
68 struct osmo_prim_hdr oph;
69 union {
70 struct osmo_xlm_prim_notify notify;
71 struct osmo_xlm_prim_error error;
72 struct osmo_xlm_prim_rk_reg rk_reg;
73 struct osmo_xlm_prim_rk_dereg rk_dereg;
74 } u;
75};
76
77#define msgb_xlm_prim(msg) ((struct osmo_xlm_prim *)(msg)->l1h)
78
79 char *osmo_xlm_prim_name(struct osmo_prim_hdr *oph);
80
81/* XUA LM-SAP towards stack */
82 int 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_rkm.c:608
osmo_xlm_prim_type
osmo_xlm_prim_type
Definition: sigtran_sap.h:13
OSMO_XLM_PRIM_M_ASP_STATUS
@ OSMO_XLM_PRIM_M_ASP_STATUS
Definition: sigtran_sap.h:18
OSMO_XLM_PRIM_M_AS_ACTIVE
@ OSMO_XLM_PRIM_M_AS_ACTIVE
Definition: sigtran_sap.h:26
OSMO_XLM_PRIM_M_ASP_DOWN
@ OSMO_XLM_PRIM_M_ASP_DOWN
Definition: sigtran_sap.h:23
OSMO_XLM_PRIM_M_SCTP_RELEASE
@ OSMO_XLM_PRIM_M_SCTP_RELEASE
Definition: sigtran_sap.h:15
OSMO_XLM_PRIM_M_ASP_ACTIVE
@ OSMO_XLM_PRIM_M_ASP_ACTIVE
Definition: sigtran_sap.h:24
OSMO_XLM_PRIM_M_RK_DEREG
@ OSMO_XLM_PRIM_M_RK_DEREG
Definition: sigtran_sap.h:31
OSMO_XLM_PRIM_M_ASP_INACTIVE
@ OSMO_XLM_PRIM_M_ASP_INACTIVE
Definition: sigtran_sap.h:25
OSMO_XLM_PRIM_M_SCTP_RESTART
@ OSMO_XLM_PRIM_M_SCTP_RESTART
Definition: sigtran_sap.h:16
OSMO_XLM_PRIM_M_ERROR
@ OSMO_XLM_PRIM_M_ERROR
Definition: sigtran_sap.h:21
OSMO_XLM_PRIM_M_SCTP_ESTABLISH
@ OSMO_XLM_PRIM_M_SCTP_ESTABLISH
Definition: sigtran_sap.h:14
OSMO_XLM_PRIM_M_SCTP_STATUS
@ OSMO_XLM_PRIM_M_SCTP_STATUS
Definition: sigtran_sap.h:17
OSMO_XLM_PRIM_M_RK_REG
@ OSMO_XLM_PRIM_M_RK_REG
Definition: sigtran_sap.h:30
OSMO_XLM_PRIM_M_AS_DOWN
@ OSMO_XLM_PRIM_M_AS_DOWN
Definition: sigtran_sap.h:28
OSMO_XLM_PRIM_M_ASP_UP
@ OSMO_XLM_PRIM_M_ASP_UP
Definition: sigtran_sap.h:22
OSMO_XLM_PRIM_M_NOTIFY
@ OSMO_XLM_PRIM_M_NOTIFY
Definition: sigtran_sap.h:20
OSMO_XLM_PRIM_M_AS_STATUS
@ OSMO_XLM_PRIM_M_AS_STATUS
Definition: sigtran_sap.h:19
OSMO_XLM_PRIM_M_AS_INACTIVE
@ OSMO_XLM_PRIM_M_AS_INACTIVE
Definition: sigtran_sap.h:27
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:42
osmo_ss7_routing_key
Definition: osmo_ss7.h:142
osmo_xlm_prim_error
Definition: sigtran_sap.h:47
osmo_xlm_prim_error::code
uint32_t code
Definition: sigtran_sap.h:48
osmo_xlm_prim_notify
Definition: sigtran_sap.h:37
osmo_xlm_prim_notify::route_ctx
uint32_t route_ctx[OSMO_SS7_MAX_RCTX_COUNT]
Definition: sigtran_sap.h:43
osmo_xlm_prim_notify::asp_id
uint32_t asp_id
Definition: sigtran_sap.h:41
osmo_xlm_prim_notify::status_info
uint16_t status_info
Definition: sigtran_sap.h:40
osmo_xlm_prim_notify::info_string
char * info_string
Definition: sigtran_sap.h:44
osmo_xlm_prim_notify::route_ctx_count
uint32_t route_ctx_count
Definition: sigtran_sap.h:42
osmo_xlm_prim_notify::status_type
uint16_t status_type
Definition: sigtran_sap.h:39
osmo_xlm_prim_notify::presence
uint32_t presence
Definition: sigtran_sap.h:38
osmo_xlm_prim_rk_dereg
Definition: sigtran_sap.h:60
osmo_xlm_prim_rk_dereg::route_ctx
uint32_t route_ctx
Definition: sigtran_sap.h:61
osmo_xlm_prim_rk_dereg::status
uint32_t status
Definition: sigtran_sap.h:64
osmo_xlm_prim_rk_reg
Definition: sigtran_sap.h:51
osmo_xlm_prim_rk_reg::status
uint32_t status
Definition: sigtran_sap.h:57
osmo_xlm_prim_rk_reg::key
struct osmo_ss7_routing_key key
Definition: sigtran_sap.h:53
osmo_xlm_prim_rk_reg::traf_mode
enum osmo_ss7_as_traffic_mode traf_mode
Definition: sigtran_sap.h:54
osmo_xlm_prim
Definition: sigtran_sap.h:67
osmo_xlm_prim::u
union osmo_xlm_prim::@21 u
osmo_xlm_prim::notify
struct osmo_xlm_prim_notify notify
Definition: sigtran_sap.h:70
osmo_xlm_prim::rk_dereg
struct osmo_xlm_prim_rk_dereg rk_dereg
Definition: sigtran_sap.h:73
osmo_xlm_prim::oph
struct osmo_prim_hdr oph
Definition: sigtran_sap.h:68
osmo_xlm_prim::rk_reg
struct osmo_xlm_prim_rk_reg rk_reg
Definition: sigtran_sap.h:72
osmo_xlm_prim::error
struct osmo_xlm_prim_error error
Definition: sigtran_sap.h:71