libosmo-sigtran 2.2.1.64-e866 Osmocom SIGTRAN library

Data Structures | Functions
ss7_route_table.h File Reference
`#include <stdint.h>`
`#include <unistd.h>`
`#include <osmocom/core/linuxlist.h>`

Go to the source code of this file.

## Data Structures
struct | osmo_ss7_route_label
struct | osmo_ss7_route_table

## Functions
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)
struct osmo_ss7_route_table * | ss7_route_table_find (struct osmo_ss7_instance *inst, const char *name)
struct osmo_ss7_route_table * | ss7_route_table_find_or_create (struct osmo_ss7_instance *inst, const char *name)
void | ss7_route_table_destroy (struct osmo_ss7_route_table *rtbl)
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. More...
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. More...
struct osmo_ss7_route * | ss7_route_table_lookup_route (const struct osmo_ss7_route_table *rtbl, const struct osmo_ss7_route_label *rtlabel)
bool | ss7_route_table_dpc_is_accessible (const struct osmo_ss7_route_table *rtbl, uint32_t dpc)
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)
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)
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)
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)
struct osmo_ss7_combined_linkset * | ss7_route_table_find_combined_linkset_by_dpc (const struct osmo_ss7_route_table *rtbl, uint32_t dpc)
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)
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)
void | ss7_route_table_del_routes_by_as (struct osmo_ss7_route_table *rtbl, struct osmo_ss7_as *as)
void | ss7_route_table_del_routes_by_linkset (struct osmo_ss7_route_table *rtbl, struct osmo_ss7_linkset *lset)

## Function Documentation

## ◆ ss7_route_label_to_str()

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
| ) |  |

References osmo_ss7_route_label::dpc, MAX_PC_STR_LEN, NULL, osmo_ss7_route_label::opc, osmo_ss7_pointcode_print_buf(), and osmo_ss7_route_label::sls.

Referenced by DEFUN(), gen_mtp_transfer_req_xua(), and ss7_combined_linkset_lookup_route().

## ◆ ss7_route_table_del_routes_by_as()

void ss7_route_table_del_routes_by_as | ( | struct osmo_ss7_route_table * | rtbl,
|  | struct osmo_ss7_as * | as
| ) |  |

References osmo_ss7_route::as, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, osmo_ss7_combined_linkset::list, osmo_ss7_route::list, osmo_ss7_combined_linkset::routes, and ss7_route_destroy().

Referenced by osmo_ss7_as_destroy().

## ◆ ss7_route_table_del_routes_by_linkset()

void ss7_route_table_del_routes_by_linkset | ( | struct osmo_ss7_route_table * | rtbl,
|  | struct osmo_ss7_linkset * | lset
| ) |  |

References osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, osmo_ss7_route::linkset, osmo_ss7_combined_linkset::list, osmo_ss7_route::list, osmo_ss7_combined_linkset::routes, and ss7_route_destroy().

Referenced by ss7_linkset_destroy().

## ◆ ss7_route_table_destroy()

void ss7_route_table_destroy | ( | struct osmo_ss7_route_table * | rtbl | ) |

References osmo_ss7_route_table::list.

## ◆ ss7_route_table_dpc_is_accessible()

bool ss7_route_table_dpc_is_accessible | ( | const struct osmo_ss7_route_table * | rtbl,
|  | uint32_t | dpc
| ) |  |

References osmo_ss7_combined_linkset::cfg, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, osmo_ss7_combined_linkset::pc, and ss7_combined_linkset_is_available().

Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), dpc_accessible(), and xua_snm_rx_daud().

## ◆ ss7_route_table_dpc_is_accessible_skip_as()

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
| ) |  |

References osmo_ss7_route::as, osmo_ss7_combined_linkset::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, dpc, osmo_ss7_route::list, osmo_ss7_combined_linkset::mask, osmo_ss7_combined_linkset::pc, osmo_ss7_combined_linkset::routes, and ss7_route_is_available().

Referenced by as_snm_pc_available(), as_snm_pc_unavailable(), and as_tx_duna_during_asp_act().

## ◆ ss7_route_table_dpc_is_accessible_via_as()

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
| ) |  |

References osmo_ss7_route::as, osmo_ss7_combined_linkset::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, dpc, osmo_ss7_route::list, osmo_ss7_combined_linkset::mask, osmo_ss7_combined_linkset::pc, osmo_ss7_combined_linkset::routes, and ss7_route_is_available().

Referenced by as_snm_pc_available().

## ◆ ss7_route_table_find()

struct osmo_ss7_route_table * ss7_route_table_find | ( | struct osmo_ss7_instance * | inst,
|  | const char * | name
| ) |  |

References osmo_ss7_route_table::cfg, osmo_ss7_route_table::inst, osmo_ss7_route_table::list, osmo_ss7_route_table::name, NULL, osmo_ss7_instance::rtable_list, and ss7_initialized.

Referenced by ss7_route_table_find_or_create().

## ◆ ss7_route_table_find_combined_linkset()

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
| ) |  |

References osmo_ss7_combined_linkset::cfg, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_combined_linkset::pc, and osmo_ss7_combined_linkset::priority.

Referenced by ss7_route_insert(), and ss7_route_table_find_or_create_combined_linkset().

## ◆ ss7_route_table_find_combined_linkset_by_dpc()

struct osmo_ss7_combined_linkset * ss7_route_table_find_combined_linkset_by_dpc | ( | const struct osmo_ss7_route_table * | rtbl,
|  | uint32_t | dpc
| ) |  |

References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_route_table::inst, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, and ss7_initialized.

## ◆ ss7_route_table_find_combined_linkset_by_dpc_mask()

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
| ) |  |

References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_route_table::inst, osmo_ss7_combined_linkset::list, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, and ss7_initialized.

## ◆ ss7_route_table_find_or_create()

struct osmo_ss7_route_table * ss7_route_table_find_or_create | ( | struct osmo_ss7_instance * | inst,
|  | const char * | name
| ) |  |

References osmo_ss7_route_table::inst, osmo_ss7_route_table::name, ss7_initialized, ss7_route_table_alloc(), and ss7_route_table_find().

Referenced by ss7_instance_alloc().

## ◆ ss7_route_table_find_or_create_combined_linkset()

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
| ) |  |

References osmo_ss7_combined_linkset::mask, pc, osmo_ss7_combined_linkset::rtable, ss7_combined_linkset_alloc(), and ss7_route_table_find_combined_linkset().

## ◆ ss7_route_table_find_route_by_dpc_mask()

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.

This function is used for route management procedures, not for packet routing lookup procedures!

References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, dpc, osmo_ss7_route::dyn_allocated, osmo_ss7_route_table::inst, osmo_ss7_route::list, osmo_ss7_combined_linkset::mask, osmo_ss7_route::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_combined_linkset::routes, and ss7_initialized.

Referenced by DEFUN_ATTR(), handle_rkey_dereg(), osmo_sccp_simple_client_on_ss7_id(), and ss7_route_create().

## ◆ ss7_route_table_find_route_by_dpc_mask_as()

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.

This function is used for route management procedures, not for packet routing lookup procedures!

References osmo_ss7_route::as, osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, dpc, osmo_ss7_route::dyn_allocated, osmo_ss7_route_table::inst, osmo_ss7_route::list, osmo_ss7_combined_linkset::mask, osmo_ss7_route::mask, NULL, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_combined_linkset::routes, and ss7_initialized.

Referenced by xua_snm_srm_pc_available_single().

## ◆ ss7_route_table_lookup_route()

struct osmo_ss7_route * ss7_route_table_lookup_route | ( | const struct osmo_ss7_route_table * | rtbl,
|  | const struct osmo_ss7_route_label * | rtlabel
| ) |  |

References osmo_ss7_combined_linkset::cfg, osmo_ss7_instance::cfg, osmo_ss7_route_table::combined_linksets, osmo_ss7_route_label::dpc, osmo_ss7_route_table::inst, osmo_ss7_combined_linkset::mask, NULL, osmo_ss7_route_label::opc, osmo_ss7_pc_normalize(), osmo_ss7_combined_linkset::pc, osmo_ss7_instance::pc_fmt, osmo_ss7_route_label::sls, and ss7_combined_linkset_lookup_route().

Referenced by ss7_instance_lookup_route().

## ◆ ss7_route_table_update_route_status_by_as()

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
| ) |  |

References osmo_ss7_route::as, osmo_ss7_route::cfg, osmo_ss7_route::clset, osmo_ss7_route_table::combined_linksets, osmo_ss7_route::dest, dpc, osmo_ss7_combined_linkset::list, osmo_ss7_route::list, osmo_ss7_route::pc, osmo_ss7_combined_linkset::routes, ss7_route_is_summary(), ss7_route_update_route_status(), and osmo_ss7_route::status.

Referenced by xua_snm_srm_pc_available_single().