libosmo-sigtran 2.1.0.158-7430
Osmocom SIGTRAN library
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 ...)    _LOGPSCI((scu)->inst, subsys, level, "SCU(%s) " fmt, osmo_sccp_user_name(scu), ## args)
 
#define LOGPSCU(scu, level, fmt, args ...)    _LOGPSCU(scu, DLSCCP, 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. More...
 

Macro Definition Documentation

◆ _LOGPSCU

#define _LOGPSCU (   scu,
  subsys,
  level,
  fmt,
  args ... 
)     _LOGPSCI((scu)->inst, subsys, level, "SCU(%s) " fmt, osmo_sccp_user_name(scu), ## args)

◆ LOGPSCU

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

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().