2 * Copyright (C) 2020 NetDEF, Inc.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the Free
7 * Software Foundation; either version 2 of the License, or (at your option)
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef _COMMON_ISIS_H
21 #define _COMMON_ISIS_H
23 #include "isisd/isisd.h"
24 #include "isisd/isis_spf.h"
25 #include "isisd/isis_spf_private.h"
27 #define MAX_HOSTNAME 16
28 #define MAX_NETWORKS 8
29 #define MAX_ADJACENCIES 8
32 #define SRGB_DFTL_LOWER_BOUND 16000
33 #define SRGB_DFTL_RANGE_SIZE 8000
35 struct isis_test_adj
{
36 char hostname
[MAX_HOSTNAME
];
37 uint8_t pseudonode_id
;
41 struct isis_test_node
{
42 char hostname
[MAX_HOSTNAME
];
43 uint8_t sysid
[ISIS_SYS_ID_LEN
];
44 uint8_t pseudonode_id
;
50 const char *router_id
;
55 const char *networks
[MAX_NETWORKS
+ 1];
56 struct isis_test_adj adjacencies
[MAX_ADJACENCIES
+ 1];
59 #define F_ISIS_TEST_NODE_SR 0x01
61 struct isis_topology
{
63 struct isis_test_node nodes
[MAX_NODES
+ 1];
67 extern int isis_sock_init(struct isis_circuit
*circuit
);
68 extern const struct isis_test_node
*
69 test_topology_find_node(const struct isis_topology
*topology
,
70 const char *hostname
, uint8_t pseudonode_id
);
71 extern const struct isis_topology
*
72 test_topology_find(struct isis_topology
*test_topologies
, uint16_t number
);
73 extern int test_topology_load(const struct isis_topology
*topology
,
74 struct isis_area
*area
,
75 struct lspdb_head lspdb
[]);
77 /* Global variables. */
78 extern struct thread_master
*master
;
79 extern struct zebra_privs_t isisd_privs
;
80 extern struct isis_topology test_topologies
[];
82 #endif /* _COMMON_ISIS_H */