libosmo-sigtran  1.8.0.67-fb30
Osmocom SIGTRAN library
osmo_ss7_hmrt.c File Reference
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <arpa/inet.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/logging.h>
#include <osmocom/sigtran/mtp_sap.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include <osmocom/sigtran/protocol/m3ua.h>
#include "xua_internal.h"
#include "ss7_internal.h"

Macros

#define APPEND(fmt, args ...)
 

Functions

struct osmo_mtp_primm3ua_to_xfer_ind (struct xua_msg *xua)
 
static struct xua_msgmtp_prim_to_m3ua (struct osmo_mtp_prim *prim)
 
static int deliver_to_mtp_user (const struct osmo_ss7_user *osu, struct xua_msg *xua)
 
static int hmdt_message_for_distribution (struct osmo_ss7_instance *inst, struct xua_msg *xua)
 
const char * osmo_ss7_route_name (struct osmo_ss7_route *rt, bool list_asps)
 Return human readable representation of the route, in a static buffer. More...
 
static int hmrt_message_for_routing (struct osmo_ss7_instance *inst, struct xua_msg *xua)
 
int m3ua_hmdc_rx_from_l2 (struct osmo_ss7_instance *inst, struct xua_msg *xua)
 
int osmo_ss7_user_mtp_xfer_req (struct osmo_ss7_instance *inst, struct osmo_mtp_prim *omp)
 

Macro Definition Documentation

◆ APPEND

#define APPEND (   fmt,
  args ... 
)
Value:
do { \
l = snprintf(pos, sizeof(buf) - (pos - buf), fmt, ## args); \
pos += l; \
if (pos - buf >= sizeof(buf) ) \
goto out; \
} while (0)

Referenced by osmo_ss7_route_name().

Function Documentation

◆ deliver_to_mtp_user()

static int deliver_to_mtp_user ( const struct osmo_ss7_user osu,
struct xua_msg xua 
)
static

◆ hmdt_message_for_distribution()

◆ hmrt_message_for_routing()

◆ m3ua_hmdc_rx_from_l2()

◆ m3ua_to_xfer_ind()

◆ mtp_prim_to_m3ua()

static struct xua_msg* mtp_prim_to_m3ua ( struct osmo_mtp_prim prim)
static

◆ osmo_ss7_route_name()

const char* osmo_ss7_route_name ( struct osmo_ss7_route rt,
bool  list_asps 
)

Return human readable representation of the route, in a static buffer.

This uses both osmo_ss7_pointcode_print() and osmo_ss7_pointcode_print2(), so pairing osmo_ss7_route_name() with osmo_ss7_pointcode_print() in the same printf statement is likely to conflict.

Parameters
[in]rtThe route information to print, or NULL.
[in]list_aspsIf true, append info for all ASPs for the route's AS.
Returns
A string constant or static buffer.

References APPEND, osmo_ss7_route::as, osmo_ss7_as::asps, osmo_ss7_linkset::cfg, osmo_ss7_route::cfg, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_route::dest, osmo_ss7_route_table::inst, osmo_ss7_route::linkset, osmo_ss7_route::mask, osmo_ss7_linkset::name, osmo_ss7_as::name, osmo_ss7_asp::name, osmo_ss7_asp_protocol_name(), osmo_ss7_pointcode_print(), osmo_ss7_pointcode_print2(), osmo_ss7_route::pc, osmo_ss7_as::proto, osmo_ss7_route::rtable, and osmo_ss7_asp::sock_name.

Referenced by hmrt_message_for_routing().

◆ osmo_ss7_user_mtp_xfer_req()