pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/40559?usp=email )
Change subject: route_table: Constify args of serveral APIs ......................................................................
route_table: Constify args of serveral APIs
Change-Id: I45387df6b6d598676cd8dcd152e1f8b4cd35bba4 --- M src/ss7_route_table.c M src/ss7_route_table.h 2 files changed, 15 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/59/40559/1
diff --git a/src/ss7_route_table.c b/src/ss7_route_table.c index e59fd55..bd7b305 100644 --- a/src/ss7_route_table.c +++ b/src/ss7_route_table.c @@ -109,7 +109,7 @@ * This function is used for route management procedures, not for packet routing lookup procedures! */ struct osmo_ss7_route * -ss7_route_table_find_route_by_dpc_mask(struct osmo_ss7_route_table *rtbl, uint32_t dpc, +ss7_route_table_find_route_by_dpc_mask(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, bool dynamic) { struct osmo_ss7_combined_linkset *clset; @@ -142,7 +142,7 @@ * This function is used for route management procedures, not for packet routing lookup procedures! */ struct osmo_ss7_route * -ss7_route_table_find_route_by_dpc_mask_as(struct osmo_ss7_route_table *rtbl, uint32_t dpc, +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) { struct osmo_ss7_combined_linkset *clset; @@ -173,7 +173,7 @@ }
struct osmo_ss7_combined_linkset * -ss7_route_table_find_combined_linkset_by_dpc(struct osmo_ss7_route_table *rtbl, uint32_t dpc) +ss7_route_table_find_combined_linkset_by_dpc(const struct osmo_ss7_route_table *rtbl, uint32_t dpc) { struct osmo_ss7_combined_linkset *clset;
@@ -192,7 +192,7 @@ }
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) +ss7_route_table_find_combined_linkset_by_dpc_mask(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask) { struct osmo_ss7_combined_linkset *clset;
@@ -213,7 +213,7 @@ }
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) +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 *clset;
@@ -244,7 +244,7 @@ return clset; }
-void ss7_route_table_update_route_status_by_as(struct osmo_ss7_route_table *rtbl, enum osmo_ss7_route_status status, +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) { struct osmo_ss7_combined_linkset *clset; @@ -300,7 +300,7 @@ }
struct osmo_ss7_route * -ss7_route_table_lookup_route(struct osmo_ss7_route_table *rtbl, const struct osmo_ss7_route_label *rtlabel) +ss7_route_table_lookup_route(const struct osmo_ss7_route_table *rtbl, const struct osmo_ss7_route_label *rtlabel) { struct osmo_ss7_combined_linkset *clset; struct osmo_ss7_route *rt; diff --git a/src/ss7_route_table.h b/src/ss7_route_table.h index a128915..5141c18 100644 --- a/src/ss7_route_table.h +++ b/src/ss7_route_table.h @@ -39,26 +39,26 @@ void ss7_route_table_destroy(struct osmo_ss7_route_table *rtbl);
struct osmo_ss7_route * -ss7_route_table_find_route_by_dpc_mask(struct osmo_ss7_route_table *rtbl, uint32_t dpc, +ss7_route_table_find_route_by_dpc_mask(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, bool dynamic); struct osmo_ss7_route * -ss7_route_table_find_route_by_dpc_mask_as(struct osmo_ss7_route_table *rtbl, uint32_t dpc, +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); struct osmo_ss7_route * -ss7_route_table_lookup_route(struct osmo_ss7_route_table *rtbl, const struct osmo_ss7_route_label *rtlabel); +ss7_route_table_lookup_route(const struct osmo_ss7_route_table *rtbl, const struct osmo_ss7_route_label *rtlabel);
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); +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(struct osmo_ss7_route_table *rtbl, uint32_t dpc); +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(struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask); +ss7_route_table_find_combined_linkset_by_dpc_mask(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask); 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); +ss7_route_table_find_combined_linkset(const struct osmo_ss7_route_table *rtbl, uint32_t dpc, uint32_t mask, uint32_t prio);
-void ss7_route_table_update_route_status_by_as(struct osmo_ss7_route_table *rtbl, enum osmo_ss7_route_status status, +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);