libosmo-sigtran 2.1.0.149-fef8
Osmocom SIGTRAN library
sccp_user.h
Go to the documentation of this file.
1#pragma once
2#include <inttypes.h>
3
4#include <osmocom/core/fsm.h>
5#include <osmocom/core/prim.h>
6#include <osmocom/core/linuxlist.h>
7
9
11
14 struct llist_head list;
18 char *name;
19
21 uint16_t ssn;
22 uint32_t pc;
23
24 /* set if we are a server */
25 struct llist_head links;
26
27 /* user call-back function in case of incoming primitives */
28 osmo_prim_cb prim_cb;
29 void *priv;
30
31 /* Application Server FSM Instance */
32 struct osmo_fsm_inst *as_fi;
33};
34
35struct osmo_sccp_user *sccp_user_alloc(struct osmo_sccp_instance *inst, const char *name,
36 osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc);
37void sccp_user_free(struct osmo_sccp_user *scu);
38
39int sccp_user_prim_up(struct osmo_sccp_user *scut, struct osmo_scu_prim *prim);
40
41#define _LOGPSCU(scu, subsys, level, fmt, args ...) \
42 _LOGPSCI((scu)->inst, subsys, level, "SCU(%s) " fmt, osmo_sccp_user_name(scu), ## args)
43#define LOGPSCU(scu, level, fmt, args ...) \
44 _LOGPSCU(scu, DLSCCP, level, fmt, ## args)
void sccp_user_free(struct osmo_sccp_user *scu)
Definition: sccp_user.c:84
int sccp_user_prim_up(struct osmo_sccp_user *scut, struct osmo_scu_prim *prim)
Send a SCCP User SAP Primitive up to the User.
Definition: sccp_user.c:119
struct osmo_sccp_user * sccp_user_alloc(struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc)
Definition: sccp_user.c:52
Definition: sccp_instance.h:47
Definition: sccp_user.h:12
struct osmo_fsm_inst * as_fi
Definition: sccp_user.h:32
struct osmo_sccp_instance * inst
pointer back to SCCP instance
Definition: sccp_user.h:16
uint32_t pc
Definition: sccp_user.h:22
struct llist_head links
Definition: sccp_user.h:25
void * priv
Definition: sccp_user.h:29
uint16_t ssn
SSN and/or point code to which we are bound.
Definition: sccp_user.h:21
char * name
human-readable name of this user
Definition: sccp_user.h:18
osmo_prim_cb prim_cb
Definition: sccp_user.h:28
struct llist_head list
entry in list of sccp users of osmo_sccp_instance
Definition: sccp_user.h:14
Definition: sccp_sap.h:280