libosmo-sigtran 2.0.0.52-6412
Osmocom SIGTRAN library
osmo_ss7_user.c File Reference
#include <errno.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/prim.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "ss7_user.h"
#include "ss7_internal.h"

Functions

struct osmo_ss7_userosmo_ss7_user_create (struct osmo_ss7_instance *inst, const char *name)
 
void osmo_ss7_user_destroy (struct osmo_ss7_user *user)
 
struct osmo_ss7_instanceosmo_ss7_user_get_instance (const struct osmo_ss7_user *user)
 
void osmo_ss7_user_set_prim_cb (struct osmo_ss7_user *user, osmo_prim_cb prim_cb)
 
void osmo_ss7_user_set_priv (struct osmo_ss7_user *user, void *priv)
 
void * osmo_ss7_user_get_priv (const struct osmo_ss7_user *user)
 
int osmo_ss7_user_register (struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user)
 Register a MTP user for a given service indicator. More...
 
int osmo_ss7_user_unregister (struct osmo_ss7_instance *inst, uint8_t service_ind, struct osmo_ss7_user *user)
 Unregister a MTP user for a given service indicator. More...
 
int ss7_mtp_to_user (struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp)
 

Function Documentation

◆ osmo_ss7_user_create()

struct osmo_ss7_user * osmo_ss7_user_create ( struct osmo_ss7_instance inst,
const char *  name 
)

◆ osmo_ss7_user_destroy()

void osmo_ss7_user_destroy ( struct osmo_ss7_user user)

◆ osmo_ss7_user_get_instance()

struct osmo_ss7_instance * osmo_ss7_user_get_instance ( const struct osmo_ss7_user user)

◆ osmo_ss7_user_get_priv()

void * osmo_ss7_user_get_priv ( const struct osmo_ss7_user user)

◆ osmo_ss7_user_register()

int osmo_ss7_user_register ( struct osmo_ss7_instance inst,
uint8_t  service_ind,
struct osmo_ss7_user user 
)

Register a MTP user for a given service indicator.

Parameters
[in]instSS7 instance for which we register the user
[in]service_indService (ISUP, SCCP, ...)
[in]userSS7 user (including primitive call-back)
Returns
0 on success; negative on error

References osmo_ss7_user::inst, osmo_ss7_user::name, osmo_ss7_user::priv, and osmo_ss7_instance::user.

Referenced by osmo_sccp_instance_create().

◆ osmo_ss7_user_set_prim_cb()

void osmo_ss7_user_set_prim_cb ( struct osmo_ss7_user user,
osmo_prim_cb  prim_cb 
)

◆ osmo_ss7_user_set_priv()

void osmo_ss7_user_set_priv ( struct osmo_ss7_user user,
void *  priv 
)

◆ osmo_ss7_user_unregister()

int osmo_ss7_user_unregister ( struct osmo_ss7_instance inst,
uint8_t  service_ind,
struct osmo_ss7_user user 
)

Unregister a MTP user for a given service indicator.

Parameters
[in]instSS7 instance for which we register the user
[in]service_indService (ISUP, SCCP, ...)
[in]user(optional) SS7 user. If present, we will not unregister other users
Returns
0 on success; negative on error

References osmo_ss7_user::inst, and osmo_ss7_instance::user.

Referenced by osmo_sccp_instance_destroy().

◆ ss7_mtp_to_user()