libosmo-sigtran: src/xua_shared.c File Reference

libosmo-sigtran 2.2.1.99-1c6a Osmocom SIGTRAN library

Functions
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
| 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. More...

## Function Documentation

## ◆ osmo_static_assert() [1/2]

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

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

## ◆ 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 LOGPASP, M3UA_ERR_INVAL_ROUT_CTX, M3UA_ERR_NO_CONFGD_AS_FOR_ASP, NULL, osmo_ss7_asp::num_assoc_as, osmo_ss7_asp_get_log_subsys(), ss7_asp_find_as_by_rctx(), ss7_asp_get_first_as(), and xua_msg_part_get_u32().

Referenced by m3ua_rx_snm_asp(), m3ua_rx_snm_ipsp(), m3ua_rx_snm_sg(), m3ua_rx_xfer(), sua_rx_cl(), sua_rx_co(), sua_rx_snm_asp(), sua_rx_snm_ipsp(), and sua_rx_snm_sg().