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 "spf_backoff.h"
40 #include "isisd/dict.h"
41 #include "isisd/isis_constants.h"
42 #include "isisd/isis_common.h"
43 #include "isisd/isis_flags.h"
44 #include "isisd/isis_circuit.h"
45 #include "isisd/isis_csm.h"
46 #include "isisd/isisd.h"
47 #include "isisd/isis_dynhn.h"
48 #include "isisd/isis_adjacency.h"
49 #include "isisd/isis_pdu.h"
50 #include "isisd/isis_misc.h"
51 #include "isisd/isis_constants.h"
52 #include "isisd/isis_tlv.h"
53 #include "isisd/isis_lsp.h"
54 #include "isisd/isis_spf.h"
55 #include "isisd/isis_route.h"
56 #include "isisd/isis_zebra.h"
57 #include "isisd/isis_events.h"
58 #include "isisd/isis_te.h"
59 #include "isisd/isis_mt.h"
61 struct isis
*isis
= NULL
;
63 DEFINE_QOBJ_TYPE(isis
)
64 DEFINE_QOBJ_TYPE(isis_area
)
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 ();
94 isis
->nexthops6
= list_new ();
97 * uncomment the next line for full debugs
99 /* isis->debugs = 0xFFFF; */
100 isisMplsTE
.status
= disable
; /* Only support TE metric */
101 QOBJ_REG (isis
, isis
);
105 isis_area_create (const char *area_tag
)
107 struct isis_area
*area
;
109 area
= XCALLOC (MTYPE_ISIS_AREA
, sizeof (struct isis_area
));
112 * The first instance is level-1-2 rest are level-1, unless otherwise
115 if (listcount (isis
->area_list
) > 0)
116 area
->is_type
= IS_LEVEL_1
;
118 area
->is_type
= IS_LEVEL_1_AND_2
;
121 * intialize the databases
123 if (area
->is_type
& IS_LEVEL_1
)
125 area
->lspdb
[0] = lsp_db_init ();
126 area
->route_table
[0] = route_table_init ();
127 area
->route_table6
[0] = route_table_init ();
129 if (area
->is_type
& IS_LEVEL_2
)
131 area
->lspdb
[1] = lsp_db_init ();
132 area
->route_table
[1] = route_table_init ();
133 area
->route_table6
[1] = route_table_init ();
136 spftree_area_init (area
);
138 area
->circuit_list
= list_new ();
139 area
->area_addrs
= list_new ();
140 thread_add_timer(master
, lsp_tick
, area
, 1, &area
->t_tick
);
141 flags_initialize (&area
->flags
);
146 area
->max_lsp_lifetime
[0] = DEFAULT_LSP_LIFETIME
; /* 1200 */
147 area
->max_lsp_lifetime
[1] = DEFAULT_LSP_LIFETIME
; /* 1200 */
148 area
->lsp_refresh
[0] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
149 area
->lsp_refresh
[1] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
150 area
->lsp_gen_interval
[0] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
151 area
->lsp_gen_interval
[1] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
152 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
153 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
154 area
->dynhostname
= 1;
157 area
->lsp_frag_threshold
= 90;
158 area
->lsp_mtu
= DEFAULT_LSP_MTU
;
162 area
->area_tag
= strdup (area_tag
);
163 listnode_add (isis
->area_list
, area
);
166 QOBJ_REG (area
, isis_area
);
172 isis_area_lookup (const char *area_tag
)
174 struct isis_area
*area
;
175 struct listnode
*node
;
177 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
178 if ((area
->area_tag
== NULL
&& area_tag
== NULL
) ||
179 (area
->area_tag
&& area_tag
180 && strcmp (area
->area_tag
, area_tag
) == 0))
187 isis_area_get (struct vty
*vty
, const char *area_tag
)
189 struct isis_area
*area
;
191 area
= isis_area_lookup (area_tag
);
195 VTY_PUSH_CONTEXT (ISIS_NODE
, area
);
199 area
= isis_area_create (area_tag
);
201 if (isis
->debugs
& DEBUG_EVENTS
)
202 zlog_debug ("New IS-IS area instance %s", area
->area_tag
);
204 VTY_PUSH_CONTEXT (ISIS_NODE
, area
);
210 isis_area_destroy (struct vty
*vty
, const char *area_tag
)
212 struct isis_area
*area
;
213 struct listnode
*node
, *nnode
;
214 struct isis_circuit
*circuit
;
215 struct area_addr
*addr
;
217 area
= isis_area_lookup (area_tag
);
221 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
222 return CMD_ERR_NO_MATCH
;
227 if (area
->circuit_list
)
229 for (ALL_LIST_ELEMENTS (area
->circuit_list
, node
, nnode
, circuit
))
231 circuit
->ip_router
= 0;
232 circuit
->ipv6_router
= 0;
233 isis_csm_state_change (ISIS_DISABLE
, circuit
, area
);
235 list_delete (area
->circuit_list
);
236 area
->circuit_list
= NULL
;
239 if (area
->lspdb
[0] != NULL
)
241 lsp_db_destroy (area
->lspdb
[0]);
242 area
->lspdb
[0] = NULL
;
244 if (area
->lspdb
[1] != NULL
)
246 lsp_db_destroy (area
->lspdb
[1]);
247 area
->lspdb
[1] = NULL
;
250 spftree_area_del (area
);
252 THREAD_TIMER_OFF(area
->spf_timer
[0]);
253 THREAD_TIMER_OFF(area
->spf_timer
[1]);
255 spf_backoff_free(area
->spf_delay_ietf
[0]);
256 spf_backoff_free(area
->spf_delay_ietf
[1]);
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
;
272 if (area
->route_table6
[0])
274 route_table_finish (area
->route_table6
[0]);
275 area
->route_table6
[0] = NULL
;
277 if (area
->route_table6
[1])
279 route_table_finish (area
->route_table6
[1]);
280 area
->route_table6
[1] = NULL
;
283 isis_redist_area_finish(area
);
285 for (ALL_LIST_ELEMENTS (area
->area_addrs
, node
, nnode
, addr
))
287 list_delete_node (area
->area_addrs
, node
);
288 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
290 area
->area_addrs
= NULL
;
292 THREAD_TIMER_OFF (area
->t_tick
);
293 THREAD_TIMER_OFF (area
->t_lsp_refresh
[0]);
294 THREAD_TIMER_OFF (area
->t_lsp_refresh
[1]);
296 thread_cancel_event (master
, area
);
298 listnode_delete (isis
->area_list
, area
);
300 free (area
->area_tag
);
302 area_mt_finish(area
);
304 XFREE (MTYPE_ISIS_AREA
, area
);
306 if (listcount (isis
->area_list
) == 0)
308 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
316 area_set_mt_enabled(struct isis_area
*area
, uint16_t mtid
, bool enabled
)
318 struct isis_area_mt_setting
*setting
;
320 setting
= area_get_mt_setting(area
, mtid
);
321 if (setting
->enabled
!= enabled
)
323 setting
->enabled
= enabled
;
324 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
329 area_set_mt_overload(struct isis_area
*area
, uint16_t mtid
, bool overload
)
331 struct isis_area_mt_setting
*setting
;
333 setting
= area_get_mt_setting(area
, mtid
);
334 if (setting
->overload
!= overload
)
336 setting
->overload
= overload
;
337 if (setting
->enabled
)
338 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
343 area_net_title (struct vty
*vty
, const char *net_title
)
345 VTY_DECLVAR_CONTEXT (isis_area
, area
);
346 struct area_addr
*addr
;
347 struct area_addr
*addrp
;
348 struct listnode
*node
;
352 /* We check that we are not over the maximal number of addresses */
353 if (listcount (area
->area_addrs
) >= isis
->max_area_addrs
)
355 vty_out (vty
, "Maximum of area addresses (%d) already reached %s",
356 isis
->max_area_addrs
, VTY_NEWLINE
);
357 return CMD_ERR_NOTHING_TODO
;
360 addr
= XMALLOC (MTYPE_ISIS_AREA_ADDR
, sizeof (struct area_addr
));
361 addr
->addr_len
= dotformat2buff (buff
, net_title
);
362 memcpy (addr
->area_addr
, buff
, addr
->addr_len
);
364 zlog_debug ("added area address %s for area %s (address length %d)",
365 net_title
, area
->area_tag
, addr
->addr_len
);
366 #endif /* EXTREME_DEBUG */
367 if (addr
->addr_len
< 8 || addr
->addr_len
> 20)
369 vty_out (vty
, "area address must be at least 8..20 octets long (%d)%s",
370 addr
->addr_len
, VTY_NEWLINE
);
371 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
372 return CMD_ERR_AMBIGUOUS
;
375 if (addr
->area_addr
[addr
->addr_len
-1] != 0)
377 vty_out (vty
, "nsel byte (last byte) in area address must be 0%s",
379 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
380 return CMD_ERR_AMBIGUOUS
;
383 if (isis
->sysid_set
== 0)
386 * First area address - get the SystemID for this router
388 memcpy (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
);
390 if (isis
->debugs
& DEBUG_EVENTS
)
391 zlog_debug ("Router has SystemID %s", sysid_print (isis
->sysid
));
396 * Check that the SystemID portions match
398 if (memcmp (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
))
401 "System ID must not change when defining additional area"
402 " addresses%s", VTY_NEWLINE
);
403 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
404 return CMD_ERR_AMBIGUOUS
;
407 /* now we see that we don't already have this address */
408 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
410 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
) != (addr
->addr_len
))
412 if (!memcmp (addrp
->area_addr
, addr
->area_addr
, addr
->addr_len
))
414 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
415 return CMD_SUCCESS
; /* silent fail */
421 * Forget the systemID part of the address
423 addr
->addr_len
-= (ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
);
424 listnode_add (area
->area_addrs
, addr
);
426 /* only now we can safely generate our LSPs for this area */
427 if (listcount (area
->area_addrs
) > 0)
429 if (area
->is_type
& IS_LEVEL_1
)
430 lsp_generate (area
, IS_LEVEL_1
);
431 if (area
->is_type
& IS_LEVEL_2
)
432 lsp_generate (area
, IS_LEVEL_2
);
439 area_clear_net_title (struct vty
*vty
, const char *net_title
)
441 VTY_DECLVAR_CONTEXT (isis_area
, area
);
442 struct area_addr addr
, *addrp
= NULL
;
443 struct listnode
*node
;
446 addr
.addr_len
= dotformat2buff (buff
, net_title
);
447 if (addr
.addr_len
< 8 || addr
.addr_len
> 20)
449 vty_out (vty
, "Unsupported area address length %d, should be 8...20 %s",
450 addr
.addr_len
, VTY_NEWLINE
);
451 return CMD_ERR_AMBIGUOUS
;
454 memcpy (addr
.area_addr
, buff
, (int) addr
.addr_len
);
456 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
457 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ 1) == addr
.addr_len
&&
458 !memcmp (addrp
->area_addr
, addr
.area_addr
, addr
.addr_len
))
463 vty_out (vty
, "No area address %s for area %s %s", net_title
,
464 area
->area_tag
, VTY_NEWLINE
);
465 return CMD_ERR_NO_MATCH
;
468 listnode_delete (area
->area_addrs
, addrp
);
469 XFREE (MTYPE_ISIS_AREA_ADDR
, addrp
);
472 * Last area address - reset the SystemID for this router
474 if (listcount (area
->area_addrs
) == 0)
476 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
478 if (isis
->debugs
& DEBUG_EVENTS
)
479 zlog_debug ("Router has no SystemID");
486 * 'show isis interface' command
490 show_isis_interface_common (struct vty
*vty
, const char *ifname
, char detail
)
492 struct listnode
*anode
, *cnode
;
493 struct isis_area
*area
;
494 struct isis_circuit
*circuit
;
498 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
502 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
504 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
506 if (detail
== ISIS_UI_LEVEL_BRIEF
)
507 vty_out (vty
, " Interface CircId State Type Level%s",
510 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
512 isis_circuit_print_vty (circuit
, vty
, detail
);
513 else if (strcmp(circuit
->interface
->name
, ifname
) == 0)
514 isis_circuit_print_vty (circuit
, vty
, detail
);
520 DEFUN (show_isis_interface
,
521 show_isis_interface_cmd
,
522 "show isis interface",
524 "ISIS network information\n"
527 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
530 DEFUN (show_isis_interface_detail
,
531 show_isis_interface_detail_cmd
,
532 "show isis interface detail",
534 "ISIS network information\n"
536 "show detailed information\n")
538 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
541 DEFUN (show_isis_interface_arg
,
542 show_isis_interface_arg_cmd
,
543 "show isis interface WORD",
545 "ISIS network information\n"
547 "ISIS interface name\n")
550 return show_isis_interface_common (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
554 * 'show isis neighbor' command
558 show_isis_neighbor_common (struct vty
*vty
, const char *id
, char detail
)
560 struct listnode
*anode
, *cnode
, *node
;
561 struct isis_area
*area
;
562 struct isis_circuit
*circuit
;
564 struct isis_adjacency
*adj
;
565 struct isis_dynhn
*dynhn
;
566 u_char sysid
[ISIS_SYS_ID_LEN
];
571 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
575 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
578 if (sysid2buff (sysid
, id
) == 0)
580 dynhn
= dynhn_find_by_name (id
);
583 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
586 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
590 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
592 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
594 if (detail
== ISIS_UI_LEVEL_BRIEF
)
595 vty_out (vty
, " System Id Interface L State"
596 " Holdtime SNPA%s", VTY_NEWLINE
);
598 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
600 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
602 for (i
= 0; i
< 2; i
++)
604 adjdb
= circuit
->u
.bc
.adjdb
[i
];
605 if (adjdb
&& adjdb
->count
)
607 for (ALL_LIST_ELEMENTS_RO (adjdb
, node
, adj
))
608 if (!id
|| !memcmp (adj
->sysid
, sysid
,
610 isis_adj_print_vty (adj
, vty
, detail
);
614 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
615 circuit
->u
.p2p
.neighbor
)
617 adj
= circuit
->u
.p2p
.neighbor
;
618 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
619 isis_adj_print_vty (adj
, vty
, detail
);
628 * 'clear isis neighbor' command
631 clear_isis_neighbor_common (struct vty
*vty
, const char *id
)
633 struct listnode
*anode
, *cnode
, *cnextnode
, *node
, *nnode
;
634 struct isis_area
*area
;
635 struct isis_circuit
*circuit
;
637 struct isis_adjacency
*adj
;
638 struct isis_dynhn
*dynhn
;
639 u_char sysid
[ISIS_SYS_ID_LEN
];
644 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
648 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
651 if (sysid2buff (sysid
, id
) == 0)
653 dynhn
= dynhn_find_by_name (id
);
656 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
659 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
663 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
665 for (ALL_LIST_ELEMENTS (area
->circuit_list
, cnode
, cnextnode
, circuit
))
667 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
669 for (i
= 0; i
< 2; i
++)
671 adjdb
= circuit
->u
.bc
.adjdb
[i
];
672 if (adjdb
&& adjdb
->count
)
674 for (ALL_LIST_ELEMENTS (adjdb
, node
, nnode
, adj
))
675 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
676 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
677 "clear user request");
681 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
682 circuit
->u
.p2p
.neighbor
)
684 adj
= circuit
->u
.p2p
.neighbor
;
685 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
686 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
687 "clear user request");
695 DEFUN (show_isis_neighbor
,
696 show_isis_neighbor_cmd
,
697 "show isis neighbor",
699 "ISIS network information\n"
700 "ISIS neighbor adjacencies\n")
702 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
705 DEFUN (show_isis_neighbor_detail
,
706 show_isis_neighbor_detail_cmd
,
707 "show isis neighbor detail",
709 "ISIS network information\n"
710 "ISIS neighbor adjacencies\n"
711 "show detailed information\n")
713 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
716 DEFUN (show_isis_neighbor_arg
,
717 show_isis_neighbor_arg_cmd
,
718 "show isis neighbor WORD",
720 "ISIS network information\n"
721 "ISIS neighbor adjacencies\n"
725 return show_isis_neighbor_common (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
728 DEFUN (clear_isis_neighbor
,
729 clear_isis_neighbor_cmd
,
730 "clear isis neighbor",
732 "Reset ISIS network information\n"
733 "Reset ISIS neighbor adjacencies\n")
735 return clear_isis_neighbor_common (vty
, NULL
);
738 DEFUN (clear_isis_neighbor_arg
,
739 clear_isis_neighbor_arg_cmd
,
740 "clear isis neighbor WORD",
742 "ISIS network information\n"
743 "ISIS neighbor adjacencies\n"
747 return clear_isis_neighbor_common (vty
, argv
[idx_word
]->arg
);
751 * 'isis debug', 'show debugging'
754 print_debug (struct vty
*vty
, int flags
, int onoff
)
758 strcpy (onoffs
, "on");
760 strcpy (onoffs
, "off");
762 if (flags
& DEBUG_ADJ_PACKETS
)
763 vty_out (vty
, "IS-IS Adjacency related packets debugging is %s%s", onoffs
,
765 if (flags
& DEBUG_CHECKSUM_ERRORS
)
766 vty_out (vty
, "IS-IS checksum errors debugging is %s%s", onoffs
,
768 if (flags
& DEBUG_LOCAL_UPDATES
)
769 vty_out (vty
, "IS-IS local updates debugging is %s%s", onoffs
,
771 if (flags
& DEBUG_PROTOCOL_ERRORS
)
772 vty_out (vty
, "IS-IS protocol errors debugging is %s%s", onoffs
,
774 if (flags
& DEBUG_SNP_PACKETS
)
775 vty_out (vty
, "IS-IS CSNP/PSNP packets debugging is %s%s", onoffs
,
777 if (flags
& DEBUG_SPF_EVENTS
)
778 vty_out (vty
, "IS-IS SPF events debugging is %s%s", onoffs
, VTY_NEWLINE
);
779 if (flags
& DEBUG_SPF_STATS
)
780 vty_out (vty
, "IS-IS SPF Timing and Statistics Data debugging is %s%s",
781 onoffs
, VTY_NEWLINE
);
782 if (flags
& DEBUG_SPF_TRIGGERS
)
783 vty_out (vty
, "IS-IS SPF triggering events debugging is %s%s", onoffs
,
785 if (flags
& DEBUG_UPDATE_PACKETS
)
786 vty_out (vty
, "IS-IS Update related packet debugging is %s%s", onoffs
,
788 if (flags
& DEBUG_RTE_EVENTS
)
789 vty_out (vty
, "IS-IS Route related debuggin is %s%s", onoffs
,
791 if (flags
& DEBUG_EVENTS
)
792 vty_out (vty
, "IS-IS Event debugging is %s%s", onoffs
, VTY_NEWLINE
);
793 if (flags
& DEBUG_PACKET_DUMP
)
794 vty_out (vty
, "IS-IS Packet dump debugging is %s%s", onoffs
, VTY_NEWLINE
);
795 if (flags
& DEBUG_LSP_GEN
)
796 vty_out (vty
, "IS-IS LSP generation debugging is %s%s", onoffs
, VTY_NEWLINE
);
797 if (flags
& DEBUG_LSP_SCHED
)
798 vty_out (vty
, "IS-IS LSP scheduling debugging is %s%s", onoffs
, VTY_NEWLINE
);
801 DEFUN (show_debugging
,
802 show_debugging_isis_cmd
,
803 "show debugging isis",
805 "State of each debugging option\n"
809 vty_out (vty
, "IS-IS:%s", VTY_NEWLINE
);
810 print_debug (vty
, isis
->debugs
, 1);
816 static struct cmd_node debug_node
= {
823 config_write_debug (struct vty
*vty
)
826 int flags
= isis
->debugs
;
828 if (flags
& DEBUG_ADJ_PACKETS
)
830 vty_out (vty
, "debug isis adj-packets%s", VTY_NEWLINE
);
833 if (flags
& DEBUG_CHECKSUM_ERRORS
)
835 vty_out (vty
, "debug isis checksum-errors%s", VTY_NEWLINE
);
838 if (flags
& DEBUG_LOCAL_UPDATES
)
840 vty_out (vty
, "debug isis local-updates%s", VTY_NEWLINE
);
843 if (flags
& DEBUG_PROTOCOL_ERRORS
)
845 vty_out (vty
, "debug isis protocol-errors%s", VTY_NEWLINE
);
848 if (flags
& DEBUG_SNP_PACKETS
)
850 vty_out (vty
, "debug isis snp-packets%s", VTY_NEWLINE
);
853 if (flags
& DEBUG_SPF_EVENTS
)
855 vty_out (vty
, "debug isis spf-events%s", VTY_NEWLINE
);
858 if (flags
& DEBUG_SPF_STATS
)
860 vty_out (vty
, "debug isis spf-statistics%s", VTY_NEWLINE
);
863 if (flags
& DEBUG_SPF_TRIGGERS
)
865 vty_out (vty
, "debug isis spf-triggers%s", VTY_NEWLINE
);
868 if (flags
& DEBUG_UPDATE_PACKETS
)
870 vty_out (vty
, "debug isis update-packets%s", VTY_NEWLINE
);
873 if (flags
& DEBUG_RTE_EVENTS
)
875 vty_out (vty
, "debug isis route-events%s", VTY_NEWLINE
);
878 if (flags
& DEBUG_EVENTS
)
880 vty_out (vty
, "debug isis events%s", VTY_NEWLINE
);
883 if (flags
& DEBUG_PACKET_DUMP
)
885 vty_out (vty
, "debug isis packet-dump%s", VTY_NEWLINE
);
888 if (flags
& DEBUG_LSP_GEN
)
890 vty_out (vty
, "debug isis lsp-gen%s", VTY_NEWLINE
);
893 if (flags
& DEBUG_LSP_SCHED
)
895 vty_out (vty
, "debug isis lsp-sched%s", VTY_NEWLINE
);
898 write
+= spf_backoff_write_config(vty
);
903 DEFUN (debug_isis_adj
,
905 "debug isis adj-packets",
907 "IS-IS information\n"
908 "IS-IS Adjacency related packets\n")
910 isis
->debugs
|= DEBUG_ADJ_PACKETS
;
911 print_debug (vty
, DEBUG_ADJ_PACKETS
, 1);
916 DEFUN (no_debug_isis_adj
,
917 no_debug_isis_adj_cmd
,
918 "no debug isis adj-packets",
921 "IS-IS information\n"
922 "IS-IS Adjacency related packets\n")
924 isis
->debugs
&= ~DEBUG_ADJ_PACKETS
;
925 print_debug (vty
, DEBUG_ADJ_PACKETS
, 0);
930 DEFUN (debug_isis_csum
,
932 "debug isis checksum-errors",
934 "IS-IS information\n"
935 "IS-IS LSP checksum errors\n")
937 isis
->debugs
|= DEBUG_CHECKSUM_ERRORS
;
938 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 1);
943 DEFUN (no_debug_isis_csum
,
944 no_debug_isis_csum_cmd
,
945 "no debug isis checksum-errors",
948 "IS-IS information\n"
949 "IS-IS LSP checksum errors\n")
951 isis
->debugs
&= ~DEBUG_CHECKSUM_ERRORS
;
952 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 0);
957 DEFUN (debug_isis_lupd
,
959 "debug isis local-updates",
961 "IS-IS information\n"
962 "IS-IS local update packets\n")
964 isis
->debugs
|= DEBUG_LOCAL_UPDATES
;
965 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 1);
970 DEFUN (no_debug_isis_lupd
,
971 no_debug_isis_lupd_cmd
,
972 "no debug isis local-updates",
975 "IS-IS information\n"
976 "IS-IS local update packets\n")
978 isis
->debugs
&= ~DEBUG_LOCAL_UPDATES
;
979 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 0);
984 DEFUN (debug_isis_err
,
986 "debug isis protocol-errors",
988 "IS-IS information\n"
989 "IS-IS LSP protocol errors\n")
991 isis
->debugs
|= DEBUG_PROTOCOL_ERRORS
;
992 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 1);
997 DEFUN (no_debug_isis_err
,
998 no_debug_isis_err_cmd
,
999 "no debug isis protocol-errors",
1002 "IS-IS information\n"
1003 "IS-IS LSP protocol errors\n")
1005 isis
->debugs
&= ~DEBUG_PROTOCOL_ERRORS
;
1006 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 0);
1011 DEFUN (debug_isis_snp
,
1013 "debug isis snp-packets",
1015 "IS-IS information\n"
1016 "IS-IS CSNP/PSNP packets\n")
1018 isis
->debugs
|= DEBUG_SNP_PACKETS
;
1019 print_debug (vty
, DEBUG_SNP_PACKETS
, 1);
1024 DEFUN (no_debug_isis_snp
,
1025 no_debug_isis_snp_cmd
,
1026 "no debug isis snp-packets",
1029 "IS-IS information\n"
1030 "IS-IS CSNP/PSNP packets\n")
1032 isis
->debugs
&= ~DEBUG_SNP_PACKETS
;
1033 print_debug (vty
, DEBUG_SNP_PACKETS
, 0);
1038 DEFUN (debug_isis_upd
,
1040 "debug isis update-packets",
1042 "IS-IS information\n"
1043 "IS-IS Update related packets\n")
1045 isis
->debugs
|= DEBUG_UPDATE_PACKETS
;
1046 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 1);
1051 DEFUN (no_debug_isis_upd
,
1052 no_debug_isis_upd_cmd
,
1053 "no debug isis update-packets",
1056 "IS-IS information\n"
1057 "IS-IS Update related packets\n")
1059 isis
->debugs
&= ~DEBUG_UPDATE_PACKETS
;
1060 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 0);
1065 DEFUN (debug_isis_spfevents
,
1066 debug_isis_spfevents_cmd
,
1067 "debug isis spf-events",
1069 "IS-IS information\n"
1070 "IS-IS Shortest Path First Events\n")
1072 isis
->debugs
|= DEBUG_SPF_EVENTS
;
1073 print_debug (vty
, DEBUG_SPF_EVENTS
, 1);
1078 DEFUN (no_debug_isis_spfevents
,
1079 no_debug_isis_spfevents_cmd
,
1080 "no debug isis spf-events",
1083 "IS-IS information\n"
1084 "IS-IS Shortest Path First Events\n")
1086 isis
->debugs
&= ~DEBUG_SPF_EVENTS
;
1087 print_debug (vty
, DEBUG_SPF_EVENTS
, 0);
1092 DEFUN (debug_isis_spfstats
,
1093 debug_isis_spfstats_cmd
,
1094 "debug isis spf-statistics ",
1096 "IS-IS information\n"
1097 "IS-IS SPF Timing and Statistic Data\n")
1099 isis
->debugs
|= DEBUG_SPF_STATS
;
1100 print_debug (vty
, DEBUG_SPF_STATS
, 1);
1105 DEFUN (no_debug_isis_spfstats
,
1106 no_debug_isis_spfstats_cmd
,
1107 "no debug isis spf-statistics",
1110 "IS-IS information\n"
1111 "IS-IS SPF Timing and Statistic Data\n")
1113 isis
->debugs
&= ~DEBUG_SPF_STATS
;
1114 print_debug (vty
, DEBUG_SPF_STATS
, 0);
1119 DEFUN (debug_isis_spftrigg
,
1120 debug_isis_spftrigg_cmd
,
1121 "debug isis spf-triggers",
1123 "IS-IS information\n"
1124 "IS-IS SPF triggering events\n")
1126 isis
->debugs
|= DEBUG_SPF_TRIGGERS
;
1127 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 1);
1132 DEFUN (no_debug_isis_spftrigg
,
1133 no_debug_isis_spftrigg_cmd
,
1134 "no debug isis spf-triggers",
1137 "IS-IS information\n"
1138 "IS-IS SPF triggering events\n")
1140 isis
->debugs
&= ~DEBUG_SPF_TRIGGERS
;
1141 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 0);
1146 DEFUN (debug_isis_rtevents
,
1147 debug_isis_rtevents_cmd
,
1148 "debug isis route-events",
1150 "IS-IS information\n"
1151 "IS-IS Route related events\n")
1153 isis
->debugs
|= DEBUG_RTE_EVENTS
;
1154 print_debug (vty
, DEBUG_RTE_EVENTS
, 1);
1159 DEFUN (no_debug_isis_rtevents
,
1160 no_debug_isis_rtevents_cmd
,
1161 "no debug isis route-events",
1164 "IS-IS information\n"
1165 "IS-IS Route related events\n")
1167 isis
->debugs
&= ~DEBUG_RTE_EVENTS
;
1168 print_debug (vty
, DEBUG_RTE_EVENTS
, 0);
1173 DEFUN (debug_isis_events
,
1174 debug_isis_events_cmd
,
1175 "debug isis events",
1177 "IS-IS information\n"
1180 isis
->debugs
|= DEBUG_EVENTS
;
1181 print_debug (vty
, DEBUG_EVENTS
, 1);
1186 DEFUN (no_debug_isis_events
,
1187 no_debug_isis_events_cmd
,
1188 "no debug isis events",
1191 "IS-IS information\n"
1194 isis
->debugs
&= ~DEBUG_EVENTS
;
1195 print_debug (vty
, DEBUG_EVENTS
, 0);
1200 DEFUN (debug_isis_packet_dump
,
1201 debug_isis_packet_dump_cmd
,
1202 "debug isis packet-dump",
1204 "IS-IS information\n"
1205 "IS-IS packet dump\n")
1207 isis
->debugs
|= DEBUG_PACKET_DUMP
;
1208 print_debug (vty
, DEBUG_PACKET_DUMP
, 1);
1213 DEFUN (no_debug_isis_packet_dump
,
1214 no_debug_isis_packet_dump_cmd
,
1215 "no debug isis packet-dump",
1218 "IS-IS information\n"
1219 "IS-IS packet dump\n")
1221 isis
->debugs
&= ~DEBUG_PACKET_DUMP
;
1222 print_debug (vty
, DEBUG_PACKET_DUMP
, 0);
1227 DEFUN (debug_isis_lsp_gen
,
1228 debug_isis_lsp_gen_cmd
,
1229 "debug isis lsp-gen",
1231 "IS-IS information\n"
1232 "IS-IS generation of own LSPs\n")
1234 isis
->debugs
|= DEBUG_LSP_GEN
;
1235 print_debug (vty
, DEBUG_LSP_GEN
, 1);
1240 DEFUN (no_debug_isis_lsp_gen
,
1241 no_debug_isis_lsp_gen_cmd
,
1242 "no debug isis lsp-gen",
1245 "IS-IS information\n"
1246 "IS-IS generation of own LSPs\n")
1248 isis
->debugs
&= ~DEBUG_LSP_GEN
;
1249 print_debug (vty
, DEBUG_LSP_GEN
, 0);
1254 DEFUN (debug_isis_lsp_sched
,
1255 debug_isis_lsp_sched_cmd
,
1256 "debug isis lsp-sched",
1258 "IS-IS information\n"
1259 "IS-IS scheduling of LSP generation\n")
1261 isis
->debugs
|= DEBUG_LSP_SCHED
;
1262 print_debug (vty
, DEBUG_LSP_SCHED
, 1);
1267 DEFUN (no_debug_isis_lsp_sched
,
1268 no_debug_isis_lsp_sched_cmd
,
1269 "no debug isis lsp-sched",
1272 "IS-IS information\n"
1273 "IS-IS scheduling of LSP generation\n")
1275 isis
->debugs
&= ~DEBUG_LSP_SCHED
;
1276 print_debug (vty
, DEBUG_LSP_SCHED
, 0);
1281 DEFUN (show_hostname
,
1283 "show isis hostname",
1285 "IS-IS information\n"
1286 "IS-IS Dynamic hostname mapping\n")
1288 dynhn_print_all (vty
);
1294 vty_out_timestr(struct vty
*vty
, time_t uptime
)
1297 time_t difftime
= time (NULL
);
1299 tm
= gmtime (&difftime
);
1301 #define ONE_DAY_SECOND 60*60*24
1302 #define ONE_WEEK_SECOND 60*60*24*7
1303 if (difftime
< ONE_DAY_SECOND
)
1304 vty_out (vty
, "%02d:%02d:%02d",
1305 tm
->tm_hour
, tm
->tm_min
, tm
->tm_sec
);
1306 else if (difftime
< ONE_WEEK_SECOND
)
1307 vty_out (vty
, "%dd%02dh%02dm",
1308 tm
->tm_yday
, tm
->tm_hour
, tm
->tm_min
);
1310 vty_out (vty
, "%02dw%dd%02dh",
1312 tm
->tm_yday
- ((tm
->tm_yday
/7) * 7), tm
->tm_hour
);
1313 vty_out (vty
, " ago");
1316 DEFUN (show_isis_spf_ietf
,
1317 show_isis_spf_ietf_cmd
,
1318 "show isis spf-delay-ietf",
1320 "IS-IS information\n"
1321 "IS-IS SPF delay IETF information\n")
1325 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1329 struct listnode
*node
;
1330 struct isis_area
*area
;
1332 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1334 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1337 for (int level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1339 if ((area
->is_type
& level
) == 0)
1342 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1343 vty_out (vty
, " SPF delay status: ");
1344 if (area
->spf_timer
[level
-1])
1346 struct timeval remain
= thread_timer_remain(area
->spf_timer
[level
- 1]);
1347 vty_out(vty
, "Pending, due in %ld msec%s",
1348 remain
.tv_sec
* 1000 + remain
.tv_usec
/ 1000,
1353 vty_out(vty
, "Not scheduled%s", VTY_NEWLINE
);
1356 if (area
->spf_delay_ietf
[level
- 1]) {
1357 vty_out(vty
, " Using draft-ietf-rtgwg-backoff-algo-04%s", VTY_NEWLINE
);
1358 spf_backoff_show(area
->spf_delay_ietf
[level
- 1], vty
, " ");
1360 vty_out(vty
, " Using legacy backoff algo%s", VTY_NEWLINE
);
1367 DEFUN (show_isis_summary
,
1368 show_isis_summary_cmd
,
1369 "show isis summary",
1370 SHOW_STR
"IS-IS information\n" "IS-IS summary\n")
1372 struct listnode
*node
, *node2
;
1373 struct isis_area
*area
;
1374 struct isis_spftree
*spftree
;
1379 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1383 vty_out (vty
, "Process Id : %ld%s", isis
->process_id
,
1385 if (isis
->sysid_set
)
1386 vty_out (vty
, "System Id : %s%s", sysid_print (isis
->sysid
),
1389 vty_out (vty
, "Up time : ");
1390 vty_out_timestr(vty
, isis
->uptime
);
1391 vty_out (vty
, "%s", VTY_NEWLINE
);
1393 if (isis
->area_list
)
1394 vty_out (vty
, "Number of areas : %d%s", isis
->area_list
->count
,
1397 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1399 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1402 if (listcount (area
->area_addrs
) > 0)
1404 struct area_addr
*area_addr
;
1405 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
1407 vty_out (vty
, " Net: %s%s",
1408 isonet_print (area_addr
->area_addr
,
1409 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
1414 for (level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1416 if ((area
->is_type
& level
) == 0)
1419 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1420 spftree
= area
->spftree
[level
- 1];
1421 if (area
->spf_timer
[level
- 1])
1422 vty_out (vty
, " SPF: (pending)%s", VTY_NEWLINE
);
1424 vty_out (vty
, " SPF:%s", VTY_NEWLINE
);
1426 vty_out (vty
, " minimum interval : %d",
1427 area
->min_spf_interval
[level
- 1]);
1428 if (area
->spf_delay_ietf
[level
- 1])
1429 vty_out (vty
, " (not used, IETF SPF delay activated)");
1430 vty_out (vty
, VTY_NEWLINE
);
1432 vty_out (vty
, " IPv4 route computation:%s", VTY_NEWLINE
);
1433 vty_out (vty
, " last run elapsed : ");
1434 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1435 vty_out (vty
, "%s", VTY_NEWLINE
);
1437 vty_out (vty
, " last run duration : %u usec%s",
1438 (u_int32_t
)spftree
->last_run_duration
, VTY_NEWLINE
);
1440 vty_out (vty
, " run count : %d%s",
1441 spftree
->runcount
, VTY_NEWLINE
);
1443 spftree
= area
->spftree6
[level
- 1];
1444 vty_out (vty
, " IPv6 route computation:%s", VTY_NEWLINE
);
1446 vty_out (vty
, " last run elapsed : ");
1447 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1448 vty_out (vty
, "%s", VTY_NEWLINE
);
1450 vty_out (vty
, " last run duration : %llu msec%s",
1451 (unsigned long long)spftree
->last_run_duration
, VTY_NEWLINE
);
1453 vty_out (vty
, " run count : %d%s",
1454 spftree
->runcount
, VTY_NEWLINE
);
1457 vty_out (vty
, "%s", VTY_NEWLINE
);
1463 * This function supports following display options:
1464 * [ show isis database [detail] ]
1465 * [ show isis database <sysid> [detail] ]
1466 * [ show isis database <hostname> [detail] ]
1467 * [ show isis database <sysid>.<pseudo-id> [detail] ]
1468 * [ show isis database <hostname>.<pseudo-id> [detail] ]
1469 * [ show isis database <sysid>.<pseudo-id>-<fragment-number> [detail] ]
1470 * [ show isis database <hostname>.<pseudo-id>-<fragment-number> [detail] ]
1471 * [ show isis database detail <sysid> ]
1472 * [ show isis database detail <hostname> ]
1473 * [ show isis database detail <sysid>.<pseudo-id> ]
1474 * [ show isis database detail <hostname>.<pseudo-id> ]
1475 * [ show isis database detail <sysid>.<pseudo-id>-<fragment-number> ]
1476 * [ show isis database detail <hostname>.<pseudo-id>-<fragment-number> ]
1479 show_isis_database (struct vty
*vty
, const char *argv
, int ui_level
)
1481 struct listnode
*node
;
1482 struct isis_area
*area
;
1483 struct isis_lsp
*lsp
;
1484 struct isis_dynhn
*dynhn
;
1485 const char *pos
= argv
;
1486 u_char lspid
[ISIS_SYS_ID_LEN
+2];
1489 int level
, lsp_count
;
1491 if (isis
->area_list
->count
== 0)
1494 memset (&lspid
, 0, ISIS_SYS_ID_LEN
);
1495 memset (&sysid
, 0, 255);
1498 * extract fragment and pseudo id from the string argv
1500 * (a) <systemid/hostname>.<pseudo-id>-<framenent> or
1501 * (b) <systemid/hostname>.<pseudo-id> or
1502 * (c) <systemid/hostname> or
1503 * Where systemid is in the form:
1507 strncpy (sysid
, argv
, 254);
1508 if (argv
&& strlen (argv
) > 3)
1510 pos
= argv
+ strlen (argv
) - 3;
1511 if (strncmp (pos
, "-", 1) == 0)
1513 memcpy (number
, ++pos
, 2);
1514 lspid
[ISIS_SYS_ID_LEN
+1] = (u_char
) strtol ((char *)number
, NULL
, 16);
1516 if (strncmp (pos
, ".", 1) != 0)
1517 return CMD_ERR_AMBIGUOUS
;
1519 if (strncmp (pos
, ".", 1) == 0)
1521 memcpy (number
, ++pos
, 2);
1522 lspid
[ISIS_SYS_ID_LEN
] = (u_char
) strtol ((char *)number
, NULL
, 16);
1523 sysid
[pos
- argv
- 1] = '\0';
1527 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1529 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1532 for (level
= 0; level
< ISIS_LEVELS
; level
++)
1534 if (area
->lspdb
[level
] && dict_count (area
->lspdb
[level
]) > 0)
1540 * Try to find the lsp-id if the argv string is in
1541 * the form hostname.<pseudo-id>-<fragment>
1543 if (sysid2buff (lspid
, sysid
))
1545 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1547 else if ((dynhn
= dynhn_find_by_name (sysid
)))
1549 memcpy (lspid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
1550 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1552 else if (strncmp(unix_hostname (), sysid
, 15) == 0)
1554 memcpy (lspid
, isis
->sysid
, ISIS_SYS_ID_LEN
);
1555 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1559 if (lsp
!= NULL
|| argv
== NULL
)
1561 vty_out (vty
, "IS-IS Level-%d link-state database:%s",
1562 level
+ 1, VTY_NEWLINE
);
1564 /* print the title in all cases */
1565 vty_out (vty
, "LSP ID PduLen "
1566 "SeqNumber Chksum Holdtime ATT/P/OL%s",
1572 if (ui_level
== ISIS_UI_LEVEL_DETAIL
)
1573 lsp_print_detail (lsp
, vty
, area
->dynhostname
);
1575 lsp_print (lsp
, vty
, area
->dynhostname
);
1577 else if (argv
== NULL
)
1579 lsp_count
= lsp_print_all (vty
, area
->lspdb
[level
],
1583 vty_out (vty
, " %u LSPs%s%s",
1584 lsp_count
, VTY_NEWLINE
, VTY_NEWLINE
);
1593 DEFUN (show_database
,
1595 "show isis database [detail] [WORD]",
1597 "IS-IS information\n"
1598 "IS-IS link state database\n"
1599 "Detailed information\n"
1603 int uilevel
= argv_find (argv
, argc
, "detail", &idx
) ? ISIS_UI_LEVEL_DETAIL
: ISIS_UI_LEVEL_BRIEF
;
1604 char *id
= argv_find (argv
, argc
, "WORD", &idx
) ? argv
[idx
]->arg
: NULL
;
1605 return show_isis_database (vty
, id
, uilevel
);
1609 * 'router isis' command
1611 DEFUN_NOSH (router_isis
,
1616 "ISO Routing area tag")
1619 return isis_area_get (vty
, argv
[idx_word
]->arg
);
1623 *'no router isis' command
1625 DEFUN (no_router_isis
,
1627 "no router isis WORD",
1628 "no\n" ROUTER_STR
"ISO IS-IS\n" "ISO Routing area tag")
1631 return isis_area_destroy (vty
, argv
[idx_word
]->arg
);
1640 "A Network Entity Title for this process (OSI only)\n"
1641 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1644 return area_net_title (vty
, argv
[idx_word
]->arg
);
1654 "A Network Entity Title for this process (OSI only)\n"
1655 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1658 return area_clear_net_title (vty
, argv
[idx_word
]->arg
);
1661 DEFUN (isis_topology
,
1663 "topology " ISIS_MT_NAMES
" [overload]",
1664 "Configure IS-IS topologies\n"
1665 ISIS_MT_DESCRIPTIONS
1666 "Set overload bit for topology\n")
1668 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1670 const char *arg
= argv
[1]->arg
;
1671 uint16_t mtid
= isis_str2mtid(arg
);
1673 if (area
->oldmetric
)
1675 vty_out (vty
, "Multi topology IS-IS can only be used with wide metrics%s", VTY_NEWLINE
);
1676 return CMD_ERR_AMBIGUOUS
;
1679 if (mtid
== (uint16_t)-1)
1681 vty_out (vty
, "Don't know topology '%s'%s", arg
, VTY_NEWLINE
);
1682 return CMD_ERR_AMBIGUOUS
;
1684 if (mtid
== ISIS_MT_IPV4_UNICAST
)
1686 vty_out (vty
, "Cannot configure IPv4 unicast topology%s", VTY_NEWLINE
);
1687 return CMD_ERR_AMBIGUOUS
;
1690 area_set_mt_enabled(area
, mtid
, true);
1691 area_set_mt_overload(area
, mtid
, (argc
== 3));
1695 DEFUN (no_isis_topology
,
1696 no_isis_topology_cmd
,
1697 "no topology " ISIS_MT_NAMES
" [overload]",
1699 "Configure IS-IS topologies\n"
1700 ISIS_MT_DESCRIPTIONS
1701 "Set overload bit for topology\n")
1703 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1705 const char *arg
= argv
[2]->arg
;
1706 uint16_t mtid
= isis_str2mtid(arg
);
1708 if (area
->oldmetric
)
1710 vty_out (vty
, "Multi topology IS-IS can only be used with wide metrics%s", VTY_NEWLINE
);
1711 return CMD_ERR_AMBIGUOUS
;
1714 if (mtid
== (uint16_t)-1)
1716 vty_out (vty
, "Don't know topology '%s'%s", arg
, VTY_NEWLINE
);
1717 return CMD_ERR_AMBIGUOUS
;
1719 if (mtid
== ISIS_MT_IPV4_UNICAST
)
1721 vty_out (vty
, "Cannot configure IPv4 unicast topology%s", VTY_NEWLINE
);
1722 return CMD_ERR_AMBIGUOUS
;
1725 area_set_mt_enabled(area
, mtid
, false);
1726 area_set_mt_overload(area
, mtid
, false);
1730 void isis_area_lsp_mtu_set(struct isis_area
*area
, unsigned int lsp_mtu
)
1732 area
->lsp_mtu
= lsp_mtu
;
1733 lsp_regenerate_schedule(area
, IS_LEVEL_1_AND_2
, 1);
1737 isis_area_passwd_set(struct isis_area
*area
, int level
, u_char passwd_type
,
1738 const char *passwd
, u_char snp_auth
)
1740 struct isis_passwd
*dest
;
1741 struct isis_passwd modified
;
1744 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1745 dest
= (level
== IS_LEVEL_1
) ? &area
->area_passwd
: &area
->domain_passwd
;
1746 memset(&modified
, 0, sizeof(modified
));
1748 if (passwd_type
!= ISIS_PASSWD_TYPE_UNUSED
)
1753 len
= strlen(passwd
);
1758 strncpy((char*)modified
.passwd
, passwd
, 255);
1759 modified
.type
= passwd_type
;
1760 modified
.snp_auth
= snp_auth
;
1763 if (memcmp(&modified
, dest
, sizeof(modified
)))
1765 memcpy(dest
, &modified
, sizeof(modified
));
1766 lsp_regenerate_schedule(area
, IS_LEVEL_1
|IS_LEVEL_2
, 1);
1773 isis_area_passwd_unset (struct isis_area
*area
, int level
)
1775 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_UNUSED
, NULL
, 0);
1779 isis_area_passwd_cleartext_set (struct isis_area
*area
, int level
,
1780 const char *passwd
, u_char snp_auth
)
1782 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_CLEARTXT
,
1787 isis_area_passwd_hmac_md5_set (struct isis_area
*area
, int level
,
1788 const char *passwd
, u_char snp_auth
)
1790 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_HMAC_MD5
,
1795 area_resign_level (struct isis_area
*area
, int level
)
1797 if (area
->lspdb
[level
- 1])
1799 lsp_db_destroy (area
->lspdb
[level
- 1]);
1800 area
->lspdb
[level
- 1] = NULL
;
1802 if (area
->spftree
[level
- 1])
1804 isis_spftree_del (area
->spftree
[level
- 1]);
1805 area
->spftree
[level
- 1] = NULL
;
1807 if (area
->spftree6
[level
- 1])
1809 isis_spftree_del (area
->spftree6
[level
- 1]);
1810 area
->spftree6
[level
- 1] = NULL
;
1812 THREAD_TIMER_OFF(area
->spf_timer
[level
- 1]);
1813 if (area
->route_table
[level
- 1])
1815 route_table_finish (area
->route_table
[level
- 1]);
1816 area
->route_table
[level
- 1] = NULL
;
1818 if (area
->route_table6
[level
- 1])
1820 route_table_finish (area
->route_table6
[level
- 1]);
1821 area
->route_table6
[level
- 1] = NULL
;
1824 sched_debug("ISIS (%s): Resigned from L%d - canceling LSP regeneration timer.",
1825 area
->area_tag
, level
);
1826 THREAD_TIMER_OFF (area
->t_lsp_refresh
[level
- 1]);
1827 area
->lsp_regenerate_pending
[level
- 1] = 0;
1831 isis_area_is_type_set(struct isis_area
*area
, int is_type
)
1833 struct listnode
*node
;
1834 struct isis_circuit
*circuit
;
1836 if (isis
->debugs
& DEBUG_EVENTS
)
1837 zlog_debug ("ISIS-Evt (%s) system type change %s -> %s", area
->area_tag
,
1838 circuit_t2string (area
->is_type
), circuit_t2string (is_type
));
1840 if (area
->is_type
== is_type
)
1841 return; /* No change */
1843 switch (area
->is_type
)
1846 if (is_type
== IS_LEVEL_2
)
1847 area_resign_level (area
, IS_LEVEL_1
);
1849 if (area
->lspdb
[1] == NULL
)
1850 area
->lspdb
[1] = lsp_db_init ();
1851 if (area
->route_table
[1] == NULL
)
1852 area
->route_table
[1] = route_table_init ();
1853 if (area
->route_table6
[1] == NULL
)
1854 area
->route_table6
[1] = route_table_init ();
1857 case IS_LEVEL_1_AND_2
:
1858 if (is_type
== IS_LEVEL_1
)
1859 area_resign_level (area
, IS_LEVEL_2
);
1861 area_resign_level (area
, IS_LEVEL_1
);
1865 if (is_type
== IS_LEVEL_1
)
1866 area_resign_level (area
, IS_LEVEL_2
);
1868 if (area
->lspdb
[0] == NULL
)
1869 area
->lspdb
[0] = lsp_db_init ();
1870 if (area
->route_table
[0] == NULL
)
1871 area
->route_table
[0] = route_table_init ();
1872 if (area
->route_table6
[0] == NULL
)
1873 area
->route_table6
[0] = route_table_init ();
1880 area
->is_type
= is_type
;
1882 /* override circuit's is_type */
1883 if (area
->is_type
!= IS_LEVEL_1_AND_2
)
1885 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, node
, circuit
))
1886 isis_circuit_is_type_set (circuit
, is_type
);
1889 spftree_area_init (area
);
1891 if (listcount (area
->area_addrs
) > 0)
1893 if (is_type
& IS_LEVEL_1
)
1894 lsp_generate (area
, IS_LEVEL_1
);
1895 if (is_type
& IS_LEVEL_2
)
1896 lsp_generate (area
, IS_LEVEL_2
);
1898 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1903 void isis_area_metricstyle_set(struct isis_area
*area
, bool old_metric
,
1906 if (area
->oldmetric
!= old_metric
1907 || area
->newmetric
!= new_metric
)
1909 area
->oldmetric
= old_metric
;
1910 area
->newmetric
= new_metric
;
1911 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1915 void isis_area_overload_bit_set(struct isis_area
*area
, bool overload_bit
)
1917 char new_overload_bit
= overload_bit
? LSPBIT_OL
: 0;
1919 if (new_overload_bit
!= area
->overload_bit
)
1921 area
->overload_bit
= new_overload_bit
;
1922 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1926 void isis_area_attached_bit_set(struct isis_area
*area
, bool attached_bit
)
1928 char new_attached_bit
= attached_bit
? LSPBIT_ATT
: 0;
1930 if (new_attached_bit
!= area
->attached_bit
)
1932 area
->attached_bit
= new_attached_bit
;
1933 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1937 void isis_area_dynhostname_set(struct isis_area
*area
, bool dynhostname
)
1939 if (area
->dynhostname
!= dynhostname
)
1941 area
->dynhostname
= dynhostname
;
1942 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
1947 isis_area_max_lsp_lifetime_set(struct isis_area
*area
, int level
,
1948 uint16_t max_lsp_lifetime
)
1950 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1952 if (area
->max_lsp_lifetime
[level
-1] == max_lsp_lifetime
)
1955 area
->max_lsp_lifetime
[level
-1] = max_lsp_lifetime
;
1956 lsp_regenerate_schedule(area
, level
, 1);
1960 isis_area_lsp_refresh_set(struct isis_area
*area
, int level
,
1961 uint16_t lsp_refresh
)
1963 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1965 if (area
->lsp_refresh
[level
-1] == lsp_refresh
)
1968 area
->lsp_refresh
[level
-1] = lsp_refresh
;
1969 lsp_regenerate_schedule(area
, level
, 1);
1972 DEFUN (log_adj_changes
,
1973 log_adj_changes_cmd
,
1974 "log-adjacency-changes",
1975 "Log changes in adjacency state\n")
1977 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1979 area
->log_adj_changes
= 1;
1984 DEFUN (no_log_adj_changes
,
1985 no_log_adj_changes_cmd
,
1986 "no log-adjacency-changes",
1988 "Stop logging changes in adjacency state\n")
1990 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1992 area
->log_adj_changes
= 0;
1997 /* IS-IS configuration write function */
1999 isis_config_write (struct vty
*vty
)
2005 struct isis_area
*area
;
2006 struct listnode
*node
, *node2
;
2008 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
2010 /* ISIS - Area name */
2011 vty_out (vty
, "router isis %s%s", area
->area_tag
, VTY_NEWLINE
);
2014 if (listcount (area
->area_addrs
) > 0)
2016 struct area_addr
*area_addr
;
2017 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
2019 vty_out (vty
, " net %s%s",
2020 isonet_print (area_addr
->area_addr
,
2021 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
2026 /* ISIS - Dynamic hostname - Defaults to true so only display if
2028 if (!area
->dynhostname
)
2030 vty_out (vty
, " no hostname dynamic%s", VTY_NEWLINE
);
2033 /* ISIS - Metric-Style - when true displays wide */
2034 if (area
->newmetric
)
2036 if (!area
->oldmetric
)
2037 vty_out (vty
, " metric-style wide%s", VTY_NEWLINE
);
2039 vty_out (vty
, " metric-style transition%s", VTY_NEWLINE
);
2044 vty_out (vty
, " metric-style narrow%s", VTY_NEWLINE
);
2047 /* ISIS - overload-bit */
2048 if (area
->overload_bit
)
2050 vty_out (vty
, " set-overload-bit%s", VTY_NEWLINE
);
2053 /* ISIS - Area is-type (level-1-2 is default) */
2054 if (area
->is_type
== IS_LEVEL_1
)
2056 vty_out (vty
, " is-type level-1%s", VTY_NEWLINE
);
2059 else if (area
->is_type
== IS_LEVEL_2
)
2061 vty_out (vty
, " is-type level-2-only%s", VTY_NEWLINE
);
2064 write
+= isis_redist_config_write(vty
, area
, AF_INET
);
2065 write
+= isis_redist_config_write(vty
, area
, AF_INET6
);
2066 /* ISIS - Lsp generation interval */
2067 if (area
->lsp_gen_interval
[0] == area
->lsp_gen_interval
[1])
2069 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2071 vty_out (vty
, " lsp-gen-interval %d%s",
2072 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2078 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2080 vty_out (vty
, " lsp-gen-interval level-1 %d%s",
2081 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2084 if (area
->lsp_gen_interval
[1] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2086 vty_out (vty
, " lsp-gen-interval level-2 %d%s",
2087 area
->lsp_gen_interval
[1], VTY_NEWLINE
);
2091 /* ISIS - LSP lifetime */
2092 if (area
->max_lsp_lifetime
[0] == area
->max_lsp_lifetime
[1])
2094 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2096 vty_out (vty
, " max-lsp-lifetime %u%s", area
->max_lsp_lifetime
[0],
2103 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2105 vty_out (vty
, " max-lsp-lifetime level-1 %u%s",
2106 area
->max_lsp_lifetime
[0], VTY_NEWLINE
);
2109 if (area
->max_lsp_lifetime
[1] != DEFAULT_LSP_LIFETIME
)
2111 vty_out (vty
, " max-lsp-lifetime level-2 %u%s",
2112 area
->max_lsp_lifetime
[1], VTY_NEWLINE
);
2116 /* ISIS - LSP refresh interval */
2117 if (area
->lsp_refresh
[0] == area
->lsp_refresh
[1])
2119 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2121 vty_out (vty
, " lsp-refresh-interval %u%s", area
->lsp_refresh
[0],
2128 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2130 vty_out (vty
, " lsp-refresh-interval level-1 %u%s",
2131 area
->lsp_refresh
[0], VTY_NEWLINE
);
2134 if (area
->lsp_refresh
[1] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2136 vty_out (vty
, " lsp-refresh-interval level-2 %u%s",
2137 area
->lsp_refresh
[1], VTY_NEWLINE
);
2141 if (area
->lsp_mtu
!= DEFAULT_LSP_MTU
)
2143 vty_out(vty
, " lsp-mtu %u%s", area
->lsp_mtu
, VTY_NEWLINE
);
2147 /* Minimum SPF interval. */
2148 if (area
->min_spf_interval
[0] == area
->min_spf_interval
[1])
2150 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2152 vty_out (vty
, " spf-interval %d%s",
2153 area
->min_spf_interval
[0], VTY_NEWLINE
);
2159 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2161 vty_out (vty
, " spf-interval level-1 %d%s",
2162 area
->min_spf_interval
[0], VTY_NEWLINE
);
2165 if (area
->min_spf_interval
[1] != MINIMUM_SPF_INTERVAL
)
2167 vty_out (vty
, " spf-interval level-2 %d%s",
2168 area
->min_spf_interval
[1], VTY_NEWLINE
);
2173 /* IETF SPF interval */
2174 if (area
->spf_delay_ietf
[0])
2176 vty_out (vty
, " spf-delay-ietf init-delay %ld short-delay %ld long-delay %ld holddown %ld time-to-learn %ld%s",
2177 spf_backoff_init_delay(area
->spf_delay_ietf
[0]),
2178 spf_backoff_short_delay(area
->spf_delay_ietf
[0]),
2179 spf_backoff_long_delay(area
->spf_delay_ietf
[0]),
2180 spf_backoff_holddown(area
->spf_delay_ietf
[0]),
2181 spf_backoff_timetolearn(area
->spf_delay_ietf
[0]),
2186 /* Authentication passwords. */
2187 if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2189 vty_out(vty
, " area-password md5 %s", area
->area_passwd
.passwd
);
2190 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2192 vty_out(vty
, " authenticate snp ");
2193 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2194 vty_out(vty
, "validate");
2196 vty_out(vty
, "send-only");
2198 vty_out(vty
, "%s", VTY_NEWLINE
);
2201 else if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
2203 vty_out(vty
, " area-password clear %s", area
->area_passwd
.passwd
);
2204 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2206 vty_out(vty
, " authenticate snp ");
2207 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2208 vty_out(vty
, "validate");
2210 vty_out(vty
, "send-only");
2212 vty_out(vty
, "%s", VTY_NEWLINE
);
2215 if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2217 vty_out(vty
, " domain-password md5 %s",
2218 area
->domain_passwd
.passwd
);
2219 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
2221 vty_out(vty
, " authenticate snp ");
2222 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
2223 vty_out(vty
, "validate");
2225 vty_out(vty
, "send-only");
2227 vty_out(vty
, "%s", VTY_NEWLINE
);
2230 else if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
2232 vty_out(vty
, " domain-password clear %s",
2233 area
->domain_passwd
.passwd
);
2234 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
2236 vty_out(vty
, " authenticate snp ");
2237 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
2238 vty_out(vty
, "validate");
2240 vty_out(vty
, "send-only");
2242 vty_out(vty
, "%s", VTY_NEWLINE
);
2246 if (area
->log_adj_changes
)
2248 vty_out (vty
, " log-adjacency-changes%s", VTY_NEWLINE
);
2252 write
+= area_write_mt_settings(area
, vty
);
2254 isis_mpls_te_config_write_router(vty
);
2260 struct cmd_node isis_node
= {
2262 "%s(config-router)# ",
2269 /* Install IS-IS top node */
2270 install_node (&isis_node
, isis_config_write
);
2272 install_element (VIEW_NODE
, &show_isis_summary_cmd
);
2274 install_element (VIEW_NODE
, &show_isis_spf_ietf_cmd
);
2276 install_element (VIEW_NODE
, &show_isis_interface_cmd
);
2277 install_element (VIEW_NODE
, &show_isis_interface_detail_cmd
);
2278 install_element (VIEW_NODE
, &show_isis_interface_arg_cmd
);
2280 install_element (VIEW_NODE
, &show_isis_neighbor_cmd
);
2281 install_element (VIEW_NODE
, &show_isis_neighbor_detail_cmd
);
2282 install_element (VIEW_NODE
, &show_isis_neighbor_arg_cmd
);
2283 install_element (VIEW_NODE
, &clear_isis_neighbor_cmd
);
2284 install_element (VIEW_NODE
, &clear_isis_neighbor_arg_cmd
);
2286 install_element (VIEW_NODE
, &show_hostname_cmd
);
2287 install_element (VIEW_NODE
, &show_database_cmd
);
2289 install_element (ENABLE_NODE
, &show_debugging_isis_cmd
);
2291 install_node (&debug_node
, config_write_debug
);
2293 install_element (ENABLE_NODE
, &debug_isis_adj_cmd
);
2294 install_element (ENABLE_NODE
, &no_debug_isis_adj_cmd
);
2295 install_element (ENABLE_NODE
, &debug_isis_csum_cmd
);
2296 install_element (ENABLE_NODE
, &no_debug_isis_csum_cmd
);
2297 install_element (ENABLE_NODE
, &debug_isis_lupd_cmd
);
2298 install_element (ENABLE_NODE
, &no_debug_isis_lupd_cmd
);
2299 install_element (ENABLE_NODE
, &debug_isis_err_cmd
);
2300 install_element (ENABLE_NODE
, &no_debug_isis_err_cmd
);
2301 install_element (ENABLE_NODE
, &debug_isis_snp_cmd
);
2302 install_element (ENABLE_NODE
, &no_debug_isis_snp_cmd
);
2303 install_element (ENABLE_NODE
, &debug_isis_upd_cmd
);
2304 install_element (ENABLE_NODE
, &no_debug_isis_upd_cmd
);
2305 install_element (ENABLE_NODE
, &debug_isis_spfevents_cmd
);
2306 install_element (ENABLE_NODE
, &no_debug_isis_spfevents_cmd
);
2307 install_element (ENABLE_NODE
, &debug_isis_spfstats_cmd
);
2308 install_element (ENABLE_NODE
, &no_debug_isis_spfstats_cmd
);
2309 install_element (ENABLE_NODE
, &debug_isis_spftrigg_cmd
);
2310 install_element (ENABLE_NODE
, &no_debug_isis_spftrigg_cmd
);
2311 install_element (ENABLE_NODE
, &debug_isis_rtevents_cmd
);
2312 install_element (ENABLE_NODE
, &no_debug_isis_rtevents_cmd
);
2313 install_element (ENABLE_NODE
, &debug_isis_events_cmd
);
2314 install_element (ENABLE_NODE
, &no_debug_isis_events_cmd
);
2315 install_element (ENABLE_NODE
, &debug_isis_packet_dump_cmd
);
2316 install_element (ENABLE_NODE
, &no_debug_isis_packet_dump_cmd
);
2317 install_element (ENABLE_NODE
, &debug_isis_lsp_gen_cmd
);
2318 install_element (ENABLE_NODE
, &no_debug_isis_lsp_gen_cmd
);
2319 install_element (ENABLE_NODE
, &debug_isis_lsp_sched_cmd
);
2320 install_element (ENABLE_NODE
, &no_debug_isis_lsp_sched_cmd
);
2322 install_element (CONFIG_NODE
, &debug_isis_adj_cmd
);
2323 install_element (CONFIG_NODE
, &no_debug_isis_adj_cmd
);
2324 install_element (CONFIG_NODE
, &debug_isis_csum_cmd
);
2325 install_element (CONFIG_NODE
, &no_debug_isis_csum_cmd
);
2326 install_element (CONFIG_NODE
, &debug_isis_lupd_cmd
);
2327 install_element (CONFIG_NODE
, &no_debug_isis_lupd_cmd
);
2328 install_element (CONFIG_NODE
, &debug_isis_err_cmd
);
2329 install_element (CONFIG_NODE
, &no_debug_isis_err_cmd
);
2330 install_element (CONFIG_NODE
, &debug_isis_snp_cmd
);
2331 install_element (CONFIG_NODE
, &no_debug_isis_snp_cmd
);
2332 install_element (CONFIG_NODE
, &debug_isis_upd_cmd
);
2333 install_element (CONFIG_NODE
, &no_debug_isis_upd_cmd
);
2334 install_element (CONFIG_NODE
, &debug_isis_spfevents_cmd
);
2335 install_element (CONFIG_NODE
, &no_debug_isis_spfevents_cmd
);
2336 install_element (CONFIG_NODE
, &debug_isis_spfstats_cmd
);
2337 install_element (CONFIG_NODE
, &no_debug_isis_spfstats_cmd
);
2338 install_element (CONFIG_NODE
, &debug_isis_spftrigg_cmd
);
2339 install_element (CONFIG_NODE
, &no_debug_isis_spftrigg_cmd
);
2340 install_element (CONFIG_NODE
, &debug_isis_rtevents_cmd
);
2341 install_element (CONFIG_NODE
, &no_debug_isis_rtevents_cmd
);
2342 install_element (CONFIG_NODE
, &debug_isis_events_cmd
);
2343 install_element (CONFIG_NODE
, &no_debug_isis_events_cmd
);
2344 install_element (CONFIG_NODE
, &debug_isis_packet_dump_cmd
);
2345 install_element (CONFIG_NODE
, &no_debug_isis_packet_dump_cmd
);
2346 install_element (CONFIG_NODE
, &debug_isis_lsp_gen_cmd
);
2347 install_element (CONFIG_NODE
, &no_debug_isis_lsp_gen_cmd
);
2348 install_element (CONFIG_NODE
, &debug_isis_lsp_sched_cmd
);
2349 install_element (CONFIG_NODE
, &no_debug_isis_lsp_sched_cmd
);
2351 install_element (CONFIG_NODE
, &router_isis_cmd
);
2352 install_element (CONFIG_NODE
, &no_router_isis_cmd
);
2354 install_default (ISIS_NODE
);
2356 install_element (ISIS_NODE
, &net_cmd
);
2357 install_element (ISIS_NODE
, &no_net_cmd
);
2359 install_element (ISIS_NODE
, &isis_topology_cmd
);
2360 install_element (ISIS_NODE
, &no_isis_topology_cmd
);
2362 install_element (ISIS_NODE
, &log_adj_changes_cmd
);
2363 install_element (ISIS_NODE
, &no_log_adj_changes_cmd
);
2365 spf_backoff_cmd_init();