blob: 094355688439d322664c28bdd092f14b777a67dc [file] [log] [blame]
Harald Welte283c7fd2015-12-21 23:35:56 +01001/* 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 Affero General Public License as
9 % published by the Free Software Foundation; either version 3 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 Affero General Public License
18 % along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
Harald Welte70e84ab2015-12-21 23:50:36 +010021/* FIXME: Move this to libosmocore osmocom/core/gsm/protocol/sua.h */
22
Harald Welte283c7fd2015-12-21 23:35:56 +010023#pragma once
24#include <stdint.h>
25
Harald Welte283c7fd2015-12-21 23:35:56 +010026#define SUA_PPID 4
27#define SUA_PORT 14001
28
29/* 3.1.2 Message Classes */
30#define SUA_MSGC_MGMT 0
31#define SUA_MSGC_SNM 2
32#define SUA_MSGC_ASPSM 3
33#define SUA_MSGC_ASPTM 4
34#define SUA_MSGC_CL 7
35#define SUA_MSGC_CO 8
36#define SUA_MSGC_RKM 9
37
38/* 3.1.3 Message Types */
39#define SUA_MGMT_ERR 0
40#define SUA_MGMT_NTFY 1
41
42#define SUA_SNM_DUNA 1
43#define SUA_SNM_DAVA 2
44#define SUA_SNM_DAUD 3
45#define SUA_SNM_SCON 4
46#define SUA_SNM_DUPU 5
47#define SUA_SNM_DRST 6
48
49#define SUA_ASPSM_UP 1
50#define SUA_ASPSM_DOWN 2
51#define SUA_ASPSM_BEAT 3
52#define SUA_ASPSM_UP_ACK 4
53#define SUA_ASPSM_DOWN_ACK 5
54#define SUA_ASPSM_BEAT_ACK 6
55
56#define SUA_ASPTM_ACTIVE 1
57#define SUA_ASPTM_INACTIVE 2
58#define SUA_ASPTM_ACTIVE_ACK 3
59#define SUA_ASPTM_INACTIVE_ACK 4
60
61#define SUA_RKM_REG_REQ 1
62#define SUA_RKM_REG_RSP 2
63#define SUA_RKM_DEREG_REQ 3
64#define SUA_RKM_DEREG_RSP 4
65
66#define SUA_CL_CLDT 1
67#define SUA_CL_CLDR 2
68
69#define SUA_CO_CORE 1
70#define SUA_CO_COAK 2
71#define SUA_CO_COREF 3
72#define SUA_CO_RELRE 4
73#define SUA_CO_RELCO 5
74#define SUA_CO_RESCO 6
75#define SUA_CO_RESRE 7
76#define SUA_CO_CODT 8
77#define SUA_CO_CODA 9
78#define SUA_CO_COERR 10
79#define SUA_CO_COIT 11
80
81#define SUA_IEI_ROUTE_CTX 0x0006
82#define SUA_IEI_CORR_ID 0x0013
83#define SUA_IEI_REG_RESULT 0x0014
84#define SUA_IEI_DEREG_RESULT 0x0015
85
86/* 3.10 SUA specific parameters */
87
88#define SUA_IEI_S7_HOP_CTR 0x0101
89#define SUA_IEI_SRC_ADDR 0x0102
90#define SUA_IEI_DEST_ADDR 0x0103
91#define SUA_IEI_SRC_REF 0x0104
92#define SUA_IEI_DEST_REF 0x0105
93#define SUA_IEI_CAUSE 0x0106
94#define SUA_IEI_SEQ_NR 0x0107
95#define SUA_IEI_RX_SEQ_NR 0x0108
96#define SUA_IEI_ASP_CAPA 0x0109
97#define SUA_IEI_CREDIT 0x010A
98#define SUA_IEI_DATA 0x010B
99#define SUA_IEI_USER_CAUSE 0x010C
100#define SUA_IEI_NET_APPEARANCE 0x010D
101#define SUA_IEI_ROUTING_KEY 0x010E
102#define SUA_IEI_DRN 0x010F
103#define SUA_IEI_TID 0x0110
104#define SUA_IEI_SMI 0x0112
105#define SUA_IEI_IMPORTANCE 0x0113
106#define SUA_IEI_MSG_PRIO 0x0114
107#define SUA_IEI_PROTO_CLASS 0x0115
108#define SUA_IEI_SEQ_CTRL 0x0116
109#define SUA_IEI_SEGMENTATION 0x0117
110#define SUA_IEI_CONG_LEVEL 0x0118
111
112#define SUA_IEI_GT 0x8001
113#define SUA_IEI_PC 0x8002
114#define SUA_IEI_SSN 0x8003
115#define SUA_IEI_IPv4 0x8004
116#define SUA_IEI_HOST 0x8005
117#define SUA_IEI_IPv6 0x8006
118
119#define SUA_RI_GT 1
120#define SUA_RI_SSN_PC 2
121#define SUA_RI_HOST 3
122#define SUA_RI_SSN_IP 4