libosmo-sigtran 2.2.1.95-893c Osmocom SIGTRAN library

Data Structures | Macros | Functions
ss7_user.h File Reference
`#include <stdint.h>`
`#include <unistd.h>`
`#include <osmocom/core/prim.h>`
`#include <osmocom/sigtran/protocol/mtp.h>`
`#include <osmocom/sigtran/mtp_sap.h>`

Go to the source code of this file.

## Data Structures
struct | osmo_ss7_user

## Macros
#define | _LOGPSS7U(osu, subsys, level, fmt, args ...) _LOGSS7((osu)->inst, subsys, level, "ss7_user(%s) " fmt, osu->name, ## args)
#define | LOGPSS7U(osu, level, fmt, args ...) _LOGPSS7U(osu, DLSS7, level, fmt, ## args)

## Functions
void | ss7_user_unregister_all (struct osmo_ss7_user *user)
int | ss7_user_mtp_sap_prim_up (const struct osmo_ss7_user *osu, struct osmo_mtp_prim *omp)
| Send a MTP SAP Primitive up to the MTP User. More...
struct osmo_mtp_prim * | mtp_prim_xfer_ind_alloc (const struct osmo_mtp_transfer_param *param, const uint8_t *user_data, size_t user_data_len)
struct osmo_mtp_prim * | mtp_prim_status_ind_alloc (uint32_t dpc, enum mtp_unavail_cause cause, bool cong_level_present, uint8_t cong_level)
void | mtp_resume_ind_up_to_all_users (struct osmo_ss7_instance *s7i, uint32_t pc)
void | mtp_pause_ind_up_to_all_users (struct osmo_ss7_instance *s7i, uint32_t pc)
void | mtp_status_ind_up_to_all_users (struct osmo_ss7_instance *s7i, uint32_t dpc, enum mtp_unavail_cause cause, bool cong_level_present, uint8_t cong_level)

## Macro Definition Documentation

## ◆ _LOGPSS7U

#define _LOGPSS7U | ( |  | osu,
|  |  | subsys,
|  |  | level,
|  |  | fmt,
|  |  | args ...
| ) |  | _LOGSS7((osu)->inst, subsys, level, "ss7_user(%s) " fmt, osu->name, ## args)

## ◆ LOGPSS7U

#define LOGPSS7U | ( |  | osu,
|  |  | level,
|  |  | fmt,
|  |  | args ...
| ) |  | _LOGPSS7U(osu, DLSS7, level, fmt, ## args)

## Function Documentation

## ◆ mtp_pause_ind_up_to_all_users()

void mtp_pause_ind_up_to_all_users | ( | struct osmo_ss7_instance * | s7i,
|  | uint32_t | pc
| ) |  |

References mtp_prim_pause_ind_alloc(), pc, ss7_user_mtp_sap_prim_up(), and osmo_ss7_instance::user.

Referenced by xua_snm_pc_available_to_mtp_users().

## ◆ mtp_prim_status_ind_alloc()

struct osmo_mtp_prim * mtp_prim_status_ind_alloc | ( | uint32_t | dpc,
|  | enum mtp_unavail_cause | cause,
|  | bool | cong_level_present,
|  | uint8_t | cong_level
| ) |  |

References osmo_mtp_status_param::affected_dpc, osmo_mtp_status_param::cause, osmo_mtp_status_param::congestion_level, osmo_mtp_status_param::congestion_level_present, dpc, mtp_prim_msgb_alloc(), MTP_SAP_USER, osmo_mtp_prim::oph, OSMO_MTP_PRIM_STATUS, osmo_mtp_prim::status, and osmo_mtp_prim::u.

Referenced by mtp_status_ind_up_to_all_users(), and xua_snm_upu().

## ◆ mtp_prim_xfer_ind_alloc()

struct osmo_mtp_prim * mtp_prim_xfer_ind_alloc | ( | const struct osmo_mtp_transfer_param * | param,
|  | const uint8_t * | user_data,
|  | size_t | user_data_len
| ) |  |

References m3ua_msgb_alloc(), MTP_SAP_USER, osmo_mtp_prim::oph, OSMO_MTP_PRIM_TRANSFER, osmo_mtp_prim::transfer, and osmo_mtp_prim::u.

Referenced by m3ua_to_xfer_ind().

## ◆ mtp_resume_ind_up_to_all_users()

void mtp_resume_ind_up_to_all_users | ( | struct osmo_ss7_instance * | s7i,
|  | uint32_t | pc
| ) |  |

References mtp_prim_resume_ind_alloc(), pc, ss7_user_mtp_sap_prim_up(), and osmo_ss7_instance::user.

Referenced by xua_snm_pc_available_to_mtp_users().

## ◆ mtp_status_ind_up_to_all_users()

void mtp_status_ind_up_to_all_users | ( | struct osmo_ss7_instance * | s7i,
|  | uint32_t | dpc,
|  | enum mtp_unavail_cause | cause,
|  | bool | cong_level_present,
|  | uint8_t | cong_level
| ) |  |

References dpc, mtp_prim_status_ind_alloc(), ss7_user_mtp_sap_prim_up(), and osmo_ss7_instance::user.

Referenced by xua_snm_scon_to_mtp_users().

## ◆ ss7_user_mtp_sap_prim_up()

int ss7_user_mtp_sap_prim_up | ( | const struct osmo_ss7_user * | osu,
|  | struct osmo_mtp_prim * | omp
| ) |  |

Send a MTP SAP Primitive up to the MTP User.

Parameters

  [in] | osu | MTP User to whom to send the primitive
  [in] | prim | Primitive to send to the user

Returns
  return value of the MTP User's prim_cb() function

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

References LOGPSS7U, osmo_mtp_prim::oph, osmo_mtp_prim_name(), osmo_ss7_user::prim_cb, and osmo_ss7_user::priv.

Referenced by deliver_to_mtp_user(), mtp_pause_ind_up_to_all_users(), mtp_resume_ind_up_to_all_users(), mtp_status_ind_up_to_all_users(), and xua_snm_upu().

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