libosmo-sigtran 2.2.0 Osmocom SIGTRAN library

Functions
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 <osmocom/sigtran/mtp_sap.h>`
`#include "ss7_user.h"`
`#include "ss7_internal.h"`
`#include "xua_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_user * | osmo_ss7_user_find_by_si (const struct osmo_ss7_instance *inst, uint8_t service_indicator)
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_user *user, uint8_t service_ind)
| Register a MTP user for a given service indicator. More...
int | osmo_ss7_user_unregister (struct osmo_ss7_user *user, uint8_t service_ind)
| Unregister a MTP user for a given service indicator. More...
void | ss7_user_unregister_all (struct osmo_ss7_user *user)

## 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, osmo_ss7_user::name, and NULL.

Referenced by osmo_sccp_instance_create().

## ◆ osmo_ss7_user_destroy()

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

References ss7_user_unregister_all().

Referenced by osmo_sccp_instance_destroy().

## ◆ osmo_ss7_user_find_by_si()

struct osmo_ss7_user * osmo_ss7_user_find_by_si | ( | const struct osmo_ss7_instance * | inst,
|  | uint8_t | service_indicator
| ) |  |

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

Referenced by mtp3_hmdt_message_for_distribution(), and xua_snm_upu().

## ◆ 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_user * | user,
|  | uint8_t | service_ind
| ) |  |

Register a MTP user for a given service indicator.

Parameters

  [in] | user | SS7 user to register (including primitive call-back)
  [in] | service_ind | Service (ISUP, SCCP, ...)

Returns
  0 on success; negative on error

References osmo_ss7_user::inst, LOGPSS7U, 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_user * | user,
|  | uint8_t | service_ind
| ) |  |

Unregister a MTP user for a given service indicator.

Parameters

  [in] | user | SS7 user to unregister.
  [in] | service_ind | Service (ISUP, SCCP, ...)

Returns
  0 on success; negative on error

References osmo_ss7_user::inst, LOGPSS7U, NULL, osmo_ss7_user::priv, and osmo_ss7_instance::user.

Referenced by osmo_sccp_instance_destroy().

## ◆ ss7_user_unregister_all()

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

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

Referenced by osmo_ss7_user_destroy().