1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2020 NetDEF, Inc.
10 #include "isisd/isisd.h"
11 #include "isisd/isis_spf.h"
12 #include "isisd/isis_spf_private.h"
14 #define MAX_HOSTNAME 16
15 #define MAX_NETWORKS 8
16 #define MAX_ADJACENCIES 8
19 #define SRGB_DFTL_LOWER_BOUND 16000
20 #define SRGB_DFTL_RANGE_SIZE 8000
22 struct isis_test_adj
{
23 char hostname
[MAX_HOSTNAME
];
24 uint8_t pseudonode_id
;
28 struct isis_test_node
{
29 char hostname
[MAX_HOSTNAME
];
30 uint8_t sysid
[ISIS_SYS_ID_LEN
];
31 uint8_t pseudonode_id
;
37 const char *router_id
;
42 const char *networks
[MAX_NETWORKS
+ 1];
43 struct isis_test_adj adjacencies
[MAX_ADJACENCIES
+ 1];
46 #define F_ISIS_TEST_NODE_SR 0x01
48 struct isis_topology
{
50 struct isis_test_node nodes
[MAX_NODES
+ 1];
54 extern int isis_sock_init(struct isis_circuit
*circuit
);
55 extern const struct isis_test_node
*
56 test_topology_find_node(const struct isis_topology
*topology
,
57 const char *hostname
, uint8_t pseudonode_id
);
58 extern const struct isis_topology
*
59 test_topology_find(struct isis_topology
*test_topologies
, uint16_t number
);
61 test_topology_node_ldp_label(const struct isis_topology
*topology
,
62 struct in_addr router_id
);
63 extern int test_topology_load(const struct isis_topology
*topology
,
64 struct isis_area
*area
,
65 struct lspdb_head lspdb
[]);
67 /* Global variables. */
68 extern struct event_loop
*master
;
69 extern struct zebra_privs_t isisd_privs
;
70 extern struct isis_topology test_topologies
[];
72 #endif /* _COMMON_ISIS_H */