libosmo-sigtran 2.1.0.134-a6b3
Osmocom SIGTRAN library
ss7_route_table.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4#include <unistd.h>
5#include <osmocom/core/linuxlist.h>
6
7/***********************************************************************
8 * SS7 Routing Tables
9 ***********************************************************************/
10
13
15 uint32_t opc;
16 uint32_t dpc;
17 uint8_t sls;
18};
19char *ss7_route_label_to_str(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, const struct osmo_ss7_route_label *rtlb);
20
23 struct llist_head list;
27 struct llist_head combined_linksets;
28
29 struct {
30 char *name;
32 } cfg;
33};
34
40
41struct osmo_ss7_route *
43 uint32_t mask, bool dynamic);
44struct osmo_ss7_route *
46 uint32_t mask, const struct osmo_ss7_as *as, bool dynamic);
47struct osmo_ss7_route *
48ss7_route_table_lookup_route(const struct osmo_ss7_route_table *rtbl, const struct osmo_ss7_route_label *rtlabel);
49bool ss7_route_table_dpc_is_accessible(const struct osmo_ss7_route_table *rtbl, uint32_t dpc);
50bool ss7_route_table_dpc_is_accessible_via_as(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, const struct osmo_ss7_as *as);
51bool ss7_route_table_dpc_is_accessible_skip_as(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, const struct osmo_ss7_as *as);
52
54ss7_route_table_find_combined_linkset(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, uint32_t prio);
56ss7_route_table_find_or_create_combined_linkset(struct osmo_ss7_route_table *rtbl, uint32_t pc, uint32_t mask, uint32_t prio);
62ss7_route_table_find_combined_linkset(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, uint32_t prio);
63
65 const struct osmo_ss7_as *as, uint32_t dpc);
uint32_t dpc
Definition: m3ua.h:1
osmo_ss7_route_status
Definition: ss7_route.h:19
struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, uint32_t prio)
Definition: ss7_route_table.c:216
struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset_by_dpc_mask(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask)
Definition: ss7_route_table.c:195
void ss7_route_table_del_routes_by_as(struct osmo_ss7_route_table *rtbl, struct osmo_ss7_as *as)
Definition: ss7_route_table.c:267
char * ss7_route_label_to_str(char *buf, size_t buf_len, const struct osmo_ss7_instance *inst, const struct osmo_ss7_route_label *rtlb)
Definition: ss7_route_table.c:39
void ss7_route_table_update_route_status_by_as(const struct osmo_ss7_route_table *rtbl, enum osmo_ss7_route_status status, const struct osmo_ss7_as *as, uint32_t dpc)
Definition: ss7_route_table.c:247
struct osmo_ss7_combined_linkset * ss7_route_table_find_or_create_combined_linkset(struct osmo_ss7_route_table *rtbl, uint32_t pc, uint32_t mask, uint32_t prio)
Definition: ss7_route_table.c:238
bool ss7_route_table_dpc_is_accessible(const struct osmo_ss7_route_table *rtbl, uint32_t dpc)
Definition: ss7_route_table.c:330
bool ss7_route_table_dpc_is_accessible_skip_as(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, const struct osmo_ss7_as *as)
Definition: ss7_route_table.c:370
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc_mask_as(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, const struct osmo_ss7_as *as, bool dynamic)
Find a SS7 route for given destination point code + mask in given table via given AS.
Definition: ss7_route_table.c:145
void ss7_route_table_del_routes_by_linkset(struct osmo_ss7_route_table *rtbl, struct osmo_ss7_linkset *lset)
Definition: ss7_route_table.c:285
struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset_by_dpc(const struct osmo_ss7_route_table *rtbl, uint32_t dpc)
Definition: ss7_route_table.c:176
void ss7_route_table_destroy(struct osmo_ss7_route_table *rtbl)
Definition: ss7_route_table.c:99
struct osmo_ss7_route * ss7_route_table_lookup_route(const struct osmo_ss7_route_table *rtbl, const struct osmo_ss7_route_label *rtlabel)
Definition: ss7_route_table.c:305
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc_mask(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, bool dynamic)
Find a SS7 route for given destination point code + mask in given table.
Definition: ss7_route_table.c:112
bool ss7_route_table_dpc_is_accessible_via_as(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, const struct osmo_ss7_as *as)
Definition: ss7_route_table.c:347
struct osmo_ss7_route_table * ss7_route_table_find_or_create(struct osmo_ss7_instance *inst, const char *name)
Definition: ss7_route_table.c:87
struct osmo_ss7_route_table * ss7_route_table_find(struct osmo_ss7_instance *inst, const char *name)
Definition: ss7_route_table.c:75
Definition: ss7_as.h:74
Definition: ss7_combined_linkset.h:25
uint32_t mask
Definition: ss7_combined_linkset.h:41
uint32_t pc
Definition: ss7_combined_linkset.h:40
Definition: ss7_instance.h:21
Definition: ss7_linkset.h:13
Definition: ss7_route_table.h:14
uint32_t dpc
Definition: ss7_route_table.h:16
uint32_t opc
Definition: ss7_route_table.h:15
uint8_t sls
Definition: ss7_route_table.h:17
Definition: ss7_route_table.h:21
struct llist_head list
member in list of routing tables
Definition: ss7_route_table.h:23
struct osmo_ss7_instance * inst
osmo_ss7_instance to which we belong
Definition: ss7_route_table.h:25
struct osmo_ss7_route_table::@35 cfg
struct llist_head combined_linksets
list of osmo_ss7_combined_linksets
Definition: ss7_route_table.h:27
char * description
Definition: ss7_route_table.h:31
char * name
Definition: ss7_route_table.h:30
Definition: ss7_route.h:28
struct osmo_ss7_as * as
pointer to Application Server
Definition: ss7_route.h:42
uint32_t mask
Definition: ss7_route.h:48