summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_route.h
diff options
context:
space:
mode:
authorwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:03:14 +0200
committerwhitespace / reindent <invalid@invalid.invalid>2017-07-17 14:04:07 +0200
commitd62a17aedeb0eebdba98238874bb13d62c48dbf9 (patch)
tree3b319b1d61c8b85b4d1f06adf8b844bb8a9b5107 /ospfd/ospf_route.h
parent*: add indent control files (diff)
downloadfrr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.tar.xz
frr-d62a17aedeb0eebdba98238874bb13d62c48dbf9.zip
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'` Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospfd/ospf_route.h')
-rw-r--r--ospfd/ospf_route.h165
1 files changed, 80 insertions, 85 deletions
diff --git a/ospfd/ospf_route.h b/ospfd/ospf_route.h
index 16c6b0000..199937984 100644
--- a/ospfd/ospf_route.h
+++ b/ospfd/ospf_route.h
@@ -34,12 +34,11 @@
#define OSPF_PATH_MAX 5
/* OSPF Path. */
-struct ospf_path
-{
- struct in_addr nexthop;
- struct in_addr adv_router;
- ifindex_t ifindex;
- unsigned char unnumbered;
+struct ospf_path {
+ struct in_addr nexthop;
+ struct in_addr adv_router;
+ ifindex_t ifindex;
+ unsigned char unnumbered;
};
/* Below is the structure linked to every
@@ -54,107 +53,103 @@ struct ospf_path
nr->info is a (struct ospf_router_route *) for OSPF_DESTINATION_ROUTER
*/
-struct route_standard
-{
- /* Link Sate Origin. */
- struct lsa_header *origin;
+struct route_standard {
+ /* Link Sate Origin. */
+ struct lsa_header *origin;
- /* Associated Area. */
- struct in_addr area_id; /* The area the route belongs to */
+ /* Associated Area. */
+ struct in_addr area_id; /* The area the route belongs to */
- /* Area Type */
- int external_routing;
+ /* Area Type */
+ int external_routing;
- /* Optional Capability. */
- u_char options; /* Get from LSA header. */
+ /* Optional Capability. */
+ u_char options; /* Get from LSA header. */
- /* */
- u_char flags; /* From router-LSA */
+ /* */
+ u_char flags; /* From router-LSA */
};
-struct route_external
-{
- /* Link State Origin. */
- struct ospf_lsa *origin;
+struct route_external {
+ /* Link State Origin. */
+ struct ospf_lsa *origin;
- /* Link State Cost Type2. */
- u_int32_t type2_cost;
+ /* Link State Cost Type2. */
+ u_int32_t type2_cost;
- /* Tag value. */
- u_int32_t tag;
+ /* Tag value. */
+ u_int32_t tag;
- /* ASBR route. */
- struct ospf_route *asbr;
+ /* ASBR route. */
+ struct ospf_route *asbr;
};
-struct ospf_route
-{
- /* Destination Type. */
- u_char type;
+struct ospf_route {
+ /* Destination Type. */
+ u_char type;
- /* Destination ID. */ /* i.e. Link State ID. */
- struct in_addr id;
+ /* Destination ID. */ /* i.e. Link State ID. */
+ struct in_addr id;
- /* Address Mask. */
- struct in_addr mask; /* Only valid for networks. */
+ /* Address Mask. */
+ struct in_addr mask; /* Only valid for networks. */
- /* Path Type. */
- u_char path_type;
+ /* Path Type. */
+ u_char path_type;
- /* List of Paths. */
- struct list *paths;
+ /* List of Paths. */
+ struct list *paths;
- /* Link State Cost. */
- u_int32_t cost; /* i.e. metric. */
+ /* Link State Cost. */
+ u_int32_t cost; /* i.e. metric. */
- /* Route specific info. */
- union
- {
- struct route_standard std;
- struct route_external ext;
- } u;
+ /* Route specific info. */
+ union {
+ struct route_standard std;
+ struct route_external ext;
+ } u;
};
-extern struct ospf_path *ospf_path_new (void);
-extern void ospf_path_free (struct ospf_path *);
-extern struct ospf_path *ospf_path_lookup (struct list *, struct ospf_path *);
-extern struct ospf_route *ospf_route_new (void);
-extern void ospf_route_free (struct ospf_route *);
-extern void ospf_route_delete (struct route_table *);
-extern void ospf_route_table_free (struct route_table *);
+extern struct ospf_path *ospf_path_new(void);
+extern void ospf_path_free(struct ospf_path *);
+extern struct ospf_path *ospf_path_lookup(struct list *, struct ospf_path *);
+extern struct ospf_route *ospf_route_new(void);
+extern void ospf_route_free(struct ospf_route *);
+extern void ospf_route_delete(struct route_table *);
+extern void ospf_route_table_free(struct route_table *);
-extern void ospf_route_install (struct ospf *, struct route_table *);
-extern void ospf_route_table_dump (struct route_table *);
+extern void ospf_route_install(struct ospf *, struct route_table *);
+extern void ospf_route_table_dump(struct route_table *);
-extern void ospf_intra_add_router (struct route_table *, struct vertex *,
+extern void ospf_intra_add_router(struct route_table *, struct vertex *,
+ struct ospf_area *);
+
+extern void ospf_intra_add_transit(struct route_table *, struct vertex *,
struct ospf_area *);
-extern void ospf_intra_add_transit (struct route_table *, struct vertex *,
- struct ospf_area *);
-
-extern void ospf_intra_add_stub (struct route_table *,
- struct router_lsa_link *, struct vertex *,
- struct ospf_area *,
- int parent_is_root, int);
-
-extern int ospf_route_cmp (struct ospf *, struct ospf_route *,
- struct ospf_route *);
-extern void ospf_route_copy_nexthops (struct ospf_route *, struct list *);
-extern void ospf_route_copy_nexthops_from_vertex (struct ospf_route *,
- struct vertex *);
-
-extern void ospf_route_subst (struct route_node *, struct ospf_route *,
- struct ospf_route *);
-extern void ospf_route_add (struct route_table *, struct prefix_ipv4 *,
- struct ospf_route *, struct ospf_route *);
-
-extern void ospf_route_subst_nexthops (struct ospf_route *, struct list *);
-extern void ospf_prune_unreachable_networks (struct route_table *);
-extern void ospf_prune_unreachable_routers (struct route_table *);
-extern int ospf_add_discard_route (struct route_table *, struct ospf_area *,
- struct prefix_ipv4 *);
-extern void ospf_delete_discard_route (struct route_table *, struct prefix_ipv4 *);
-extern int ospf_route_match_same (struct route_table *, struct prefix_ipv4 *,
- struct ospf_route *);
+extern void ospf_intra_add_stub(struct route_table *, struct router_lsa_link *,
+ struct vertex *, struct ospf_area *,
+ int parent_is_root, int);
+
+extern int ospf_route_cmp(struct ospf *, struct ospf_route *,
+ struct ospf_route *);
+extern void ospf_route_copy_nexthops(struct ospf_route *, struct list *);
+extern void ospf_route_copy_nexthops_from_vertex(struct ospf_route *,
+ struct vertex *);
+
+extern void ospf_route_subst(struct route_node *, struct ospf_route *,
+ struct ospf_route *);
+extern void ospf_route_add(struct route_table *, struct prefix_ipv4 *,
+ struct ospf_route *, struct ospf_route *);
+
+extern void ospf_route_subst_nexthops(struct ospf_route *, struct list *);
+extern void ospf_prune_unreachable_networks(struct route_table *);
+extern void ospf_prune_unreachable_routers(struct route_table *);
+extern int ospf_add_discard_route(struct route_table *, struct ospf_area *,
+ struct prefix_ipv4 *);
+extern void ospf_delete_discard_route(struct route_table *,
+ struct prefix_ipv4 *);
+extern int ospf_route_match_same(struct route_table *, struct prefix_ipv4 *,
+ struct ospf_route *);
#endif /* _ZEBRA_OSPF_ROUTE_H */