libosmo-sigtran 2.1.0.49-23d1
Osmocom SIGTRAN library
ss7_route.h
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4#include <osmocom/core/linuxlist.h>
5
6/***********************************************************************
7 * SS7 Routes
8 ***********************************************************************/
9
12struct osmo_ss7_linkset;
13struct osmo_ss7_as;
14
15#define OSMO_SS7_ROUTE_PRIO_DEFAULT 5
16
19 struct llist_head list;
22 /* Combined linkset this route is part of */
24
25 struct {
29 struct osmo_ss7_as *as;
31
32 struct {
33 /* FIXME: presence? */
34 uint32_t pc;
35 uint32_t mask;
39 uint32_t priority;
40 uint8_t qos_class;
41 } cfg;
42};
43
44struct osmo_ss7_route *
45ss7_route_alloc(struct osmo_ss7_route_table *rtbl, uint32_t pc, uint32_t mask);
46struct osmo_ss7_route *
47ss7_route_create(struct osmo_ss7_route_table *rtbl, uint32_t dpc,
48 uint32_t mask, const char *linkset_name);
49void ss7_route_destroy(struct osmo_ss7_route *rt);
50
51struct osmo_ss7_route *
53struct osmo_ss7_route *
55 uint32_t mask);
56
57int ss7_route_set_linkset(struct osmo_ss7_route *rt, const char *linkset_name);
58int ss7_route_insert(struct osmo_ss7_route *rt);
59
60bool ss7_route_is_available(const struct osmo_ss7_route *rt);
uint32_t dpc
Definition: m3ua.h:1
struct osmo_ss7_route * ss7_route_create(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, const char *linkset_name)
Create a new route in the given routing table.
Definition: osmo_ss7_route.c:194
int ss7_route_set_linkset(struct osmo_ss7_route *rt, const char *linkset_name)
Set linkset on route entry.
Definition: osmo_ss7_route.c:98
struct osmo_ss7_route * ss7_route_find_dpc(struct osmo_ss7_route_table *rtbl, uint32_t dpc)
void ss7_route_destroy(struct osmo_ss7_route *rt)
Destroy a given SS7 route.
Definition: osmo_ss7_route.c:220
struct osmo_ss7_route * ss7_route_find_dpc_mask(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask)
int ss7_route_insert(struct osmo_ss7_route *rt)
Insert route into its routing table.
Definition: osmo_ss7_route.c:144
bool ss7_route_is_available(const struct osmo_ss7_route *rt)
Definition: osmo_ss7_route.c:368
struct osmo_ss7_route * ss7_route_alloc(struct osmo_ss7_route_table *rtbl, uint32_t pc, uint32_t mask)
Allocate a route entry.
Definition: osmo_ss7_route.c:63
Definition: ss7_as.h:73
Definition: ss7_combined_linkset.h:25
Definition: ss7_instance.h:21
Definition: ss7_linkset.h:13
Definition: ss7_route_table.h:20
Definition: ss7_route.h:17
struct osmo_ss7_route::@31 dest
struct osmo_ss7_as * as
pointer to Application Server
Definition: ss7_route.h:29
struct osmo_ss7_combined_linkset * clset
Definition: ss7_route.h:23
uint8_t qos_class
Definition: ss7_route.h:40
uint32_t pc
Definition: ss7_route.h:34
uint32_t mask
Definition: ss7_route.h:35
struct osmo_ss7_route_table * rtable
osmo_ss7_route_table to which we belong
Definition: ss7_route.h:21
struct llist_head list
member in osmo_ss7_combined_linkset::routes
Definition: ss7_route.h:19
struct osmo_ss7_route::@32 cfg
struct osmo_ss7_linkset * linkset
pointer to linkset (destination) of route
Definition: ss7_route.h:27
uint32_t priority
lower priority is higher
Definition: ss7_route.h:39
char * linkset_name
human-specified linkset name
Definition: ss7_route.h:37