libosmo-sigtran: src/sccp_user.h Source File

libosmo-sigtran 2.2.1.99-1c6a 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
8#include <osmocom/sigtran/sccp_sap.h>
9
10struct osmo_sccp_instance;
11
12 struct osmo_sccp_user {
14 struct llist_head list;
16 struct osmo_sccp_instance *inst;
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)
sccp_sap.h
sccp_user_free
void sccp_user_free(struct osmo_sccp_user *scu)
Definition: sccp_user.c:84
sccp_user_prim_up
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
sccp_user_alloc
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
osmo_sccp_instance
Definition: sccp_instance.h:47
osmo_sccp_user
Definition: sccp_user.h:12
osmo_sccp_user::as_fi
struct osmo_fsm_inst * as_fi
Definition: sccp_user.h:32
osmo_sccp_user::inst
struct osmo_sccp_instance * inst
pointer back to SCCP instance
Definition: sccp_user.h:16
osmo_sccp_user::pc
uint32_t pc
Definition: sccp_user.h:22
osmo_sccp_user::links
struct llist_head links
Definition: sccp_user.h:25
osmo_sccp_user::priv
void * priv
Definition: sccp_user.h:29
osmo_sccp_user::ssn
uint16_t ssn
SSN and/or point code to which we are bound.
Definition: sccp_user.h:21
osmo_sccp_user::name
char * name
human-readable name of this user
Definition: sccp_user.h:18
osmo_sccp_user::prim_cb
osmo_prim_cb prim_cb
Definition: sccp_user.h:28
osmo_sccp_user::list
struct llist_head list
entry in list of sccp users of osmo_sccp_instance
Definition: sccp_user.h:14
osmo_scu_prim
Definition: sccp_sap.h:282
ssn
uint8_t ssn
Definition: tcap_as_loadshare.c:3
pc
uint32_t pc
Definition: tcap_as_loadshare.c:2