libosmo-sigtran 2.2.1.64-e866 Osmocom SIGTRAN library

Functions
ss7_combined_linkset.c File Reference
`#include <errno.h>`
`#include <osmocom/core/linuxlist.h>`
`#include <osmocom/core/logging.h>`
`#include <osmocom/sigtran/osmo_ss7.h>`
`#include "ss7_as.h"`
`#include "ss7_combined_linkset.h"`
`#include "ss7_route.h"`
`#include "ss7_route_table.h"`
`#include "ss7_internal.h"`

## Functions
static void | ss7_combined_linkset_insert (struct osmo_ss7_combined_linkset *clset)
| Insert combined_link into its routing table. More...
struct osmo_ss7_combined_linkset * | ss7_combined_linkset_alloc (struct osmo_ss7_route_table *rtbl, uint32_t pc, uint32_t mask, uint32_t prio)
void | ss7_combined_linkset_free (struct osmo_ss7_combined_linkset *clset)
void | ss7_combined_linkset_add_route (struct osmo_ss7_combined_linkset *clset, struct osmo_ss7_route *rt)
void | ss7_combined_linkset_del_route (struct osmo_ss7_route *rt)
bool | ss7_combined_linkset_is_available (const struct osmo_ss7_combined_linkset *clset)
static ext_sls_t | osmo_ss7_instance_calc_itu_ext_sls (const struct osmo_ss7_instance *inst, const struct osmo_ss7_route_label *rtlabel)
struct osmo_ss7_route * | current_rt (const struct osmo_ss7_esls_entry *eslse)
static struct osmo_ss7_route * | ss7_combined_linkset_assign_route_roundrobin (struct osmo_ss7_combined_linkset *clset)
static struct osmo_ss7_route * | ss7_combined_linkset_select_route_roundrobin (struct osmo_ss7_combined_linkset *clset)
struct osmo_ss7_route * | ss7_combined_linkset_lookup_route (struct osmo_ss7_combined_linkset *clset, const struct osmo_ss7_route_label *rtlabel)

## Function Documentation

## ◆ current_rt()

struct osmo_ss7_route * current_rt | ( | const struct osmo_ss7_esls_entry * | eslse | ) |

References osmo_ss7_esls_entry::alt_rt, osmo_ss7_esls_entry::normal_rt, NULL, and ss7_route_is_available().

Referenced by ss7_combined_linkset_lookup_route().

## ◆ osmo_ss7_instance_calc_itu_ext_sls()

static ext_sls_t osmo_ss7_instance_calc_itu_ext_sls | ( | const struct osmo_ss7_instance * | inst,
|  | const struct osmo_ss7_route_label * | rtlabel
| ) |  |
| static

References osmo_ss7_instance::cfg, osmo_ss7_route_label::dpc, osmo_ss7_instance::dpc_shift, NUM_EXT_SLS, osmo_ss7_route_label::opc, osmo_ss7_instance::opc_shift, osmo_ss7_route_label::sls, and osmo_ss7_instance::sls_shift.

Referenced by ss7_combined_linkset_lookup_route().

## ◆ ss7_combined_linkset_add_route()

void ss7_combined_linkset_add_route | ( | struct osmo_ss7_combined_linkset * | clset,
|  | struct osmo_ss7_route * | rt
| ) |  |

References osmo_ss7_route::clset, osmo_ss7_route::list, osmo_ss7_combined_linkset::num_routes, and osmo_ss7_combined_linkset::routes.

Referenced by ss7_route_insert().

## ◆ ss7_combined_linkset_alloc()

struct osmo_ss7_combined_linkset * ss7_combined_linkset_alloc | ( | struct osmo_ss7_route_table * | rtbl,
|  | uint32_t | pc,
|  | uint32_t | mask,
|  | uint32_t | prio
| ) |  |

References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route_table::inst, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, pc, osmo_ss7_instance::pc_fmt, osmo_ss7_combined_linkset::priority, osmo_ss7_combined_linkset::routes, osmo_ss7_combined_linkset::rtable, and ss7_combined_linkset_insert().

Referenced by ss7_route_insert(), and ss7_route_table_find_or_create_combined_linkset().

## ◆ ss7_combined_linkset_assign_route_roundrobin()

static struct osmo_ss7_route * ss7_combined_linkset_assign_route_roundrobin | ( | struct osmo_ss7_combined_linkset * | clset | ) |
| static

References osmo_ss7_route::clset, osmo_ss7_combined_linkset::last_route_roundrobin_ass, osmo_ss7_route::list, NULL, osmo_ss7_combined_linkset::num_routes, osmo_ss7_combined_linkset::routes, and ss7_llist_round_robin.

Referenced by ss7_combined_linkset_lookup_route().

## ◆ ss7_combined_linkset_del_route()

void ss7_combined_linkset_del_route | ( | struct osmo_ss7_route * | rt | ) |

References osmo_ss7_esls_entry::alt_rt, osmo_ss7_route::clset, osmo_ss7_combined_linkset::esls_table, osmo_ss7_combined_linkset::last_route_roundrobin_ass, osmo_ss7_combined_linkset::last_route_roundrobin_tx, osmo_ss7_combined_linkset::list, osmo_ss7_route::list, osmo_ss7_esls_entry::normal_rt, NULL, osmo_ss7_combined_linkset::num_routes, osmo_ss7_combined_linkset::routes, ss7_combined_linkset_free(), and ss7_llist_round_robin.

Referenced by ss7_route_destroy().

## ◆ ss7_combined_linkset_free()

void ss7_combined_linkset_free | ( | struct osmo_ss7_combined_linkset * | clset | ) |

References osmo_ss7_combined_linkset::list.

Referenced by ss7_combined_linkset_del_route().

## ◆ ss7_combined_linkset_insert()

static void ss7_combined_linkset_insert | ( | struct osmo_ss7_combined_linkset * | clset | ) |
| static

Insert combined_link into its routing table.

Parameters

  [in] | clset | Combined link to be inserted into its routing table

Returns
  0 on success, negative on error

A combined link is only really used once it has been inserted into its routing table.

insert the route in the ordered list of routes. The list is sorted by mask length, so that the more specific (longer mask) routes are first, while the less specific routes with shorter masks are last. Within the same mask length, the routes are ordered by priority (where lower value means higher prio). Hence, the first matching route in a linear iteration is the most specific match.

References osmo_ss7_combined_linkset::cfg, osmo_ss7_route_table::combined_linksets, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, osmo_ss7_combined_linkset::priority, and osmo_ss7_combined_linkset::rtable.

Referenced by ss7_combined_linkset_alloc().

## ◆ ss7_combined_linkset_is_available()

bool ss7_combined_linkset_is_available | ( | const struct osmo_ss7_combined_linkset * | clset | ) |

References osmo_ss7_route::clset, osmo_ss7_route::list, osmo_ss7_combined_linkset::routes, and ss7_route_is_available().

Referenced by ss7_route_table_dpc_is_accessible(), and vty_dump_rtable().

## ◆ ss7_combined_linkset_lookup_route()

struct osmo_ss7_route * ss7_combined_linkset_lookup_route | ( | struct osmo_ss7_combined_linkset * | clset,
|  | const struct osmo_ss7_route_label * | rtlabel
| ) |  |

References osmo_ss7_esls_entry::alt_rt, osmo_ss7_route::as, osmo_ss7_as::cfg, current_rt(), osmo_ss7_route::dest, osmo_ss7_combined_linkset::esls_table, osmo_ss7_route_table::inst, LOGPCLSET, osmo_ss7_as::name, osmo_ss7_esls_entry::normal_rt, NULL, osmo_ss7_instance_calc_itu_ext_sls(), osmo_ss7_combined_linkset::rtable, ss7_combined_linkset_assign_route_roundrobin(), ss7_combined_linkset_select_route_roundrobin(), ss7_route_is_available(), and ss7_route_label_to_str().

Referenced by ss7_route_table_lookup_route().

## ◆ ss7_combined_linkset_select_route_roundrobin()

static struct osmo_ss7_route * ss7_combined_linkset_select_route_roundrobin | ( | struct osmo_ss7_combined_linkset * | clset | ) |
| static

References osmo_ss7_route::clset, osmo_ss7_combined_linkset::last_route_roundrobin_tx, osmo_ss7_route::list, NULL, osmo_ss7_combined_linkset::num_routes, osmo_ss7_combined_linkset::routes, ss7_llist_round_robin, and ss7_route_is_available().

Referenced by ss7_combined_linkset_lookup_route().