sigtran_sap.h
Go to the documentation of this file.
#pragma once
#include <osmocom/core/prim.h>
#include <osmocom/sigtran/osmo_ss7.h>
enum osmo_sigtran_sap {
SCCP_SAP_USER = _SAP_SS7_BASE,
/* xUA Layer Manager */
XUA_SAP_LM,
MTP_SAP_USER,
};
enum osmo_xlm_prim_type {
OSMO_XLM_PRIM_M_SCTP_ESTABLISH,
OSMO_XLM_PRIM_M_SCTP_RELEASE,
OSMO_XLM_PRIM_M_SCTP_RESTART,
OSMO_XLM_PRIM_M_SCTP_STATUS,
OSMO_XLM_PRIM_M_ASP_STATUS,
OSMO_XLM_PRIM_M_AS_STATUS,
OSMO_XLM_PRIM_M_NOTIFY,
OSMO_XLM_PRIM_M_ERROR,
OSMO_XLM_PRIM_M_ASP_UP,
OSMO_XLM_PRIM_M_ASP_DOWN,
OSMO_XLM_PRIM_M_ASP_ACTIVE,
OSMO_XLM_PRIM_M_ASP_INACTIVE,
OSMO_XLM_PRIM_M_AS_ACTIVE,
OSMO_XLM_PRIM_M_AS_INACTIVE,
OSMO_XLM_PRIM_M_AS_DOWN,
/* optional as per spec, not implemented yet */
OSMO_XLM_PRIM_M_RK_REG,
OSMO_XLM_PRIM_M_RK_DEREG,
};
#define NOTIFY_PAR_P_ASP_ID (1 << 0)
#define NOTIFY_PAR_P_ROUTE_CTX (1 << 1)
struct osmo_xlm_prim_notify {
uint32_t presence;
uint16_t status_type;
uint16_t status_info;
uint32_t asp_id;
uint32_t route_ctx;
char *info_string;
};
struct osmo_xlm_prim_error {
uint32_t code;
};
struct osmo_xlm_prim_rk_reg {
/* routing key */
struct osmo_ss7_routing_key key;
enum osmo_ss7_as_traffic_mode traf_mode;
/* Status: Confirm only */
uint32_t status;
};
struct osmo_xlm_prim_rk_dereg {
uint32_t route_ctx;
/* Status: Confirm only */
uint32_t status;
};
struct osmo_xlm_prim {
struct osmo_prim_hdr oph;
union {
struct osmo_xlm_prim_notify notify;
struct osmo_xlm_prim_error error;
struct osmo_xlm_prim_rk_reg rk_reg;
struct osmo_xlm_prim_rk_dereg rk_dereg;
} u;
};
#define msgb_xlm_prim(msg) ((struct osmo_xlm_prim *)(msg)->l1h)
char *osmo_xlm_prim_name(struct osmo_prim_hdr *oph);
/* XUA LM-SAP towards stack */
int osmo_xlm_sap_down(struct osmo_ss7_asp *asp, struct osmo_prim_hdr *oph);
OSMO_XLM_PRIM_M_ASP_INACTIVE
Definition: sigtran_sap.h:25
OSMO_XLM_PRIM_M_ASP_STATUS
Definition: sigtran_sap.h:18
OSMO_XLM_PRIM_M_AS_INACTIVE
Definition: sigtran_sap.h:27
OSMO_XLM_PRIM_M_ASP_UP
Definition: sigtran_sap.h:22
OSMO_XLM_PRIM_M_ERROR
Definition: sigtran_sap.h:21
osmo_xlm_prim_notify::status_type
uint16_t status_type
Definition: sigtran_sap.h:39
OSMO_XLM_PRIM_M_AS_STATUS
Definition: sigtran_sap.h:19
osmo_xlm_prim_notify::asp_id
uint32_t asp_id
Definition: sigtran_sap.h:41
SCCP_SAP_USER
Definition: sigtran_sap.h:7
osmo_xlm_prim_error
Definition: sigtran_sap.h:46
OSMO_XLM_PRIM_M_RK_DEREG
Definition: sigtran_sap.h:31
osmo_xlm_prim_rk_dereg::route_ctx
uint32_t route_ctx
Definition: sigtran_sap.h:60
osmo_xlm_prim
Definition: sigtran_sap.h:66
osmo_ss7_routing_key
Definition: osmo_ss7.h:244
osmo_xlm_prim_notify::presence
uint32_t presence
Definition: sigtran_sap.h:38
osmo_sigtran_sap
osmo_sigtran_sap
Definition: sigtran_sap.h:6
MTP_SAP_USER
Definition: sigtran_sap.h:10
OSMO_XLM_PRIM_M_SCTP_RELEASE
Definition: sigtran_sap.h:15
osmo_xlm_prim_name
char * osmo_xlm_prim_name(struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:81
osmo_xlm_prim_notify::info_string
char * info_string
Definition: sigtran_sap.h:43
OSMO_XLM_PRIM_M_SCTP_ESTABLISH
Definition: sigtran_sap.h:14
osmo_ss7.h
osmo_xlm_prim_notify
Definition: sigtran_sap.h:37
osmo_xlm_prim_type
osmo_xlm_prim_type
Definition: sigtran_sap.h:13
OSMO_XLM_PRIM_M_SCTP_RESTART
Definition: sigtran_sap.h:16
OSMO_XLM_PRIM_M_AS_ACTIVE
Definition: sigtran_sap.h:26
XUA_SAP_LM
Definition: sigtran_sap.h:9
OSMO_XLM_PRIM_M_AS_DOWN
Definition: sigtran_sap.h:28
osmo_ss7_as_traffic_mode
osmo_ss7_as_traffic_mode
Definition: osmo_ss7.h:254
osmo_xlm_sap_down
int osmo_xlm_sap_down(struct osmo_ss7_asp *asp, struct osmo_prim_hdr *oph)
Definition: xua_rkm.c:526
OSMO_XLM_PRIM_M_RK_REG
Definition: sigtran_sap.h:30
osmo_ss7_asp
Definition: osmo_ss7.h:352
OSMO_XLM_PRIM_M_NOTIFY
Definition: sigtran_sap.h:20
OSMO_XLM_PRIM_M_SCTP_STATUS
Definition: sigtran_sap.h:17
osmo_xlm_prim_notify::route_ctx
uint32_t route_ctx
Definition: sigtran_sap.h:42
osmo_xlm_prim_rk_reg::status
uint32_t status
Definition: sigtran_sap.h:56
osmo_xlm_prim_rk_reg
Definition: sigtran_sap.h:50
osmo_xlm_prim_error::code
uint32_t code
Definition: sigtran_sap.h:47
OSMO_XLM_PRIM_M_ASP_DOWN
Definition: sigtran_sap.h:23
OSMO_XLM_PRIM_M_ASP_ACTIVE
Definition: sigtran_sap.h:24
osmo_xlm_prim_rk_dereg
Definition: sigtran_sap.h:59
osmo_xlm_prim_rk_dereg::status
uint32_t status
Definition: sigtran_sap.h:63
osmo_xlm_prim_notify::status_info
uint16_t status_info
Definition: sigtran_sap.h:40