Loading...
Searching...
No Matches
xua_shared.c File Reference
`#include <stdint.h>`
`#include <unistd.h>`
`#include <string.h>`
`#include <osmocom/core/utils.h>`
`#include <osmocom/core/linuxlist.h>`
`#include <osmocom/core/logging.h>`
`#include "xua_msg.h"`
`#include <osmocom/sigtran/osmo_ss7.h>`
`#include <osmocom/sigtran/protocol/m3ua.h>`
`#include <osmocom/sigtran/protocol/sua.h>`
`#include "ss7_as.h"`
`#include "ss7_asp.h"`
`#include "ss7_internal.h"`
`#include "xua_internal.h"`

## Functions

static struct osmo_ss7_as * | find_single_as_for_asp (const struct osmo_ss7_asp *asp)
| osmo_static_assert (M3UA_ERR_INVAL_ROUT_CTX==SUA_ERR_INVAL_ROUT_CTX, _err_rctx)
| osmo_static_assert (M3UA_ERR_NO_CONFGD_AS_FOR_ASP==SUA_ERR_NO_CONFGD_AS_FOR_ASP, _err_as_for_asp)
int | xua_find_as_for_asp (struct osmo_ss7_as **as, const struct osmo_ss7_asp *asp, const struct xua_msg_part *rctx_ie)
| Find the AS for given ASP + optional routing context IE.

## Function Documentation

## find_single_as_for_asp()

struct osmo_ss7_as * find_single_as_for_asp | ( | const struct osmo_ss7_asp * | asp | ) |

static

References osmo_ss7_instance::as_list, osmo_ss7_asp::inst, osmo_ss7_as::list, and osmo_ss7_as_has_asp().

Referenced by xua_find_as_for_asp().

## osmo_static_assert() [1/2]

osmo_static_assert | ( | M3UA_ERR_INVAL_ROUT_CTX | = =SUA_ERR_INVAL_ROUT_CTX,
|  | _err_rctx | )

References M3UA_ERR_INVAL_ROUT_CTX, and SUA_ERR_INVAL_ROUT_CTX.

## osmo_static_assert() [2/2]

osmo_static_assert | ( | M3UA_ERR_NO_CONFGD_AS_FOR_ASP | = =SUA_ERR_NO_CONFGD_AS_FOR_ASP,
|  | _err_as_for_asp | )

References M3UA_ERR_NO_CONFGD_AS_FOR_ASP, and SUA_ERR_NO_CONFGD_AS_FOR_ASP.

## xua_find_as_for_asp()

int xua_find_as_for_asp | ( | struct osmo_ss7_as ** | as,
|  | const struct osmo_ss7_asp * | asp,
|  | const struct xua_msg_part * | rctx_ie )

Find the AS for given ASP + optional routing context IE.

if rctx_ie == NULL, we assume that this ASP is only part of a single AS; if rctx_ie is given, then we look-up the ASP based on the routing context, and verify that this ASP is part of it.

Parameters

  [out] | as | caller-provided address-of-pointer to store the found AS
  [in] | asp | ASP for which we want to look-up the AS
  [in] | rctx_ie | routing context IE (may be NULL) to use for look-up

Returns
  0 in case of success; {M3UA,SUA}_ERR_* code in case of error.

References osmo_ss7_asp::cfg, find_single_as_for_asp(), osmo_ss7_asp::inst, LOGPASP, M3UA_ERR_INVAL_ROUT_CTX, M3UA_ERR_NO_CONFGD_AS_FOR_ASP, osmo_ss7_asp::name, osmo_ss7_as_find_by_rctx(), osmo_ss7_as_has_asp(), osmo_ss7_asp_get_log_subsys(), and xua_msg_part_get_u32().

Referenced by m3ua_rx_snm_asp(), m3ua_rx_xfer(), sua_rx_cl(), sua_rx_co(), and sua_rx_snm_asp().