libosmo-sigtran 2.3.0.61-fb14d
Osmocom SIGTRAN library
sccp_sap.h
Go to the documentation of this file.
1#pragma once
2
3/* SCCP User SAP description */
4
5/* (C) 2015-2017 by Harald Welte <laforge@gnumonks.org>
6 * All Rights Reserved
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22
23#include <stdint.h>
24#include <osmocom/core/prim.h>
26
27#include <netinet/in.h>
28
29/* detailed coding of primitives at the SAP_SCCP_USER */
30
33 /* connection oriented, 6.1.1 */
40 /* connectionless, 6.2.2 */
43 /* management */
47};
48
49#define OSMO_SCCP_ADDR_T_GT 0x0001 /* global title */
50#define OSMO_SCCP_ADDR_T_PC 0x0002 /* signalling point code */
51#define OSMO_SCCP_ADDR_T_SSN 0x0004 /* subsystem number */
52#define OSMO_SCCP_ADDR_T_IPv4 0x0008
53#define OSMO_SCCP_ADDR_T_IPv6 0x0010
54#define OSMO_SCCP_ADDR_T_MASK 0x001f
55
56/* Q.713 3.4.1 + RFC 3868 3.10.2.3 */
62};
63
64extern const struct value_string osmo_sccp_routing_ind_names[];
65static inline const char *osmo_sccp_routing_ind_name(enum osmo_sccp_routing_ind val)
66{ return get_value_string(osmo_sccp_routing_ind_names, val); }
67
68
69/* Q.713 3.4.1 + RFC 3868 3.10.2.3 */
76};
77
78extern const struct value_string osmo_sccp_gti_names[];
79static inline const char *osmo_sccp_gti_name(enum osmo_sccp_gti val)
80{ return get_value_string(osmo_sccp_gti_names, val); }
81
82/* RFC 3868 3.10.2.3 */
93};
94
95/* Q.713 3.4.2.3.1 + RFC 3868 3.10.2.3 */
102 /* 5.. 255: Spare */
103};
104
105/* Q.713 3.4.2.2 */
107 /* globally standardised for GSM/UMTS: 1-31 */
117 /* Q.713 */
122 /* national network SSN for wihin and between GSM/UMTS: 129-150 */
131 /* national network SSN within GSM/UMTS: 32-128 + 151-254 */
138};
139
140/* Q.711 6.1.1.2.3, "Table 5/Q.711" and paragrapgs below it */
144};
145
148};
149
152};
153
154/* Q.711 6.1.1.2.4 1) When the "originator" parameter indicates the "network service provider" */
172};
173
174/* Q.711 6.1.1.2.4 2) When the "originator" parameter indicates the "network service user" */
194};
195
196/* Q.711 6.1.1.2.4 2) When the "originator" parameter indicates the "network service user" */
199};
200
201/* Q.711 6.2.2.2.4 Reason for return.
202 * Q.713 A.5 Return cause: "There is a one-to-one mapping between the return
203 * cause of UDTS, XUDTS or LUDTS messages and the reason for return in the
204 * N-NOTICE primitives" (ITU-T Q.713, Section 3.12 Return cause) */
222extern const struct value_string osmo_sccp_return_reason_names[];
223static inline const char *osmo_sccp_return_reason_name(enum osmo_sccp_return_reason val)
224{ return get_value_string(osmo_sccp_return_reason_names, val); }
225
226/* Q.711 6.3.2.2.5 Signalling point status */
231};
232
233extern const struct value_string osmo_sccp_sp_status_names[];
234static inline const char *osmo_sccp_sp_status_name(enum osmo_sccp_sp_status val)
235{
236 return get_value_string(osmo_sccp_sp_status_names, val);
237}
238
239/* Q.711 6.3.2.2.6 Remote SCCP status */
246};
247
248extern const struct value_string osmo_sccp_rem_sccp_status_names[];
250{
251 return get_value_string(osmo_sccp_rem_sccp_status_names, val);
252}
253
254/* legacy shim for name change */
255#define OSMO_SCCP_SSN_SMLC_BSSAP OSMO_SCCP_SSN_SMLC_BSSAP_LE
256
257extern const struct value_string osmo_sccp_ssn_names[];
258static inline const char *osmo_sccp_ssn_name(enum osmo_sccp_ssn val)
259{ return get_value_string(osmo_sccp_ssn_names, val); }
260
262 uint8_t gti;
263 uint8_t tt;
264 uint32_t npi;
265 uint32_t nai;
266 char digits[32];
267};
268
270 uint32_t presence;
273 uint32_t pc;
274 uint32_t ssn;
275 union {
276 struct in_addr v4;
277 struct in6_addr v6;
278 } ip;
279 /* we don't do hostnames */
280};
281
282/* OSMO_SCU_PRIM_N_CONNECT */
287 //struct osmo_sccp_qos_pars qos_pars;
288 uint32_t sccp_class;
289 uint32_t importance;
290 uint32_t conn_id;
291 /* user data */
292};
293
294/* OSMO_SCU_PRIM_N_DATA / OSMO_SCU_PRIM_N_EXPEDITED_DATA */
296 uint32_t conn_id;
297 uint32_t importance;
298 /* user data */
299};
300
305};
306
307/* OSMO_SCU_PRIM_N_DISCONNECT */
311 /* enum osmo_sccp_release_reason_* (value > 19),
312 * enum sccp_refusal_cause (ITU-T Q.713 Section 3.15 Refusal cause) value <= 19, backward compatibility */
313 uint32_t cause;
314 uint32_t conn_id;
315 uint32_t importance;
316 /* user data */
317};
318
319/* OSMO_SCU_PRIM_N_RESET */
322 /* enum osmo_sccp_reset_reason_*, "Table 5/Q.711" and paragraphs below it */
323 uint32_t cause;
324 uint32_t conn_id;
325};
326
327/* OSMO_SCU_PRIM_N_UNITDATA */
328/* NOTE: Ideally there should have been a "bool in_sequence_control_present",
329 * but that was found too late, so instead set:
330 * "in_sequence_control = OSMO_SCU_UNITDATA_PARAM_SEQUENCE_CONTROL_NOT_PRESENT"
331 * to mark the field not present (aka select Protocol Class 0).
332 * See ITU-T Q.711 6.2.1 for more information.
333 */
334#define OSMO_SCU_UNITDATA_REQ_P_SEQUENCE_CONTROL_NOT_PRESENT 0xffffffff
340 uint32_t importance;
341 /* user data */
342};
343
344/* OSMO_SCU_PRIM_N_NOTICE */
348 /* ITU Q.711 6.2.2.2.4 "Reason for return" (enum osmo_sccp_return_reason): */
349 uint32_t cause;
350 uint32_t importance; /* ITU Q.711 6.2.2.2.6, Q.713 3.19 */
351 /* user data */
352};
353
354/* OSMO_SCU_PRIM_N_STATE */
356 uint32_t affected_pc;
357 uint32_t affected_ssn;
358 bool user_in_service; /* true: UIS; false: UOS */
360};
361
362/* OSMO_SCU_PRIM_N_PCSTATE */
364 uint32_t affected_pc;
368};
369
371 struct osmo_prim_hdr oph;
372 union {
381 } u;
382};
383
384#define msgb_scu_prim(msg) ((struct osmo_scu_prim *)(msg)->l1h)
385
386extern const struct value_string osmo_scu_prim_type_names[];
387static inline const char *osmo_scu_prim_type_name(enum osmo_scu_prim_type val)
388{
389 return get_value_string(osmo_scu_prim_type_names, val);
390}
391
392int osmo_scu_prim_hdr_name_buf(char *buf, size_t buflen, const struct osmo_prim_hdr *oph);
393char *osmo_scu_prim_hdr_name_c(void *ctx, const struct osmo_prim_hdr *oph);
394char *osmo_scu_prim_name(const struct osmo_prim_hdr *oph);
395
396struct osmo_ss7_instance;
397struct osmo_sccp_instance;
398struct osmo_sccp_user;
399
400void osmo_sccp_vty_init(void);
401
405struct osmo_sccp_instance *osmo_sccp_get_sccp(const struct osmo_sccp_user *scu);
406void osmo_sccp_set_priv(struct osmo_sccp_instance *sccp, void *priv);
407void *osmo_sccp_get_priv(struct osmo_sccp_instance *sccp);
408
409void osmo_sccp_user_unbind(struct osmo_sccp_user *scu);
410void osmo_sccp_user_set_priv(struct osmo_sccp_user *scu, void *priv);
411void *osmo_sccp_user_get_priv(struct osmo_sccp_user *scu);
412
414 osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc);
415
417 osmo_prim_cb prim_cb, uint16_t ssn);
418struct osmo_sccp_user *osmo_sccp_user_find(struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc);
419
420int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph);
421int osmo_sccp_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph);
422
423int osmo_sccp_addr_create(struct osmo_ss7_instance *inst, const char *name, const struct osmo_sccp_addr *dest_addr);
424int osmo_sccp_addr_update(struct osmo_ss7_instance *inst, const char *name, const struct osmo_sccp_addr *dest_addr);
425struct osmo_ss7_instance *osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, const char *name);
426int osmo_sccp_addr_by_name_local(struct osmo_sccp_addr *dest_addr, const char *name,
427 const struct osmo_ss7_instance *inst);
428const char *osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr);
430 const struct osmo_sccp_instance *inst,
431 uint32_t ssn);
432
433bool osmo_sccp_check_addr(struct osmo_sccp_addr *addr, uint32_t presence);
434int osmo_sccp_addr_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria);
435int osmo_sccp_addr_ri_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b);
436int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b);
437
438const char *osmo_sccp_user_name(struct osmo_sccp_user *scu);
439
static const char * osmo_sccp_return_reason_name(enum osmo_sccp_return_reason val)
Definition: sccp_sap.h:223
osmo_sccp_reset_reason_nsu
Definition: sccp_sap.h:146
@ OSMO_SCCP_RESET_REASON_NSU_USER_SYNCHRONIZATION
Definition: sccp_sap.h:147
osmo_sccp_release_reason_undefined
Definition: sccp_sap.h:197
@ OSMO_SCCP_REL_REASON_UNDEFINED
Definition: sccp_sap.h:198
osmo_scu_prim_type
SCCP-User primitives as per Q.711.
Definition: sccp_sap.h:32
@ OSMO_SCU_PRIM_N_CONNECT
Definition: sccp_sap.h:34
@ OSMO_SCU_PRIM_N_NOTICE
Definition: sccp_sap.h:42
@ OSMO_SCU_PRIM_N_INFORM
Definition: sccp_sap.h:39
@ OSMO_SCU_PRIM_N_RESET
Definition: sccp_sap.h:38
@ OSMO_SCU_PRIM_N_UNITDATA
Definition: sccp_sap.h:41
@ OSMO_SCU_PRIM_N_PCSTATE
Definition: sccp_sap.h:46
@ OSMO_SCU_PRIM_N_EXPEDITED_DATA
Definition: sccp_sap.h:36
@ OSMO_SCU_PRIM_N_STATE
Definition: sccp_sap.h:45
@ OSMO_SCU_PRIM_N_DISCONNECT
Definition: sccp_sap.h:37
@ OSMO_SCU_PRIM_N_DATA
Definition: sccp_sap.h:35
@ OSMO_SCU_PRIM_N_COORD
Definition: sccp_sap.h:44
osmo_sccp_npi
Definition: sccp_sap.h:83
@ OSMO_SCCP_NPI_F69_TELEX
Definition: sccp_sap.h:88
@ OSMO_SCCP_NPI_E214_ISDN_MOBILE
Definition: sccp_sap.h:91
@ OSMO_SCCP_NPI_GEERIC
Definition: sccp_sap.h:86
@ OSMO_SCCP_NPI_E210_MARITIME
Definition: sccp_sap.h:89
@ OSMO_SCCP_NPI_X121_DATA
Definition: sccp_sap.h:87
@ OSMO_SCCP_NPI_E212_LAND
Definition: sccp_sap.h:90
@ OSMO_SCCP_NPI_E164_ISDN
Definition: sccp_sap.h:85
@ OSMO_SCCP_NPI_UNKNOWN
Definition: sccp_sap.h:84
@ OSMO_SCCP_NPI_PRIVATE
Definition: sccp_sap.h:92
int osmo_sccp_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
Main entrance function for primitives from SCCP User.
Definition: sccp_sap.c:570
static const char * osmo_sccp_ssn_name(enum osmo_sccp_ssn val)
Definition: sccp_sap.h:258
void osmo_sccp_user_set_priv(struct osmo_sccp_user *scu, void *priv)
Definition: sccp_user.c:102
char * osmo_scu_prim_hdr_name_c(void *ctx, const struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:76
const struct value_string osmo_sccp_sp_status_names[]
Definition: sccp_sap.c:132
struct osmo_sccp_instance * osmo_sccp_get_sccp(const struct osmo_sccp_user *scu)
get the SCCP instance that is related to the given sccp user
Definition: sccp_user.c:150
osmo_sccp_originator
Definition: sccp_sap.h:301
@ OSMO_SCCP_ORIG_NS_USER
Definition: sccp_sap.h:303
@ OSMO_SCCP_ORIG_NS_PROVIDER
Definition: sccp_sap.h:302
@ OSMO_SCCP_ORIG_UNDEFINED
Definition: sccp_sap.h:304
osmo_sccp_release_reason_nsu
Definition: sccp_sap.h:175
@ OSMO_SCCP_REL_REASON_NSU_CREF_ACCESS_FAILURE
Definition: sccp_sap.h:192
@ OSMO_SCCP_REL_REASON_NSU_DISC_END_USER_CONGESTION
Definition: sccp_sap.h:178
@ OSMO_SCCP_REL_REASON_NSU_CREF_INCOMPAT_INFO_NSDU
Definition: sccp_sap.h:186
@ OSMO_SCCP_REL_REASON_NSU_CREF_END_USER_CONGESTION
Definition: sccp_sap.h:188
@ OSMO_SCCP_REL_REASON_NSU_DISC_ACCESS_CONGESTION
Definition: sccp_sap.h:181
@ OSMO_SCCP_REL_REASON_NSU_DISC_ABNORMAL
Definition: sccp_sap.h:177
@ OSMO_SCCP_REL_REASON_NSU_DISC_SUBSYS_CONGESTION
Definition: sccp_sap.h:183
@ OSMO_SCCP_REL_REASON_NSU_CREF_ACCESS_CONGESTION
Definition: sccp_sap.h:191
@ OSMO_SCCP_REL_REASON_NSU_DISC_SCCP_USER_ORIGIN
Definition: sccp_sap.h:180
@ OSMO_SCCP_REL_REASON_NSU_CREF_SUBSYS_CONGESTION
Definition: sccp_sap.h:193
@ OSMO_SCCP_REL_REASON_NSU_CREF_NT_CONDITION
Definition: sccp_sap.h:184
@ OSMO_SCCP_REL_REASON_NSU_DISC_ACCESS_FAILURE
Definition: sccp_sap.h:182
@ OSMO_SCCP_REL_REASON_NSU_DISC_NORMAL
Definition: sccp_sap.h:176
@ OSMO_SCCP_REL_REASON_NSU_DISC_END_USER_FAILURE
Definition: sccp_sap.h:179
@ OSMO_SCCP_REL_REASON_NSU_CREF_SCCP_USER_ORIGINATED
Definition: sccp_sap.h:190
@ OSMO_SCCP_REL_REASON_NSU_CREF_END_USER_ORIGIN
Definition: sccp_sap.h:187
@ OSMO_SCCP_REL_REASON_NSU_CREF_END_USER_FAILURE
Definition: sccp_sap.h:189
@ OSMO_SCCP_REL_REASON_NSU_CREF_T_CONDITION
Definition: sccp_sap.h:185
void osmo_sccp_instance_destroy(struct osmo_sccp_instance *inst)
Definition: sccp_instance.c:347
struct osmo_sccp_user * osmo_sccp_user_find(struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc)
Find a SCCP User registered for given PC+SSN or SSN only.
Definition: sccp_instance.c:137
const struct value_string osmo_sccp_rem_sccp_status_names[]
Definition: sccp_sap.c:139
osmo_sccp_release_reason_nsp
Definition: sccp_sap.h:155
@ OSMO_SCCP_REL_REASON_NSP_CREF_IN_RESTART_PHASE
Definition: sccp_sap.h:170
@ OSMO_SCCP_REL_REASON_NSP_CREF_HOP_COUNTER_VIOLATION
Definition: sccp_sap.h:171
@ OSMO_SCCP_REL_REASON_NSP_CREF_REASON_UNSPEC_NT
Definition: sccp_sap.h:165
@ OSMO_SCCP_REL_REASON_NSP_CREF_DST_INACC_NT
Definition: sccp_sap.h:161
@ OSMO_SCCP_REL_REASON_NSP_DISC_T
Definition: sccp_sap.h:157
@ OSMO_SCCP_REL_REASON_NSP_CREF_REASON_UNSPEC_T
Definition: sccp_sap.h:166
@ OSMO_SCCP_REL_REASON_NSP_CREF_LOCAL_ERROR
Definition: sccp_sap.h:167
@ OSMO_SCCP_REL_REASON_NSP_CREF_INVALID_STATE
Definition: sccp_sap.h:168
@ OSMO_SCCP_REL_REASON_NSP_CREF_DST_ADDR_UNKNOWN_NT
Definition: sccp_sap.h:160
@ OSMO_SCCP_REL_REASON_NSP_CREF_DST_INACC_T
Definition: sccp_sap.h:162
@ OSMO_SCCP_REL_REASON_NSP_CREF_QOS_UNAVAIL_NT
Definition: sccp_sap.h:163
@ OSMO_SCCP_REL_REASON_NSP_DISC_RELEASE_IN_PROGRESS
Definition: sccp_sap.h:159
@ OSMO_SCCP_REL_REASON_NSP_DISC_INVALID_STATE
Definition: sccp_sap.h:158
@ OSMO_SCCP_REL_REASON_NSP_DISC_NT
Definition: sccp_sap.h:156
@ OSMO_SCCP_REL_REASON_NSP_CREF_QOS_UNAVAIL_T
Definition: sccp_sap.h:164
@ OSMO_SCCP_REL_REASON_NSP_CREF_NO_TRANSITION
Definition: sccp_sap.h:169
bool osmo_sccp_check_addr(struct osmo_sccp_addr *addr, uint32_t presence)
check whether a given SCCP-Address is consistent.
Definition: sccp_instance.c:405
static const char * osmo_sccp_sp_status_name(enum osmo_sccp_sp_status val)
Definition: sccp_sap.h:234
osmo_sccp_reset_reason_nsp
Definition: sccp_sap.h:141
@ OSMO_SCCP_RESET_REASON_NSP_UNSPEC
Definition: sccp_sap.h:142
@ OSMO_SCCP_RESET_REASON_NSP_LOCAL_SCCP_ORIGIN
Definition: sccp_sap.h:143
osmo_sccp_gti
Definition: sccp_sap.h:70
@ OSMO_SCCP_GTI_TT_NPL_ENC_NAI
Definition: sccp_sap.h:75
@ OSMO_SCCP_GTI_NAI_ONLY
Definition: sccp_sap.h:72
@ OSMO_SCCP_GTI_TT_ONLY
Definition: sccp_sap.h:73
@ OSMO_SCCP_GTI_TT_NPL_ENC
Definition: sccp_sap.h:74
@ OSMO_SCCP_GTI_NO_GT
Definition: sccp_sap.h:71
int osmo_scu_prim_hdr_name_buf(char *buf, size_t buflen, const struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:61
struct osmo_ss7_instance * osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, const char *name)
Lookup an SCCP address from the addressbook by its name.
Definition: ss7_instance.c:821
int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b)
Compare two SCCP Global Titles.
Definition: sccp_instance.c:448
static const char * osmo_sccp_routing_ind_name(enum osmo_sccp_routing_ind val)
Definition: sccp_sap.h:65
osmo_sccp_routing_ind
Definition: sccp_sap.h:57
@ OSMO_SCCP_RI_GT
Definition: sccp_sap.h:59
@ OSMO_SCCP_RI_NONE
Definition: sccp_sap.h:58
@ OSMO_SCCP_RI_SSN_PC
Definition: sccp_sap.h:60
@ OSMO_SCCP_RI_SSN_IP
Definition: sccp_sap.h:61
void * osmo_sccp_get_priv(struct osmo_sccp_instance *sccp)
Definition: sccp_instance.c:376
struct osmo_sccp_user * osmo_sccp_user_bind_pc(struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc)
Bind a given SCCP User to a given SSN+PC.
Definition: sccp_instance.c:187
static const char * osmo_sccp_rem_sccp_status_name(enum osmo_sccp_rem_sccp_status val)
Definition: sccp_sap.h:249
static const char * osmo_sccp_gti_name(enum osmo_sccp_gti val)
Definition: sccp_sap.h:79
const struct value_string osmo_sccp_ssn_names[]
Definition: sccp_sap.c:148
int osmo_sccp_addr_by_name_local(struct osmo_sccp_addr *dest_addr, const char *name, const struct osmo_ss7_instance *inst)
Lookup an SCCP address from the addressbook of a specific instance by its name.
Definition: ss7_instance.c:843
void osmo_sccp_vty_init(void)
Definition: sccp_vty.c:329
struct osmo_ss7_instance * osmo_sccp_get_ss7(const struct osmo_sccp_instance *sccp)
get the SS7 instance that is related to the given SCCP instance
Definition: sccp_instance.c:974
void * osmo_sccp_user_get_priv(struct osmo_sccp_user *scu)
Definition: sccp_user.c:107
const struct value_string osmo_sccp_routing_ind_names[]
Definition: sccp_sap.c:115
int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph)
Main entrance function for primitives from SCCP User.
Definition: sccp_sap.c:627
void osmo_sccp_set_priv(struct osmo_sccp_instance *sccp, void *priv)
Definition: sccp_instance.c:371
struct osmo_sccp_instance * osmo_sccp_instance_create(struct osmo_ss7_instance *ss7, void *priv)
create a SCCP Instance and register it as user with SS7 inst
Definition: sccp_instance.c:309
const struct value_string osmo_sccp_return_reason_names[]
Definition: sccp_sap.c:514
static const char * osmo_scu_prim_type_name(enum osmo_scu_prim_type val)
Definition: sccp_sap.h:387
osmo_sccp_return_reason
Definition: sccp_sap.h:205
@ OSMO_SCCP_RETURN_REASON_UNQUALIFIED
Definition: sccp_sap.h:213
@ OSMO_SCCP_RETURN_REASON_ERROR_IN_LOCAL_PROCESSING
Definition: sccp_sap.h:215
@ OSMO_SCCP_RETURN_REASON_HOP_COUNTER_VIOLATION
Definition: sccp_sap.h:218
@ OSMO_SCCP_RETURN_REASON_SUBSYSTEM_CONGESTION
Definition: sccp_sap.h:208
@ OSMO_SCCP_RETURN_REASON_NETWORK_CONGESTION
Definition: sccp_sap.h:212
@ OSMO_SCCP_RETURN_REASON_NO_TRANSLATION
Definition: sccp_sap.h:207
@ OSMO_SCCP_RETURN_REASON_SEGMENTATION_NOT_SUPPORTED
Definition: sccp_sap.h:219
@ OSMO_SCCP_RETURN_REASON_UNEQUIPPED_USER
Definition: sccp_sap.h:210
@ OSMO_SCCP_RETURN_REASON_SEGMENTATION_FAILURE
Definition: sccp_sap.h:220
@ OSMO_SCCP_RETURN_REASON_DEST_CANNOT_PERFORM_REASSEMBLY
Definition: sccp_sap.h:216
@ OSMO_SCCP_RETURN_REASON_SUBSYSTEM_FAILURE
Definition: sccp_sap.h:209
@ OSMO_SCCP_RETURN_REASON_NO_TRANSLATION_NATURE
Definition: sccp_sap.h:206
@ OSMO_SCCP_RETURN_REASON_ERROR_IN_MSG_TRANSPORT
Definition: sccp_sap.h:214
@ OSMO_SCCP_RETURN_REASON_SCCP_FAILURE
Definition: sccp_sap.h:217
@ OSMO_SCCP_RETURN_REASON_MTP_FAILURE
Definition: sccp_sap.h:211
int osmo_sccp_addr_create(struct osmo_ss7_instance *inst, const char *name, const struct osmo_sccp_addr *dest_addr)
Add an SCCP address entry to the addressbook.
Definition: ss7_instance.c:736
struct osmo_sccp_user * osmo_sccp_user_bind(struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn)
Bind a given SCCP User to a given SSN (at any PC)
Definition: sccp_instance.c:204
osmo_sccp_reset_reason_undefined
Definition: sccp_sap.h:150
@ OSMO_SCCP_RESET_REASON_UNDEFINED
Definition: sccp_sap.h:151
int osmo_sccp_addr_update(struct osmo_ss7_instance *inst, const char *name, const struct osmo_sccp_addr *dest_addr)
Update the value of an SCCP address entry already present in the addressbook.
Definition: ss7_instance.c:766
const char * osmo_sccp_name_by_addr(const struct osmo_sccp_addr *addr)
Reverse lookup the lookup-name of a specified SCCP address.
Definition: ss7_instance.c:861
osmo_sccp_ssn
Definition: sccp_sap.h:106
@ OSMO_SCCP_SSN_BSC_BSSAP_LE
Definition: sccp_sap.h:133
@ OSMO_SCCP_SSN_ISUP
Definition: sccp_sap.h:109
@ OSMO_SCCP_SSN_RES_INTL
Definition: sccp_sap.h:119
@ OSMO_SCCP_SSN_MSC_BSSAP_LE
Definition: sccp_sap.h:134
@ OSMO_SCCP_SSN_HLR
Definition: sccp_sap.h:112
@ OSMO_SCCP_SSN_SGSN_MAP
Definition: sccp_sap.h:129
@ OSMO_SCCP_SSN_VLR
Definition: sccp_sap.h:113
@ OSMO_SCCP_SSN_RANAP
Definition: sccp_sap.h:123
@ OSMO_SCCP_SSN_gsmSCF_MAP
Definition: sccp_sap.h:127
@ OSMO_SCCP_SSN_MSC
Definition: sccp_sap.h:114
@ OSMO_SCCP_SSN_GMLC_MAP
Definition: sccp_sap.h:125
@ OSMO_SCCP_SSN_BSSAP
Definition: sccp_sap.h:137
@ OSMO_SCCP_SSN_ISDN_SS
Definition: sccp_sap.h:118
@ OSMO_SCCP_SSN_SMLC_BSSAP_LE
Definition: sccp_sap.h:135
@ OSMO_SCCP_SSN_MAP
Definition: sccp_sap.h:111
@ OSMO_SCCP_SSN_GGSN_MAP
Definition: sccp_sap.h:130
@ OSMO_SCCP_SSN_EIR
Definition: sccp_sap.h:115
@ OSMO_SCCP_SSN_CAP
Definition: sccp_sap.h:126
@ OSMO_SCCP_SSN_TC_TEST
Definition: sccp_sap.h:121
@ OSMO_SCCP_SSN_RNSAP
Definition: sccp_sap.h:124
@ OSMO_SCCP_SSN_PCAP
Definition: sccp_sap.h:132
@ OSMO_SCCP_SSN_AUC
Definition: sccp_sap.h:116
@ OSMO_SCCP_SSN_OMAP
Definition: sccp_sap.h:110
@ OSMO_SCCP_SSN_BISDN
Definition: sccp_sap.h:120
@ OSMO_SCCP_SSN_BSS_OAM
Definition: sccp_sap.h:136
@ OSMO_SCCP_SSN_SIWF_MAP
Definition: sccp_sap.h:128
@ OSMO_SCCP_SSN_MGMT
Definition: sccp_sap.h:108
osmo_sccp_nai
Definition: sccp_sap.h:96
@ OSMO_SCCP_NAI_SUBSCR
Definition: sccp_sap.h:98
@ OSMO_SCCP_NAI_INTL
Definition: sccp_sap.h:101
@ OSMO_SCCP_NAI_UNKNOWN
Definition: sccp_sap.h:97
@ OSMO_SCCP_NAI_RES_NAT_USE
Definition: sccp_sap.h:99
@ OSMO_SCCP_NAI_NATL
Definition: sccp_sap.h:100
osmo_sccp_rem_sccp_status
Definition: sccp_sap.h:240
@ OSMO_SCCP_REM_SCCP_S_UNEQUIPPED
Definition: sccp_sap.h:243
@ OSMO_SCCP_REM_SCCP_S_CONGESTED
Definition: sccp_sap.h:245
@ OSMO_SCCP_REM_SCCP_S_INACCESSIBLE
Definition: sccp_sap.h:244
@ OSMO_SCCP_REM_SCCP_S_AVAILABLE
Definition: sccp_sap.h:241
@ OSMO_SCCP_REM_SCCP_S_UNAVAILABLE_UNKNOWN
Definition: sccp_sap.h:242
void osmo_sccp_local_addr_by_instance(struct osmo_sccp_addr *dest_addr, const struct osmo_sccp_instance *inst, uint32_t ssn)
derive a basic local SCCP-Address from a given SCCP instance.
Definition: sccp_instance.c:385
char * osmo_scu_prim_name(const struct osmo_prim_hdr *oph)
Definition: sccp_sap.c:55
const char * osmo_sccp_user_name(struct osmo_sccp_user *scu)
Compose a human readable string to describe the SCCP user's connection.
Definition: sccp_user.c:131
osmo_sccp_sp_status
Definition: sccp_sap.h:227
@ OSMO_SCCP_SP_S_CONGESTED
Definition: sccp_sap.h:229
@ OSMO_SCCP_SP_S_INACCESSIBLE
Definition: sccp_sap.h:228
@ OSMO_SCCP_SP_S_ACCESSIBLE
Definition: sccp_sap.h:230
int osmo_sccp_addr_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria)
Compare two SCCP addresses by given presence criteria.
Definition: sccp_instance.c:470
const struct value_string osmo_sccp_gti_names[]
Definition: sccp_sap.c:123
void osmo_sccp_user_unbind(struct osmo_sccp_user *scu)
Unbind a given SCCP user.
Definition: sccp_user.c:96
int osmo_sccp_instance_next_conn_id(struct osmo_sccp_instance *sccp)
Definition: sccp_scoc.c:120
const struct value_string osmo_scu_prim_type_names[]
Definition: sccp_sap.c:37
int osmo_sccp_addr_ri_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b)
Compare the routing information of two SCCP addresses.
Definition: sccp_instance.c:530
Definition: sccp_sap.h:269
uint32_t pc
Definition: sccp_sap.h:273
union osmo_sccp_addr::@19 ip
struct in_addr v4
Definition: sccp_sap.h:276
uint32_t ssn
Definition: sccp_sap.h:274
enum osmo_sccp_routing_ind ri
Definition: sccp_sap.h:271
struct osmo_sccp_gt gt
Definition: sccp_sap.h:272
uint32_t presence
Definition: sccp_sap.h:270
struct in6_addr v6
Definition: sccp_sap.h:277
Definition: sccp_sap.h:261
uint8_t gti
Definition: sccp_sap.h:262
uint32_t nai
Definition: sccp_sap.h:265
uint32_t npi
Definition: sccp_sap.h:264
char digits[32]
Definition: sccp_sap.h:266
uint8_t tt
Definition: sccp_sap.h:263
Definition: sccp_instance.h:47
struct osmo_ss7_instance * ss7
Definition: sccp_instance.h:58
void * priv
Definition: sccp_instance.h:59
Definition: sccp_user.h:14
struct osmo_sccp_instance * inst
pointer back to SCCP instance
Definition: sccp_user.h:18
char * name
human-readable name of this user
Definition: sccp_user.h:20
osmo_prim_cb prim_cb
Definition: sccp_user.h:30
Definition: sccp_sap.h:283
struct osmo_sccp_addr calling_addr
Definition: sccp_sap.h:285
struct osmo_sccp_addr responding_addr
Definition: sccp_sap.h:286
uint32_t sccp_class
Definition: sccp_sap.h:288
uint32_t importance
Definition: sccp_sap.h:289
struct osmo_sccp_addr called_addr
Definition: sccp_sap.h:284
uint32_t conn_id
Definition: sccp_sap.h:290
Definition: sccp_sap.h:295
uint32_t importance
Definition: sccp_sap.h:297
uint32_t conn_id
Definition: sccp_sap.h:296
Definition: sccp_sap.h:308
uint32_t conn_id
Definition: sccp_sap.h:314
enum osmo_sccp_originator originator
Definition: sccp_sap.h:309
uint32_t importance
Definition: sccp_sap.h:315
struct osmo_sccp_addr responding_addr
Definition: sccp_sap.h:310
uint32_t cause
Definition: sccp_sap.h:313
Definition: sccp_sap.h:345
struct osmo_sccp_addr called_addr
Definition: sccp_sap.h:346
uint32_t cause
Definition: sccp_sap.h:349
uint32_t importance
Definition: sccp_sap.h:350
struct osmo_sccp_addr calling_addr
Definition: sccp_sap.h:347
Definition: sccp_sap.h:363
uint32_t restricted_importance_level
Definition: sccp_sap.h:365
enum osmo_sccp_rem_sccp_status remote_sccp_status
Definition: sccp_sap.h:367
uint32_t affected_pc
Definition: sccp_sap.h:364
enum osmo_sccp_sp_status sp_status
Definition: sccp_sap.h:366
Definition: sccp_sap.h:370
struct osmo_prim_hdr oph
Definition: sccp_sap.h:371
struct osmo_scu_notice_param notice
Definition: sccp_sap.h:378
struct osmo_scu_unitdata_param unitdata
Definition: sccp_sap.h:377
struct osmo_scu_disconn_param disconnect
Definition: sccp_sap.h:375
struct osmo_scu_connect_param connect
Definition: sccp_sap.h:373
union osmo_scu_prim::@20 u
struct osmo_scu_data_param data
Definition: sccp_sap.h:374
struct osmo_scu_pcstate_param pcstate
Definition: sccp_sap.h:380
struct osmo_scu_reset_param reset
Definition: sccp_sap.h:376
struct osmo_scu_state_param state
Definition: sccp_sap.h:379
Definition: sccp_sap.h:320
uint32_t conn_id
Definition: sccp_sap.h:324
uint32_t cause
Definition: sccp_sap.h:323
enum osmo_sccp_originator originator
Definition: sccp_sap.h:321
Definition: sccp_sap.h:355
uint32_t ssn_multiplicity_ind
Definition: sccp_sap.h:359
uint32_t affected_ssn
Definition: sccp_sap.h:357
bool user_in_service
Definition: sccp_sap.h:358
uint32_t affected_pc
Definition: sccp_sap.h:356
Definition: sccp_sap.h:335
uint32_t return_option
Definition: sccp_sap.h:339
uint32_t in_sequence_control
Definition: sccp_sap.h:338
struct osmo_sccp_addr called_addr
Definition: sccp_sap.h:336
struct osmo_sccp_addr calling_addr
Definition: sccp_sap.h:337
uint32_t importance
Definition: sccp_sap.h:340
Definition: ss7_instance.h:47
struct osmo_sccp_instance * sccp
Definition: ss7_instance.h:68
char * name
Definition: ss7_instance.h:81
uint8_t ssn
Definition: tcap_as_loadshare.c:3
uint32_t pc
Definition: tcap_as_loadshare.c:2