libosmo-sigtran  2.1.0.93-5cebd.202505202026
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 
11 struct osmo_ss7_instance;
12 
14  uint32_t opc;
15  uint32_t dpc;
16  uint8_t sls;
17 };
18 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);
19 
22  struct llist_head list;
26  struct llist_head combined_linksets;
27 
28  struct {
29  char *name;
30  char *description;
31  } cfg;
32 };
33 
34 struct osmo_ss7_route_table *
35 ss7_route_table_find(struct osmo_ss7_instance *inst, const char *name);
36 struct osmo_ss7_route_table *
39 
40 struct osmo_ss7_route *
42  uint32_t mask);
43 struct osmo_ss7_route *
45 
47 ss7_route_table_find_combined_linkset(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, uint32_t prio);
49 ss7_route_table_find_or_create_combined_linkset(struct osmo_ss7_route_table *rtbl, uint32_t pc, uint32_t mask, uint32_t prio);
55 ss7_route_table_find_combined_linkset(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, uint32_t prio);
56 
uint32_t dpc
Definition: m3ua.h:1
struct osmo_ss7_route * ss7_route_table_lookup_route(struct osmo_ss7_route_table *rtbl, const struct osmo_ss7_route_label *rtlabel)
Definition: ss7_route_table.c:238
void ss7_route_table_del_routes_by_as(struct osmo_ss7_route_table *rtbl, struct osmo_ss7_as *as)
Definition: ss7_route_table.c:202
struct osmo_ss7_route * ss7_route_table_find_route_by_dpc_mask(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask)
Find a SS7 route for given destination point code + mask in given table.
Definition: ss7_route_table.c:112
struct osmo_ss7_route_table * ss7_route_table_find(struct osmo_ss7_instance *inst, const char *name)
Definition: ss7_route_table.c:75
struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, uint32_t prio)
Definition: ss7_route_table.c:171
void ss7_route_table_del_routes_by_linkset(struct osmo_ss7_route_table *rtbl, struct osmo_ss7_linkset *lset)
Definition: ss7_route_table.c:220
struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset_by_dpc(struct osmo_ss7_route_table *rtbl, uint32_t dpc)
Definition: ss7_route_table.c:131
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_combined_linkset * ss7_route_table_find_combined_linkset_by_dpc_mask(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask)
Definition: ss7_route_table.c:150
void ss7_route_table_destroy(struct osmo_ss7_route_table *rtbl)
Definition: ss7_route_table.c:99
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
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:192
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:13
uint32_t dpc
Definition: ss7_route_table.h:15
uint32_t opc
Definition: ss7_route_table.h:14
uint8_t sls
Definition: ss7_route_table.h:16
Definition: ss7_route_table.h:20
struct llist_head list
member in list of routing tables
Definition: ss7_route_table.h:22
struct osmo_ss7_instance * inst
osmo_ss7_instance to which we belong
Definition: ss7_route_table.h:24
struct llist_head combined_linksets
list of osmo_ss7_combined_linksets
Definition: ss7_route_table.h:26
char * description
Definition: ss7_route_table.h:30
char * name
Definition: ss7_route_table.h:29
struct osmo_ss7_route_table::@34 cfg
Definition: ss7_route.h:17
uint32_t mask
Definition: ss7_route.h:35