libosmo-sigtran 2.2.1
Osmocom SIGTRAN library
Loading...
Searching...
No Matches
sccp_user.h File Reference
#include <inttypes.h>
#include <osmocom/core/fsm.h>
#include <osmocom/core/prim.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/sigtran/sccp_sap.h>

Go to the source code of this file.

Data Structures

struct  osmo_sccp_user

Macros

#define _LOGPSCU(scu, subsys, level, fmt, args ...)
#define LOGPSCU(scu, level, fmt, args ...)

Functions

struct osmo_sccp_usersccp_user_alloc (struct osmo_sccp_instance *inst, const char *name, osmo_prim_cb prim_cb, uint16_t ssn, uint32_t pc)
void sccp_user_free (struct osmo_sccp_user *scu)
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.

Macro Definition Documentation

◆ _LOGPSCU

#define _LOGPSCU ( scu,
subsys,
level,
fmt,
args ... )
Value:
_LOGPSCI((scu)->inst, subsys, level, "SCU(%s) " fmt, osmo_sccp_user_name(scu), ## args)
#define _LOGPSCI(sci, subsys, level, fmt, args ...)
Definition sccp_instance.h:77
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

◆ LOGPSCU

#define LOGPSCU ( scu,
level,
fmt,
args ... )
Value:
_LOGPSCU(scu, DLSCCP, level, fmt, ## args)
#define _LOGPSCU(scu, subsys, level, fmt, args ...)
Definition sccp_user.h:41

Referenced by osmo_sccp_tx_conn_resp_msg(), osmo_sccp_tx_data(), osmo_sccp_tx_disconn_data(), osmo_sccp_user_sap_down_nofree(), osmo_sccp_user_unbind(), sccp_sclc_user_sap_down_nofree(), sccp_user_prim_up(), scmg_prim_cb(), and scmg_rx().

Function Documentation

◆ 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 )

◆ sccp_user_free()

void sccp_user_free ( struct osmo_sccp_user * scu)

◆ sccp_user_prim_up()

int sccp_user_prim_up ( struct osmo_sccp_user * scu,
struct osmo_scu_prim * prim )

Send a SCCP User SAP Primitive up to the User.

Parameters
[in]scuSCCP User to whom to send the primitive
[in]primPrimitive to send to the user
Returns
return value of the SCCP User's prim_cb() function

Ownership of prim->oph->msg is passed to the user of the registered callback

References LOGPSCU, osmo_scu_prim::oph, osmo_scu_prim_name(), and osmo_sccp_user::prim_cb.

Referenced by sccp_conn_scu_gen_encode_and_send(), sccp_lbcs_local_bcast_pcstate(), sccp_lbcs_local_bcast_state(), sclc_rx_cldr(), and sclc_rx_cldt().