libosmo-sigtran 2.1.0.49-23d1
Osmocom SIGTRAN library
osmo_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"

Macros

#define ss7_llist_round_robin(list, state, struct_type, entry_name)    llist_entry(_ss7_llist_round_robin(list, state), struct_type, entry_name)
 

Functions

static struct llist_head * _ss7_llist_round_robin (struct llist_head *list, void **state)
 
static void ss7_combined_linkset_insert (struct osmo_ss7_combined_linkset *clset)
 Insert combined_link into its routing table. More...
 
struct osmo_ss7_combined_linksetss7_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)
 
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_routecurrent_rt (const struct osmo_ss7_esls_entry *eslse)
 
static struct osmo_ss7_routess7_combined_linkset_assign_route_roundrobin (struct osmo_ss7_combined_linkset *clset)
 
static struct osmo_ss7_routess7_combined_linkset_select_route_roundrobin (struct osmo_ss7_combined_linkset *clset)
 
struct osmo_ss7_routess7_combined_linkset_lookup_route (struct osmo_ss7_combined_linkset *clset, const struct osmo_ss7_route_label *rtlabel)
 

Macro Definition Documentation

◆ ss7_llist_round_robin

#define ss7_llist_round_robin (   list,
  state,
  struct_type,
  entry_name 
)     llist_entry(_ss7_llist_round_robin(list, state), struct_type, entry_name)

Function Documentation

◆ _ss7_llist_round_robin()

static struct llist_head * _ss7_llist_round_robin ( struct llist_head *  list,
void **  state 
)
inlinestatic

References NULL.

◆ current_rt()

◆ osmo_ss7_instance_calc_itu_ext_sls()

◆ ss7_combined_linkset_add_route()

void ss7_combined_linkset_add_route ( struct osmo_ss7_combined_linkset clset,
struct osmo_ss7_route rt 
)

◆ ss7_combined_linkset_alloc()

◆ ss7_combined_linkset_assign_route_roundrobin()

◆ ss7_combined_linkset_del_route()

◆ ss7_combined_linkset_free()

void ss7_combined_linkset_free ( struct osmo_ss7_combined_linkset clset)

◆ 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]clsetCombined 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. 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_lookup_route()

◆ ss7_combined_linkset_select_route_roundrobin()