libosmo-sigtran
2.0.0.52-6412
Osmocom SIGTRAN library
sua.h
Go to the documentation of this file.
1
/* RFC 3868 SUA SCCP User Adaption */
2
3
/* (C) 2012 by Harald Welte <laforge@gnumonks.org>
4
*
5
* All Rights Reserved
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as
9
* published by the Free Software Foundation; either version 2 of the
10
* License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
*/
20
21
#pragma once
22
#include <stddef.h>
23
#include <stdint.h>
24
25
#include <
osmocom/sigtran/protocol/m3ua.h
>
26
27
#define SUA_VERSION 1
28
#define SUA_PPID 4
29
#define SUA_PORT 14001
30
31
/* 3.1.2 Message Classes */
32
#define SUA_MSGC_MGMT 0
33
#define SUA_MSGC_SNM 2
34
#define SUA_MSGC_ASPSM 3
35
#define SUA_MSGC_ASPTM 4
36
#define SUA_MSGC_CL 7
37
#define SUA_MSGC_CO 8
38
#define SUA_MSGC_RKM 9
39
40
/* 3.1.3 Message Types */
41
#define SUA_MGMT_ERR 0
42
#define SUA_MGMT_NTFY 1
43
44
#define SUA_SNM_DUNA 1
45
#define SUA_SNM_DAVA 2
46
#define SUA_SNM_DAUD 3
47
#define SUA_SNM_SCON 4
48
#define SUA_SNM_DUPU 5
49
#define SUA_SNM_DRST 6
50
51
#define SUA_ASPSM_UP 1
52
#define SUA_ASPSM_DOWN 2
53
#define SUA_ASPSM_BEAT 3
54
#define SUA_ASPSM_UP_ACK 4
55
#define SUA_ASPSM_DOWN_ACK 5
56
#define SUA_ASPSM_BEAT_ACK 6
57
58
#define SUA_ASPTM_ACTIVE 1
59
#define SUA_ASPTM_INACTIVE 2
60
#define SUA_ASPTM_ACTIVE_ACK 3
61
#define SUA_ASPTM_INACTIVE_ACK 4
62
63
#define SUA_RKM_REG_REQ 1
64
#define SUA_RKM_REG_RSP 2
65
#define SUA_RKM_DEREG_REQ 3
66
#define SUA_RKM_DEREG_RSP 4
67
68
#define SUA_CL_CLDT 1
69
#define SUA_CL_CLDR 2
70
71
#define SUA_CO_CORE 1
72
#define SUA_CO_COAK 2
73
#define SUA_CO_COREF 3
74
#define SUA_CO_RELRE 4
75
#define SUA_CO_RELCO 5
76
#define SUA_CO_RESCO 6
77
#define SUA_CO_RESRE 7
78
#define SUA_CO_CODT 8
79
#define SUA_CO_CODA 9
80
#define SUA_CO_COERR 10
81
#define SUA_CO_COIT 11
/* Connection Oriented Inactiviy Test */
82
83
#define SUA_IEI_INFO_STRING M3UA_IEI_INFO_STRING
84
#define SUA_IEI_ROUTE_CTX M3UA_IEI_ROUTE_CTX
85
#define SUA_IEI_DIAG_INFO M3UA_IEI_DIAG_INFO
86
#define SUA_IEI_HEARTBT_DATA M3UA_IEI_HEARDBT_DATA
87
#define SUA_IEI_TRAF_MODE_TYP M3UA_IEI_TRAF_MODE_TYP
88
#define SUA_IEI_ERR_CODE M3UA_IEI_ERR_CODE
89
#define SUA_IEI_STATUS M3UA_IEI_STATUS
90
#define SUA_IEI_ASP_ID M3UA_IEI_ASP_ID
91
#define SUA_IEI_AFFECTED_PC M3UA_IEI_AFFECTED_PC
92
#define SUA_IEI_CORR_ID M3UA_IEI_CORR_ID
93
#define SUA_IEI_REG_RESULT 0x0014
94
#define SUA_IEI_DEREG_RESULT 0x0015
95
96
/* 3.10 SUA specific parameters */
97
98
#define SUA_IEI_S7_HOP_CTR 0x0101
99
#define SUA_IEI_SRC_ADDR 0x0102
100
#define SUA_IEI_DEST_ADDR 0x0103
101
#define SUA_IEI_SRC_REF 0x0104
102
#define SUA_IEI_DEST_REF 0x0105
103
#define SUA_IEI_CAUSE 0x0106
104
#define SUA_IEI_SEQ_NR 0x0107
105
#define SUA_IEI_RX_SEQ_NR 0x0108
106
#define SUA_IEI_ASP_CAPA 0x0109
107
#define SUA_IEI_CREDIT 0x010A
108
#define SUA_IEI_DATA 0x010B
109
#define SUA_IEI_USER_CAUSE 0x010C
110
#define SUA_IEI_NET_APPEARANCE 0x010D
111
#define SUA_IEI_ROUTING_KEY 0x010E
112
#define SUA_IEI_DRN 0x010F
113
#define SUA_IEI_TID 0x0110
114
#define SUA_IEI_SMI 0x0112
115
#define SUA_IEI_IMPORTANCE 0x0113
116
#define SUA_IEI_MSG_PRIO 0x0114
117
#define SUA_IEI_PROTO_CLASS 0x0115
118
#define SUA_IEI_SEQ_CTRL 0x0116
119
#define SUA_IEI_SEGMENTATION 0x0117
120
#define SUA_IEI_CONG_LEVEL 0x0118
121
122
#define SUA_IEI_GT 0x8001
123
#define SUA_IEI_PC 0x8002
124
#define SUA_IEI_SSN 0x8003
125
#define SUA_IEI_IPv4 0x8004
126
#define SUA_IEI_HOST 0x8005
127
#define SUA_IEI_IPv6 0x8006
128
129
#define SUA_RI_GT 1
130
#define SUA_RI_SSN_PC 2
131
#define SUA_RI_HOST 3
132
#define SUA_RI_SSN_IP 4
133
134
/* 3.10.6. SCCP Cause: Cause Type */
135
#define SUA_CAUSE_T_MASK 0xff00
136
#define SUA_CAUSE_T_RETURN 0x0100
137
#define SUA_CAUSE_T_REFUSAL 0x0200
138
#define SUA_CAUSE_T_RELEASE 0x0300
139
#define SUA_CAUSE_T_RESET 0x0400
140
#define SUA_CAUSE_T_ERROR 0x0500
141
142
const
char
*
osmo_sua_sccp_cause_name
(uint32_t sccp_cause,
char
*out_buf,
size_t
out_buf_len);
143
144
/* 3.9.12 Error: Identical to M3UA, extended by two at the bottom */
145
#define SUA_ERR_INVALID_VERSION M3UA_ERR_INVALID_VERSION
146
#define SUA_ERR_UNSUPP_MSG_CLASS M3UA_ERR_UNSUPP_MSG_CLASS
147
#define SUA_ERR_UNSUPP_MSG_TYPE M3UA_ERR_UNSUPP_MSG_TYPE
148
#define SUA_ERR_UNSUPP_TRAF_MOD_TYP M3UA_ERR_UNSUPP_TRAF_MOD_TYP
149
#define SUA_ERR_UNEXPECTED_MSG M3UA_ERR_UNEXPECTED_MSG
150
#define SUA_ERR_PROTOCOL_ERR M3UA_ERR_PROTOCOL_ERR
151
#define SUA_ERR_INVAL_STREAM_ID M3UA_ERR_INVAL_STREAM_ID
152
#define SUA_ERR_REFUSED_MGMT_BLOCKING M3UA_ERR_REFUSED_MGMT_BLOCKING
153
#define SUA_ERR_ASP_ID_REQD M3UA_ERR_ASP_ID_REQD
154
#define SUA_ERR_INVAL_ASP_ID M3UA_ERR_INVAL_ASP_ID
155
#define SUA_ERR_INVAL_PARAM_VAL M3UA_ERR_INVAL_PARAM_VAL
156
#define SUA_ERR_PARAM_FIELD_ERR M3UA_ERR_PARAM_FIELD_ERR
157
#define SUA_ERR_UNEXP_PARAM M3UA_ERR_UNEXP_PARAM
158
#define SUA_ERR_DEST_STATUS_UNKN M3UA_ERR_DEST_STATUS_UNKN
159
#define SUA_ERR_INVAL_NET_APPEAR M3UA_ERR_INVAL_NET_APPEAR
160
#define SUA_ERR_MISSING_PARAM M3UA_ERR_MISSING_PARAM
161
#define SUA_ERR_INVAL_ROUT_CTX M3UA_ERR_INVAL_ROUT_CTX
162
#define SUA_ERR_NO_CONFGD_AS_FOR_ASP M3UA_ERR_NO_CONFGD_AS_FOR_ASP
163
#define SUA_ERR_SUBSYS_STATUS_UNKN 0x1b
164
#define SUA_ERR_INVAL_LOADSH_LEVEL 0x1c
m3ua.h
osmo_sua_sccp_cause_name
const char * osmo_sua_sccp_cause_name(uint32_t sccp_cause, char *out_buf, size_t out_buf_len)
Definition:
sua.c:1024
include
osmocom
sigtran
protocol
sua.h
Generated on Fri Dec 20 2024 13:26:28 for libosmo-sigtran by
1.9.4