]> git.proxmox.com Git - mirror_frr.git/blob - tests/ospfd/common.h
bgpd: Allow self next-hop if `bgp allow-martian-nexthop` is enabled
[mirror_frr.git] / tests / ospfd / common.h
1 #ifndef _COMMON_OSPF_H
2 #define _COMMON_OSPF_H
3
4 #define MAX_ADJACENCIES 8
5 #define MAX_NODES 12
6
7 struct ospf_test_adj {
8 char hostname[256];
9 char network[256];
10 uint32_t metric;
11 mpls_label_t label;
12 };
13
14 struct ospf_test_node {
15 char hostname[256];
16 const char *router_id;
17 mpls_label_t label;
18 struct ospf_test_adj adjacencies[MAX_ADJACENCIES + 1];
19 };
20
21 struct ospf_topology {
22 struct ospf_test_node nodes[MAX_NODES + 1];
23 };
24
25 /* Prototypes. */
26 extern struct ospf_topology *test_find_topology(const char *name);
27 extern struct ospf_test_node *test_find_node(struct ospf_topology *topology,
28 const char *hostname);
29 extern int topology_load(struct vty *vty, struct ospf_topology *topology,
30 struct ospf_test_node *root, struct ospf *ospf);
31
32 /* Global variables. */
33 extern struct thread_master *master;
34 extern struct ospf_topology topo1;
35 extern struct ospf_topology topo2;
36 extern struct ospf_topology topo3;
37 extern struct ospf_topology topo4;
38 extern struct ospf_topology topo5;
39 extern struct zebra_privs_t ospfd_privs;
40
41 /* For stable order in unit tests */
42 extern int sort_paths(const void **path1, const void **path2);
43
44 /* Print the routing table */
45 extern void print_route_table(struct vty *vty, struct route_table *rt);
46
47 #endif /* _COMMON_OSPF_H */