diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2018-03-22 15:01:08 +0100 | 
|---|---|---|
| committer | Christian Franke <chris@opensourcerouting.org> | 2018-09-05 11:38:12 +0200 | 
| commit | 7c0cbd0e8879ef85469cd2da606cdabdb374cf01 (patch) | |
| tree | 8999de060c8affdb9cb2e476369d5238524fae7c /isisd | |
| parent | 74938acb9450abeae56380bd8ed665203cb45aa6 (diff) | |
fabricd: add new daemon as build of isisd
fabricd is built using the sources of isisd. To allow differentiation
in the code, -DFABRICD=1 is added to its preprocessor flags.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'isisd')
| -rw-r--r-- | isisd/.gitignore | 1 | ||||
| -rw-r--r-- | isisd/fabricd.conf.sample | 27 | ||||
| -rw-r--r-- | isisd/isis_circuit.c | 42 | ||||
| -rw-r--r-- | isisd/isis_main.c | 11 | ||||
| -rw-r--r-- | isisd/isis_mt.c | 2 | ||||
| -rw-r--r-- | isisd/isis_redist.c | 20 | ||||
| -rw-r--r-- | isisd/isis_spf.c | 4 | ||||
| -rw-r--r-- | isisd/isis_te.c | 18 | ||||
| -rw-r--r-- | isisd/isis_vty.c | 270 | ||||
| -rw-r--r-- | isisd/isis_zebra.c | 8 | ||||
| -rw-r--r-- | isisd/isisd.c | 237 | ||||
| -rw-r--r-- | isisd/isisd.h | 18 | ||||
| -rw-r--r-- | isisd/subdir.am | 15 | 
13 files changed, 374 insertions, 299 deletions
diff --git a/isisd/.gitignore b/isisd/.gitignore index a882bbf675..865cc38253 100644 --- a/isisd/.gitignore +++ b/isisd/.gitignore @@ -2,6 +2,7 @@  Makefile.in  *.o  isisd +fabricd  .deps  isisd.conf  .nfs* diff --git a/isisd/fabricd.conf.sample b/isisd/fabricd.conf.sample new file mode 100644 index 0000000000..be9e33ba62 --- /dev/null +++ b/isisd/fabricd.conf.sample @@ -0,0 +1,27 @@ +! -*- openfabric -*- +! +! fabricd sample configuration file +! +hostname fabricd +password foo +enable password foo +log stdout +!log file /tmp/fabricd.log +! +! +router openfabric DEAD +  net 47.0023.0000.0003.0300.0100.0102.0304.0506.00 +!  lsp-lifetime 65535 + +!  hostname isisd-router +!  domain-password foobar + +interface eth0 + ip router openfabric DEAD +! openfabric hello-interval 5 +! openfabric lsp-interval 1000 + +! -- optional +! openfabric retransmit-interval 10 +! openfabric retransmit-throttle-interval +! diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c index cd4b76139f..df55afac4d 100644 --- a/isisd/isis_circuit.c +++ b/isisd/isis_circuit.c @@ -957,32 +957,32 @@ int isis_interface_config_write(struct vty *vty)  			if (circuit == NULL)  				continue;  			if (circuit->ip_router) { -				vty_out(vty, " ip router isis %s\n", +				vty_out(vty, " ip router " PROTO_NAME " %s\n",  					area->area_tag);  				write++;  			}  			if (circuit->is_passive) { -				vty_out(vty, " isis passive\n"); +				vty_out(vty, " " PROTO_NAME " passive\n");  				write++;  			}  			if (circuit->circ_type_config == CIRCUIT_T_P2P) { -				vty_out(vty, " isis network point-to-point\n"); +				vty_out(vty, " " PROTO_NAME " network point-to-point\n");  				write++;  			}  			if (circuit->ipv6_router) { -				vty_out(vty, " ipv6 router isis %s\n", +				vty_out(vty, " ipv6 router " PROTO_NAME " %s\n",  					area->area_tag);  				write++;  			}  			/* ISIS - circuit type */  			if (circuit->is_type == IS_LEVEL_1) { -				vty_out(vty, " isis circuit-type level-1\n"); +				vty_out(vty, " " PROTO_NAME " circuit-type level-1\n");  				write++;  			} else {  				if (circuit->is_type == IS_LEVEL_2) {  					vty_out(vty, -						" isis circuit-type level-2-only\n"); +						" " PROTO_NAME " circuit-type level-2-only\n");  					write++;  				}  			} @@ -992,7 +992,7 @@ int isis_interface_config_write(struct vty *vty)  			    == circuit->csnp_interval[1]) {  				if (circuit->csnp_interval[0]  				    != DEFAULT_CSNP_INTERVAL) { -					vty_out(vty, " isis csnp-interval %d\n", +					vty_out(vty, " " PROTO_NAME " csnp-interval %d\n",  						circuit->csnp_interval[0]);  					write++;  				} @@ -1001,7 +1001,7 @@ int isis_interface_config_write(struct vty *vty)  					if (circuit->csnp_interval[i]  					    != DEFAULT_CSNP_INTERVAL) {  						vty_out(vty, -							" isis csnp-interval %d level-%d\n", +							" " PROTO_NAME " csnp-interval %d level-%d\n",  							circuit->csnp_interval  								[i],  							i + 1); @@ -1015,7 +1015,7 @@ int isis_interface_config_write(struct vty *vty)  			    == circuit->psnp_interval[1]) {  				if (circuit->psnp_interval[0]  				    != DEFAULT_PSNP_INTERVAL) { -					vty_out(vty, " isis psnp-interval %d\n", +					vty_out(vty, " " PROTO_NAME " psnp-interval %d\n",  						circuit->psnp_interval[0]);  					write++;  				} @@ -1024,7 +1024,7 @@ int isis_interface_config_write(struct vty *vty)  					if (circuit->psnp_interval[i]  					    != DEFAULT_PSNP_INTERVAL) {  						vty_out(vty, -							" isis psnp-interval %d level-%d\n", +							" " PROTO_NAME " psnp-interval %d level-%d\n",  							circuit->psnp_interval  								[i],  							i + 1); @@ -1036,7 +1036,7 @@ int isis_interface_config_write(struct vty *vty)  			/* ISIS - Hello padding - Defaults to true so only  			 * display if false */  			if (circuit->pad_hellos == 0) { -				vty_out(vty, " no isis hello padding\n"); +				vty_out(vty, " no " PROTO_NAME " hello padding\n");  				write++;  			} @@ -1051,7 +1051,7 @@ int isis_interface_config_write(struct vty *vty)  				if (circuit->hello_interval[0]  				    != DEFAULT_HELLO_INTERVAL) {  					vty_out(vty, -						" isis hello-interval %d\n", +						" " PROTO_NAME " hello-interval %d\n",  						circuit->hello_interval[0]);  					write++;  				} @@ -1060,7 +1060,7 @@ int isis_interface_config_write(struct vty *vty)  					if (circuit->hello_interval[i]  					    != DEFAULT_HELLO_INTERVAL) {  						vty_out(vty, -							" isis hello-interval %d level-%d\n", +							" " PROTO_NAME " hello-interval %d level-%d\n",  							circuit->hello_interval  								[i],  							i + 1); @@ -1075,7 +1075,7 @@ int isis_interface_config_write(struct vty *vty)  				if (circuit->hello_multiplier[0]  				    != DEFAULT_HELLO_MULTIPLIER) {  					vty_out(vty, -						" isis hello-multiplier %d\n", +						" " PROTO_NAME " hello-multiplier %d\n",  						circuit->hello_multiplier[0]);  					write++;  				} @@ -1084,7 +1084,7 @@ int isis_interface_config_write(struct vty *vty)  					if (circuit->hello_multiplier[i]  					    != DEFAULT_HELLO_MULTIPLIER) {  						vty_out(vty, -							" isis hello-multiplier %d level-%d\n", +							" " PROTO_NAME " hello-multiplier %d level-%d\n",  							circuit->hello_multiplier  								[i],  							i + 1); @@ -1096,7 +1096,7 @@ int isis_interface_config_write(struct vty *vty)  			/* ISIS - Priority */  			if (circuit->priority[0] == circuit->priority[1]) {  				if (circuit->priority[0] != DEFAULT_PRIORITY) { -					vty_out(vty, " isis priority %d\n", +					vty_out(vty, " " PROTO_NAME " priority %d\n",  						circuit->priority[0]);  					write++;  				} @@ -1105,7 +1105,7 @@ int isis_interface_config_write(struct vty *vty)  					if (circuit->priority[i]  					    != DEFAULT_PRIORITY) {  						vty_out(vty, -							" isis priority %d level-%d\n", +							" " PROTO_NAME " priority %d level-%d\n",  							circuit->priority[i],  							i + 1);  						write++; @@ -1117,7 +1117,7 @@ int isis_interface_config_write(struct vty *vty)  			if (circuit->te_metric[0] == circuit->te_metric[1]) {  				if (circuit->te_metric[0]  				    != DEFAULT_CIRCUIT_METRIC) { -					vty_out(vty, " isis metric %d\n", +					vty_out(vty, " " PROTO_NAME " metric %d\n",  						circuit->te_metric[0]);  					write++;  				} @@ -1126,7 +1126,7 @@ int isis_interface_config_write(struct vty *vty)  					if (circuit->te_metric[i]  					    != DEFAULT_CIRCUIT_METRIC) {  						vty_out(vty, -							" isis metric %d level-%d\n", +							" " PROTO_NAME " metric %d level-%d\n",  							circuit->te_metric[i],  							i + 1);  						write++; @@ -1134,12 +1134,12 @@ int isis_interface_config_write(struct vty *vty)  				}  			}  			if (circuit->passwd.type == ISIS_PASSWD_TYPE_HMAC_MD5) { -				vty_out(vty, " isis password md5 %s\n", +				vty_out(vty, " " PROTO_NAME " password md5 %s\n",  					circuit->passwd.passwd);  				write++;  			} else if (circuit->passwd.type  				   == ISIS_PASSWD_TYPE_CLEARTXT) { -				vty_out(vty, " isis password clear %s\n", +				vty_out(vty, " " PROTO_NAME " password clear %s\n",  					circuit->passwd.passwd);  				write++;  			} diff --git a/isisd/isis_main.c b/isisd/isis_main.c index 3b4168adb9..2d96364afa 100644 --- a/isisd/isis_main.c +++ b/isisd/isis_main.c @@ -59,6 +59,7 @@  #define ISISD_DEFAULT_CONFIG "isisd.conf"  /* Default vty port */  #define ISISD_VTY_PORT       2608 +#define FABRICD_VTY_PORT     2618  /* isisd privileges */  zebra_capabilities_t _caps_p[] = {ZCAP_NET_RAW, ZCAP_BIND}; @@ -145,9 +146,15 @@ struct quagga_signal_t isisd_signals[] = {  	},  }; +#ifdef FABRICD +FRR_DAEMON_INFO(fabricd, OPEN_FABRIC, .vty_port = FABRICD_VTY_PORT, + +		.proghelp = "Implementation of the OpenFabric routing protocol.", +#else  FRR_DAEMON_INFO(isisd, ISIS, .vty_port = ISISD_VTY_PORT,  		.proghelp = "Implementation of the IS-IS routing protocol.", +#endif  		.copyright =  			"Copyright (c) 2001-2002 Sampo Saaristo,"  			" Ofer Wald and Hannes Gredler", @@ -164,7 +171,11 @@ int main(int argc, char **argv, char **envp)  {  	int opt; +#ifdef FABRICD +	frr_preinit(&fabricd_di, argc, argv); +#else  	frr_preinit(&isisd_di, argc, argv); +#endif  	frr_opt_add("", longopts, "");  	/* Command line argument treatment. */ diff --git a/isisd/isis_mt.c b/isisd/isis_mt.c index 2155bf584e..2dfccf9830 100644 --- a/isisd/isis_mt.c +++ b/isisd/isis_mt.c @@ -311,7 +311,7 @@ int circuit_write_mt_settings(struct isis_circuit *circuit, struct vty *vty)  	for (ALL_LIST_ELEMENTS_RO(circuit->mt_settings, node, setting)) {  		const char *name = isis_mtid2str(setting->mtid);  		if (name && !setting->enabled) { -			vty_out(vty, " no isis topology %s\n", name); +			vty_out(vty, " no " PROTO_NAME " topology %s\n", name);  			written++;  		}  	} diff --git a/isisd/isis_redist.c b/isisd/isis_redist.c index cd3ca44379..c2581fd493 100644 --- a/isisd/isis_redist.c +++ b/isisd/isis_redist.c @@ -377,7 +377,7 @@ static void isis_redist_update_zebra_subscriptions(struct isis *isis)  			 * routes to Zebra and has nothing to do with  			 * redistribution,  			 * so skip it. */ -			if (type == ZEBRA_ROUTE_ISIS) +			if (type == PROTO_TYPE)  				continue;  			afi_t afi = afi_for_redist_protocol(protocol); @@ -515,11 +515,11 @@ void isis_redist_area_finish(struct isis_area *area)  DEFUN (isis_redistribute,         isis_redistribute_cmd, -       "redistribute <ipv4|ipv6> " FRR_REDIST_STR_ISISD " <level-1|level-2> [<metric (0-16777215)|route-map WORD>]", +       "redistribute <ipv4|ipv6> " PROTO_REDIST_STR " <level-1|level-2> [<metric (0-16777215)|route-map WORD>]",         REDIST_STR         "Redistribute IPv4 routes\n"         "Redistribute IPv6 routes\n" -       FRR_REDIST_HELP_STR_ISISD +       PROTO_REDIST_HELP         "Redistribute into level-1\n"         "Redistribute into level-2\n"         "Metric for redistributed routes\n" @@ -585,12 +585,12 @@ DEFUN (isis_redistribute,  DEFUN (no_isis_redistribute,         no_isis_redistribute_cmd, -       "no redistribute <ipv4|ipv6> " FRR_REDIST_STR_ISISD " <level-1|level-2>", +       "no redistribute <ipv4|ipv6> " PROTO_REDIST_STR " <level-1|level-2>",         NO_STR         REDIST_STR         "Redistribute IPv4 routes\n"         "Redistribute IPv6 routes\n" -       FRR_REDIST_HELP_STR_ISISD +       PROTO_REDIST_HELP         "Redistribute into level-1\n"         "Redistribute into level-2\n")  { @@ -732,7 +732,7 @@ int isis_redist_config_write(struct vty *vty, struct isis_area *area,  		return 0;  	for (type = 0; type < ZEBRA_ROUTE_MAX; type++) { -		if (type == ZEBRA_ROUTE_ISIS) +		if (type == PROTO_TYPE)  			continue;  		for (level = 1; level <= ISIS_LEVELS; level++) { @@ -772,8 +772,8 @@ int isis_redist_config_write(struct vty *vty, struct isis_area *area,  void isis_redist_init(void)  { -	install_element(ISIS_NODE, &isis_redistribute_cmd); -	install_element(ISIS_NODE, &no_isis_redistribute_cmd); -	install_element(ISIS_NODE, &isis_default_originate_cmd); -	install_element(ISIS_NODE, &no_isis_default_originate_cmd); +	install_element(ROUTER_NODE, &isis_redistribute_cmd); +	install_element(ROUTER_NODE, &no_isis_redistribute_cmd); +	install_element(ROUTER_NODE, &isis_default_originate_cmd); +	install_element(ROUTER_NODE, &no_isis_default_originate_cmd);  } diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 341921146b..317e278e80 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -1617,9 +1617,9 @@ static void isis_print_spftree(struct vty *vty, int level,  DEFUN (show_isis_topology,         show_isis_topology_cmd, -       "show isis topology [<level-1|level-2>]", +       "show " PROTO_NAME " topology [<level-1|level-2>]",         SHOW_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS paths to Intermediate Systems\n"         "Paths to all level-1 routers in the area\n"         "Paths to all level-2 routers in the domain\n") diff --git a/isisd/isis_te.c b/isisd/isis_te.c index 44ba64ce26..2430742498 100644 --- a/isisd/isis_te.c +++ b/isisd/isis_te.c @@ -1223,9 +1223,9 @@ DEFUN (no_isis_mpls_te_inter_as,  DEFUN (show_isis_mpls_te_router,         show_isis_mpls_te_router_cmd, -       "show isis mpls-te router", +       "show " PROTO_NAME " mpls-te router",         SHOW_STR -       ISIS_STR +       PROTO_HELP         MPLS_TE_STR         "Router information\n")  { @@ -1314,9 +1314,9 @@ static void show_mpls_te_sub(struct vty *vty, struct interface *ifp)  DEFUN (show_isis_mpls_te_interface,         show_isis_mpls_te_interface_cmd, -       "show isis mpls-te interface [INTERFACE]", +       "show " PROTO_NAME " mpls-te interface [INTERFACE]",         SHOW_STR -       ISIS_STR +       PROTO_HELP         MPLS_TE_STR         "Interface information\n"         "Interface name\n") @@ -1361,11 +1361,11 @@ void isis_mpls_te_init(void)  	install_element(VIEW_NODE, &show_isis_mpls_te_router_cmd);  	install_element(VIEW_NODE, &show_isis_mpls_te_interface_cmd); -	install_element(ISIS_NODE, &isis_mpls_te_on_cmd); -	install_element(ISIS_NODE, &no_isis_mpls_te_on_cmd); -	install_element(ISIS_NODE, &isis_mpls_te_router_addr_cmd); -	install_element(ISIS_NODE, &isis_mpls_te_inter_as_cmd); -	install_element(ISIS_NODE, &no_isis_mpls_te_inter_as_cmd); +	install_element(ROUTER_NODE, &isis_mpls_te_on_cmd); +	install_element(ROUTER_NODE, &no_isis_mpls_te_on_cmd); +	install_element(ROUTER_NODE, &isis_mpls_te_router_addr_cmd); +	install_element(ROUTER_NODE, &isis_mpls_te_inter_as_cmd); +	install_element(ROUTER_NODE, &no_isis_mpls_te_inter_as_cmd);  	return;  } diff --git a/isisd/isis_vty.c b/isisd/isis_vty.c index ce2952c135..2deb813275 100644 --- a/isisd/isis_vty.c +++ b/isisd/isis_vty.c @@ -53,10 +53,10 @@ static struct isis_circuit *isis_circuit_lookup(struct vty *vty)  DEFUN (ip_router_isis,         ip_router_isis_cmd, -       "ip router isis WORD", +       "ip router " PROTO_NAME " WORD",         "Interface Internet Protocol config commands\n"         "IP router interface commands\n" -       "IS-IS Routing for IP\n" +       PROTO_HELP         "Routing process tag\n")  {  	int idx_afi = 0; @@ -104,10 +104,10 @@ DEFUN (ip_router_isis,  DEFUN (ip6_router_isis,         ip6_router_isis_cmd, -       "ipv6 router isis WORD", +       "ipv6 router " PROTO_NAME " WORD",         "Interface Internet Protocol config commands\n"         "IP router interface commands\n" -       "IS-IS Routing for IP\n" +       PROTO_HELP         "Routing process tag\n")  {  	return ip_router_isis(self, vty, argc, argv); @@ -115,12 +115,12 @@ DEFUN (ip6_router_isis,  DEFUN (no_ip_router_isis,         no_ip_router_isis_cmd, -       "no <ip|ipv6> router isis WORD", +       "no <ip|ipv6> router " PROTO_NAME " WORD",         NO_STR         "Interface Internet Protocol config commands\n"         "IP router interface commands\n"         "IP router interface commands\n" -       "IS-IS Routing for IP\n" +       PROTO_HELP         "Routing process tag\n")  {  	int idx_afi = 1; @@ -156,8 +156,8 @@ DEFUN (no_ip_router_isis,  DEFUN (isis_passive,         isis_passive_cmd, -       "isis passive", -       "IS-IS commands\n" +       PROTO_NAME " passive", +       PROTO_HELP         "Configure the passive mode for interface\n")  {  	struct isis_circuit *circuit = isis_circuit_lookup(vty); @@ -171,9 +171,9 @@ DEFUN (isis_passive,  DEFUN (no_isis_passive,         no_isis_passive_cmd, -       "no isis passive", +       "no " PROTO_NAME " passive",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Configure the passive mode for interface\n")  {  	struct isis_circuit *circuit = isis_circuit_lookup(vty); @@ -187,8 +187,8 @@ DEFUN (no_isis_passive,  DEFUN (isis_circuit_type,         isis_circuit_type_cmd, -       "isis circuit-type <level-1|level-1-2|level-2-only>", -       "IS-IS commands\n" +       PROTO_NAME " circuit-type <level-1|level-1-2|level-2-only>", +       PROTO_HELP         "Configure circuit type for interface\n"         "Level-1 only adjacencies are formed\n"         "Level-1-2 adjacencies are formed\n" @@ -220,9 +220,9 @@ DEFUN (isis_circuit_type,  DEFUN (no_isis_circuit_type,         no_isis_circuit_type_cmd, -       "no isis circuit-type <level-1|level-1-2|level-2-only>", +       "no " PROTO_NAME " circuit-type <level-1|level-1-2|level-2-only>",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Configure circuit type for interface\n"         "Level-1 only adjacencies are formed\n"         "Level-1-2 adjacencies are formed\n" @@ -247,8 +247,8 @@ DEFUN (no_isis_circuit_type,  DEFUN (isis_network,         isis_network_cmd, -       "isis network point-to-point", -       "IS-IS commands\n" +       PROTO_NAME " network point-to-point", +       PROTO_HELP         "Set network type\n"         "point-to-point network type\n")  { @@ -258,7 +258,7 @@ DEFUN (isis_network,  	if (isis_circuit_circ_type_set(circuit, CIRCUIT_T_P2P)) {  		vty_out(vty, -			"isis network point-to-point is valid only on broadcast interfaces\n"); +			PROTO_NAME " network point-to-point is valid only on broadcast interfaces\n");  		return CMD_WARNING_CONFIG_FAILED;  	} @@ -267,9 +267,9 @@ DEFUN (isis_network,  DEFUN (no_isis_network,         no_isis_network_cmd, -       "no isis network point-to-point", +       "no " PROTO_NAME " network point-to-point",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set network type for circuit\n"         "point-to-point network type\n")  { @@ -279,7 +279,7 @@ DEFUN (no_isis_network,  	if (isis_circuit_circ_type_set(circuit, CIRCUIT_T_BROADCAST)) {  		vty_out(vty, -			"isis network point-to-point is valid only on broadcast interfaces\n"); +			PROTO_NAME " network point-to-point is valid only on broadcast interfaces\n");  		return CMD_WARNING_CONFIG_FAILED;  	} @@ -288,8 +288,8 @@ DEFUN (no_isis_network,  DEFUN (isis_passwd,         isis_passwd_cmd, -       "isis password <md5|clear> WORD", -       "IS-IS commands\n" +       PROTO_NAME " password <md5|clear> WORD", +       PROTO_HELP         "Configure the authentication password for a circuit\n"         "HMAC-MD5 authentication\n"         "Cleartext password\n" @@ -316,9 +316,9 @@ DEFUN (isis_passwd,  DEFUN (no_isis_passwd,         no_isis_passwd_cmd, -       "no isis password [<md5|clear> WORD]", +       "no " PROTO_NAME " password [<md5|clear> WORD]",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Configure the authentication password for a circuit\n"         "HMAC-MD5 authentication\n"         "Cleartext password\n" @@ -336,8 +336,8 @@ DEFUN (no_isis_passwd,  DEFUN (isis_priority,         isis_priority_cmd, -       "isis priority (0-127)", -       "IS-IS commands\n" +       PROTO_NAME " priority (0-127)", +       PROTO_HELP         "Set priority for Designated Router election\n"         "Priority value\n")  { @@ -361,9 +361,9 @@ DEFUN (isis_priority,  DEFUN (no_isis_priority,         no_isis_priority_cmd, -       "no isis priority [(0-127)]", +       "no " PROTO_NAME " priority [(0-127)]",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set priority for Designated Router election\n"         "Priority value\n")  { @@ -380,8 +380,8 @@ DEFUN (no_isis_priority,  DEFUN (isis_priority_l1,         isis_priority_l1_cmd, -       "isis priority (0-127) level-1", -       "IS-IS commands\n" +       PROTO_NAME " priority (0-127) level-1", +       PROTO_HELP         "Set priority for Designated Router election\n"         "Priority value\n"         "Specify priority for level-1 routing\n") @@ -405,9 +405,9 @@ DEFUN (isis_priority_l1,  DEFUN (no_isis_priority_l1,         no_isis_priority_l1_cmd, -       "no isis priority [(0-127)] level-1", +       "no " PROTO_NAME " priority [(0-127)] level-1",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set priority for Designated Router election\n"         "Priority value\n"         "Specify priority for level-1 routing\n") @@ -424,8 +424,8 @@ DEFUN (no_isis_priority_l1,  DEFUN (isis_priority_l2,         isis_priority_l2_cmd, -       "isis priority (0-127) level-2", -       "IS-IS commands\n" +       PROTO_NAME " priority (0-127) level-2", +       PROTO_HELP         "Set priority for Designated Router election\n"         "Priority value\n"         "Specify priority for level-2 routing\n") @@ -449,9 +449,9 @@ DEFUN (isis_priority_l2,  DEFUN (no_isis_priority_l2,         no_isis_priority_l2_cmd, -       "no isis priority [(0-127)] level-2", +       "no " PROTO_NAME " priority [(0-127)] level-2",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set priority for Designated Router election\n"         "Priority value\n"         "Specify priority for level-2 routing\n") @@ -469,8 +469,8 @@ DEFUN (no_isis_priority_l2,  /* Metric command */  DEFUN (isis_metric,         isis_metric_cmd, -       "isis metric (0-16777215)", -       "IS-IS commands\n" +       PROTO_NAME " metric (0-16777215)", +       PROTO_HELP         "Set default metric for circuit\n"         "Default metric value\n")  { @@ -512,9 +512,9 @@ DEFUN (isis_metric,  DEFUN (no_isis_metric,         no_isis_metric_cmd, -       "no isis metric [(0-16777215)]", +       "no " PROTO_NAME " metric [(0-16777215)]",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set default metric for circuit\n"         "Default metric value\n")  { @@ -534,8 +534,8 @@ DEFUN (no_isis_metric,  DEFUN (isis_metric_l1,         isis_metric_l1_cmd, -       "isis metric (0-16777215) level-1", -       "IS-IS commands\n" +       PROTO_NAME " metric (0-16777215) level-1", +       PROTO_HELP         "Set default metric for circuit\n"         "Default metric value\n"         "Specify metric for level-1 routing\n") @@ -555,9 +555,9 @@ DEFUN (isis_metric_l1,  DEFUN (no_isis_metric_l1,         no_isis_metric_l1_cmd, -       "no isis metric [(0-16777215)] level-1", +       "no " PROTO_NAME " metric [(0-16777215)] level-1",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set default metric for circuit\n"         "Default metric value\n"         "Specify metric for level-1 routing\n") @@ -575,8 +575,8 @@ DEFUN (no_isis_metric_l1,  DEFUN (isis_metric_l2,         isis_metric_l2_cmd, -       "isis metric (0-16777215) level-2", -       "IS-IS commands\n" +       PROTO_NAME " metric (0-16777215) level-2", +       PROTO_HELP         "Set default metric for circuit\n"         "Default metric value\n"         "Specify metric for level-2 routing\n") @@ -596,9 +596,9 @@ DEFUN (isis_metric_l2,  DEFUN (no_isis_metric_l2,         no_isis_metric_l2_cmd, -       "no isis metric [(0-16777215)] level-2", +       "no " PROTO_NAME " metric [(0-16777215)] level-2",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set default metric for circuit\n"         "Default metric value\n"         "Specify metric for level-2 routing\n") @@ -617,8 +617,8 @@ DEFUN (no_isis_metric_l2,  DEFUN (isis_hello_interval,         isis_hello_interval_cmd, -       "isis hello-interval (1-600)", -       "IS-IS commands\n" +       PROTO_NAME " hello-interval (1-600)", +       PROTO_HELP         "Set Hello interval\n"         "Holdtime 1 seconds, interval depends on multiplier\n")  { @@ -644,9 +644,9 @@ DEFUN (isis_hello_interval,  DEFUN (no_isis_hello_interval,         no_isis_hello_interval_cmd, -       "no isis hello-interval [(1-600)]", +       "no " PROTO_NAME " hello-interval [(1-600)]",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set Hello interval\n"         "Holdtime 1 second, interval depends on multiplier\n")  { @@ -663,8 +663,8 @@ DEFUN (no_isis_hello_interval,  DEFUN (isis_hello_interval_l1,         isis_hello_interval_l1_cmd, -       "isis hello-interval (1-600) level-1", -       "IS-IS commands\n" +       PROTO_NAME " hello-interval (1-600) level-1", +       PROTO_HELP         "Set Hello interval\n"         "Holdtime 1 second, interval depends on multiplier\n"         "Specify hello-interval for level-1 IIHs\n") @@ -690,9 +690,9 @@ DEFUN (isis_hello_interval_l1,  DEFUN (no_isis_hello_interval_l1,         no_isis_hello_interval_l1_cmd, -       "no isis hello-interval [(1-600)] level-1", +       "no " PROTO_NAME " hello-interval [(1-600)] level-1",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set Hello interval\n"         "Holdtime 1 second, interval depends on multiplier\n"         "Specify hello-interval for level-1 IIHs\n") @@ -709,8 +709,8 @@ DEFUN (no_isis_hello_interval_l1,  DEFUN (isis_hello_interval_l2,         isis_hello_interval_l2_cmd, -       "isis hello-interval (1-600) level-2", -       "IS-IS commands\n" +       PROTO_NAME " hello-interval (1-600) level-2", +       PROTO_HELP         "Set Hello interval\n"         "Holdtime 1 second, interval depends on multiplier\n"         "Specify hello-interval for level-2 IIHs\n") @@ -736,9 +736,9 @@ DEFUN (isis_hello_interval_l2,  DEFUN (no_isis_hello_interval_l2,         no_isis_hello_interval_l2_cmd, -       "no isis hello-interval [(1-600)] level-2", +       "no " PROTO_NAME " hello-interval [(1-600)] level-2",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set Hello interval\n"         "Holdtime 1 second, interval depends on multiplier\n"         "Specify hello-interval for level-2 IIHs\n") @@ -755,8 +755,8 @@ DEFUN (no_isis_hello_interval_l2,  DEFUN (isis_hello_multiplier,         isis_hello_multiplier_cmd, -       "isis hello-multiplier (2-100)", -       "IS-IS commands\n" +       PROTO_NAME " hello-multiplier (2-100)", +       PROTO_HELP         "Set multiplier for Hello holding time\n"         "Hello multiplier value\n")  { @@ -783,9 +783,9 @@ DEFUN (isis_hello_multiplier,  DEFUN (no_isis_hello_multiplier,         no_isis_hello_multiplier_cmd, -       "no isis hello-multiplier [(2-100)]", +       "no " PROTO_NAME " hello-multiplier [(2-100)]",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set multiplier for Hello holding time\n"         "Hello multiplier value\n")  { @@ -802,8 +802,8 @@ DEFUN (no_isis_hello_multiplier,  DEFUN (isis_hello_multiplier_l1,         isis_hello_multiplier_l1_cmd, -       "isis hello-multiplier (2-100) level-1", -       "IS-IS commands\n" +       PROTO_NAME " hello-multiplier (2-100) level-1", +       PROTO_HELP         "Set multiplier for Hello holding time\n"         "Hello multiplier value\n"         "Specify hello multiplier for level-1 IIHs\n") @@ -830,9 +830,9 @@ DEFUN (isis_hello_multiplier_l1,  DEFUN (no_isis_hello_multiplier_l1,         no_isis_hello_multiplier_l1_cmd, -       "no isis hello-multiplier [(2-100)] level-1", +       "no " PROTO_NAME " hello-multiplier [(2-100)] level-1",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set multiplier for Hello holding time\n"         "Hello multiplier value\n"         "Specify hello multiplier for level-1 IIHs\n") @@ -849,8 +849,8 @@ DEFUN (no_isis_hello_multiplier_l1,  DEFUN (isis_hello_multiplier_l2,         isis_hello_multiplier_l2_cmd, -       "isis hello-multiplier (2-100) level-2", -       "IS-IS commands\n" +       PROTO_NAME " hello-multiplier (2-100) level-2", +       PROTO_HELP         "Set multiplier for Hello holding time\n"         "Hello multiplier value\n"         "Specify hello multiplier for level-2 IIHs\n") @@ -877,9 +877,9 @@ DEFUN (isis_hello_multiplier_l2,  DEFUN (no_isis_hello_multiplier_l2,         no_isis_hello_multiplier_l2_cmd, -       "no isis hello-multiplier [(2-100)] level-2", +       "no " PROTO_NAME " hello-multiplier [(2-100)] level-2",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set multiplier for Hello holding time\n"         "Hello multiplier value\n"         "Specify hello multiplier for level-2 IIHs\n") @@ -896,8 +896,8 @@ DEFUN (no_isis_hello_multiplier_l2,  DEFUN (isis_hello_padding,         isis_hello_padding_cmd, -       "isis hello padding", -       "IS-IS commands\n" +       PROTO_NAME " hello padding", +       PROTO_HELP         "Add padding to IS-IS hello packets\n"         "Pad hello packets\n")  { @@ -912,9 +912,9 @@ DEFUN (isis_hello_padding,  DEFUN (no_isis_hello_padding,         no_isis_hello_padding_cmd, -       "no isis hello padding", +       "no " PROTO_NAME " hello padding",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Add padding to IS-IS hello packets\n"         "Pad hello packets\n")  { @@ -944,8 +944,8 @@ DEFUN (isis_threeway_adj,  DEFUN (csnp_interval,         csnp_interval_cmd, -       "isis csnp-interval (1-600)", -       "IS-IS commands\n" +       PROTO_NAME " csnp-interval (1-600)", +       PROTO_HELP         "Set CSNP interval in seconds\n"         "CSNP interval value\n")  { @@ -971,9 +971,9 @@ DEFUN (csnp_interval,  DEFUN (no_csnp_interval,         no_csnp_interval_cmd, -       "no isis csnp-interval [(1-600)]", +       "no " PROTO_NAME " csnp-interval [(1-600)]",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set CSNP interval in seconds\n"         "CSNP interval value\n")  { @@ -990,8 +990,8 @@ DEFUN (no_csnp_interval,  DEFUN (csnp_interval_l1,         csnp_interval_l1_cmd, -       "isis csnp-interval (1-600) level-1", -       "IS-IS commands\n" +       PROTO_NAME " csnp-interval (1-600) level-1", +       PROTO_HELP         "Set CSNP interval in seconds\n"         "CSNP interval value\n"         "Specify interval for level-1 CSNPs\n") @@ -1017,9 +1017,9 @@ DEFUN (csnp_interval_l1,  DEFUN (no_csnp_interval_l1,         no_csnp_interval_l1_cmd, -       "no isis csnp-interval [(1-600)] level-1", +       "no " PROTO_NAME " csnp-interval [(1-600)] level-1",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set CSNP interval in seconds\n"         "CSNP interval value\n"         "Specify interval for level-1 CSNPs\n") @@ -1036,8 +1036,8 @@ DEFUN (no_csnp_interval_l1,  DEFUN (csnp_interval_l2,         csnp_interval_l2_cmd, -       "isis csnp-interval (1-600) level-2", -       "IS-IS commands\n" +       PROTO_NAME " csnp-interval (1-600) level-2", +       PROTO_HELP         "Set CSNP interval in seconds\n"         "CSNP interval value\n"         "Specify interval for level-2 CSNPs\n") @@ -1063,9 +1063,9 @@ DEFUN (csnp_interval_l2,  DEFUN (no_csnp_interval_l2,         no_csnp_interval_l2_cmd, -       "no isis csnp-interval [(1-600)] level-2", +       "no " PROTO_NAME " csnp-interval [(1-600)] level-2",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set CSNP interval in seconds\n"         "CSNP interval value\n"         "Specify interval for level-2 CSNPs\n") @@ -1082,8 +1082,8 @@ DEFUN (no_csnp_interval_l2,  DEFUN (psnp_interval,         psnp_interval_cmd, -       "isis psnp-interval (1-120)", -       "IS-IS commands\n" +       PROTO_NAME " psnp-interval (1-120)", +       PROTO_HELP         "Set PSNP interval in seconds\n"         "PSNP interval value\n")  { @@ -1109,9 +1109,9 @@ DEFUN (psnp_interval,  DEFUN (no_psnp_interval,         no_psnp_interval_cmd, -       "no isis psnp-interval [(1-120)]", +       "no " PROTO_NAME " psnp-interval [(1-120)]",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set PSNP interval in seconds\n"         "PSNP interval value\n")  { @@ -1128,8 +1128,8 @@ DEFUN (no_psnp_interval,  DEFUN (psnp_interval_l1,         psnp_interval_l1_cmd, -       "isis psnp-interval (1-120) level-1", -       "IS-IS commands\n" +       PROTO_NAME " psnp-interval (1-120) level-1", +       PROTO_HELP         "Set PSNP interval in seconds\n"         "PSNP interval value\n"         "Specify interval for level-1 PSNPs\n") @@ -1155,9 +1155,9 @@ DEFUN (psnp_interval_l1,  DEFUN (no_psnp_interval_l1,         no_psnp_interval_l1_cmd, -       "no isis psnp-interval [(1-120)] level-1", +       "no " PROTO_NAME " psnp-interval [(1-120)] level-1",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set PSNP interval in seconds\n"         "PSNP interval value\n"         "Specify interval for level-1 PSNPs\n") @@ -1174,8 +1174,8 @@ DEFUN (no_psnp_interval_l1,  DEFUN (psnp_interval_l2,         psnp_interval_l2_cmd, -       "isis psnp-interval (1-120) level-2", -       "IS-IS commands\n" +       PROTO_NAME " psnp-interval (1-120) level-2", +       PROTO_HELP         "Set PSNP interval in seconds\n"         "PSNP interval value\n"         "Specify interval for level-2 PSNPs\n") @@ -1201,9 +1201,9 @@ DEFUN (psnp_interval_l2,  DEFUN (no_psnp_interval_l2,         no_psnp_interval_l2_cmd, -       "no isis psnp-interval [(1-120)] level-2", +       "no " PROTO_NAME " psnp-interval [(1-120)] level-2",         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Set PSNP interval in seconds\n"         "PSNP interval value\n"         "Specify interval for level-2 PSNPs\n") @@ -1219,8 +1219,8 @@ DEFUN (no_psnp_interval_l2,  DEFUN (circuit_topology,         circuit_topology_cmd, -       "isis topology " ISIS_MT_NAMES, -       "IS-IS commands\n" +       PROTO_NAME " topology " ISIS_MT_NAMES, +       PROTO_HELP         "Configure interface IS-IS topologies\n"         ISIS_MT_DESCRIPTIONS)  { @@ -1246,9 +1246,9 @@ DEFUN (circuit_topology,  DEFUN (no_circuit_topology,         no_circuit_topology_cmd, -       "no isis topology " ISIS_MT_NAMES, +       "no " PROTO_NAME " topology " ISIS_MT_NAMES,         NO_STR -       "IS-IS commands\n" +       PROTO_HELP         "Configure interface IS-IS topologies\n"         ISIS_MT_DESCRIPTIONS)  { @@ -2120,46 +2120,46 @@ void isis_vty_init(void)  	install_element(INTERFACE_NODE, &circuit_topology_cmd);  	install_element(INTERFACE_NODE, &no_circuit_topology_cmd); -	install_element(ISIS_NODE, &metric_style_cmd); -	install_element(ISIS_NODE, &no_metric_style_cmd); +	install_element(ROUTER_NODE, &metric_style_cmd); +	install_element(ROUTER_NODE, &no_metric_style_cmd); -	install_element(ISIS_NODE, &set_overload_bit_cmd); -	install_element(ISIS_NODE, &no_set_overload_bit_cmd); +	install_element(ROUTER_NODE, &set_overload_bit_cmd); +	install_element(ROUTER_NODE, &no_set_overload_bit_cmd); -	install_element(ISIS_NODE, &set_attached_bit_cmd); -	install_element(ISIS_NODE, &no_set_attached_bit_cmd); +	install_element(ROUTER_NODE, &set_attached_bit_cmd); +	install_element(ROUTER_NODE, &no_set_attached_bit_cmd); -	install_element(ISIS_NODE, &dynamic_hostname_cmd); -	install_element(ISIS_NODE, &no_dynamic_hostname_cmd); +	install_element(ROUTER_NODE, &dynamic_hostname_cmd); +	install_element(ROUTER_NODE, &no_dynamic_hostname_cmd); -	install_element(ISIS_NODE, &area_lsp_mtu_cmd); -	install_element(ISIS_NODE, &no_area_lsp_mtu_cmd); +	install_element(ROUTER_NODE, &area_lsp_mtu_cmd); +	install_element(ROUTER_NODE, &no_area_lsp_mtu_cmd); -	install_element(ISIS_NODE, &is_type_cmd); -	install_element(ISIS_NODE, &no_is_type_cmd); +	install_element(ROUTER_NODE, &is_type_cmd); +	install_element(ROUTER_NODE, &no_is_type_cmd); -	install_element(ISIS_NODE, &lsp_gen_interval_cmd); -	install_element(ISIS_NODE, &no_lsp_gen_interval_cmd); +	install_element(ROUTER_NODE, &lsp_gen_interval_cmd); +	install_element(ROUTER_NODE, &no_lsp_gen_interval_cmd); -	install_element(ISIS_NODE, &spf_interval_cmd); -	install_element(ISIS_NODE, &no_spf_interval_cmd); -	install_element(ISIS_NODE, &spf_interval_l1_cmd); -	install_element(ISIS_NODE, &no_spf_interval_l1_cmd); -	install_element(ISIS_NODE, &spf_interval_l2_cmd); -	install_element(ISIS_NODE, &no_spf_interval_l2_cmd); +	install_element(ROUTER_NODE, &spf_interval_cmd); +	install_element(ROUTER_NODE, &no_spf_interval_cmd); +	install_element(ROUTER_NODE, &spf_interval_l1_cmd); +	install_element(ROUTER_NODE, &no_spf_interval_l1_cmd); +	install_element(ROUTER_NODE, &spf_interval_l2_cmd); +	install_element(ROUTER_NODE, &no_spf_interval_l2_cmd); -	install_element(ISIS_NODE, &max_lsp_lifetime_cmd); -	install_element(ISIS_NODE, &no_max_lsp_lifetime_cmd); +	install_element(ROUTER_NODE, &max_lsp_lifetime_cmd); +	install_element(ROUTER_NODE, &no_max_lsp_lifetime_cmd); -	install_element(ISIS_NODE, &lsp_refresh_interval_cmd); -	install_element(ISIS_NODE, &no_lsp_refresh_interval_cmd); +	install_element(ROUTER_NODE, &lsp_refresh_interval_cmd); +	install_element(ROUTER_NODE, &no_lsp_refresh_interval_cmd); -	install_element(ISIS_NODE, &area_passwd_md5_cmd); -	install_element(ISIS_NODE, &area_passwd_clear_cmd); -	install_element(ISIS_NODE, &domain_passwd_md5_cmd); -	install_element(ISIS_NODE, &domain_passwd_clear_cmd); -	install_element(ISIS_NODE, &no_area_passwd_cmd); +	install_element(ROUTER_NODE, &area_passwd_md5_cmd); +	install_element(ROUTER_NODE, &area_passwd_clear_cmd); +	install_element(ROUTER_NODE, &domain_passwd_md5_cmd); +	install_element(ROUTER_NODE, &domain_passwd_clear_cmd); +	install_element(ROUTER_NODE, &no_area_passwd_cmd); -	install_element(ISIS_NODE, &spf_delay_ietf_cmd); -	install_element(ISIS_NODE, &no_spf_delay_ietf_cmd); +	install_element(ROUTER_NODE, &spf_delay_ietf_cmd); +	install_element(ROUTER_NODE, &no_spf_delay_ietf_cmd);  } diff --git a/isisd/isis_zebra.c b/isisd/isis_zebra.c index 9bc0f2ef35..220f131b63 100644 --- a/isisd/isis_zebra.c +++ b/isisd/isis_zebra.c @@ -262,7 +262,7 @@ static void isis_zebra_route_add_route(struct prefix *prefix,  	memset(&api, 0, sizeof(api));  	api.vrf_id = VRF_DEFAULT; -	api.type = ZEBRA_ROUTE_ISIS; +	api.type = PROTO_TYPE;  	api.safi = SAFI_UNICAST;  	api.prefix = *prefix;  	if (src_p && src_p->prefixlen) { @@ -337,7 +337,7 @@ static void isis_zebra_route_del_route(struct prefix *prefix,  	memset(&api, 0, sizeof(api));  	api.vrf_id = VRF_DEFAULT; -	api.type = ZEBRA_ROUTE_ISIS; +	api.type = PROTO_TYPE;  	api.safi = SAFI_UNICAST;  	api.prefix = *prefix;  	if (src_p && src_p->prefixlen) { @@ -378,7 +378,7 @@ static int isis_zebra_read(int command, struct zclient *zclient,  	 */  	if (api.prefix.prefixlen == 0  	    && api.src_prefix.prefixlen == 0 -	    && api.type == ZEBRA_ROUTE_ISIS) { +	    && api.type == PROTO_TYPE) {  		command = ZEBRA_REDISTRIBUTE_ROUTE_DEL;  	} @@ -424,7 +424,7 @@ static void isis_zebra_connected(struct zclient *zclient)  void isis_zebra_init(struct thread_master *master)  {  	zclient = zclient_new_notify(master, &zclient_options_default); -	zclient_init(zclient, ZEBRA_ROUTE_ISIS, 0, &isisd_privs); +	zclient_init(zclient, PROTO_TYPE, 0, &isisd_privs);  	zclient->zebra_connected = isis_zebra_connected;  	zclient->router_id_update = isis_router_id_update_zebra;  	zclient->interface_add = isis_zebra_if_add; diff --git a/isisd/isisd.c b/isisd/isisd.c index a19f287453..a3f15e9de2 100644 --- a/isisd/isisd.c +++ b/isisd/isisd.c @@ -179,7 +179,7 @@ int isis_area_get(struct vty *vty, const char *area_tag)  	area = isis_area_lookup(area_tag);  	if (area) { -		VTY_PUSH_CONTEXT(ISIS_NODE, area); +		VTY_PUSH_CONTEXT(ROUTER_NODE, area);  		return CMD_SUCCESS;  	} @@ -188,7 +188,7 @@ int isis_area_get(struct vty *vty, const char *area_tag)  	if (isis->debugs & DEBUG_EVENTS)  		zlog_debug("New IS-IS area instance %s", area->area_tag); -	VTY_PUSH_CONTEXT(ISIS_NODE, area); +	VTY_PUSH_CONTEXT(ROUTER_NODE, area);  	return CMD_SUCCESS;  } @@ -463,9 +463,9 @@ int show_isis_interface_common(struct vty *vty, const char *ifname, char detail)  DEFUN (show_isis_interface,         show_isis_interface_cmd, -       "show isis interface", +       "show " PROTO_NAME " interface",         SHOW_STR -       "ISIS network information\n" +       PROTO_HELP         "ISIS interface\n")  {  	return show_isis_interface_common(vty, NULL, ISIS_UI_LEVEL_BRIEF); @@ -473,9 +473,9 @@ DEFUN (show_isis_interface,  DEFUN (show_isis_interface_detail,         show_isis_interface_detail_cmd, -       "show isis interface detail", +       "show " PROTO_NAME " interface detail",         SHOW_STR -       "ISIS network information\n" +       PROTO_HELP         "ISIS interface\n"         "show detailed information\n")  { @@ -484,9 +484,9 @@ DEFUN (show_isis_interface_detail,  DEFUN (show_isis_interface_arg,         show_isis_interface_arg_cmd, -       "show isis interface WORD", +       "show " PROTO_NAME " interface WORD",         SHOW_STR -       "ISIS network information\n" +       PROTO_HELP         "ISIS interface\n"         "ISIS interface name\n")  { @@ -634,9 +634,9 @@ int clear_isis_neighbor_common(struct vty *vty, const char *id)  DEFUN (show_isis_neighbor,         show_isis_neighbor_cmd, -       "show isis neighbor", +       "show " PROTO_NAME " neighbor",         SHOW_STR -       "ISIS network information\n" +       PROTO_HELP         "ISIS neighbor adjacencies\n")  {  	return show_isis_neighbor_common(vty, NULL, ISIS_UI_LEVEL_BRIEF); @@ -644,9 +644,9 @@ DEFUN (show_isis_neighbor,  DEFUN (show_isis_neighbor_detail,         show_isis_neighbor_detail_cmd, -       "show isis neighbor detail", +       "show " PROTO_NAME " neighbor detail",         SHOW_STR -       "ISIS network information\n" +       PROTO_HELP         "ISIS neighbor adjacencies\n"         "show detailed information\n")  { @@ -655,9 +655,9 @@ DEFUN (show_isis_neighbor_detail,  DEFUN (show_isis_neighbor_arg,         show_isis_neighbor_arg_cmd, -       "show isis neighbor WORD", +       "show " PROTO_NAME " neighbor WORD",         SHOW_STR -       "ISIS network information\n" +       PROTO_HELP         "ISIS neighbor adjacencies\n"         "System id\n")  { @@ -668,19 +668,19 @@ DEFUN (show_isis_neighbor_arg,  DEFUN (clear_isis_neighbor,         clear_isis_neighbor_cmd, -       "clear isis neighbor", +       "clear " PROTO_NAME " neighbor",         CLEAR_STR -       "Reset ISIS network information\n" -       "Reset ISIS neighbor adjacencies\n") +       PROTO_HELP +       "ISIS neighbor adjacencies\n")  {  	return clear_isis_neighbor_common(vty, NULL);  }  DEFUN (clear_isis_neighbor_arg,         clear_isis_neighbor_arg_cmd, -       "clear isis neighbor WORD", +       "clear " PROTO_NAME " neighbor WORD",         CLEAR_STR -       "ISIS network information\n" +       PROTO_HELP         "ISIS neighbor adjacencies\n"         "System id\n")  { @@ -738,12 +738,12 @@ void print_debug(struct vty *vty, int flags, int onoff)  DEFUN_NOSH (show_debugging,  	    show_debugging_isis_cmd, -	    "show debugging [isis]", +	    "show debugging [" PROTO_NAME "]",  	    SHOW_STR  	    "State of each debugging option\n" -	    ISIS_STR) +	    PROTO_HELP)  { -	vty_out(vty, "IS-IS debugging status:\n"); +	vty_out(vty, PROTO_NAME " debugging status:\n");  	if (isis->debugs)  		print_debug(vty, isis->debugs, 1); @@ -760,59 +760,59 @@ static int config_write_debug(struct vty *vty)  	int flags = isis->debugs;  	if (flags & DEBUG_ADJ_PACKETS) { -		vty_out(vty, "debug isis adj-packets\n"); +		vty_out(vty, "debug " PROTO_NAME " adj-packets\n");  		write++;  	}  	if (flags & DEBUG_CHECKSUM_ERRORS) { -		vty_out(vty, "debug isis checksum-errors\n"); +		vty_out(vty, "debug " PROTO_NAME " checksum-errors\n");  		write++;  	}  	if (flags & DEBUG_LOCAL_UPDATES) { -		vty_out(vty, "debug isis local-updates\n"); +		vty_out(vty, "debug " PROTO_NAME " local-updates\n");  		write++;  	}  	if (flags & DEBUG_PROTOCOL_ERRORS) { -		vty_out(vty, "debug isis protocol-errors\n"); +		vty_out(vty, "debug " PROTO_NAME " protocol-errors\n");  		write++;  	}  	if (flags & DEBUG_SNP_PACKETS) { -		vty_out(vty, "debug isis snp-packets\n"); +		vty_out(vty, "debug " PROTO_NAME " snp-packets\n");  		write++;  	}  	if (flags & DEBUG_SPF_EVENTS) { -		vty_out(vty, "debug isis spf-events\n"); +		vty_out(vty, "debug " PROTO_NAME " spf-events\n");  		write++;  	}  	if (flags & DEBUG_SPF_STATS) { -		vty_out(vty, "debug isis spf-statistics\n"); +		vty_out(vty, "debug " PROTO_NAME " spf-statistics\n");  		write++;  	}  	if (flags & DEBUG_SPF_TRIGGERS) { -		vty_out(vty, "debug isis spf-triggers\n"); +		vty_out(vty, "debug " PROTO_NAME " spf-triggers\n");  		write++;  	}  	if (flags & DEBUG_UPDATE_PACKETS) { -		vty_out(vty, "debug isis update-packets\n"); +		vty_out(vty, "debug " PROTO_NAME " update-packets\n");  		write++;  	}  	if (flags & DEBUG_RTE_EVENTS) { -		vty_out(vty, "debug isis route-events\n"); +		vty_out(vty, "debug " PROTO_NAME " route-events\n");  		write++;  	}  	if (flags & DEBUG_EVENTS) { -		vty_out(vty, "debug isis events\n"); +		vty_out(vty, "debug " PROTO_NAME " events\n");  		write++;  	}  	if (flags & DEBUG_PACKET_DUMP) { -		vty_out(vty, "debug isis packet-dump\n"); +		vty_out(vty, "debug " PROTO_NAME " packet-dump\n");  		write++;  	}  	if (flags & DEBUG_LSP_GEN) { -		vty_out(vty, "debug isis lsp-gen\n"); +		vty_out(vty, "debug " PROTO_NAME " lsp-gen\n");  		write++;  	}  	if (flags & DEBUG_LSP_SCHED) { -		vty_out(vty, "debug isis lsp-sched\n"); +		vty_out(vty, "debug " PROTO_NAME " lsp-sched\n");  		write++;  	}  	write += spf_backoff_write_config(vty); @@ -822,9 +822,9 @@ static int config_write_debug(struct vty *vty)  DEFUN (debug_isis_adj,         debug_isis_adj_cmd, -       "debug isis adj-packets", +       "debug " PROTO_NAME " adj-packets",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Adjacency related packets\n")  {  	isis->debugs |= DEBUG_ADJ_PACKETS; @@ -835,10 +835,10 @@ DEFUN (debug_isis_adj,  DEFUN (no_debug_isis_adj,         no_debug_isis_adj_cmd, -       "no debug isis adj-packets", +       "no debug " PROTO_NAME " adj-packets",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Adjacency related packets\n")  {  	isis->debugs &= ~DEBUG_ADJ_PACKETS; @@ -849,9 +849,9 @@ DEFUN (no_debug_isis_adj,  DEFUN (debug_isis_csum,         debug_isis_csum_cmd, -       "debug isis checksum-errors", +       "debug " PROTO_NAME " checksum-errors",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS LSP checksum errors\n")  {  	isis->debugs |= DEBUG_CHECKSUM_ERRORS; @@ -862,10 +862,10 @@ DEFUN (debug_isis_csum,  DEFUN (no_debug_isis_csum,         no_debug_isis_csum_cmd, -       "no debug isis checksum-errors", +       "no debug " PROTO_NAME " checksum-errors",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS LSP checksum errors\n")  {  	isis->debugs &= ~DEBUG_CHECKSUM_ERRORS; @@ -876,9 +876,9 @@ DEFUN (no_debug_isis_csum,  DEFUN (debug_isis_lupd,         debug_isis_lupd_cmd, -       "debug isis local-updates", +       "debug " PROTO_NAME " local-updates",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS local update packets\n")  {  	isis->debugs |= DEBUG_LOCAL_UPDATES; @@ -889,10 +889,10 @@ DEFUN (debug_isis_lupd,  DEFUN (no_debug_isis_lupd,         no_debug_isis_lupd_cmd, -       "no debug isis local-updates", +       "no debug " PROTO_NAME " local-updates",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS local update packets\n")  {  	isis->debugs &= ~DEBUG_LOCAL_UPDATES; @@ -903,9 +903,9 @@ DEFUN (no_debug_isis_lupd,  DEFUN (debug_isis_err,         debug_isis_err_cmd, -       "debug isis protocol-errors", +       "debug " PROTO_NAME " protocol-errors",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS LSP protocol errors\n")  {  	isis->debugs |= DEBUG_PROTOCOL_ERRORS; @@ -916,10 +916,10 @@ DEFUN (debug_isis_err,  DEFUN (no_debug_isis_err,         no_debug_isis_err_cmd, -       "no debug isis protocol-errors", +       "no debug " PROTO_NAME " protocol-errors",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS LSP protocol errors\n")  {  	isis->debugs &= ~DEBUG_PROTOCOL_ERRORS; @@ -930,9 +930,9 @@ DEFUN (no_debug_isis_err,  DEFUN (debug_isis_snp,         debug_isis_snp_cmd, -       "debug isis snp-packets", +       "debug " PROTO_NAME " snp-packets",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS CSNP/PSNP packets\n")  {  	isis->debugs |= DEBUG_SNP_PACKETS; @@ -943,10 +943,10 @@ DEFUN (debug_isis_snp,  DEFUN (no_debug_isis_snp,         no_debug_isis_snp_cmd, -       "no debug isis snp-packets", +       "no debug " PROTO_NAME " snp-packets",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS CSNP/PSNP packets\n")  {  	isis->debugs &= ~DEBUG_SNP_PACKETS; @@ -957,9 +957,9 @@ DEFUN (no_debug_isis_snp,  DEFUN (debug_isis_upd,         debug_isis_upd_cmd, -       "debug isis update-packets", +       "debug " PROTO_NAME " update-packets",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Update related packets\n")  {  	isis->debugs |= DEBUG_UPDATE_PACKETS; @@ -970,10 +970,10 @@ DEFUN (debug_isis_upd,  DEFUN (no_debug_isis_upd,         no_debug_isis_upd_cmd, -       "no debug isis update-packets", +       "no debug " PROTO_NAME " update-packets",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Update related packets\n")  {  	isis->debugs &= ~DEBUG_UPDATE_PACKETS; @@ -984,9 +984,9 @@ DEFUN (no_debug_isis_upd,  DEFUN (debug_isis_spfevents,         debug_isis_spfevents_cmd, -       "debug isis spf-events", +       "debug " PROTO_NAME " spf-events",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Shortest Path First Events\n")  {  	isis->debugs |= DEBUG_SPF_EVENTS; @@ -997,10 +997,10 @@ DEFUN (debug_isis_spfevents,  DEFUN (no_debug_isis_spfevents,         no_debug_isis_spfevents_cmd, -       "no debug isis spf-events", +       "no debug " PROTO_NAME " spf-events",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Shortest Path First Events\n")  {  	isis->debugs &= ~DEBUG_SPF_EVENTS; @@ -1011,9 +1011,9 @@ DEFUN (no_debug_isis_spfevents,  DEFUN (debug_isis_spfstats,         debug_isis_spfstats_cmd, -       "debug isis spf-statistics ", +       "debug " PROTO_NAME " spf-statistics ",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS SPF Timing and Statistic Data\n")  {  	isis->debugs |= DEBUG_SPF_STATS; @@ -1024,10 +1024,10 @@ DEFUN (debug_isis_spfstats,  DEFUN (no_debug_isis_spfstats,         no_debug_isis_spfstats_cmd, -       "no debug isis spf-statistics", +       "no debug " PROTO_NAME " spf-statistics",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS SPF Timing and Statistic Data\n")  {  	isis->debugs &= ~DEBUG_SPF_STATS; @@ -1038,9 +1038,9 @@ DEFUN (no_debug_isis_spfstats,  DEFUN (debug_isis_spftrigg,         debug_isis_spftrigg_cmd, -       "debug isis spf-triggers", +       "debug " PROTO_NAME " spf-triggers",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS SPF triggering events\n")  {  	isis->debugs |= DEBUG_SPF_TRIGGERS; @@ -1051,10 +1051,10 @@ DEFUN (debug_isis_spftrigg,  DEFUN (no_debug_isis_spftrigg,         no_debug_isis_spftrigg_cmd, -       "no debug isis spf-triggers", +       "no debug " PROTO_NAME " spf-triggers",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS SPF triggering events\n")  {  	isis->debugs &= ~DEBUG_SPF_TRIGGERS; @@ -1065,9 +1065,9 @@ DEFUN (no_debug_isis_spftrigg,  DEFUN (debug_isis_rtevents,         debug_isis_rtevents_cmd, -       "debug isis route-events", +       "debug " PROTO_NAME " route-events",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Route related events\n")  {  	isis->debugs |= DEBUG_RTE_EVENTS; @@ -1078,10 +1078,10 @@ DEFUN (debug_isis_rtevents,  DEFUN (no_debug_isis_rtevents,         no_debug_isis_rtevents_cmd, -       "no debug isis route-events", +       "no debug " PROTO_NAME " route-events",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Route related events\n")  {  	isis->debugs &= ~DEBUG_RTE_EVENTS; @@ -1092,9 +1092,9 @@ DEFUN (no_debug_isis_rtevents,  DEFUN (debug_isis_events,         debug_isis_events_cmd, -       "debug isis events", +       "debug " PROTO_NAME " events",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Events\n")  {  	isis->debugs |= DEBUG_EVENTS; @@ -1105,10 +1105,10 @@ DEFUN (debug_isis_events,  DEFUN (no_debug_isis_events,         no_debug_isis_events_cmd, -       "no debug isis events", +       "no debug " PROTO_NAME " events",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Events\n")  {  	isis->debugs &= ~DEBUG_EVENTS; @@ -1119,9 +1119,9 @@ DEFUN (no_debug_isis_events,  DEFUN (debug_isis_packet_dump,         debug_isis_packet_dump_cmd, -       "debug isis packet-dump", +       "debug " PROTO_NAME " packet-dump",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS packet dump\n")  {  	isis->debugs |= DEBUG_PACKET_DUMP; @@ -1132,10 +1132,10 @@ DEFUN (debug_isis_packet_dump,  DEFUN (no_debug_isis_packet_dump,         no_debug_isis_packet_dump_cmd, -       "no debug isis packet-dump", +       "no debug " PROTO_NAME " packet-dump",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS packet dump\n")  {  	isis->debugs &= ~DEBUG_PACKET_DUMP; @@ -1146,9 +1146,9 @@ DEFUN (no_debug_isis_packet_dump,  DEFUN (debug_isis_lsp_gen,         debug_isis_lsp_gen_cmd, -       "debug isis lsp-gen", +       "debug " PROTO_NAME " lsp-gen",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS generation of own LSPs\n")  {  	isis->debugs |= DEBUG_LSP_GEN; @@ -1159,10 +1159,10 @@ DEFUN (debug_isis_lsp_gen,  DEFUN (no_debug_isis_lsp_gen,         no_debug_isis_lsp_gen_cmd, -       "no debug isis lsp-gen", +       "no debug " PROTO_NAME " lsp-gen",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS generation of own LSPs\n")  {  	isis->debugs &= ~DEBUG_LSP_GEN; @@ -1173,9 +1173,9 @@ DEFUN (no_debug_isis_lsp_gen,  DEFUN (debug_isis_lsp_sched,         debug_isis_lsp_sched_cmd, -       "debug isis lsp-sched", +       "debug " PROTO_NAME " lsp-sched",         DEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS scheduling of LSP generation\n")  {  	isis->debugs |= DEBUG_LSP_SCHED; @@ -1186,10 +1186,10 @@ DEFUN (debug_isis_lsp_sched,  DEFUN (no_debug_isis_lsp_sched,         no_debug_isis_lsp_sched_cmd, -       "no debug isis lsp-sched", +       "no debug " PROTO_NAME " lsp-sched",         NO_STR         UNDEBUG_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS scheduling of LSP generation\n")  {  	isis->debugs &= ~DEBUG_LSP_SCHED; @@ -1200,9 +1200,9 @@ DEFUN (no_debug_isis_lsp_sched,  DEFUN (show_hostname,         show_hostname_cmd, -       "show isis hostname", +       "show " PROTO_NAME " hostname",         SHOW_STR -       "IS-IS information\n" +       PROTO_HELP         "IS-IS Dynamic hostname mapping\n")  {  	dynhn_print_all(vty); @@ -1212,10 +1212,10 @@ DEFUN (show_hostname,  DEFUN (show_isis_spf_ietf,         show_isis_spf_ietf_cmd, -       "show isis spf-delay-ietf", +       "show " PROTO_NAME " spf-delay-ietf",         SHOW_STR -       "IS-IS information\n" -       "IS-IS SPF delay IETF information\n") +       PROTO_HELP +       "SPF delay IETF information\n")  {  	if (!isis) {  		vty_out(vty, "ISIS is not running\n"); @@ -1261,15 +1261,15 @@ DEFUN (show_isis_spf_ietf,  DEFUN (show_isis_summary,         show_isis_summary_cmd, -       "show isis summary", -       SHOW_STR "IS-IS information\n" "IS-IS summary\n") +       "show " PROTO_NAME " summary", +       SHOW_STR PROTO_HELP "summary\n")  {  	struct listnode *node, *node2;  	struct isis_area *area;  	int level;  	if (isis == NULL) { -		vty_out(vty, "ISIS is not running\n"); +		vty_out(vty, PROTO_NAME " is not running\n");  		return CMD_SUCCESS;  	} @@ -1471,10 +1471,10 @@ static int show_isis_database(struct vty *vty, const char *argv, int ui_level)  DEFUN (show_database,         show_database_cmd, -       "show isis database [detail] [WORD]", +       "show " PROTO_NAME " database [detail] [WORD]",         SHOW_STR -       "IS-IS information\n" -       "IS-IS link state database\n" +       PROTO_HELP +       "Link state database\n"         "Detailed information\n"         "LSP ID\n")  { @@ -1491,9 +1491,9 @@ DEFUN (show_database,   */  DEFUN_NOSH (router_isis,         router_isis_cmd, -       "router isis WORD", +       "router " PROTO_NAME " WORD",         ROUTER_STR -       "ISO IS-IS\n" +       PROTO_HELP         "ISO Routing area tag\n")  {  	int idx_word = 2; @@ -1505,8 +1505,11 @@ DEFUN_NOSH (router_isis,   */  DEFUN (no_router_isis,         no_router_isis_cmd, -       "no router isis WORD", -       "no\n" ROUTER_STR "ISO IS-IS\n" "ISO Routing area tag\n") +       "no router " PROTO_NAME " WORD", +       NO_STR +       ROUTER_STR +       PROTO_HELP +       "ISO Routing area tag\n")  {  	int idx_word = 3;  	return isis_area_destroy(vty, argv[idx_word]->arg); @@ -1869,7 +1872,7 @@ int isis_config_write(struct vty *vty)  		for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) {  			/* ISIS - Area name */ -			vty_out(vty, "router isis %s\n", area->area_tag); +			vty_out(vty, "router " PROTO_NAME " %s\n", area->area_tag);  			write++;  			/* ISIS - Net */  			if (listcount(area->area_addrs) > 0) { @@ -2123,12 +2126,12 @@ int isis_config_write(struct vty *vty)  	return write;  } -struct cmd_node isis_node = {ISIS_NODE, "%s(config-router)# ", 1}; +struct cmd_node router_node = {ROUTER_NODE, "%s(config-router)# ", 1};  void isis_init()  {  	/* Install IS-IS top node */ -	install_node(&isis_node, isis_config_write); +	install_node(&router_node, isis_config_write);  	install_element(VIEW_NODE, &show_isis_summary_cmd); @@ -2212,16 +2215,16 @@ void isis_init()  	install_element(CONFIG_NODE, &router_isis_cmd);  	install_element(CONFIG_NODE, &no_router_isis_cmd); -	install_default(ISIS_NODE); +	install_default(ROUTER_NODE); -	install_element(ISIS_NODE, &net_cmd); -	install_element(ISIS_NODE, &no_net_cmd); +	install_element(ROUTER_NODE, &net_cmd); +	install_element(ROUTER_NODE, &no_net_cmd); -	install_element(ISIS_NODE, &isis_topology_cmd); -	install_element(ISIS_NODE, &no_isis_topology_cmd); +	install_element(ROUTER_NODE, &isis_topology_cmd); +	install_element(ROUTER_NODE, &no_isis_topology_cmd); -	install_element(ISIS_NODE, &log_adj_changes_cmd); -	install_element(ISIS_NODE, &no_log_adj_changes_cmd); +	install_element(ROUTER_NODE, &log_adj_changes_cmd); +	install_element(ROUTER_NODE, &no_log_adj_changes_cmd);  	spf_backoff_cmd_init();  } diff --git a/isisd/isisd.h b/isisd/isisd.h index ce602e4402..ebccfee330 100644 --- a/isisd/isisd.h +++ b/isisd/isisd.h @@ -33,6 +33,24 @@  #include "isis_memory.h"  #include "qobj.h" +#ifdef FABRICD +static const bool fabricd = true; +#define PROTO_TYPE ZEBRA_ROUTE_OPENFABRIC +#define PROTO_NAME "openfabric" +#define PROTO_HELP "OpenFabric routing protocol\n" +#define PROTO_REDIST_STR FRR_REDIST_STR_FABRICD +#define PROTO_REDIST_HELP FRR_REDIST_HELP_STR_FABRICD +#define ROUTER_NODE OPENFABRIC_NODE +#else +static const bool fabricd = false; +#define PROTO_TYPE ZEBRA_ROUTE_ISIS +#define PROTO_NAME "isis" +#define PROTO_HELP "IS-IS routing protocol\n" +#define PROTO_REDIST_STR FRR_REDIST_STR_ISISD +#define PROTO_REDIST_HELP FRR_REDIST_HELP_STR_ISISD +#define ROUTER_NODE ISIS_NODE +#endif +  extern struct zebra_privs_t isisd_privs;  /* uncomment if you are a developer in bug hunt */ diff --git a/isisd/subdir.am b/isisd/subdir.am index 7b8be46167..085b0cb845 100644 --- a/isisd/subdir.am +++ b/isisd/subdir.am @@ -8,6 +8,12 @@ sbin_PROGRAMS += isisd/isisd  dist_examples_DATA += isisd/isisd.conf.sample  endif +if FABRICD +noinst_LIBRARIES += isisd/libfabric.a +sbin_PROGRAMS += isisd/fabricd +dist_examples_DATA += isisd/fabricd.conf.sample +endif +  isisd_libisis_a_SOURCES = \  	isisd/dict.c \  	isisd/isis_adjacency.c \ @@ -73,3 +79,12 @@ isisd_isisd_SOURCES = \  	isisd/isis_main.c \  	isisd/isis_pfpacket.c \  	# end + +FABRICD_CPPFLAGS = -DFABRICD=1 $(AM_CPPFLAGS) + +isisd_libfabric_a_SOURCES = $(isisd_libisis_a_SOURCES) +isisd_libfabric_a_CPPFLAGS = $(FABRICD_CPPFLAGS) + +isisd_fabricd_LDADD = isisd/libfabric.a lib/libfrr.la @LIBCAP@ +isisd_fabricd_SOURCES = $(isisd_isisd_SOURCES) +isisd_fabricd_CPPFLAGS = $(FABRICD_CPPFLAGS)  | 
