libosmo-sigtran 2.1.0.140-12dd.202507092026
Osmocom SIGTRAN library
Loading...
Searching...
No Matches
sccp_instance.h
Go to the documentation of this file.
1#pragma once
2
3#include <inttypes.h>
4
5#include <osmocom/core/fsm.h>
6#include <osmocom/core/prim.h>
7#include <osmocom/core/linuxlist.h>
8#include <osmocom/core/linuxrbtree.h>
9#include <osmocom/core/tdef.h>
13
14struct osmo_ss7_user;
15
16/* Appendix C.4 of Q.714 */
31
32extern const struct osmo_tdef osmo_sccp_timer_defaults[OSMO_SCCP_TIMERS_LEN];
33
34extern const struct value_string osmo_sccp_timer_names[];
35static inline const char *osmo_sccp_timer_name(enum osmo_sccp_timer val)
36{ return get_value_string(osmo_sccp_timer_names, val); }
37
38/* an instance of the SCCP stack */
40 /* entry in global list of ss7 instances */
41 struct llist_head list;
42 /* rbtree root of 'struct sccp_connection' in this instance */
43 struct rb_root connections;
44 /* list of SCCP users in this instance */
45 struct llist_head users;
46 /* routing context to be used in all outbound messages */
47 uint32_t route_ctx;
48 /* next connection ID to allocate */
49 uint32_t next_id;
51 void *priv;
52
54
55 struct osmo_tdef *tdefs;
56
58};
59
60struct osmo_sccp_user *
61sccp_user_find(struct osmo_sccp_instance *inst, uint16_t ssn, uint32_t pc);
62
63#define _LOGPSCI(sci, subsys, level, fmt, args ...) \
64 _LOGSS7((sci)->ss7, subsys, level, "SCCP(rctx=%" PRIu32 ") " fmt, (sci)->route_ctx, ## args)
65#define LOGPSCI(sci, level, fmt, args ...) \
66 _LOGPSCI(sci, DLSCCP, level, fmt, ## args)
67
osmo_sccp_timer
Definition sccp_instance.h:17
@ OSMO_SCCP_TIMER_REPEAT_REL
Definition sccp_instance.h:23
@ OSMO_SCCP_TIMER_INT
Definition sccp_instance.h:24
@ OSMO_SCCP_TIMER_GUARD
Definition sccp_instance.h:25
@ OSMO_SCCP_TIMER_REASSEMBLY
Definition sccp_instance.h:27
@ OSMO_SCCP_TIMERS_LEN
Definition sccp_instance.h:29
@ OSMO_SCCP_TIMER_REL
Definition sccp_instance.h:22
@ OSMO_SCCP_TIMER_IAS
Definition sccp_instance.h:20
@ OSMO_SCCP_TIMER_CONN_EST
Definition sccp_instance.h:19
@ OSMO_SCCP_TIMER_RESET
Definition sccp_instance.h:26
@ OSMO_SCCP_TIMER_IAR
Definition sccp_instance.h:21
struct osmo_sccp_user * 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 First search all users with a valid PC for a...
Definition sccp_instance.c:107
static const char * osmo_sccp_timer_name(enum osmo_sccp_timer val)
Definition sccp_instance.h:35
const struct value_string osmo_sccp_timer_names[]
Definition sccp_instance.c:82
const struct osmo_tdef osmo_sccp_timer_defaults[OSMO_SCCP_TIMERS_LEN]
Definition sccp_instance.c:58
Definition sccp_instance.h:39
uint32_t next_id
Definition sccp_instance.h:49
struct osmo_ss7_user * ss7_user
Definition sccp_instance.h:53
uint32_t route_ctx
Definition sccp_instance.h:47
struct osmo_tdef * tdefs
Definition sccp_instance.h:55
struct osmo_ss7_instance * ss7
Definition sccp_instance.h:50
struct llist_head list
Definition sccp_instance.h:41
void * priv
Definition sccp_instance.h:51
uint32_t max_optional_data
Definition sccp_instance.h:57
struct llist_head users
Definition sccp_instance.h:45
struct rb_root connections
Definition sccp_instance.h:43
Definition sccp_user.h:12
struct osmo_sccp_instance * inst
pointer back to SCCP instance
Definition sccp_user.h:16
uint32_t pc
Definition sccp_user.h:22
uint16_t ssn
SSN and/or point code to which we are bound.
Definition sccp_user.h:21
Definition ss7_instance.h:21
Definition ss7_user.h:13