libosmo-sigtran 2.1.0.49-23d1
Osmocom SIGTRAN library
|
#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) |
#define ss7_llist_round_robin | ( | list, | |
state, | |||
struct_type, | |||
entry_name | |||
) | llist_entry(_ss7_llist_round_robin(list, state), struct_type, entry_name) |
|
inlinestatic |
References NULL.
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().
|
static |
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().
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, 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().
|
static |
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().
void ss7_combined_linkset_free | ( | struct osmo_ss7_combined_linkset * | clset | ) |
References osmo_ss7_combined_linkset::list.
Referenced by ss7_combined_linkset_del_route().
|
static |
Insert combined_link into its routing table.
[in] | clset | Combined link to be inserted into its routing table |
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().
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_route_label::dpc, 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_route_label::opc, osmo_ss7_instance_calc_itu_ext_sls(), osmo_ss7_pointcode_print(), osmo_ss7_pointcode_print2(), osmo_ss7_combined_linkset::rtable, osmo_ss7_route_label::sls, ss7_combined_linkset_assign_route_roundrobin(), ss7_combined_linkset_select_route_roundrobin(), and ss7_route_is_available().
Referenced by ss7_route_table_lookup_route().
|
static |