2 * IS-IS Rout(e)ing protocol - isisd.c
4 * Copyright (C) 2001,2002 Sampo Saaristo
5 * Tampere University of Technology
6 * Institute of Communications Engineering
8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms of the GNU General Public Licenseas published by the Free
10 * Software Foundation; either version 2 of the License, or (at your option)
13 * This program is distributed in the hope that it will be useful,but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 #include "isisd/dict.h"
39 #include "isisd/include-netbsd/iso.h"
40 #include "isisd/isis_constants.h"
41 #include "isisd/isis_common.h"
42 #include "isisd/isis_flags.h"
43 #include "isisd/isis_circuit.h"
44 #include "isisd/isis_csm.h"
45 #include "isisd/isisd.h"
46 #include "isisd/isis_dynhn.h"
47 #include "isisd/isis_adjacency.h"
48 #include "isisd/isis_pdu.h"
49 #include "isisd/isis_misc.h"
50 #include "isisd/isis_constants.h"
51 #include "isisd/isis_tlv.h"
52 #include "isisd/isis_lsp.h"
53 #include "isisd/isis_spf.h"
54 #include "isisd/isis_route.h"
55 #include "isisd/isis_zebra.h"
56 #include "isisd/isis_events.h"
57 #include "isisd/isis_te.h"
59 #ifdef TOPOLOGY_GENERATE
61 u_char DEFAULT_TOPOLOGY_BASEIS
[6] = { 0xFE, 0xED, 0xFE, 0xED, 0x00, 0x00 };
62 #endif /* TOPOLOGY_GENERATE */
64 struct isis
*isis
= NULL
;
69 int isis_area_get(struct vty
*, const char *);
70 int isis_area_destroy(struct vty
*, const char *);
71 int area_net_title(struct vty
*, const char *);
72 int area_clear_net_title(struct vty
*, const char *);
73 int show_isis_interface_common(struct vty
*, const char *ifname
, char);
74 int show_isis_neighbor_common(struct vty
*, const char *id
, char);
75 int clear_isis_neighbor_common(struct vty
*, const char *id
);
76 int isis_config_write(struct vty
*);
81 isis_new (unsigned long process_id
)
83 isis
= XCALLOC (MTYPE_ISIS
, sizeof (struct isis
));
87 isis
->max_area_addrs
= 3;
88 isis
->process_id
= process_id
;
90 isis
->area_list
= list_new ();
91 isis
->init_circ_list
= list_new ();
92 isis
->uptime
= time (NULL
);
93 isis
->nexthops
= list_new ();
95 isis
->nexthops6
= list_new ();
96 #endif /* HAVE_IPV6 */
99 * uncomment the next line for full debugs
101 /* isis->debugs = 0xFFFF; */
102 isisMplsTE
.status
= disable
; /* Only support TE metric */
106 isis_area_create (const char *area_tag
)
108 struct isis_area
*area
;
110 area
= XCALLOC (MTYPE_ISIS_AREA
, sizeof (struct isis_area
));
113 * The first instance is level-1-2 rest are level-1, unless otherwise
116 if (listcount (isis
->area_list
) > 0)
117 area
->is_type
= IS_LEVEL_1
;
119 area
->is_type
= IS_LEVEL_1_AND_2
;
122 * intialize the databases
124 if (area
->is_type
& IS_LEVEL_1
)
126 area
->lspdb
[0] = lsp_db_init ();
127 area
->route_table
[0] = route_table_init ();
129 area
->route_table6
[0] = route_table_init ();
130 #endif /* HAVE_IPV6 */
132 if (area
->is_type
& IS_LEVEL_2
)
134 area
->lspdb
[1] = lsp_db_init ();
135 area
->route_table
[1] = route_table_init ();
137 area
->route_table6
[1] = route_table_init ();
138 #endif /* HAVE_IPV6 */
141 spftree_area_init (area
);
143 area
->circuit_list
= list_new ();
144 area
->area_addrs
= list_new ();
145 THREAD_TIMER_ON (master
, area
->t_tick
, lsp_tick
, area
, 1);
146 flags_initialize (&area
->flags
);
151 area
->max_lsp_lifetime
[0] = DEFAULT_LSP_LIFETIME
; /* 1200 */
152 area
->max_lsp_lifetime
[1] = DEFAULT_LSP_LIFETIME
; /* 1200 */
153 area
->lsp_refresh
[0] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
154 area
->lsp_refresh
[1] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
155 area
->lsp_gen_interval
[0] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
156 area
->lsp_gen_interval
[1] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
157 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
158 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
159 area
->dynhostname
= 1;
162 area
->lsp_frag_threshold
= 90;
163 area
->lsp_mtu
= DEFAULT_LSP_MTU
;
164 #ifdef TOPOLOGY_GENERATE
165 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
166 #endif /* TOPOLOGY_GENERATE */
168 area
->area_tag
= strdup (area_tag
);
169 listnode_add (isis
->area_list
, area
);
176 isis_area_lookup (const char *area_tag
)
178 struct isis_area
*area
;
179 struct listnode
*node
;
181 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
182 if ((area
->area_tag
== NULL
&& area_tag
== NULL
) ||
183 (area
->area_tag
&& area_tag
184 && strcmp (area
->area_tag
, area_tag
) == 0))
191 isis_area_get (struct vty
*vty
, const char *area_tag
)
193 struct isis_area
*area
;
195 area
= isis_area_lookup (area_tag
);
199 vty
->node
= ISIS_NODE
;
204 area
= isis_area_create (area_tag
);
206 if (isis
->debugs
& DEBUG_EVENTS
)
207 zlog_debug ("New IS-IS area instance %s", area
->area_tag
);
209 vty
->node
= ISIS_NODE
;
216 isis_area_destroy (struct vty
*vty
, const char *area_tag
)
218 struct isis_area
*area
;
219 struct listnode
*node
, *nnode
;
220 struct isis_circuit
*circuit
;
221 struct area_addr
*addr
;
223 area
= isis_area_lookup (area_tag
);
227 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
228 return CMD_ERR_NO_MATCH
;
231 if (area
->circuit_list
)
233 for (ALL_LIST_ELEMENTS (area
->circuit_list
, node
, nnode
, circuit
))
235 circuit
->ip_router
= 0;
237 circuit
->ipv6_router
= 0;
239 isis_csm_state_change (ISIS_DISABLE
, circuit
, area
);
241 list_delete (area
->circuit_list
);
242 area
->circuit_list
= NULL
;
245 if (area
->lspdb
[0] != NULL
)
247 lsp_db_destroy (area
->lspdb
[0]);
248 area
->lspdb
[0] = NULL
;
250 if (area
->lspdb
[1] != NULL
)
252 lsp_db_destroy (area
->lspdb
[1]);
253 area
->lspdb
[1] = NULL
;
256 spftree_area_del (area
);
258 /* invalidate and validate would delete all routes from zebra */
259 isis_route_invalidate (area
);
260 isis_route_validate (area
);
262 if (area
->route_table
[0])
264 route_table_finish (area
->route_table
[0]);
265 area
->route_table
[0] = NULL
;
267 if (area
->route_table
[1])
269 route_table_finish (area
->route_table
[1]);
270 area
->route_table
[1] = NULL
;
273 if (area
->route_table6
[0])
275 route_table_finish (area
->route_table6
[0]);
276 area
->route_table6
[0] = NULL
;
278 if (area
->route_table6
[1])
280 route_table_finish (area
->route_table6
[1]);
281 area
->route_table6
[1] = NULL
;
283 #endif /* HAVE_IPV6 */
285 isis_redist_area_finish(area
);
287 for (ALL_LIST_ELEMENTS (area
->area_addrs
, node
, nnode
, addr
))
289 list_delete_node (area
->area_addrs
, node
);
290 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
292 area
->area_addrs
= NULL
;
294 THREAD_TIMER_OFF (area
->t_tick
);
295 THREAD_TIMER_OFF (area
->t_lsp_refresh
[0]);
296 THREAD_TIMER_OFF (area
->t_lsp_refresh
[1]);
298 thread_cancel_event (master
, area
);
300 listnode_delete (isis
->area_list
, area
);
302 free (area
->area_tag
);
304 XFREE (MTYPE_ISIS_AREA
, area
);
306 if (listcount (isis
->area_list
) == 0)
308 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
316 area_net_title (struct vty
*vty
, const char *net_title
)
318 struct isis_area
*area
;
319 struct area_addr
*addr
;
320 struct area_addr
*addrp
;
321 struct listnode
*node
;
328 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
329 return CMD_ERR_NO_MATCH
;
332 /* We check that we are not over the maximal number of addresses */
333 if (listcount (area
->area_addrs
) >= isis
->max_area_addrs
)
335 vty_out (vty
, "Maximum of area addresses (%d) already reached %s",
336 isis
->max_area_addrs
, VTY_NEWLINE
);
337 return CMD_ERR_NOTHING_TODO
;
340 addr
= XMALLOC (MTYPE_ISIS_AREA_ADDR
, sizeof (struct area_addr
));
341 addr
->addr_len
= dotformat2buff (buff
, net_title
);
342 memcpy (addr
->area_addr
, buff
, addr
->addr_len
);
344 zlog_debug ("added area address %s for area %s (address length %d)",
345 net_title
, area
->area_tag
, addr
->addr_len
);
346 #endif /* EXTREME_DEBUG */
347 if (addr
->addr_len
< 8 || addr
->addr_len
> 20)
349 vty_out (vty
, "area address must be at least 8..20 octets long (%d)%s",
350 addr
->addr_len
, VTY_NEWLINE
);
351 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
352 return CMD_ERR_AMBIGUOUS
;
355 if (addr
->area_addr
[addr
->addr_len
-1] != 0)
357 vty_out (vty
, "nsel byte (last byte) in area address must be 0%s",
359 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
360 return CMD_ERR_AMBIGUOUS
;
363 if (isis
->sysid_set
== 0)
366 * First area address - get the SystemID for this router
368 memcpy (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
);
370 if (isis
->debugs
& DEBUG_EVENTS
)
371 zlog_debug ("Router has SystemID %s", sysid_print (isis
->sysid
));
376 * Check that the SystemID portions match
378 if (memcmp (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
))
381 "System ID must not change when defining additional area"
382 " addresses%s", VTY_NEWLINE
);
383 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
384 return CMD_ERR_AMBIGUOUS
;
387 /* now we see that we don't already have this address */
388 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
390 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
) != (addr
->addr_len
))
392 if (!memcmp (addrp
->area_addr
, addr
->area_addr
, addr
->addr_len
))
394 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
395 return CMD_SUCCESS
; /* silent fail */
401 * Forget the systemID part of the address
403 addr
->addr_len
-= (ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
);
404 listnode_add (area
->area_addrs
, addr
);
406 /* only now we can safely generate our LSPs for this area */
407 if (listcount (area
->area_addrs
) > 0)
409 if (area
->is_type
& IS_LEVEL_1
)
410 lsp_generate (area
, IS_LEVEL_1
);
411 if (area
->is_type
& IS_LEVEL_2
)
412 lsp_generate (area
, IS_LEVEL_2
);
419 area_clear_net_title (struct vty
*vty
, const char *net_title
)
421 struct isis_area
*area
;
422 struct area_addr addr
, *addrp
= NULL
;
423 struct listnode
*node
;
429 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
430 return CMD_ERR_NO_MATCH
;
433 addr
.addr_len
= dotformat2buff (buff
, net_title
);
434 if (addr
.addr_len
< 8 || addr
.addr_len
> 20)
436 vty_out (vty
, "Unsupported area address length %d, should be 8...20 %s",
437 addr
.addr_len
, VTY_NEWLINE
);
438 return CMD_ERR_AMBIGUOUS
;
441 memcpy (addr
.area_addr
, buff
, (int) addr
.addr_len
);
443 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
444 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ 1) == addr
.addr_len
&&
445 !memcmp (addrp
->area_addr
, addr
.area_addr
, addr
.addr_len
))
450 vty_out (vty
, "No area address %s for area %s %s", net_title
,
451 area
->area_tag
, VTY_NEWLINE
);
452 return CMD_ERR_NO_MATCH
;
455 listnode_delete (area
->area_addrs
, addrp
);
456 XFREE (MTYPE_ISIS_AREA_ADDR
, addrp
);
459 * Last area address - reset the SystemID for this router
461 if (listcount (area
->area_addrs
) == 0)
463 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
465 if (isis
->debugs
& DEBUG_EVENTS
)
466 zlog_debug ("Router has no SystemID");
473 * 'show isis interface' command
477 show_isis_interface_common (struct vty
*vty
, const char *ifname
, char detail
)
479 struct listnode
*anode
, *cnode
;
480 struct isis_area
*area
;
481 struct isis_circuit
*circuit
;
485 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
489 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
491 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
493 if (detail
== ISIS_UI_LEVEL_BRIEF
)
494 vty_out (vty
, " Interface CircId State Type Level%s",
497 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
499 isis_circuit_print_vty (circuit
, vty
, detail
);
500 else if (strcmp(circuit
->interface
->name
, ifname
) == 0)
501 isis_circuit_print_vty (circuit
, vty
, detail
);
507 DEFUN (show_isis_interface
,
508 show_isis_interface_cmd
,
509 "show isis interface",
511 "ISIS network information\n"
514 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
517 DEFUN (show_isis_interface_detail
,
518 show_isis_interface_detail_cmd
,
519 "show isis interface detail",
521 "ISIS network information\n"
523 "show detailed information\n")
525 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
528 DEFUN (show_isis_interface_arg
,
529 show_isis_interface_arg_cmd
,
530 "show isis interface WORD",
532 "ISIS network information\n"
534 "ISIS interface name\n")
537 return show_isis_interface_common (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
541 * 'show isis neighbor' command
545 show_isis_neighbor_common (struct vty
*vty
, const char *id
, char detail
)
547 struct listnode
*anode
, *cnode
, *node
;
548 struct isis_area
*area
;
549 struct isis_circuit
*circuit
;
551 struct isis_adjacency
*adj
;
552 struct isis_dynhn
*dynhn
;
553 u_char sysid
[ISIS_SYS_ID_LEN
];
558 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
562 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
565 if (sysid2buff (sysid
, id
) == 0)
567 dynhn
= dynhn_find_by_name (id
);
570 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
573 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
577 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
579 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
581 if (detail
== ISIS_UI_LEVEL_BRIEF
)
582 vty_out (vty
, " System Id Interface L State"
583 " Holdtime SNPA%s", VTY_NEWLINE
);
585 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
587 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
589 for (i
= 0; i
< 2; i
++)
591 adjdb
= circuit
->u
.bc
.adjdb
[i
];
592 if (adjdb
&& adjdb
->count
)
594 for (ALL_LIST_ELEMENTS_RO (adjdb
, node
, adj
))
595 if (!id
|| !memcmp (adj
->sysid
, sysid
,
597 isis_adj_print_vty (adj
, vty
, detail
);
601 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
602 circuit
->u
.p2p
.neighbor
)
604 adj
= circuit
->u
.p2p
.neighbor
;
605 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
606 isis_adj_print_vty (adj
, vty
, detail
);
615 * 'clear isis neighbor' command
618 clear_isis_neighbor_common (struct vty
*vty
, const char *id
)
620 struct listnode
*anode
, *cnode
, *cnextnode
, *node
, *nnode
;
621 struct isis_area
*area
;
622 struct isis_circuit
*circuit
;
624 struct isis_adjacency
*adj
;
625 struct isis_dynhn
*dynhn
;
626 u_char sysid
[ISIS_SYS_ID_LEN
];
631 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
635 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
638 if (sysid2buff (sysid
, id
) == 0)
640 dynhn
= dynhn_find_by_name (id
);
643 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
646 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
650 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
652 for (ALL_LIST_ELEMENTS (area
->circuit_list
, cnode
, cnextnode
, circuit
))
654 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
656 for (i
= 0; i
< 2; i
++)
658 adjdb
= circuit
->u
.bc
.adjdb
[i
];
659 if (adjdb
&& adjdb
->count
)
661 for (ALL_LIST_ELEMENTS (adjdb
, node
, nnode
, adj
))
662 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
663 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
664 "clear user request");
668 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
669 circuit
->u
.p2p
.neighbor
)
671 adj
= circuit
->u
.p2p
.neighbor
;
672 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
673 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
674 "clear user request");
682 DEFUN (show_isis_neighbor
,
683 show_isis_neighbor_cmd
,
684 "show isis neighbor",
686 "ISIS network information\n"
687 "ISIS neighbor adjacencies\n")
689 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
692 DEFUN (show_isis_neighbor_detail
,
693 show_isis_neighbor_detail_cmd
,
694 "show isis neighbor detail",
696 "ISIS network information\n"
697 "ISIS neighbor adjacencies\n"
698 "show detailed information\n")
700 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
703 DEFUN (show_isis_neighbor_arg
,
704 show_isis_neighbor_arg_cmd
,
705 "show isis neighbor WORD",
707 "ISIS network information\n"
708 "ISIS neighbor adjacencies\n"
712 return show_isis_neighbor_common (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
715 DEFUN (clear_isis_neighbor
,
716 clear_isis_neighbor_cmd
,
717 "clear isis neighbor",
719 "Reset ISIS network information\n"
720 "Reset ISIS neighbor adjacencies\n")
722 return clear_isis_neighbor_common (vty
, NULL
);
725 DEFUN (clear_isis_neighbor_arg
,
726 clear_isis_neighbor_arg_cmd
,
727 "clear isis neighbor WORD",
729 "ISIS network information\n"
730 "ISIS neighbor adjacencies\n"
734 return clear_isis_neighbor_common (vty
, argv
[idx_word
]->arg
);
738 * 'isis debug', 'show debugging'
741 print_debug (struct vty
*vty
, int flags
, int onoff
)
745 strcpy (onoffs
, "on");
747 strcpy (onoffs
, "off");
749 if (flags
& DEBUG_ADJ_PACKETS
)
750 vty_out (vty
, "IS-IS Adjacency related packets debugging is %s%s", onoffs
,
752 if (flags
& DEBUG_CHECKSUM_ERRORS
)
753 vty_out (vty
, "IS-IS checksum errors debugging is %s%s", onoffs
,
755 if (flags
& DEBUG_LOCAL_UPDATES
)
756 vty_out (vty
, "IS-IS local updates debugging is %s%s", onoffs
,
758 if (flags
& DEBUG_PROTOCOL_ERRORS
)
759 vty_out (vty
, "IS-IS protocol errors debugging is %s%s", onoffs
,
761 if (flags
& DEBUG_SNP_PACKETS
)
762 vty_out (vty
, "IS-IS CSNP/PSNP packets debugging is %s%s", onoffs
,
764 if (flags
& DEBUG_SPF_EVENTS
)
765 vty_out (vty
, "IS-IS SPF events debugging is %s%s", onoffs
, VTY_NEWLINE
);
766 if (flags
& DEBUG_SPF_STATS
)
767 vty_out (vty
, "IS-IS SPF Timing and Statistics Data debugging is %s%s",
768 onoffs
, VTY_NEWLINE
);
769 if (flags
& DEBUG_SPF_TRIGGERS
)
770 vty_out (vty
, "IS-IS SPF triggering events debugging is %s%s", onoffs
,
772 if (flags
& DEBUG_UPDATE_PACKETS
)
773 vty_out (vty
, "IS-IS Update related packet debugging is %s%s", onoffs
,
775 if (flags
& DEBUG_RTE_EVENTS
)
776 vty_out (vty
, "IS-IS Route related debuggin is %s%s", onoffs
,
778 if (flags
& DEBUG_EVENTS
)
779 vty_out (vty
, "IS-IS Event debugging is %s%s", onoffs
, VTY_NEWLINE
);
780 if (flags
& DEBUG_PACKET_DUMP
)
781 vty_out (vty
, "IS-IS Packet dump debugging is %s%s", onoffs
, VTY_NEWLINE
);
782 if (flags
& DEBUG_LSP_GEN
)
783 vty_out (vty
, "IS-IS LSP generation debugging is %s%s", onoffs
, VTY_NEWLINE
);
784 if (flags
& DEBUG_LSP_SCHED
)
785 vty_out (vty
, "IS-IS LSP scheduling debugging is %s%s", onoffs
, VTY_NEWLINE
);
788 DEFUN (show_debugging
,
789 show_debugging_isis_cmd
,
790 "show debugging isis",
792 "State of each debugging option\n"
796 vty_out (vty
, "IS-IS:%s", VTY_NEWLINE
);
797 print_debug (vty
, isis
->debugs
, 1);
803 static struct cmd_node debug_node
= {
810 config_write_debug (struct vty
*vty
)
813 int flags
= isis
->debugs
;
815 if (flags
& DEBUG_ADJ_PACKETS
)
817 vty_out (vty
, "debug isis adj-packets%s", VTY_NEWLINE
);
820 if (flags
& DEBUG_CHECKSUM_ERRORS
)
822 vty_out (vty
, "debug isis checksum-errors%s", VTY_NEWLINE
);
825 if (flags
& DEBUG_LOCAL_UPDATES
)
827 vty_out (vty
, "debug isis local-updates%s", VTY_NEWLINE
);
830 if (flags
& DEBUG_PROTOCOL_ERRORS
)
832 vty_out (vty
, "debug isis protocol-errors%s", VTY_NEWLINE
);
835 if (flags
& DEBUG_SNP_PACKETS
)
837 vty_out (vty
, "debug isis snp-packets%s", VTY_NEWLINE
);
840 if (flags
& DEBUG_SPF_EVENTS
)
842 vty_out (vty
, "debug isis spf-events%s", VTY_NEWLINE
);
845 if (flags
& DEBUG_SPF_STATS
)
847 vty_out (vty
, "debug isis spf-statistics%s", VTY_NEWLINE
);
850 if (flags
& DEBUG_SPF_TRIGGERS
)
852 vty_out (vty
, "debug isis spf-triggers%s", VTY_NEWLINE
);
855 if (flags
& DEBUG_UPDATE_PACKETS
)
857 vty_out (vty
, "debug isis update-packets%s", VTY_NEWLINE
);
860 if (flags
& DEBUG_RTE_EVENTS
)
862 vty_out (vty
, "debug isis route-events%s", VTY_NEWLINE
);
865 if (flags
& DEBUG_EVENTS
)
867 vty_out (vty
, "debug isis events%s", VTY_NEWLINE
);
870 if (flags
& DEBUG_PACKET_DUMP
)
872 vty_out (vty
, "debug isis packet-dump%s", VTY_NEWLINE
);
875 if (flags
& DEBUG_LSP_GEN
)
877 vty_out (vty
, "debug isis lsp-gen%s", VTY_NEWLINE
);
880 if (flags
& DEBUG_LSP_SCHED
)
882 vty_out (vty
, "debug isis lsp-sched%s", VTY_NEWLINE
);
889 DEFUN (debug_isis_adj
,
891 "debug isis adj-packets",
893 "IS-IS information\n"
894 "IS-IS Adjacency related packets\n")
896 isis
->debugs
|= DEBUG_ADJ_PACKETS
;
897 print_debug (vty
, DEBUG_ADJ_PACKETS
, 1);
902 DEFUN (no_debug_isis_adj
,
903 no_debug_isis_adj_cmd
,
904 "no debug isis adj-packets",
906 "IS-IS information\n"
907 "IS-IS Adjacency related packets\n")
909 isis
->debugs
&= ~DEBUG_ADJ_PACKETS
;
910 print_debug (vty
, DEBUG_ADJ_PACKETS
, 0);
915 DEFUN (debug_isis_csum
,
917 "debug isis checksum-errors",
919 "IS-IS information\n"
920 "IS-IS LSP checksum errors\n")
922 isis
->debugs
|= DEBUG_CHECKSUM_ERRORS
;
923 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 1);
928 DEFUN (no_debug_isis_csum
,
929 no_debug_isis_csum_cmd
,
930 "no debug isis checksum-errors",
932 "IS-IS information\n"
933 "IS-IS LSP checksum errors\n")
935 isis
->debugs
&= ~DEBUG_CHECKSUM_ERRORS
;
936 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 0);
941 DEFUN (debug_isis_lupd
,
943 "debug isis local-updates",
945 "IS-IS information\n"
946 "IS-IS local update packets\n")
948 isis
->debugs
|= DEBUG_LOCAL_UPDATES
;
949 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 1);
954 DEFUN (no_debug_isis_lupd
,
955 no_debug_isis_lupd_cmd
,
956 "no debug isis local-updates",
958 "IS-IS information\n"
959 "IS-IS local update packets\n")
961 isis
->debugs
&= ~DEBUG_LOCAL_UPDATES
;
962 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 0);
967 DEFUN (debug_isis_err
,
969 "debug isis protocol-errors",
971 "IS-IS information\n"
972 "IS-IS LSP protocol errors\n")
974 isis
->debugs
|= DEBUG_PROTOCOL_ERRORS
;
975 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 1);
980 DEFUN (no_debug_isis_err
,
981 no_debug_isis_err_cmd
,
982 "no debug isis protocol-errors",
984 "IS-IS information\n"
985 "IS-IS LSP protocol errors\n")
987 isis
->debugs
&= ~DEBUG_PROTOCOL_ERRORS
;
988 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 0);
993 DEFUN (debug_isis_snp
,
995 "debug isis snp-packets",
997 "IS-IS information\n"
998 "IS-IS CSNP/PSNP packets\n")
1000 isis
->debugs
|= DEBUG_SNP_PACKETS
;
1001 print_debug (vty
, DEBUG_SNP_PACKETS
, 1);
1006 DEFUN (no_debug_isis_snp
,
1007 no_debug_isis_snp_cmd
,
1008 "no debug isis snp-packets",
1010 "IS-IS information\n"
1011 "IS-IS CSNP/PSNP packets\n")
1013 isis
->debugs
&= ~DEBUG_SNP_PACKETS
;
1014 print_debug (vty
, DEBUG_SNP_PACKETS
, 0);
1019 DEFUN (debug_isis_upd
,
1021 "debug isis update-packets",
1023 "IS-IS information\n"
1024 "IS-IS Update related packets\n")
1026 isis
->debugs
|= DEBUG_UPDATE_PACKETS
;
1027 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 1);
1032 DEFUN (no_debug_isis_upd
,
1033 no_debug_isis_upd_cmd
,
1034 "no debug isis update-packets",
1036 "IS-IS information\n"
1037 "IS-IS Update related packets\n")
1039 isis
->debugs
&= ~DEBUG_UPDATE_PACKETS
;
1040 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 0);
1045 DEFUN (debug_isis_spfevents
,
1046 debug_isis_spfevents_cmd
,
1047 "debug isis spf-events",
1049 "IS-IS information\n"
1050 "IS-IS Shortest Path First Events\n")
1052 isis
->debugs
|= DEBUG_SPF_EVENTS
;
1053 print_debug (vty
, DEBUG_SPF_EVENTS
, 1);
1058 DEFUN (no_debug_isis_spfevents
,
1059 no_debug_isis_spfevents_cmd
,
1060 "no debug isis spf-events",
1062 "IS-IS information\n"
1063 "IS-IS Shortest Path First Events\n")
1065 isis
->debugs
&= ~DEBUG_SPF_EVENTS
;
1066 print_debug (vty
, DEBUG_SPF_EVENTS
, 0);
1071 DEFUN (debug_isis_spfstats
,
1072 debug_isis_spfstats_cmd
,
1073 "debug isis spf-statistics ",
1075 "IS-IS information\n"
1076 "IS-IS SPF Timing and Statistic Data\n")
1078 isis
->debugs
|= DEBUG_SPF_STATS
;
1079 print_debug (vty
, DEBUG_SPF_STATS
, 1);
1084 DEFUN (no_debug_isis_spfstats
,
1085 no_debug_isis_spfstats_cmd
,
1086 "no debug isis spf-statistics",
1088 "IS-IS information\n"
1089 "IS-IS SPF Timing and Statistic Data\n")
1091 isis
->debugs
&= ~DEBUG_SPF_STATS
;
1092 print_debug (vty
, DEBUG_SPF_STATS
, 0);
1097 DEFUN (debug_isis_spftrigg
,
1098 debug_isis_spftrigg_cmd
,
1099 "debug isis spf-triggers",
1101 "IS-IS information\n"
1102 "IS-IS SPF triggering events\n")
1104 isis
->debugs
|= DEBUG_SPF_TRIGGERS
;
1105 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 1);
1110 DEFUN (no_debug_isis_spftrigg
,
1111 no_debug_isis_spftrigg_cmd
,
1112 "no debug isis spf-triggers",
1114 "IS-IS information\n"
1115 "IS-IS SPF triggering events\n")
1117 isis
->debugs
&= ~DEBUG_SPF_TRIGGERS
;
1118 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 0);
1123 DEFUN (debug_isis_rtevents
,
1124 debug_isis_rtevents_cmd
,
1125 "debug isis route-events",
1127 "IS-IS information\n"
1128 "IS-IS Route related events\n")
1130 isis
->debugs
|= DEBUG_RTE_EVENTS
;
1131 print_debug (vty
, DEBUG_RTE_EVENTS
, 1);
1136 DEFUN (no_debug_isis_rtevents
,
1137 no_debug_isis_rtevents_cmd
,
1138 "no debug isis route-events",
1140 "IS-IS information\n"
1141 "IS-IS Route related events\n")
1143 isis
->debugs
&= ~DEBUG_RTE_EVENTS
;
1144 print_debug (vty
, DEBUG_RTE_EVENTS
, 0);
1149 DEFUN (debug_isis_events
,
1150 debug_isis_events_cmd
,
1151 "debug isis events",
1153 "IS-IS information\n"
1156 isis
->debugs
|= DEBUG_EVENTS
;
1157 print_debug (vty
, DEBUG_EVENTS
, 1);
1162 DEFUN (no_debug_isis_events
,
1163 no_debug_isis_events_cmd
,
1164 "no debug isis events",
1166 "IS-IS information\n"
1169 isis
->debugs
&= ~DEBUG_EVENTS
;
1170 print_debug (vty
, DEBUG_EVENTS
, 0);
1175 DEFUN (debug_isis_packet_dump
,
1176 debug_isis_packet_dump_cmd
,
1177 "debug isis packet-dump",
1179 "IS-IS information\n"
1180 "IS-IS packet dump\n")
1182 isis
->debugs
|= DEBUG_PACKET_DUMP
;
1183 print_debug (vty
, DEBUG_PACKET_DUMP
, 1);
1188 DEFUN (no_debug_isis_packet_dump
,
1189 no_debug_isis_packet_dump_cmd
,
1190 "no debug isis packet-dump",
1192 "IS-IS information\n"
1193 "IS-IS packet dump\n")
1195 isis
->debugs
&= ~DEBUG_PACKET_DUMP
;
1196 print_debug (vty
, DEBUG_PACKET_DUMP
, 0);
1201 DEFUN (debug_isis_lsp_gen
,
1202 debug_isis_lsp_gen_cmd
,
1203 "debug isis lsp-gen",
1205 "IS-IS information\n"
1206 "IS-IS generation of own LSPs\n")
1208 isis
->debugs
|= DEBUG_LSP_GEN
;
1209 print_debug (vty
, DEBUG_LSP_GEN
, 1);
1214 DEFUN (no_debug_isis_lsp_gen
,
1215 no_debug_isis_lsp_gen_cmd
,
1216 "no debug isis lsp-gen",
1218 "IS-IS information\n"
1219 "IS-IS generation of own LSPs\n")
1221 isis
->debugs
&= ~DEBUG_LSP_GEN
;
1222 print_debug (vty
, DEBUG_LSP_GEN
, 0);
1227 DEFUN (debug_isis_lsp_sched
,
1228 debug_isis_lsp_sched_cmd
,
1229 "debug isis lsp-sched",
1231 "IS-IS information\n"
1232 "IS-IS scheduling of LSP generation\n")
1234 isis
->debugs
|= DEBUG_LSP_SCHED
;
1235 print_debug (vty
, DEBUG_LSP_SCHED
, 1);
1240 DEFUN (no_debug_isis_lsp_sched
,
1241 no_debug_isis_lsp_sched_cmd
,
1242 "no debug isis lsp-sched",
1244 "IS-IS information\n"
1245 "IS-IS scheduling of LSP generation\n")
1247 isis
->debugs
&= ~DEBUG_LSP_SCHED
;
1248 print_debug (vty
, DEBUG_LSP_SCHED
, 0);
1253 DEFUN (show_hostname
,
1255 "show isis hostname",
1257 "IS-IS information\n"
1258 "IS-IS Dynamic hostname mapping\n")
1260 dynhn_print_all (vty
);
1266 vty_out_timestr(struct vty
*vty
, time_t uptime
)
1269 time_t difftime
= time (NULL
);
1271 tm
= gmtime (&difftime
);
1273 #define ONE_DAY_SECOND 60*60*24
1274 #define ONE_WEEK_SECOND 60*60*24*7
1275 if (difftime
< ONE_DAY_SECOND
)
1276 vty_out (vty
, "%02d:%02d:%02d",
1277 tm
->tm_hour
, tm
->tm_min
, tm
->tm_sec
);
1278 else if (difftime
< ONE_WEEK_SECOND
)
1279 vty_out (vty
, "%dd%02dh%02dm",
1280 tm
->tm_yday
, tm
->tm_hour
, tm
->tm_min
);
1282 vty_out (vty
, "%02dw%dd%02dh",
1284 tm
->tm_yday
- ((tm
->tm_yday
/7) * 7), tm
->tm_hour
);
1285 vty_out (vty
, " ago");
1288 DEFUN (show_isis_summary
,
1289 show_isis_summary_cmd
,
1290 "show isis summary",
1291 SHOW_STR
"IS-IS information\n" "IS-IS summary\n")
1293 struct listnode
*node
, *node2
;
1294 struct isis_area
*area
;
1295 struct isis_spftree
*spftree
;
1300 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1304 vty_out (vty
, "Process Id : %ld%s", isis
->process_id
,
1306 if (isis
->sysid_set
)
1307 vty_out (vty
, "System Id : %s%s", sysid_print (isis
->sysid
),
1310 vty_out (vty
, "Up time : ");
1311 vty_out_timestr(vty
, isis
->uptime
);
1312 vty_out (vty
, "%s", VTY_NEWLINE
);
1314 if (isis
->area_list
)
1315 vty_out (vty
, "Number of areas : %d%s", isis
->area_list
->count
,
1318 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1320 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1323 if (listcount (area
->area_addrs
) > 0)
1325 struct area_addr
*area_addr
;
1326 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
1328 vty_out (vty
, " Net: %s%s",
1329 isonet_print (area_addr
->area_addr
,
1330 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
1335 for (level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1337 if ((area
->is_type
& level
) == 0)
1340 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1341 spftree
= area
->spftree
[level
- 1];
1342 if (spftree
->pending
)
1343 vty_out (vty
, " IPv4 SPF: (pending)%s", VTY_NEWLINE
);
1345 vty_out (vty
, " IPv4 SPF:%s", VTY_NEWLINE
);
1347 vty_out (vty
, " minimum interval : %d%s",
1348 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1350 vty_out (vty
, " last run elapsed : ");
1351 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1352 vty_out (vty
, "%s", VTY_NEWLINE
);
1354 vty_out (vty
, " last run duration : %u usec%s",
1355 (u_int32_t
)spftree
->last_run_duration
, VTY_NEWLINE
);
1357 vty_out (vty
, " run count : %d%s",
1358 spftree
->runcount
, VTY_NEWLINE
);
1361 spftree
= area
->spftree6
[level
- 1];
1362 if (spftree
->pending
)
1363 vty_out (vty
, " IPv6 SPF: (pending)%s", VTY_NEWLINE
);
1365 vty_out (vty
, " IPv6 SPF:%s", VTY_NEWLINE
);
1367 vty_out (vty
, " minimum interval : %d%s",
1368 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1370 vty_out (vty
, " last run elapsed : ");
1371 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1372 vty_out (vty
, "%s", VTY_NEWLINE
);
1374 vty_out (vty
, " last run duration : %llu msec%s",
1375 (unsigned long long)spftree
->last_run_duration
, VTY_NEWLINE
);
1377 vty_out (vty
, " run count : %d%s",
1378 spftree
->runcount
, VTY_NEWLINE
);
1382 vty_out (vty
, "%s", VTY_NEWLINE
);
1388 * This function supports following display options:
1389 * [ show isis database [detail] ]
1390 * [ show isis database <sysid> [detail] ]
1391 * [ show isis database <hostname> [detail] ]
1392 * [ show isis database <sysid>.<pseudo-id> [detail] ]
1393 * [ show isis database <hostname>.<pseudo-id> [detail] ]
1394 * [ show isis database <sysid>.<pseudo-id>-<fragment-number> [detail] ]
1395 * [ show isis database <hostname>.<pseudo-id>-<fragment-number> [detail] ]
1396 * [ show isis database detail <sysid> ]
1397 * [ show isis database detail <hostname> ]
1398 * [ show isis database detail <sysid>.<pseudo-id> ]
1399 * [ show isis database detail <hostname>.<pseudo-id> ]
1400 * [ show isis database detail <sysid>.<pseudo-id>-<fragment-number> ]
1401 * [ show isis database detail <hostname>.<pseudo-id>-<fragment-number> ]
1404 show_isis_database (struct vty
*vty
, const char *argv
, int ui_level
)
1406 struct listnode
*node
;
1407 struct isis_area
*area
;
1408 struct isis_lsp
*lsp
;
1409 struct isis_dynhn
*dynhn
;
1410 const char *pos
= argv
;
1411 u_char lspid
[ISIS_SYS_ID_LEN
+2];
1414 int level
, lsp_count
;
1416 if (isis
->area_list
->count
== 0)
1419 memset (&lspid
, 0, ISIS_SYS_ID_LEN
);
1420 memset (&sysid
, 0, 255);
1423 * extract fragment and pseudo id from the string argv
1425 * (a) <systemid/hostname>.<pseudo-id>-<framenent> or
1426 * (b) <systemid/hostname>.<pseudo-id> or
1427 * (c) <systemid/hostname> or
1428 * Where systemid is in the form:
1432 strncpy (sysid
, argv
, 254);
1433 if (argv
&& strlen (argv
) > 3)
1435 pos
= argv
+ strlen (argv
) - 3;
1436 if (strncmp (pos
, "-", 1) == 0)
1438 memcpy (number
, ++pos
, 2);
1439 lspid
[ISIS_SYS_ID_LEN
+1] = (u_char
) strtol ((char *)number
, NULL
, 16);
1441 if (strncmp (pos
, ".", 1) != 0)
1442 return CMD_ERR_AMBIGUOUS
;
1444 if (strncmp (pos
, ".", 1) == 0)
1446 memcpy (number
, ++pos
, 2);
1447 lspid
[ISIS_SYS_ID_LEN
] = (u_char
) strtol ((char *)number
, NULL
, 16);
1448 sysid
[pos
- argv
- 1] = '\0';
1452 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1454 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1457 for (level
= 0; level
< ISIS_LEVELS
; level
++)
1459 if (area
->lspdb
[level
] && dict_count (area
->lspdb
[level
]) > 0)
1465 * Try to find the lsp-id if the argv string is in
1466 * the form hostname.<pseudo-id>-<fragment>
1468 if (sysid2buff (lspid
, sysid
))
1470 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1472 else if ((dynhn
= dynhn_find_by_name (sysid
)))
1474 memcpy (lspid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
1475 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1477 else if (strncmp(unix_hostname (), sysid
, 15) == 0)
1479 memcpy (lspid
, isis
->sysid
, ISIS_SYS_ID_LEN
);
1480 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1484 if (lsp
!= NULL
|| argv
== NULL
)
1486 vty_out (vty
, "IS-IS Level-%d link-state database:%s",
1487 level
+ 1, VTY_NEWLINE
);
1489 /* print the title in all cases */
1490 vty_out (vty
, "LSP ID PduLen "
1491 "SeqNumber Chksum Holdtime ATT/P/OL%s",
1497 if (ui_level
== ISIS_UI_LEVEL_DETAIL
)
1498 lsp_print_detail (lsp
, vty
, area
->dynhostname
);
1500 lsp_print (lsp
, vty
, area
->dynhostname
);
1502 else if (argv
== NULL
)
1504 lsp_count
= lsp_print_all (vty
, area
->lspdb
[level
],
1508 vty_out (vty
, " %u LSPs%s%s",
1509 lsp_count
, VTY_NEWLINE
, VTY_NEWLINE
);
1518 DEFUN (show_database_brief
,
1520 "show isis database",
1522 "IS-IS information\n"
1523 "IS-IS link state database\n")
1525 return show_isis_database (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
1528 DEFUN (show_database_lsp_brief
,
1529 show_database_arg_cmd
,
1530 "show isis database WORD",
1532 "IS-IS information\n"
1533 "IS-IS link state database\n"
1537 return show_isis_database (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_BRIEF
);
1540 DEFUN (show_database_lsp_detail
,
1541 show_database_arg_detail_cmd
,
1542 "show isis database WORD detail",
1544 "IS-IS information\n"
1545 "IS-IS link state database\n"
1547 "Detailed information\n")
1550 return show_isis_database (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
1553 DEFUN (show_database_detail
,
1554 show_database_detail_cmd
,
1555 "show isis database detail",
1557 "IS-IS information\n"
1558 "IS-IS link state database\n")
1560 return show_isis_database (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
1563 DEFUN (show_database_detail_lsp
,
1564 show_database_detail_arg_cmd
,
1565 "show isis database detail WORD",
1567 "IS-IS information\n"
1568 "IS-IS link state database\n"
1569 "Detailed information\n"
1573 return show_isis_database (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
1577 * 'router isis' command
1584 "ISO Routing area tag")
1587 return isis_area_get (vty
, argv
[idx_word
]->arg
);
1591 *'no router isis' command
1593 DEFUN (no_router_isis
,
1595 "no router isis WORD",
1596 "no\n" ROUTER_STR
"ISO IS-IS\n" "ISO Routing area tag")
1599 return isis_area_destroy (vty
, argv
[idx_word
]->arg
);
1608 "A Network Entity Title for this process (OSI only)\n"
1609 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1612 return area_net_title (vty
, argv
[idx_word
]->arg
);
1622 "A Network Entity Title for this process (OSI only)\n"
1623 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1626 return area_clear_net_title (vty
, argv
[idx_word
]->arg
);
1629 void isis_area_lsp_mtu_set(struct isis_area
*area
, unsigned int lsp_mtu
)
1631 area
->lsp_mtu
= lsp_mtu
;
1632 lsp_regenerate_schedule(area
, IS_LEVEL_1_AND_2
, 1);
1636 isis_area_passwd_set(struct isis_area
*area
, int level
, u_char passwd_type
,
1637 const char *passwd
, u_char snp_auth
)
1639 struct isis_passwd
*dest
;
1640 struct isis_passwd modified
;
1643 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1644 dest
= (level
== IS_LEVEL_1
) ? &area
->area_passwd
: &area
->domain_passwd
;
1645 memset(&modified
, 0, sizeof(modified
));
1647 if (passwd_type
!= ISIS_PASSWD_TYPE_UNUSED
)
1652 len
= strlen(passwd
);
1657 strncpy((char*)modified
.passwd
, passwd
, 255);
1658 modified
.type
= passwd_type
;
1659 modified
.snp_auth
= snp_auth
;
1662 if (memcmp(&modified
, dest
, sizeof(modified
)))
1664 memcpy(dest
, &modified
, sizeof(modified
));
1665 lsp_regenerate_schedule(area
, IS_LEVEL_1
|IS_LEVEL_2
, 1);
1672 isis_area_passwd_unset (struct isis_area
*area
, int level
)
1674 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_UNUSED
, NULL
, 0);
1678 isis_area_passwd_cleartext_set (struct isis_area
*area
, int level
,
1679 const char *passwd
, u_char snp_auth
)
1681 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_CLEARTXT
,
1686 isis_area_passwd_hmac_md5_set (struct isis_area
*area
, int level
,
1687 const char *passwd
, u_char snp_auth
)
1689 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_HMAC_MD5
,
1694 area_resign_level (struct isis_area
*area
, int level
)
1696 if (area
->lspdb
[level
- 1])
1698 lsp_db_destroy (area
->lspdb
[level
- 1]);
1699 area
->lspdb
[level
- 1] = NULL
;
1701 if (area
->spftree
[level
- 1])
1703 isis_spftree_del (area
->spftree
[level
- 1]);
1704 area
->spftree
[level
- 1] = NULL
;
1707 if (area
->spftree6
[level
- 1])
1709 isis_spftree_del (area
->spftree6
[level
- 1]);
1710 area
->spftree6
[level
- 1] = NULL
;
1713 if (area
->route_table
[level
- 1])
1715 route_table_finish (area
->route_table
[level
- 1]);
1716 area
->route_table
[level
- 1] = NULL
;
1719 if (area
->route_table6
[level
- 1])
1721 route_table_finish (area
->route_table6
[level
- 1]);
1722 area
->route_table6
[level
- 1] = NULL
;
1724 #endif /* HAVE_IPV6 */
1726 sched_debug("ISIS (%s): Resigned from L%d - canceling LSP regeneration timer.",
1727 area
->area_tag
, level
);
1728 THREAD_TIMER_OFF (area
->t_lsp_refresh
[level
- 1]);
1729 area
->lsp_regenerate_pending
[level
- 1] = 0;
1733 isis_area_is_type_set(struct isis_area
*area
, int is_type
)
1735 struct listnode
*node
;
1736 struct isis_circuit
*circuit
;
1738 if (isis
->debugs
& DEBUG_EVENTS
)
1739 zlog_debug ("ISIS-Evt (%s) system type change %s -> %s", area
->area_tag
,
1740 circuit_t2string (area
->is_type
), circuit_t2string (is_type
));
1742 if (area
->is_type
== is_type
)
1743 return; /* No change */
1745 switch (area
->is_type
)
1748 if (is_type
== IS_LEVEL_2
)
1749 area_resign_level (area
, IS_LEVEL_1
);
1751 if (area
->lspdb
[1] == NULL
)
1752 area
->lspdb
[1] = lsp_db_init ();
1753 if (area
->route_table
[1] == NULL
)
1754 area
->route_table
[1] = route_table_init ();
1756 if (area
->route_table6
[1] == NULL
)
1757 area
->route_table6
[1] = route_table_init ();
1758 #endif /* HAVE_IPV6 */
1761 case IS_LEVEL_1_AND_2
:
1762 if (is_type
== IS_LEVEL_1
)
1763 area_resign_level (area
, IS_LEVEL_2
);
1765 area_resign_level (area
, IS_LEVEL_1
);
1769 if (is_type
== IS_LEVEL_1
)
1770 area_resign_level (area
, IS_LEVEL_2
);
1772 if (area
->lspdb
[0] == NULL
)
1773 area
->lspdb
[0] = lsp_db_init ();
1774 if (area
->route_table
[0] == NULL
)
1775 area
->route_table
[0] = route_table_init ();
1777 if (area
->route_table6
[0] == NULL
)
1778 area
->route_table6
[0] = route_table_init ();
1779 #endif /* HAVE_IPV6 */
1786 area
->is_type
= is_type
;
1788 /* override circuit's is_type */
1789 if (area
->is_type
!= IS_LEVEL_1_AND_2
)
1791 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, node
, circuit
))
1792 isis_circuit_is_type_set (circuit
, is_type
);
1795 spftree_area_init (area
);
1797 if (is_type
& IS_LEVEL_1
)
1798 lsp_generate (area
, IS_LEVEL_1
);
1799 if (is_type
& IS_LEVEL_2
)
1800 lsp_generate (area
, IS_LEVEL_2
);
1801 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1806 void isis_area_metricstyle_set(struct isis_area
*area
, bool old_metric
,
1809 if (area
->oldmetric
!= old_metric
1810 || area
->newmetric
!= new_metric
)
1812 area
->oldmetric
= old_metric
;
1813 area
->newmetric
= new_metric
;
1814 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1818 void isis_area_overload_bit_set(struct isis_area
*area
, bool overload_bit
)
1820 char new_overload_bit
= overload_bit
? LSPBIT_OL
: 0;
1822 if (new_overload_bit
!= area
->overload_bit
)
1824 area
->overload_bit
= new_overload_bit
;
1825 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1829 void isis_area_attached_bit_set(struct isis_area
*area
, bool attached_bit
)
1831 char new_attached_bit
= attached_bit
? LSPBIT_ATT
: 0;
1833 if (new_attached_bit
!= area
->attached_bit
)
1835 area
->attached_bit
= new_attached_bit
;
1836 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1840 void isis_area_dynhostname_set(struct isis_area
*area
, bool dynhostname
)
1842 if (area
->dynhostname
!= dynhostname
)
1844 area
->dynhostname
= dynhostname
;
1845 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
1850 isis_area_max_lsp_lifetime_set(struct isis_area
*area
, int level
,
1851 uint16_t max_lsp_lifetime
)
1853 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1855 if (area
->max_lsp_lifetime
[level
-1] == max_lsp_lifetime
)
1858 area
->max_lsp_lifetime
[level
-1] = max_lsp_lifetime
;
1859 lsp_regenerate_schedule(area
, level
, 1);
1863 isis_area_lsp_refresh_set(struct isis_area
*area
, int level
,
1864 uint16_t lsp_refresh
)
1866 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1868 if (area
->lsp_refresh
[level
-1] == lsp_refresh
)
1871 area
->lsp_refresh
[level
-1] = lsp_refresh
;
1872 lsp_regenerate_schedule(area
, level
, 1);
1875 DEFUN (log_adj_changes
,
1876 log_adj_changes_cmd
,
1877 "log-adjacency-changes",
1878 "Log changes in adjacency state\n")
1880 struct isis_area
*area
;
1885 area
->log_adj_changes
= 1;
1890 DEFUN (no_log_adj_changes
,
1891 no_log_adj_changes_cmd
,
1892 "no log-adjacency-changes",
1893 "Stop logging changes in adjacency state\n")
1895 struct isis_area
*area
;
1900 area
->log_adj_changes
= 0;
1905 #ifdef TOPOLOGY_GENERATE
1907 DEFUN (topology_generate_grid
,
1908 topology_generate_grid_cmd
,
1909 "topology generate grid (1-100) (1-100) (1-65000) [param] [param] [param]",
1910 "Topology generation for IS-IS\n"
1911 "Topology generation\n"
1913 "X parameter of the grid\n"
1914 "Y parameter of the grid\n"
1916 "Optional param 1\n"
1917 "Optional param 2\n"
1918 "Optional param 3\n"
1921 /* CHECK ME argc referenced below */
1922 struct isis_area
*area
;
1927 if (!spgrid_check_params (vty
, argc
, argv
))
1930 list_delete (area
->topology
);
1931 area
->topology
= list_new ();
1932 memcpy (area
->top_params
, vty
->buf
, 200);
1933 gen_spgrid_topology (vty
, area
->topology
);
1934 remove_topology_lsps (area
);
1935 generate_topology_lsps (area
);
1936 /* Regenerate L1 LSP to get two way connection to the generated
1938 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1944 DEFUN (show_isis_generated_topology
,
1945 show_isis_generated_topology_cmd
,
1946 "show isis generated-topologies",
1948 "ISIS network information\n"
1949 "Show generated topologies\n")
1951 struct isis_area
*area
;
1952 struct listnode
*node
;
1953 struct listnode
*node2
;
1956 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1958 if (!area
->topology
)
1961 vty_out (vty
, "Topology for isis area: %s%s", area
->area_tag
,
1963 vty_out (vty
, "From node To node Distance%s", VTY_NEWLINE
);
1965 for (ALL_LIST_ELEMENTS_RO (area
->topology
, node2
, arc
))
1966 vty_out (vty
, "%9ld %11ld %12ld%s", arc
->from_node
, arc
->to_node
,
1967 arc
->distance
, VTY_NEWLINE
);
1972 /* Base IS for topology generation. */
1973 DEFUN (topology_baseis
,
1974 topology_baseis_cmd
,
1975 "topology base-is WORD",
1976 "Topology generation for IS-IS\n"
1977 "A Network IS Base for this topology\n"
1978 "XXXX.XXXX.XXXX Network entity title (NET)\n")
1981 struct isis_area
*area
;
1982 u_char buff
[ISIS_SYS_ID_LEN
];
1987 if (sysid2buff (buff
, argv
[idx_word
]->arg
))
1988 sysid2buff (area
->topology_baseis
, argv
[idx_word
]->arg
);
1993 DEFUN (no_topology_baseis
,
1994 no_topology_baseis_cmd
,
1995 "no topology base-is [WORD]",
1997 "Topology generation for IS-IS\n"
1998 "A Network IS Base for this topology\n"
1999 "XXXX.XXXX.XXXX Network entity title (NET)\n")
2001 struct isis_area
*area
;
2006 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
2011 DEFUN (topology_basedynh
,
2012 topology_basedynh_cmd
,
2013 "topology base-dynh WORD",
2014 "Topology generation for IS-IS\n"
2015 "Dynamic hostname base for this topology\n"
2016 "Dynamic hostname base\n")
2019 struct isis_area
*area
;
2024 /* I hope that it's enough. */
2025 area
->topology_basedynh
= strndup (argv
[idx_word
]->arg
, 16);
2029 #endif /* TOPOLOGY_GENERATE */
2031 /* IS-IS configuration write function */
2033 isis_config_write (struct vty
*vty
)
2039 struct isis_area
*area
;
2040 struct listnode
*node
, *node2
;
2042 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
2044 /* ISIS - Area name */
2045 vty_out (vty
, "router isis %s%s", area
->area_tag
, VTY_NEWLINE
);
2048 if (listcount (area
->area_addrs
) > 0)
2050 struct area_addr
*area_addr
;
2051 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
2053 vty_out (vty
, " net %s%s",
2054 isonet_print (area_addr
->area_addr
,
2055 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
2060 /* ISIS - Dynamic hostname - Defaults to true so only display if
2062 if (!area
->dynhostname
)
2064 vty_out (vty
, " no hostname dynamic%s", VTY_NEWLINE
);
2067 /* ISIS - Metric-Style - when true displays wide */
2068 if (area
->newmetric
)
2070 if (!area
->oldmetric
)
2071 vty_out (vty
, " metric-style wide%s", VTY_NEWLINE
);
2073 vty_out (vty
, " metric-style transition%s", VTY_NEWLINE
);
2078 vty_out (vty
, " metric-style narrow%s", VTY_NEWLINE
);
2081 /* ISIS - overload-bit */
2082 if (area
->overload_bit
)
2084 vty_out (vty
, " set-overload-bit%s", VTY_NEWLINE
);
2087 /* ISIS - Area is-type (level-1-2 is default) */
2088 if (area
->is_type
== IS_LEVEL_1
)
2090 vty_out (vty
, " is-type level-1%s", VTY_NEWLINE
);
2093 else if (area
->is_type
== IS_LEVEL_2
)
2095 vty_out (vty
, " is-type level-2-only%s", VTY_NEWLINE
);
2098 write
+= isis_redist_config_write(vty
, area
, AF_INET
);
2099 write
+= isis_redist_config_write(vty
, area
, AF_INET6
);
2100 /* ISIS - Lsp generation interval */
2101 if (area
->lsp_gen_interval
[0] == area
->lsp_gen_interval
[1])
2103 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2105 vty_out (vty
, " lsp-gen-interval %d%s",
2106 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2112 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2114 vty_out (vty
, " lsp-gen-interval level-1 %d%s",
2115 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2118 if (area
->lsp_gen_interval
[1] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2120 vty_out (vty
, " lsp-gen-interval level-2 %d%s",
2121 area
->lsp_gen_interval
[1], VTY_NEWLINE
);
2125 /* ISIS - LSP lifetime */
2126 if (area
->max_lsp_lifetime
[0] == area
->max_lsp_lifetime
[1])
2128 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2130 vty_out (vty
, " max-lsp-lifetime %u%s", area
->max_lsp_lifetime
[0],
2137 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2139 vty_out (vty
, " max-lsp-lifetime level-1 %u%s",
2140 area
->max_lsp_lifetime
[0], VTY_NEWLINE
);
2143 if (area
->max_lsp_lifetime
[1] != DEFAULT_LSP_LIFETIME
)
2145 vty_out (vty
, " max-lsp-lifetime level-2 %u%s",
2146 area
->max_lsp_lifetime
[1], VTY_NEWLINE
);
2150 /* ISIS - LSP refresh interval */
2151 if (area
->lsp_refresh
[0] == area
->lsp_refresh
[1])
2153 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2155 vty_out (vty
, " lsp-refresh-interval %u%s", area
->lsp_refresh
[0],
2162 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2164 vty_out (vty
, " lsp-refresh-interval level-1 %u%s",
2165 area
->lsp_refresh
[0], VTY_NEWLINE
);
2168 if (area
->lsp_refresh
[1] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2170 vty_out (vty
, " lsp-refresh-interval level-2 %u%s",
2171 area
->lsp_refresh
[1], VTY_NEWLINE
);
2175 if (area
->lsp_mtu
!= DEFAULT_LSP_MTU
)
2177 vty_out(vty
, " lsp-mtu %u%s", area
->lsp_mtu
, VTY_NEWLINE
);
2181 /* Minimum SPF interval. */
2182 if (area
->min_spf_interval
[0] == area
->min_spf_interval
[1])
2184 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2186 vty_out (vty
, " spf-interval %d%s",
2187 area
->min_spf_interval
[0], VTY_NEWLINE
);
2193 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2195 vty_out (vty
, " spf-interval level-1 %d%s",
2196 area
->min_spf_interval
[0], VTY_NEWLINE
);
2199 if (area
->min_spf_interval
[1] != MINIMUM_SPF_INTERVAL
)
2201 vty_out (vty
, " spf-interval level-2 %d%s",
2202 area
->min_spf_interval
[1], VTY_NEWLINE
);
2206 /* Authentication passwords. */
2207 if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2209 vty_out(vty
, " area-password md5 %s", area
->area_passwd
.passwd
);
2210 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2212 vty_out(vty
, " authenticate snp ");
2213 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2214 vty_out(vty
, "validate");
2216 vty_out(vty
, "send-only");
2218 vty_out(vty
, "%s", VTY_NEWLINE
);
2221 else if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
2223 vty_out(vty
, " area-password clear %s", area
->area_passwd
.passwd
);
2224 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2226 vty_out(vty
, " authenticate snp ");
2227 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2228 vty_out(vty
, "validate");
2230 vty_out(vty
, "send-only");
2232 vty_out(vty
, "%s", VTY_NEWLINE
);
2235 if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2237 vty_out(vty
, " domain-password md5 %s",
2238 area
->domain_passwd
.passwd
);
2239 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
2241 vty_out(vty
, " authenticate snp ");
2242 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
2243 vty_out(vty
, "validate");
2245 vty_out(vty
, "send-only");
2247 vty_out(vty
, "%s", VTY_NEWLINE
);
2250 else if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
2252 vty_out(vty
, " domain-password clear %s",
2253 area
->domain_passwd
.passwd
);
2254 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
2256 vty_out(vty
, " authenticate snp ");
2257 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
2258 vty_out(vty
, "validate");
2260 vty_out(vty
, "send-only");
2262 vty_out(vty
, "%s", VTY_NEWLINE
);
2266 if (area
->log_adj_changes
)
2268 vty_out (vty
, " log-adjacency-changes%s", VTY_NEWLINE
);
2272 #ifdef TOPOLOGY_GENERATE
2273 if (memcmp (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
,
2276 vty_out (vty
, " topology base-is %s%s",
2277 sysid_print ((u_char
*)area
->topology_baseis
), VTY_NEWLINE
);
2280 if (area
->topology_basedynh
)
2282 vty_out (vty
, " topology base-dynh %s%s",
2283 area
->topology_basedynh
, VTY_NEWLINE
);
2286 /* We save the whole command line here. */
2287 if (strlen(area
->top_params
))
2289 vty_out (vty
, " %s%s", area
->top_params
, VTY_NEWLINE
);
2292 #endif /* TOPOLOGY_GENERATE */
2295 isis_mpls_te_config_write_router(vty
);
2301 struct cmd_node isis_node
= {
2303 "%s(config-router)# ",
2310 /* Install IS-IS top node */
2311 install_node (&isis_node
, isis_config_write
);
2313 install_element (VIEW_NODE
, &show_isis_summary_cmd
);
2315 install_element (VIEW_NODE
, &show_isis_interface_cmd
);
2316 install_element (VIEW_NODE
, &show_isis_interface_detail_cmd
);
2317 install_element (VIEW_NODE
, &show_isis_interface_arg_cmd
);
2319 install_element (VIEW_NODE
, &show_isis_neighbor_cmd
);
2320 install_element (VIEW_NODE
, &show_isis_neighbor_detail_cmd
);
2321 install_element (VIEW_NODE
, &show_isis_neighbor_arg_cmd
);
2322 install_element (VIEW_NODE
, &clear_isis_neighbor_cmd
);
2323 install_element (VIEW_NODE
, &clear_isis_neighbor_arg_cmd
);
2325 install_element (VIEW_NODE
, &show_hostname_cmd
);
2326 install_element (VIEW_NODE
, &show_database_cmd
);
2327 install_element (VIEW_NODE
, &show_database_arg_cmd
);
2328 install_element (VIEW_NODE
, &show_database_arg_detail_cmd
);
2329 install_element (VIEW_NODE
, &show_database_detail_cmd
);
2330 install_element (VIEW_NODE
, &show_database_detail_arg_cmd
);
2332 install_element (ENABLE_NODE
, &show_isis_summary_cmd
);
2334 install_element (ENABLE_NODE
, &show_isis_interface_cmd
);
2335 install_element (ENABLE_NODE
, &show_isis_interface_detail_cmd
);
2336 install_element (ENABLE_NODE
, &show_isis_interface_arg_cmd
);
2338 install_element (ENABLE_NODE
, &show_isis_neighbor_cmd
);
2339 install_element (ENABLE_NODE
, &show_isis_neighbor_detail_cmd
);
2340 install_element (ENABLE_NODE
, &show_isis_neighbor_arg_cmd
);
2341 install_element (ENABLE_NODE
, &clear_isis_neighbor_cmd
);
2342 install_element (ENABLE_NODE
, &clear_isis_neighbor_arg_cmd
);
2344 install_element (ENABLE_NODE
, &show_hostname_cmd
);
2345 install_element (ENABLE_NODE
, &show_database_cmd
);
2346 install_element (ENABLE_NODE
, &show_database_arg_cmd
);
2347 install_element (ENABLE_NODE
, &show_database_arg_detail_cmd
);
2348 install_element (ENABLE_NODE
, &show_database_detail_cmd
);
2349 install_element (ENABLE_NODE
, &show_database_detail_arg_cmd
);
2350 install_element (ENABLE_NODE
, &show_debugging_isis_cmd
);
2352 install_node (&debug_node
, config_write_debug
);
2354 install_element (ENABLE_NODE
, &debug_isis_adj_cmd
);
2355 install_element (ENABLE_NODE
, &no_debug_isis_adj_cmd
);
2356 install_element (ENABLE_NODE
, &debug_isis_csum_cmd
);
2357 install_element (ENABLE_NODE
, &no_debug_isis_csum_cmd
);
2358 install_element (ENABLE_NODE
, &debug_isis_lupd_cmd
);
2359 install_element (ENABLE_NODE
, &no_debug_isis_lupd_cmd
);
2360 install_element (ENABLE_NODE
, &debug_isis_err_cmd
);
2361 install_element (ENABLE_NODE
, &no_debug_isis_err_cmd
);
2362 install_element (ENABLE_NODE
, &debug_isis_snp_cmd
);
2363 install_element (ENABLE_NODE
, &no_debug_isis_snp_cmd
);
2364 install_element (ENABLE_NODE
, &debug_isis_upd_cmd
);
2365 install_element (ENABLE_NODE
, &no_debug_isis_upd_cmd
);
2366 install_element (ENABLE_NODE
, &debug_isis_spfevents_cmd
);
2367 install_element (ENABLE_NODE
, &no_debug_isis_spfevents_cmd
);
2368 install_element (ENABLE_NODE
, &debug_isis_spfstats_cmd
);
2369 install_element (ENABLE_NODE
, &no_debug_isis_spfstats_cmd
);
2370 install_element (ENABLE_NODE
, &debug_isis_spftrigg_cmd
);
2371 install_element (ENABLE_NODE
, &no_debug_isis_spftrigg_cmd
);
2372 install_element (ENABLE_NODE
, &debug_isis_rtevents_cmd
);
2373 install_element (ENABLE_NODE
, &no_debug_isis_rtevents_cmd
);
2374 install_element (ENABLE_NODE
, &debug_isis_events_cmd
);
2375 install_element (ENABLE_NODE
, &no_debug_isis_events_cmd
);
2376 install_element (ENABLE_NODE
, &debug_isis_packet_dump_cmd
);
2377 install_element (ENABLE_NODE
, &no_debug_isis_packet_dump_cmd
);
2378 install_element (ENABLE_NODE
, &debug_isis_lsp_gen_cmd
);
2379 install_element (ENABLE_NODE
, &no_debug_isis_lsp_gen_cmd
);
2380 install_element (ENABLE_NODE
, &debug_isis_lsp_sched_cmd
);
2381 install_element (ENABLE_NODE
, &no_debug_isis_lsp_sched_cmd
);
2383 install_element (CONFIG_NODE
, &debug_isis_adj_cmd
);
2384 install_element (CONFIG_NODE
, &no_debug_isis_adj_cmd
);
2385 install_element (CONFIG_NODE
, &debug_isis_csum_cmd
);
2386 install_element (CONFIG_NODE
, &no_debug_isis_csum_cmd
);
2387 install_element (CONFIG_NODE
, &debug_isis_lupd_cmd
);
2388 install_element (CONFIG_NODE
, &no_debug_isis_lupd_cmd
);
2389 install_element (CONFIG_NODE
, &debug_isis_err_cmd
);
2390 install_element (CONFIG_NODE
, &no_debug_isis_err_cmd
);
2391 install_element (CONFIG_NODE
, &debug_isis_snp_cmd
);
2392 install_element (CONFIG_NODE
, &no_debug_isis_snp_cmd
);
2393 install_element (CONFIG_NODE
, &debug_isis_upd_cmd
);
2394 install_element (CONFIG_NODE
, &no_debug_isis_upd_cmd
);
2395 install_element (CONFIG_NODE
, &debug_isis_spfevents_cmd
);
2396 install_element (CONFIG_NODE
, &no_debug_isis_spfevents_cmd
);
2397 install_element (CONFIG_NODE
, &debug_isis_spfstats_cmd
);
2398 install_element (CONFIG_NODE
, &no_debug_isis_spfstats_cmd
);
2399 install_element (CONFIG_NODE
, &debug_isis_spftrigg_cmd
);
2400 install_element (CONFIG_NODE
, &no_debug_isis_spftrigg_cmd
);
2401 install_element (CONFIG_NODE
, &debug_isis_rtevents_cmd
);
2402 install_element (CONFIG_NODE
, &no_debug_isis_rtevents_cmd
);
2403 install_element (CONFIG_NODE
, &debug_isis_events_cmd
);
2404 install_element (CONFIG_NODE
, &no_debug_isis_events_cmd
);
2405 install_element (CONFIG_NODE
, &debug_isis_packet_dump_cmd
);
2406 install_element (CONFIG_NODE
, &no_debug_isis_packet_dump_cmd
);
2407 install_element (CONFIG_NODE
, &debug_isis_lsp_gen_cmd
);
2408 install_element (CONFIG_NODE
, &no_debug_isis_lsp_gen_cmd
);
2409 install_element (CONFIG_NODE
, &debug_isis_lsp_sched_cmd
);
2410 install_element (CONFIG_NODE
, &no_debug_isis_lsp_sched_cmd
);
2412 install_element (CONFIG_NODE
, &router_isis_cmd
);
2413 install_element (CONFIG_NODE
, &no_router_isis_cmd
);
2415 install_default (ISIS_NODE
);
2417 install_element (ISIS_NODE
, &net_cmd
);
2418 install_element (ISIS_NODE
, &no_net_cmd
);
2420 install_element (ISIS_NODE
, &log_adj_changes_cmd
);
2421 install_element (ISIS_NODE
, &no_log_adj_changes_cmd
);
2423 #ifdef TOPOLOGY_GENERATE
2424 install_element (ISIS_NODE
, &topology_generate_grid_cmd
);
2425 install_element (ISIS_NODE
, &topology_baseis_cmd
);
2426 install_element (ISIS_NODE
, &topology_basedynh_cmd
);
2427 install_element (ISIS_NODE
, &no_topology_baseis_cmd
);
2428 install_element (VIEW_NODE
, &show_isis_generated_topology_cmd
);
2429 install_element (ENABLE_NODE
, &show_isis_generated_topology_cmd
);
2430 #endif /* TOPOLOGY_GENERATE */