Loading...
Searching...
No Matches
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_user * | osmo_ss7_user_create (struct osmo_ss7_instance *inst, const char *name)
void | osmo_ss7_user_destroy (struct osmo_ss7_user *user)
struct osmo_ss7_instance * | osmo_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.
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.
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 )

References osmo_ss7_user::inst, and osmo_ss7_user::name.

Referenced by osmo_sccp_instance_create().

## osmo_ss7_user_destroy()

void osmo_ss7_user_destroy | ( | struct osmo_ss7_user * | user | ) |

Referenced by osmo_sccp_instance_destroy().

## osmo_ss7_user_get_instance()

struct osmo_ss7_instance * osmo_ss7_user_get_instance | ( | const struct osmo_ss7_user * | user | ) |

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

## osmo_ss7_user_get_priv()

void * osmo_ss7_user_get_priv | ( | const struct osmo_ss7_user * | user | ) |

References osmo_ss7_user::priv, and osmo_ss7_instance::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] | inst | SS7 instance for which we register the user
  [in] | service_ind | Service (ISUP, SCCP, ...)
  [in] | user | SS7 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 )

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

Referenced by osmo_sccp_instance_create().

## osmo_ss7_user_set_priv()

void osmo_ss7_user_set_priv | ( | struct osmo_ss7_user * | user,
|  | void * | priv )

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

Referenced by osmo_sccp_instance_create().

## 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] | inst | SS7 instance for which we register the user
  [in] | service_ind | Service (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()

int ss7_mtp_to_user | ( | struct osmo_ss7_instance * | inst,
|  | struct osmo_mtp_prim * | omp )

References osmo_ss7_user::inst, MTP_SAP_USER, osmo_ss7_user::name, osmo_mtp_prim::oph, OSMO_MTP_PRIM_TRANSFER, osmo_ss7_user::prim_cb, osmo_ss7_user::priv, osmo_mtp_transfer_param::sio, osmo_mtp_prim::transfer, osmo_mtp_prim::u, and osmo_ss7_instance::user.