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.
39 #include "isisd/dict.h"
40 #include "isisd/include-netbsd/iso.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"
60 #ifdef TOPOLOGY_GENERATE
62 u_char DEFAULT_TOPOLOGY_BASEIS
[6] = { 0xFE, 0xED, 0xFE, 0xED, 0x00, 0x00 };
63 #endif /* TOPOLOGY_GENERATE */
65 struct isis
*isis
= NULL
;
67 DEFINE_QOBJ_TYPE(isis
)
68 DEFINE_QOBJ_TYPE(isis_area
)
73 int isis_area_get(struct vty
*, const char *);
74 int isis_area_destroy(struct vty
*, const char *);
75 int area_net_title(struct vty
*, const char *);
76 int area_clear_net_title(struct vty
*, const char *);
77 int show_isis_interface_common(struct vty
*, const char *ifname
, char);
78 int show_isis_neighbor_common(struct vty
*, const char *id
, char);
79 int clear_isis_neighbor_common(struct vty
*, const char *id
);
80 int isis_config_write(struct vty
*);
85 isis_new (unsigned long process_id
)
87 isis
= XCALLOC (MTYPE_ISIS
, sizeof (struct isis
));
91 isis
->max_area_addrs
= 3;
92 isis
->process_id
= process_id
;
94 isis
->area_list
= list_new ();
95 isis
->init_circ_list
= list_new ();
96 isis
->uptime
= time (NULL
);
97 isis
->nexthops
= list_new ();
99 isis
->nexthops6
= list_new ();
100 #endif /* HAVE_IPV6 */
103 * uncomment the next line for full debugs
105 /* isis->debugs = 0xFFFF; */
106 isisMplsTE
.status
= disable
; /* Only support TE metric */
107 QOBJ_REG (isis
, isis
);
111 isis_area_create (const char *area_tag
)
113 struct isis_area
*area
;
115 area
= XCALLOC (MTYPE_ISIS_AREA
, sizeof (struct isis_area
));
118 * The first instance is level-1-2 rest are level-1, unless otherwise
121 if (listcount (isis
->area_list
) > 0)
122 area
->is_type
= IS_LEVEL_1
;
124 area
->is_type
= IS_LEVEL_1_AND_2
;
127 * intialize the databases
129 if (area
->is_type
& IS_LEVEL_1
)
131 area
->lspdb
[0] = lsp_db_init ();
132 area
->route_table
[0] = route_table_init ();
134 area
->route_table6
[0] = route_table_init ();
135 #endif /* HAVE_IPV6 */
137 if (area
->is_type
& IS_LEVEL_2
)
139 area
->lspdb
[1] = lsp_db_init ();
140 area
->route_table
[1] = route_table_init ();
142 area
->route_table6
[1] = route_table_init ();
143 #endif /* HAVE_IPV6 */
146 spftree_area_init (area
);
148 area
->circuit_list
= list_new ();
149 area
->area_addrs
= list_new ();
150 THREAD_TIMER_ON (master
, area
->t_tick
, lsp_tick
, area
, 1);
151 flags_initialize (&area
->flags
);
156 area
->max_lsp_lifetime
[0] = DEFAULT_LSP_LIFETIME
; /* 1200 */
157 area
->max_lsp_lifetime
[1] = DEFAULT_LSP_LIFETIME
; /* 1200 */
158 area
->lsp_refresh
[0] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
159 area
->lsp_refresh
[1] = DEFAULT_MAX_LSP_GEN_INTERVAL
; /* 900 */
160 area
->lsp_gen_interval
[0] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
161 area
->lsp_gen_interval
[1] = DEFAULT_MIN_LSP_GEN_INTERVAL
;
162 area
->min_spf_interval
[0] = MINIMUM_SPF_INTERVAL
;
163 area
->min_spf_interval
[1] = MINIMUM_SPF_INTERVAL
;
164 area
->dynhostname
= 1;
167 area
->lsp_frag_threshold
= 90;
168 area
->lsp_mtu
= DEFAULT_LSP_MTU
;
169 #ifdef TOPOLOGY_GENERATE
170 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
171 #endif /* TOPOLOGY_GENERATE */
173 area
->area_tag
= strdup (area_tag
);
174 listnode_add (isis
->area_list
, area
);
177 QOBJ_REG (area
, isis_area
);
183 isis_area_lookup (const char *area_tag
)
185 struct isis_area
*area
;
186 struct listnode
*node
;
188 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
189 if ((area
->area_tag
== NULL
&& area_tag
== NULL
) ||
190 (area
->area_tag
&& area_tag
191 && strcmp (area
->area_tag
, area_tag
) == 0))
198 isis_area_get (struct vty
*vty
, const char *area_tag
)
200 struct isis_area
*area
;
202 area
= isis_area_lookup (area_tag
);
206 VTY_PUSH_CONTEXT (ISIS_NODE
, area
);
210 area
= isis_area_create (area_tag
);
212 if (isis
->debugs
& DEBUG_EVENTS
)
213 zlog_debug ("New IS-IS area instance %s", area
->area_tag
);
215 VTY_PUSH_CONTEXT (ISIS_NODE
, area
);
221 isis_area_destroy (struct vty
*vty
, const char *area_tag
)
223 struct isis_area
*area
;
224 struct listnode
*node
, *nnode
;
225 struct isis_circuit
*circuit
;
226 struct area_addr
*addr
;
228 area
= isis_area_lookup (area_tag
);
232 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
233 return CMD_ERR_NO_MATCH
;
238 if (area
->circuit_list
)
240 for (ALL_LIST_ELEMENTS (area
->circuit_list
, node
, nnode
, circuit
))
242 circuit
->ip_router
= 0;
244 circuit
->ipv6_router
= 0;
246 isis_csm_state_change (ISIS_DISABLE
, circuit
, area
);
248 list_delete (area
->circuit_list
);
249 area
->circuit_list
= NULL
;
252 if (area
->lspdb
[0] != NULL
)
254 lsp_db_destroy (area
->lspdb
[0]);
255 area
->lspdb
[0] = NULL
;
257 if (area
->lspdb
[1] != NULL
)
259 lsp_db_destroy (area
->lspdb
[1]);
260 area
->lspdb
[1] = NULL
;
263 spftree_area_del (area
);
265 /* invalidate and validate would delete all routes from zebra */
266 isis_route_invalidate (area
);
267 isis_route_validate (area
);
269 if (area
->route_table
[0])
271 route_table_finish (area
->route_table
[0]);
272 area
->route_table
[0] = NULL
;
274 if (area
->route_table
[1])
276 route_table_finish (area
->route_table
[1]);
277 area
->route_table
[1] = NULL
;
280 if (area
->route_table6
[0])
282 route_table_finish (area
->route_table6
[0]);
283 area
->route_table6
[0] = NULL
;
285 if (area
->route_table6
[1])
287 route_table_finish (area
->route_table6
[1]);
288 area
->route_table6
[1] = NULL
;
290 #endif /* HAVE_IPV6 */
292 isis_redist_area_finish(area
);
294 for (ALL_LIST_ELEMENTS (area
->area_addrs
, node
, nnode
, addr
))
296 list_delete_node (area
->area_addrs
, node
);
297 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
299 area
->area_addrs
= NULL
;
301 THREAD_TIMER_OFF (area
->t_tick
);
302 THREAD_TIMER_OFF (area
->t_lsp_refresh
[0]);
303 THREAD_TIMER_OFF (area
->t_lsp_refresh
[1]);
305 thread_cancel_event (master
, area
);
307 listnode_delete (isis
->area_list
, area
);
309 free (area
->area_tag
);
311 XFREE (MTYPE_ISIS_AREA
, area
);
313 if (listcount (isis
->area_list
) == 0)
315 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
323 area_net_title (struct vty
*vty
, const char *net_title
)
325 VTY_DECLVAR_CONTEXT (isis_area
, area
);
326 struct area_addr
*addr
;
327 struct area_addr
*addrp
;
328 struct listnode
*node
;
334 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
335 return CMD_ERR_NO_MATCH
;
338 /* We check that we are not over the maximal number of addresses */
339 if (listcount (area
->area_addrs
) >= isis
->max_area_addrs
)
341 vty_out (vty
, "Maximum of area addresses (%d) already reached %s",
342 isis
->max_area_addrs
, VTY_NEWLINE
);
343 return CMD_ERR_NOTHING_TODO
;
346 addr
= XMALLOC (MTYPE_ISIS_AREA_ADDR
, sizeof (struct area_addr
));
347 addr
->addr_len
= dotformat2buff (buff
, net_title
);
348 memcpy (addr
->area_addr
, buff
, addr
->addr_len
);
350 zlog_debug ("added area address %s for area %s (address length %d)",
351 net_title
, area
->area_tag
, addr
->addr_len
);
352 #endif /* EXTREME_DEBUG */
353 if (addr
->addr_len
< 8 || addr
->addr_len
> 20)
355 vty_out (vty
, "area address must be at least 8..20 octets long (%d)%s",
356 addr
->addr_len
, VTY_NEWLINE
);
357 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
358 return CMD_ERR_AMBIGUOUS
;
361 if (addr
->area_addr
[addr
->addr_len
-1] != 0)
363 vty_out (vty
, "nsel byte (last byte) in area address must be 0%s",
365 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
366 return CMD_ERR_AMBIGUOUS
;
369 if (isis
->sysid_set
== 0)
372 * First area address - get the SystemID for this router
374 memcpy (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
);
376 if (isis
->debugs
& DEBUG_EVENTS
)
377 zlog_debug ("Router has SystemID %s", sysid_print (isis
->sysid
));
382 * Check that the SystemID portions match
384 if (memcmp (isis
->sysid
, GETSYSID (addr
), ISIS_SYS_ID_LEN
))
387 "System ID must not change when defining additional area"
388 " addresses%s", VTY_NEWLINE
);
389 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
390 return CMD_ERR_AMBIGUOUS
;
393 /* now we see that we don't already have this address */
394 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
396 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
) != (addr
->addr_len
))
398 if (!memcmp (addrp
->area_addr
, addr
->area_addr
, addr
->addr_len
))
400 XFREE (MTYPE_ISIS_AREA_ADDR
, addr
);
401 return CMD_SUCCESS
; /* silent fail */
407 * Forget the systemID part of the address
409 addr
->addr_len
-= (ISIS_SYS_ID_LEN
+ ISIS_NSEL_LEN
);
410 listnode_add (area
->area_addrs
, addr
);
412 /* only now we can safely generate our LSPs for this area */
413 if (listcount (area
->area_addrs
) > 0)
415 if (area
->is_type
& IS_LEVEL_1
)
416 lsp_generate (area
, IS_LEVEL_1
);
417 if (area
->is_type
& IS_LEVEL_2
)
418 lsp_generate (area
, IS_LEVEL_2
);
425 area_clear_net_title (struct vty
*vty
, const char *net_title
)
427 VTY_DECLVAR_CONTEXT (isis_area
, area
);
428 struct area_addr addr
, *addrp
= NULL
;
429 struct listnode
*node
;
434 vty_out (vty
, "Can't find ISIS instance %s", VTY_NEWLINE
);
435 return CMD_ERR_NO_MATCH
;
438 addr
.addr_len
= dotformat2buff (buff
, net_title
);
439 if (addr
.addr_len
< 8 || addr
.addr_len
> 20)
441 vty_out (vty
, "Unsupported area address length %d, should be 8...20 %s",
442 addr
.addr_len
, VTY_NEWLINE
);
443 return CMD_ERR_AMBIGUOUS
;
446 memcpy (addr
.area_addr
, buff
, (int) addr
.addr_len
);
448 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node
, addrp
))
449 if ((addrp
->addr_len
+ ISIS_SYS_ID_LEN
+ 1) == addr
.addr_len
&&
450 !memcmp (addrp
->area_addr
, addr
.area_addr
, addr
.addr_len
))
455 vty_out (vty
, "No area address %s for area %s %s", net_title
,
456 area
->area_tag
, VTY_NEWLINE
);
457 return CMD_ERR_NO_MATCH
;
460 listnode_delete (area
->area_addrs
, addrp
);
461 XFREE (MTYPE_ISIS_AREA_ADDR
, addrp
);
464 * Last area address - reset the SystemID for this router
466 if (listcount (area
->area_addrs
) == 0)
468 memset (isis
->sysid
, 0, ISIS_SYS_ID_LEN
);
470 if (isis
->debugs
& DEBUG_EVENTS
)
471 zlog_debug ("Router has no SystemID");
478 * 'show isis interface' command
482 show_isis_interface_common (struct vty
*vty
, const char *ifname
, char detail
)
484 struct listnode
*anode
, *cnode
;
485 struct isis_area
*area
;
486 struct isis_circuit
*circuit
;
490 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
494 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
496 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
498 if (detail
== ISIS_UI_LEVEL_BRIEF
)
499 vty_out (vty
, " Interface CircId State Type Level%s",
502 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
504 isis_circuit_print_vty (circuit
, vty
, detail
);
505 else if (strcmp(circuit
->interface
->name
, ifname
) == 0)
506 isis_circuit_print_vty (circuit
, vty
, detail
);
512 DEFUN (show_isis_interface
,
513 show_isis_interface_cmd
,
514 "show isis interface",
516 "ISIS network information\n"
519 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
522 DEFUN (show_isis_interface_detail
,
523 show_isis_interface_detail_cmd
,
524 "show isis interface detail",
526 "ISIS network information\n"
528 "show detailed information\n")
530 return show_isis_interface_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
533 DEFUN (show_isis_interface_arg
,
534 show_isis_interface_arg_cmd
,
535 "show isis interface WORD",
537 "ISIS network information\n"
539 "ISIS interface name\n")
542 return show_isis_interface_common (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
546 * 'show isis neighbor' command
550 show_isis_neighbor_common (struct vty
*vty
, const char *id
, char detail
)
552 struct listnode
*anode
, *cnode
, *node
;
553 struct isis_area
*area
;
554 struct isis_circuit
*circuit
;
556 struct isis_adjacency
*adj
;
557 struct isis_dynhn
*dynhn
;
558 u_char sysid
[ISIS_SYS_ID_LEN
];
563 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
567 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
570 if (sysid2buff (sysid
, id
) == 0)
572 dynhn
= dynhn_find_by_name (id
);
575 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
578 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
582 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
584 vty_out (vty
, "Area %s:%s", area
->area_tag
, VTY_NEWLINE
);
586 if (detail
== ISIS_UI_LEVEL_BRIEF
)
587 vty_out (vty
, " System Id Interface L State"
588 " Holdtime SNPA%s", VTY_NEWLINE
);
590 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, cnode
, circuit
))
592 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
594 for (i
= 0; i
< 2; i
++)
596 adjdb
= circuit
->u
.bc
.adjdb
[i
];
597 if (adjdb
&& adjdb
->count
)
599 for (ALL_LIST_ELEMENTS_RO (adjdb
, node
, adj
))
600 if (!id
|| !memcmp (adj
->sysid
, sysid
,
602 isis_adj_print_vty (adj
, vty
, detail
);
606 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
607 circuit
->u
.p2p
.neighbor
)
609 adj
= circuit
->u
.p2p
.neighbor
;
610 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
611 isis_adj_print_vty (adj
, vty
, detail
);
620 * 'clear isis neighbor' command
623 clear_isis_neighbor_common (struct vty
*vty
, const char *id
)
625 struct listnode
*anode
, *cnode
, *cnextnode
, *node
, *nnode
;
626 struct isis_area
*area
;
627 struct isis_circuit
*circuit
;
629 struct isis_adjacency
*adj
;
630 struct isis_dynhn
*dynhn
;
631 u_char sysid
[ISIS_SYS_ID_LEN
];
636 vty_out (vty
, "IS-IS Routing Process not enabled%s", VTY_NEWLINE
);
640 memset (sysid
, 0, ISIS_SYS_ID_LEN
);
643 if (sysid2buff (sysid
, id
) == 0)
645 dynhn
= dynhn_find_by_name (id
);
648 vty_out (vty
, "Invalid system id %s%s", id
, VTY_NEWLINE
);
651 memcpy (sysid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
655 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, anode
, area
))
657 for (ALL_LIST_ELEMENTS (area
->circuit_list
, cnode
, cnextnode
, circuit
))
659 if (circuit
->circ_type
== CIRCUIT_T_BROADCAST
)
661 for (i
= 0; i
< 2; i
++)
663 adjdb
= circuit
->u
.bc
.adjdb
[i
];
664 if (adjdb
&& adjdb
->count
)
666 for (ALL_LIST_ELEMENTS (adjdb
, node
, nnode
, adj
))
667 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
668 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
669 "clear user request");
673 else if (circuit
->circ_type
== CIRCUIT_T_P2P
&&
674 circuit
->u
.p2p
.neighbor
)
676 adj
= circuit
->u
.p2p
.neighbor
;
677 if (!id
|| !memcmp (adj
->sysid
, sysid
, ISIS_SYS_ID_LEN
))
678 isis_adj_state_change (adj
, ISIS_ADJ_DOWN
,
679 "clear user request");
687 DEFUN (show_isis_neighbor
,
688 show_isis_neighbor_cmd
,
689 "show isis neighbor",
691 "ISIS network information\n"
692 "ISIS neighbor adjacencies\n")
694 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_BRIEF
);
697 DEFUN (show_isis_neighbor_detail
,
698 show_isis_neighbor_detail_cmd
,
699 "show isis neighbor detail",
701 "ISIS network information\n"
702 "ISIS neighbor adjacencies\n"
703 "show detailed information\n")
705 return show_isis_neighbor_common (vty
, NULL
, ISIS_UI_LEVEL_DETAIL
);
708 DEFUN (show_isis_neighbor_arg
,
709 show_isis_neighbor_arg_cmd
,
710 "show isis neighbor WORD",
712 "ISIS network information\n"
713 "ISIS neighbor adjacencies\n"
717 return show_isis_neighbor_common (vty
, argv
[idx_word
]->arg
, ISIS_UI_LEVEL_DETAIL
);
720 DEFUN (clear_isis_neighbor
,
721 clear_isis_neighbor_cmd
,
722 "clear isis neighbor",
724 "Reset ISIS network information\n"
725 "Reset ISIS neighbor adjacencies\n")
727 return clear_isis_neighbor_common (vty
, NULL
);
730 DEFUN (clear_isis_neighbor_arg
,
731 clear_isis_neighbor_arg_cmd
,
732 "clear isis neighbor WORD",
734 "ISIS network information\n"
735 "ISIS neighbor adjacencies\n"
739 return clear_isis_neighbor_common (vty
, argv
[idx_word
]->arg
);
743 * 'isis debug', 'show debugging'
746 print_debug (struct vty
*vty
, int flags
, int onoff
)
750 strcpy (onoffs
, "on");
752 strcpy (onoffs
, "off");
754 if (flags
& DEBUG_ADJ_PACKETS
)
755 vty_out (vty
, "IS-IS Adjacency related packets debugging is %s%s", onoffs
,
757 if (flags
& DEBUG_CHECKSUM_ERRORS
)
758 vty_out (vty
, "IS-IS checksum errors debugging is %s%s", onoffs
,
760 if (flags
& DEBUG_LOCAL_UPDATES
)
761 vty_out (vty
, "IS-IS local updates debugging is %s%s", onoffs
,
763 if (flags
& DEBUG_PROTOCOL_ERRORS
)
764 vty_out (vty
, "IS-IS protocol errors debugging is %s%s", onoffs
,
766 if (flags
& DEBUG_SNP_PACKETS
)
767 vty_out (vty
, "IS-IS CSNP/PSNP packets debugging is %s%s", onoffs
,
769 if (flags
& DEBUG_SPF_EVENTS
)
770 vty_out (vty
, "IS-IS SPF events debugging is %s%s", onoffs
, VTY_NEWLINE
);
771 if (flags
& DEBUG_SPF_STATS
)
772 vty_out (vty
, "IS-IS SPF Timing and Statistics Data debugging is %s%s",
773 onoffs
, VTY_NEWLINE
);
774 if (flags
& DEBUG_SPF_TRIGGERS
)
775 vty_out (vty
, "IS-IS SPF triggering events debugging is %s%s", onoffs
,
777 if (flags
& DEBUG_UPDATE_PACKETS
)
778 vty_out (vty
, "IS-IS Update related packet debugging is %s%s", onoffs
,
780 if (flags
& DEBUG_RTE_EVENTS
)
781 vty_out (vty
, "IS-IS Route related debuggin is %s%s", onoffs
,
783 if (flags
& DEBUG_EVENTS
)
784 vty_out (vty
, "IS-IS Event debugging is %s%s", onoffs
, VTY_NEWLINE
);
785 if (flags
& DEBUG_PACKET_DUMP
)
786 vty_out (vty
, "IS-IS Packet dump debugging is %s%s", onoffs
, VTY_NEWLINE
);
787 if (flags
& DEBUG_LSP_GEN
)
788 vty_out (vty
, "IS-IS LSP generation debugging is %s%s", onoffs
, VTY_NEWLINE
);
789 if (flags
& DEBUG_LSP_SCHED
)
790 vty_out (vty
, "IS-IS LSP scheduling debugging is %s%s", onoffs
, VTY_NEWLINE
);
793 DEFUN (show_debugging
,
794 show_debugging_isis_cmd
,
795 "show debugging isis",
797 "State of each debugging option\n"
801 vty_out (vty
, "IS-IS:%s", VTY_NEWLINE
);
802 print_debug (vty
, isis
->debugs
, 1);
808 static struct cmd_node debug_node
= {
815 config_write_debug (struct vty
*vty
)
818 int flags
= isis
->debugs
;
820 if (flags
& DEBUG_ADJ_PACKETS
)
822 vty_out (vty
, "debug isis adj-packets%s", VTY_NEWLINE
);
825 if (flags
& DEBUG_CHECKSUM_ERRORS
)
827 vty_out (vty
, "debug isis checksum-errors%s", VTY_NEWLINE
);
830 if (flags
& DEBUG_LOCAL_UPDATES
)
832 vty_out (vty
, "debug isis local-updates%s", VTY_NEWLINE
);
835 if (flags
& DEBUG_PROTOCOL_ERRORS
)
837 vty_out (vty
, "debug isis protocol-errors%s", VTY_NEWLINE
);
840 if (flags
& DEBUG_SNP_PACKETS
)
842 vty_out (vty
, "debug isis snp-packets%s", VTY_NEWLINE
);
845 if (flags
& DEBUG_SPF_EVENTS
)
847 vty_out (vty
, "debug isis spf-events%s", VTY_NEWLINE
);
850 if (flags
& DEBUG_SPF_STATS
)
852 vty_out (vty
, "debug isis spf-statistics%s", VTY_NEWLINE
);
855 if (flags
& DEBUG_SPF_TRIGGERS
)
857 vty_out (vty
, "debug isis spf-triggers%s", VTY_NEWLINE
);
860 if (flags
& DEBUG_UPDATE_PACKETS
)
862 vty_out (vty
, "debug isis update-packets%s", VTY_NEWLINE
);
865 if (flags
& DEBUG_RTE_EVENTS
)
867 vty_out (vty
, "debug isis route-events%s", VTY_NEWLINE
);
870 if (flags
& DEBUG_EVENTS
)
872 vty_out (vty
, "debug isis events%s", VTY_NEWLINE
);
875 if (flags
& DEBUG_PACKET_DUMP
)
877 vty_out (vty
, "debug isis packet-dump%s", VTY_NEWLINE
);
880 if (flags
& DEBUG_LSP_GEN
)
882 vty_out (vty
, "debug isis lsp-gen%s", VTY_NEWLINE
);
885 if (flags
& DEBUG_LSP_SCHED
)
887 vty_out (vty
, "debug isis lsp-sched%s", VTY_NEWLINE
);
894 DEFUN (debug_isis_adj
,
896 "debug isis adj-packets",
898 "IS-IS information\n"
899 "IS-IS Adjacency related packets\n")
901 isis
->debugs
|= DEBUG_ADJ_PACKETS
;
902 print_debug (vty
, DEBUG_ADJ_PACKETS
, 1);
907 DEFUN (no_debug_isis_adj
,
908 no_debug_isis_adj_cmd
,
909 "no debug isis adj-packets",
912 "IS-IS information\n"
913 "IS-IS Adjacency related packets\n")
915 isis
->debugs
&= ~DEBUG_ADJ_PACKETS
;
916 print_debug (vty
, DEBUG_ADJ_PACKETS
, 0);
921 DEFUN (debug_isis_csum
,
923 "debug isis checksum-errors",
925 "IS-IS information\n"
926 "IS-IS LSP checksum errors\n")
928 isis
->debugs
|= DEBUG_CHECKSUM_ERRORS
;
929 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 1);
934 DEFUN (no_debug_isis_csum
,
935 no_debug_isis_csum_cmd
,
936 "no debug isis checksum-errors",
939 "IS-IS information\n"
940 "IS-IS LSP checksum errors\n")
942 isis
->debugs
&= ~DEBUG_CHECKSUM_ERRORS
;
943 print_debug (vty
, DEBUG_CHECKSUM_ERRORS
, 0);
948 DEFUN (debug_isis_lupd
,
950 "debug isis local-updates",
952 "IS-IS information\n"
953 "IS-IS local update packets\n")
955 isis
->debugs
|= DEBUG_LOCAL_UPDATES
;
956 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 1);
961 DEFUN (no_debug_isis_lupd
,
962 no_debug_isis_lupd_cmd
,
963 "no debug isis local-updates",
966 "IS-IS information\n"
967 "IS-IS local update packets\n")
969 isis
->debugs
&= ~DEBUG_LOCAL_UPDATES
;
970 print_debug (vty
, DEBUG_LOCAL_UPDATES
, 0);
975 DEFUN (debug_isis_err
,
977 "debug isis protocol-errors",
979 "IS-IS information\n"
980 "IS-IS LSP protocol errors\n")
982 isis
->debugs
|= DEBUG_PROTOCOL_ERRORS
;
983 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 1);
988 DEFUN (no_debug_isis_err
,
989 no_debug_isis_err_cmd
,
990 "no debug isis protocol-errors",
993 "IS-IS information\n"
994 "IS-IS LSP protocol errors\n")
996 isis
->debugs
&= ~DEBUG_PROTOCOL_ERRORS
;
997 print_debug (vty
, DEBUG_PROTOCOL_ERRORS
, 0);
1002 DEFUN (debug_isis_snp
,
1004 "debug isis snp-packets",
1006 "IS-IS information\n"
1007 "IS-IS CSNP/PSNP packets\n")
1009 isis
->debugs
|= DEBUG_SNP_PACKETS
;
1010 print_debug (vty
, DEBUG_SNP_PACKETS
, 1);
1015 DEFUN (no_debug_isis_snp
,
1016 no_debug_isis_snp_cmd
,
1017 "no debug isis snp-packets",
1020 "IS-IS information\n"
1021 "IS-IS CSNP/PSNP packets\n")
1023 isis
->debugs
&= ~DEBUG_SNP_PACKETS
;
1024 print_debug (vty
, DEBUG_SNP_PACKETS
, 0);
1029 DEFUN (debug_isis_upd
,
1031 "debug isis update-packets",
1033 "IS-IS information\n"
1034 "IS-IS Update related packets\n")
1036 isis
->debugs
|= DEBUG_UPDATE_PACKETS
;
1037 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 1);
1042 DEFUN (no_debug_isis_upd
,
1043 no_debug_isis_upd_cmd
,
1044 "no debug isis update-packets",
1047 "IS-IS information\n"
1048 "IS-IS Update related packets\n")
1050 isis
->debugs
&= ~DEBUG_UPDATE_PACKETS
;
1051 print_debug (vty
, DEBUG_UPDATE_PACKETS
, 0);
1056 DEFUN (debug_isis_spfevents
,
1057 debug_isis_spfevents_cmd
,
1058 "debug isis spf-events",
1060 "IS-IS information\n"
1061 "IS-IS Shortest Path First Events\n")
1063 isis
->debugs
|= DEBUG_SPF_EVENTS
;
1064 print_debug (vty
, DEBUG_SPF_EVENTS
, 1);
1069 DEFUN (no_debug_isis_spfevents
,
1070 no_debug_isis_spfevents_cmd
,
1071 "no debug isis spf-events",
1074 "IS-IS information\n"
1075 "IS-IS Shortest Path First Events\n")
1077 isis
->debugs
&= ~DEBUG_SPF_EVENTS
;
1078 print_debug (vty
, DEBUG_SPF_EVENTS
, 0);
1083 DEFUN (debug_isis_spfstats
,
1084 debug_isis_spfstats_cmd
,
1085 "debug isis spf-statistics ",
1087 "IS-IS information\n"
1088 "IS-IS SPF Timing and Statistic Data\n")
1090 isis
->debugs
|= DEBUG_SPF_STATS
;
1091 print_debug (vty
, DEBUG_SPF_STATS
, 1);
1096 DEFUN (no_debug_isis_spfstats
,
1097 no_debug_isis_spfstats_cmd
,
1098 "no debug isis spf-statistics",
1101 "IS-IS information\n"
1102 "IS-IS SPF Timing and Statistic Data\n")
1104 isis
->debugs
&= ~DEBUG_SPF_STATS
;
1105 print_debug (vty
, DEBUG_SPF_STATS
, 0);
1110 DEFUN (debug_isis_spftrigg
,
1111 debug_isis_spftrigg_cmd
,
1112 "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
, 1);
1123 DEFUN (no_debug_isis_spftrigg
,
1124 no_debug_isis_spftrigg_cmd
,
1125 "no debug isis spf-triggers",
1128 "IS-IS information\n"
1129 "IS-IS SPF triggering events\n")
1131 isis
->debugs
&= ~DEBUG_SPF_TRIGGERS
;
1132 print_debug (vty
, DEBUG_SPF_TRIGGERS
, 0);
1137 DEFUN (debug_isis_rtevents
,
1138 debug_isis_rtevents_cmd
,
1139 "debug isis route-events",
1141 "IS-IS information\n"
1142 "IS-IS Route related events\n")
1144 isis
->debugs
|= DEBUG_RTE_EVENTS
;
1145 print_debug (vty
, DEBUG_RTE_EVENTS
, 1);
1150 DEFUN (no_debug_isis_rtevents
,
1151 no_debug_isis_rtevents_cmd
,
1152 "no debug isis route-events",
1155 "IS-IS information\n"
1156 "IS-IS Route related events\n")
1158 isis
->debugs
&= ~DEBUG_RTE_EVENTS
;
1159 print_debug (vty
, DEBUG_RTE_EVENTS
, 0);
1164 DEFUN (debug_isis_events
,
1165 debug_isis_events_cmd
,
1166 "debug isis events",
1168 "IS-IS information\n"
1171 isis
->debugs
|= DEBUG_EVENTS
;
1172 print_debug (vty
, DEBUG_EVENTS
, 1);
1177 DEFUN (no_debug_isis_events
,
1178 no_debug_isis_events_cmd
,
1179 "no debug isis events",
1182 "IS-IS information\n"
1185 isis
->debugs
&= ~DEBUG_EVENTS
;
1186 print_debug (vty
, DEBUG_EVENTS
, 0);
1191 DEFUN (debug_isis_packet_dump
,
1192 debug_isis_packet_dump_cmd
,
1193 "debug isis packet-dump",
1195 "IS-IS information\n"
1196 "IS-IS packet dump\n")
1198 isis
->debugs
|= DEBUG_PACKET_DUMP
;
1199 print_debug (vty
, DEBUG_PACKET_DUMP
, 1);
1204 DEFUN (no_debug_isis_packet_dump
,
1205 no_debug_isis_packet_dump_cmd
,
1206 "no debug isis packet-dump",
1209 "IS-IS information\n"
1210 "IS-IS packet dump\n")
1212 isis
->debugs
&= ~DEBUG_PACKET_DUMP
;
1213 print_debug (vty
, DEBUG_PACKET_DUMP
, 0);
1218 DEFUN (debug_isis_lsp_gen
,
1219 debug_isis_lsp_gen_cmd
,
1220 "debug isis lsp-gen",
1222 "IS-IS information\n"
1223 "IS-IS generation of own LSPs\n")
1225 isis
->debugs
|= DEBUG_LSP_GEN
;
1226 print_debug (vty
, DEBUG_LSP_GEN
, 1);
1231 DEFUN (no_debug_isis_lsp_gen
,
1232 no_debug_isis_lsp_gen_cmd
,
1233 "no debug isis lsp-gen",
1236 "IS-IS information\n"
1237 "IS-IS generation of own LSPs\n")
1239 isis
->debugs
&= ~DEBUG_LSP_GEN
;
1240 print_debug (vty
, DEBUG_LSP_GEN
, 0);
1245 DEFUN (debug_isis_lsp_sched
,
1246 debug_isis_lsp_sched_cmd
,
1247 "debug isis lsp-sched",
1249 "IS-IS information\n"
1250 "IS-IS scheduling of LSP generation\n")
1252 isis
->debugs
|= DEBUG_LSP_SCHED
;
1253 print_debug (vty
, DEBUG_LSP_SCHED
, 1);
1258 DEFUN (no_debug_isis_lsp_sched
,
1259 no_debug_isis_lsp_sched_cmd
,
1260 "no debug isis lsp-sched",
1263 "IS-IS information\n"
1264 "IS-IS scheduling of LSP generation\n")
1266 isis
->debugs
&= ~DEBUG_LSP_SCHED
;
1267 print_debug (vty
, DEBUG_LSP_SCHED
, 0);
1272 DEFUN (show_hostname
,
1274 "show isis hostname",
1276 "IS-IS information\n"
1277 "IS-IS Dynamic hostname mapping\n")
1279 dynhn_print_all (vty
);
1285 vty_out_timestr(struct vty
*vty
, time_t uptime
)
1288 time_t difftime
= time (NULL
);
1290 tm
= gmtime (&difftime
);
1292 #define ONE_DAY_SECOND 60*60*24
1293 #define ONE_WEEK_SECOND 60*60*24*7
1294 if (difftime
< ONE_DAY_SECOND
)
1295 vty_out (vty
, "%02d:%02d:%02d",
1296 tm
->tm_hour
, tm
->tm_min
, tm
->tm_sec
);
1297 else if (difftime
< ONE_WEEK_SECOND
)
1298 vty_out (vty
, "%dd%02dh%02dm",
1299 tm
->tm_yday
, tm
->tm_hour
, tm
->tm_min
);
1301 vty_out (vty
, "%02dw%dd%02dh",
1303 tm
->tm_yday
- ((tm
->tm_yday
/7) * 7), tm
->tm_hour
);
1304 vty_out (vty
, " ago");
1307 DEFUN (show_isis_summary
,
1308 show_isis_summary_cmd
,
1309 "show isis summary",
1310 SHOW_STR
"IS-IS information\n" "IS-IS summary\n")
1312 struct listnode
*node
, *node2
;
1313 struct isis_area
*area
;
1314 struct isis_spftree
*spftree
;
1319 vty_out (vty
, "ISIS is not running%s", VTY_NEWLINE
);
1323 vty_out (vty
, "Process Id : %ld%s", isis
->process_id
,
1325 if (isis
->sysid_set
)
1326 vty_out (vty
, "System Id : %s%s", sysid_print (isis
->sysid
),
1329 vty_out (vty
, "Up time : ");
1330 vty_out_timestr(vty
, isis
->uptime
);
1331 vty_out (vty
, "%s", VTY_NEWLINE
);
1333 if (isis
->area_list
)
1334 vty_out (vty
, "Number of areas : %d%s", isis
->area_list
->count
,
1337 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1339 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1342 if (listcount (area
->area_addrs
) > 0)
1344 struct area_addr
*area_addr
;
1345 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
1347 vty_out (vty
, " Net: %s%s",
1348 isonet_print (area_addr
->area_addr
,
1349 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
1354 for (level
= ISIS_LEVEL1
; level
<= ISIS_LEVELS
; level
++)
1356 if ((area
->is_type
& level
) == 0)
1359 vty_out (vty
, " Level-%d:%s", level
, VTY_NEWLINE
);
1360 spftree
= area
->spftree
[level
- 1];
1361 if (spftree
->pending
)
1362 vty_out (vty
, " IPv4 SPF: (pending)%s", VTY_NEWLINE
);
1364 vty_out (vty
, " IPv4 SPF:%s", VTY_NEWLINE
);
1366 vty_out (vty
, " minimum interval : %d%s",
1367 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1369 vty_out (vty
, " last run elapsed : ");
1370 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1371 vty_out (vty
, "%s", VTY_NEWLINE
);
1373 vty_out (vty
, " last run duration : %u usec%s",
1374 (u_int32_t
)spftree
->last_run_duration
, VTY_NEWLINE
);
1376 vty_out (vty
, " run count : %d%s",
1377 spftree
->runcount
, VTY_NEWLINE
);
1380 spftree
= area
->spftree6
[level
- 1];
1381 if (spftree
->pending
)
1382 vty_out (vty
, " IPv6 SPF: (pending)%s", VTY_NEWLINE
);
1384 vty_out (vty
, " IPv6 SPF:%s", VTY_NEWLINE
);
1386 vty_out (vty
, " minimum interval : %d%s",
1387 area
->min_spf_interval
[level
- 1], VTY_NEWLINE
);
1389 vty_out (vty
, " last run elapsed : ");
1390 vty_out_timestr(vty
, spftree
->last_run_timestamp
);
1391 vty_out (vty
, "%s", VTY_NEWLINE
);
1393 vty_out (vty
, " last run duration : %llu msec%s",
1394 (unsigned long long)spftree
->last_run_duration
, VTY_NEWLINE
);
1396 vty_out (vty
, " run count : %d%s",
1397 spftree
->runcount
, VTY_NEWLINE
);
1401 vty_out (vty
, "%s", VTY_NEWLINE
);
1407 * This function supports following display options:
1408 * [ show isis database [detail] ]
1409 * [ show isis database <sysid> [detail] ]
1410 * [ show isis database <hostname> [detail] ]
1411 * [ show isis database <sysid>.<pseudo-id> [detail] ]
1412 * [ show isis database <hostname>.<pseudo-id> [detail] ]
1413 * [ show isis database <sysid>.<pseudo-id>-<fragment-number> [detail] ]
1414 * [ show isis database <hostname>.<pseudo-id>-<fragment-number> [detail] ]
1415 * [ show isis database detail <sysid> ]
1416 * [ show isis database detail <hostname> ]
1417 * [ show isis database detail <sysid>.<pseudo-id> ]
1418 * [ show isis database detail <hostname>.<pseudo-id> ]
1419 * [ show isis database detail <sysid>.<pseudo-id>-<fragment-number> ]
1420 * [ show isis database detail <hostname>.<pseudo-id>-<fragment-number> ]
1423 show_isis_database (struct vty
*vty
, const char *argv
, int ui_level
)
1425 struct listnode
*node
;
1426 struct isis_area
*area
;
1427 struct isis_lsp
*lsp
;
1428 struct isis_dynhn
*dynhn
;
1429 const char *pos
= argv
;
1430 u_char lspid
[ISIS_SYS_ID_LEN
+2];
1433 int level
, lsp_count
;
1435 if (isis
->area_list
->count
== 0)
1438 memset (&lspid
, 0, ISIS_SYS_ID_LEN
);
1439 memset (&sysid
, 0, 255);
1442 * extract fragment and pseudo id from the string argv
1444 * (a) <systemid/hostname>.<pseudo-id>-<framenent> or
1445 * (b) <systemid/hostname>.<pseudo-id> or
1446 * (c) <systemid/hostname> or
1447 * Where systemid is in the form:
1451 strncpy (sysid
, argv
, 254);
1452 if (argv
&& strlen (argv
) > 3)
1454 pos
= argv
+ strlen (argv
) - 3;
1455 if (strncmp (pos
, "-", 1) == 0)
1457 memcpy (number
, ++pos
, 2);
1458 lspid
[ISIS_SYS_ID_LEN
+1] = (u_char
) strtol ((char *)number
, NULL
, 16);
1460 if (strncmp (pos
, ".", 1) != 0)
1461 return CMD_ERR_AMBIGUOUS
;
1463 if (strncmp (pos
, ".", 1) == 0)
1465 memcpy (number
, ++pos
, 2);
1466 lspid
[ISIS_SYS_ID_LEN
] = (u_char
) strtol ((char *)number
, NULL
, 16);
1467 sysid
[pos
- argv
- 1] = '\0';
1471 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1473 vty_out (vty
, "Area %s:%s", area
->area_tag
? area
->area_tag
: "null",
1476 for (level
= 0; level
< ISIS_LEVELS
; level
++)
1478 if (area
->lspdb
[level
] && dict_count (area
->lspdb
[level
]) > 0)
1484 * Try to find the lsp-id if the argv string is in
1485 * the form hostname.<pseudo-id>-<fragment>
1487 if (sysid2buff (lspid
, sysid
))
1489 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1491 else if ((dynhn
= dynhn_find_by_name (sysid
)))
1493 memcpy (lspid
, dynhn
->id
, ISIS_SYS_ID_LEN
);
1494 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1496 else if (strncmp(unix_hostname (), sysid
, 15) == 0)
1498 memcpy (lspid
, isis
->sysid
, ISIS_SYS_ID_LEN
);
1499 lsp
= lsp_search (lspid
, area
->lspdb
[level
]);
1503 if (lsp
!= NULL
|| argv
== NULL
)
1505 vty_out (vty
, "IS-IS Level-%d link-state database:%s",
1506 level
+ 1, VTY_NEWLINE
);
1508 /* print the title in all cases */
1509 vty_out (vty
, "LSP ID PduLen "
1510 "SeqNumber Chksum Holdtime ATT/P/OL%s",
1516 if (ui_level
== ISIS_UI_LEVEL_DETAIL
)
1517 lsp_print_detail (lsp
, vty
, area
->dynhostname
);
1519 lsp_print (lsp
, vty
, area
->dynhostname
);
1521 else if (argv
== NULL
)
1523 lsp_count
= lsp_print_all (vty
, area
->lspdb
[level
],
1527 vty_out (vty
, " %u LSPs%s%s",
1528 lsp_count
, VTY_NEWLINE
, VTY_NEWLINE
);
1537 DEFUN (show_database
,
1539 "show isis database [detail] [WORD]",
1541 "IS-IS information\n"
1542 "IS-IS link state database\n"
1543 "Detailed information\n"
1547 int uilevel
= argv_find (argv
, argc
, "detail", &idx
) ? ISIS_UI_LEVEL_DETAIL
: ISIS_UI_LEVEL_BRIEF
;
1548 char *id
= argv_find (argv
, argc
, "WORD", &idx
) ? argv
[idx
]->arg
: NULL
;
1549 return show_isis_database (vty
, id
, uilevel
);
1553 * 'router isis' command
1560 "ISO Routing area tag")
1563 return isis_area_get (vty
, argv
[idx_word
]->arg
);
1567 *'no router isis' command
1569 DEFUN (no_router_isis
,
1571 "no router isis WORD",
1572 "no\n" ROUTER_STR
"ISO IS-IS\n" "ISO Routing area tag")
1575 return isis_area_destroy (vty
, argv
[idx_word
]->arg
);
1584 "A Network Entity Title for this process (OSI only)\n"
1585 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1588 return area_net_title (vty
, argv
[idx_word
]->arg
);
1598 "A Network Entity Title for this process (OSI only)\n"
1599 "XX.XXXX. ... .XXX.XX Network entity title (NET)\n")
1602 return area_clear_net_title (vty
, argv
[idx_word
]->arg
);
1605 void isis_area_lsp_mtu_set(struct isis_area
*area
, unsigned int lsp_mtu
)
1607 area
->lsp_mtu
= lsp_mtu
;
1608 lsp_regenerate_schedule(area
, IS_LEVEL_1_AND_2
, 1);
1612 isis_area_passwd_set(struct isis_area
*area
, int level
, u_char passwd_type
,
1613 const char *passwd
, u_char snp_auth
)
1615 struct isis_passwd
*dest
;
1616 struct isis_passwd modified
;
1619 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1620 dest
= (level
== IS_LEVEL_1
) ? &area
->area_passwd
: &area
->domain_passwd
;
1621 memset(&modified
, 0, sizeof(modified
));
1623 if (passwd_type
!= ISIS_PASSWD_TYPE_UNUSED
)
1628 len
= strlen(passwd
);
1633 strncpy((char*)modified
.passwd
, passwd
, 255);
1634 modified
.type
= passwd_type
;
1635 modified
.snp_auth
= snp_auth
;
1638 if (memcmp(&modified
, dest
, sizeof(modified
)))
1640 memcpy(dest
, &modified
, sizeof(modified
));
1641 lsp_regenerate_schedule(area
, IS_LEVEL_1
|IS_LEVEL_2
, 1);
1648 isis_area_passwd_unset (struct isis_area
*area
, int level
)
1650 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_UNUSED
, NULL
, 0);
1654 isis_area_passwd_cleartext_set (struct isis_area
*area
, int level
,
1655 const char *passwd
, u_char snp_auth
)
1657 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_CLEARTXT
,
1662 isis_area_passwd_hmac_md5_set (struct isis_area
*area
, int level
,
1663 const char *passwd
, u_char snp_auth
)
1665 return isis_area_passwd_set (area
, level
, ISIS_PASSWD_TYPE_HMAC_MD5
,
1670 area_resign_level (struct isis_area
*area
, int level
)
1672 if (area
->lspdb
[level
- 1])
1674 lsp_db_destroy (area
->lspdb
[level
- 1]);
1675 area
->lspdb
[level
- 1] = NULL
;
1677 if (area
->spftree
[level
- 1])
1679 isis_spftree_del (area
->spftree
[level
- 1]);
1680 area
->spftree
[level
- 1] = NULL
;
1683 if (area
->spftree6
[level
- 1])
1685 isis_spftree_del (area
->spftree6
[level
- 1]);
1686 area
->spftree6
[level
- 1] = NULL
;
1689 if (area
->route_table
[level
- 1])
1691 route_table_finish (area
->route_table
[level
- 1]);
1692 area
->route_table
[level
- 1] = NULL
;
1695 if (area
->route_table6
[level
- 1])
1697 route_table_finish (area
->route_table6
[level
- 1]);
1698 area
->route_table6
[level
- 1] = NULL
;
1700 #endif /* HAVE_IPV6 */
1702 sched_debug("ISIS (%s): Resigned from L%d - canceling LSP regeneration timer.",
1703 area
->area_tag
, level
);
1704 THREAD_TIMER_OFF (area
->t_lsp_refresh
[level
- 1]);
1705 area
->lsp_regenerate_pending
[level
- 1] = 0;
1709 isis_area_is_type_set(struct isis_area
*area
, int is_type
)
1711 struct listnode
*node
;
1712 struct isis_circuit
*circuit
;
1714 if (isis
->debugs
& DEBUG_EVENTS
)
1715 zlog_debug ("ISIS-Evt (%s) system type change %s -> %s", area
->area_tag
,
1716 circuit_t2string (area
->is_type
), circuit_t2string (is_type
));
1718 if (area
->is_type
== is_type
)
1719 return; /* No change */
1721 switch (area
->is_type
)
1724 if (is_type
== IS_LEVEL_2
)
1725 area_resign_level (area
, IS_LEVEL_1
);
1727 if (area
->lspdb
[1] == NULL
)
1728 area
->lspdb
[1] = lsp_db_init ();
1729 if (area
->route_table
[1] == NULL
)
1730 area
->route_table
[1] = route_table_init ();
1732 if (area
->route_table6
[1] == NULL
)
1733 area
->route_table6
[1] = route_table_init ();
1734 #endif /* HAVE_IPV6 */
1737 case IS_LEVEL_1_AND_2
:
1738 if (is_type
== IS_LEVEL_1
)
1739 area_resign_level (area
, IS_LEVEL_2
);
1741 area_resign_level (area
, IS_LEVEL_1
);
1745 if (is_type
== IS_LEVEL_1
)
1746 area_resign_level (area
, IS_LEVEL_2
);
1748 if (area
->lspdb
[0] == NULL
)
1749 area
->lspdb
[0] = lsp_db_init ();
1750 if (area
->route_table
[0] == NULL
)
1751 area
->route_table
[0] = route_table_init ();
1753 if (area
->route_table6
[0] == NULL
)
1754 area
->route_table6
[0] = route_table_init ();
1755 #endif /* HAVE_IPV6 */
1762 area
->is_type
= is_type
;
1764 /* override circuit's is_type */
1765 if (area
->is_type
!= IS_LEVEL_1_AND_2
)
1767 for (ALL_LIST_ELEMENTS_RO (area
->circuit_list
, node
, circuit
))
1768 isis_circuit_is_type_set (circuit
, is_type
);
1771 spftree_area_init (area
);
1773 if (is_type
& IS_LEVEL_1
)
1774 lsp_generate (area
, IS_LEVEL_1
);
1775 if (is_type
& IS_LEVEL_2
)
1776 lsp_generate (area
, IS_LEVEL_2
);
1777 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1782 void isis_area_metricstyle_set(struct isis_area
*area
, bool old_metric
,
1785 if (area
->oldmetric
!= old_metric
1786 || area
->newmetric
!= new_metric
)
1788 area
->oldmetric
= old_metric
;
1789 area
->newmetric
= new_metric
;
1790 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1794 void isis_area_overload_bit_set(struct isis_area
*area
, bool overload_bit
)
1796 char new_overload_bit
= overload_bit
? LSPBIT_OL
: 0;
1798 if (new_overload_bit
!= area
->overload_bit
)
1800 area
->overload_bit
= new_overload_bit
;
1801 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1805 void isis_area_attached_bit_set(struct isis_area
*area
, bool attached_bit
)
1807 char new_attached_bit
= attached_bit
? LSPBIT_ATT
: 0;
1809 if (new_attached_bit
!= area
->attached_bit
)
1811 area
->attached_bit
= new_attached_bit
;
1812 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1816 void isis_area_dynhostname_set(struct isis_area
*area
, bool dynhostname
)
1818 if (area
->dynhostname
!= dynhostname
)
1820 area
->dynhostname
= dynhostname
;
1821 lsp_regenerate_schedule(area
, IS_LEVEL_1
| IS_LEVEL_2
, 0);
1826 isis_area_max_lsp_lifetime_set(struct isis_area
*area
, int level
,
1827 uint16_t max_lsp_lifetime
)
1829 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1831 if (area
->max_lsp_lifetime
[level
-1] == max_lsp_lifetime
)
1834 area
->max_lsp_lifetime
[level
-1] = max_lsp_lifetime
;
1835 lsp_regenerate_schedule(area
, level
, 1);
1839 isis_area_lsp_refresh_set(struct isis_area
*area
, int level
,
1840 uint16_t lsp_refresh
)
1842 assert((level
== IS_LEVEL_1
) || (level
== IS_LEVEL_2
));
1844 if (area
->lsp_refresh
[level
-1] == lsp_refresh
)
1847 area
->lsp_refresh
[level
-1] = lsp_refresh
;
1848 lsp_regenerate_schedule(area
, level
, 1);
1851 DEFUN (log_adj_changes
,
1852 log_adj_changes_cmd
,
1853 "log-adjacency-changes",
1854 "Log changes in adjacency state\n")
1856 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1858 area
->log_adj_changes
= 1;
1863 DEFUN (no_log_adj_changes
,
1864 no_log_adj_changes_cmd
,
1865 "no log-adjacency-changes",
1867 "Stop logging changes in adjacency state\n")
1869 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1871 area
->log_adj_changes
= 0;
1876 #ifdef TOPOLOGY_GENERATE
1878 DEFUN (topology_generate_grid
,
1879 topology_generate_grid_cmd
,
1880 "topology generate grid (1-100) (1-100) (1-65000) [param] [param] [param]",
1881 "Topology generation for IS-IS\n"
1882 "Topology generation\n"
1884 "X parameter of the grid\n"
1885 "Y parameter of the grid\n"
1887 "Optional param 1\n"
1888 "Optional param 2\n"
1889 "Optional param 3\n"
1892 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1894 if (!spgrid_check_params (vty
, argc
, argv
))
1897 list_delete (area
->topology
);
1898 area
->topology
= list_new ();
1899 memcpy (area
->top_params
, vty
->buf
, 200);
1900 gen_spgrid_topology (vty
, area
->topology
);
1901 remove_topology_lsps (area
);
1902 generate_topology_lsps (area
);
1903 /* Regenerate L1 LSP to get two way connection to the generated
1905 lsp_regenerate_schedule (area
, IS_LEVEL_1
| IS_LEVEL_2
, 1);
1911 DEFUN (show_isis_generated_topology
,
1912 show_isis_generated_topology_cmd
,
1913 "show isis generated-topologies",
1915 "ISIS network information\n"
1916 "Show generated topologies\n")
1918 struct isis_area
*area
;
1919 struct listnode
*node
;
1920 struct listnode
*node2
;
1923 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
1925 if (!area
->topology
)
1928 vty_out (vty
, "Topology for isis area: %s%s", area
->area_tag
,
1930 vty_out (vty
, "From node To node Distance%s", VTY_NEWLINE
);
1932 for (ALL_LIST_ELEMENTS_RO (area
->topology
, node2
, arc
))
1933 vty_out (vty
, "%9ld %11ld %12ld%s", arc
->from_node
, arc
->to_node
,
1934 arc
->distance
, VTY_NEWLINE
);
1939 /* Base IS for topology generation. */
1940 DEFUN (topology_baseis
,
1941 topology_baseis_cmd
,
1942 "topology base-is WORD",
1943 "Topology generation for IS-IS\n"
1944 "A Network IS Base for this topology\n"
1945 "XXXX.XXXX.XXXX Network entity title (NET)\n")
1948 u_char buff
[ISIS_SYS_ID_LEN
];
1949 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1951 if (sysid2buff (buff
, argv
[idx_word
]->arg
))
1952 sysid2buff (area
->topology_baseis
, argv
[idx_word
]->arg
);
1957 DEFUN (no_topology_baseis
,
1958 no_topology_baseis_cmd
,
1959 "no topology base-is [WORD]",
1961 "Topology generation for IS-IS\n"
1962 "A Network IS Base for this topology\n"
1963 "XXXX.XXXX.XXXX Network entity title (NET)\n")
1965 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1967 memcpy (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
, ISIS_SYS_ID_LEN
);
1972 DEFUN (topology_basedynh
,
1973 topology_basedynh_cmd
,
1974 "topology base-dynh WORD",
1975 "Topology generation for IS-IS\n"
1976 "Dynamic hostname base for this topology\n"
1977 "Dynamic hostname base\n")
1980 VTY_DECLVAR_CONTEXT (isis_area
, area
);
1982 /* I hope that it's enough. */
1983 area
->topology_basedynh
= strndup (argv
[idx_word
]->arg
, 16);
1987 #endif /* TOPOLOGY_GENERATE */
1989 /* IS-IS configuration write function */
1991 isis_config_write (struct vty
*vty
)
1997 struct isis_area
*area
;
1998 struct listnode
*node
, *node2
;
2000 for (ALL_LIST_ELEMENTS_RO (isis
->area_list
, node
, area
))
2002 /* ISIS - Area name */
2003 vty_out (vty
, "router isis %s%s", area
->area_tag
, VTY_NEWLINE
);
2006 if (listcount (area
->area_addrs
) > 0)
2008 struct area_addr
*area_addr
;
2009 for (ALL_LIST_ELEMENTS_RO (area
->area_addrs
, node2
, area_addr
))
2011 vty_out (vty
, " net %s%s",
2012 isonet_print (area_addr
->area_addr
,
2013 area_addr
->addr_len
+ ISIS_SYS_ID_LEN
+
2018 /* ISIS - Dynamic hostname - Defaults to true so only display if
2020 if (!area
->dynhostname
)
2022 vty_out (vty
, " no hostname dynamic%s", VTY_NEWLINE
);
2025 /* ISIS - Metric-Style - when true displays wide */
2026 if (area
->newmetric
)
2028 if (!area
->oldmetric
)
2029 vty_out (vty
, " metric-style wide%s", VTY_NEWLINE
);
2031 vty_out (vty
, " metric-style transition%s", VTY_NEWLINE
);
2036 vty_out (vty
, " metric-style narrow%s", VTY_NEWLINE
);
2039 /* ISIS - overload-bit */
2040 if (area
->overload_bit
)
2042 vty_out (vty
, " set-overload-bit%s", VTY_NEWLINE
);
2045 /* ISIS - Area is-type (level-1-2 is default) */
2046 if (area
->is_type
== IS_LEVEL_1
)
2048 vty_out (vty
, " is-type level-1%s", VTY_NEWLINE
);
2051 else if (area
->is_type
== IS_LEVEL_2
)
2053 vty_out (vty
, " is-type level-2-only%s", VTY_NEWLINE
);
2056 write
+= isis_redist_config_write(vty
, area
, AF_INET
);
2057 write
+= isis_redist_config_write(vty
, area
, AF_INET6
);
2058 /* ISIS - Lsp generation interval */
2059 if (area
->lsp_gen_interval
[0] == area
->lsp_gen_interval
[1])
2061 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2063 vty_out (vty
, " lsp-gen-interval %d%s",
2064 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2070 if (area
->lsp_gen_interval
[0] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2072 vty_out (vty
, " lsp-gen-interval level-1 %d%s",
2073 area
->lsp_gen_interval
[0], VTY_NEWLINE
);
2076 if (area
->lsp_gen_interval
[1] != DEFAULT_MIN_LSP_GEN_INTERVAL
)
2078 vty_out (vty
, " lsp-gen-interval level-2 %d%s",
2079 area
->lsp_gen_interval
[1], VTY_NEWLINE
);
2083 /* ISIS - LSP lifetime */
2084 if (area
->max_lsp_lifetime
[0] == area
->max_lsp_lifetime
[1])
2086 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2088 vty_out (vty
, " max-lsp-lifetime %u%s", area
->max_lsp_lifetime
[0],
2095 if (area
->max_lsp_lifetime
[0] != DEFAULT_LSP_LIFETIME
)
2097 vty_out (vty
, " max-lsp-lifetime level-1 %u%s",
2098 area
->max_lsp_lifetime
[0], VTY_NEWLINE
);
2101 if (area
->max_lsp_lifetime
[1] != DEFAULT_LSP_LIFETIME
)
2103 vty_out (vty
, " max-lsp-lifetime level-2 %u%s",
2104 area
->max_lsp_lifetime
[1], VTY_NEWLINE
);
2108 /* ISIS - LSP refresh interval */
2109 if (area
->lsp_refresh
[0] == area
->lsp_refresh
[1])
2111 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2113 vty_out (vty
, " lsp-refresh-interval %u%s", area
->lsp_refresh
[0],
2120 if (area
->lsp_refresh
[0] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2122 vty_out (vty
, " lsp-refresh-interval level-1 %u%s",
2123 area
->lsp_refresh
[0], VTY_NEWLINE
);
2126 if (area
->lsp_refresh
[1] != DEFAULT_MAX_LSP_GEN_INTERVAL
)
2128 vty_out (vty
, " lsp-refresh-interval level-2 %u%s",
2129 area
->lsp_refresh
[1], VTY_NEWLINE
);
2133 if (area
->lsp_mtu
!= DEFAULT_LSP_MTU
)
2135 vty_out(vty
, " lsp-mtu %u%s", area
->lsp_mtu
, VTY_NEWLINE
);
2139 /* Minimum SPF interval. */
2140 if (area
->min_spf_interval
[0] == area
->min_spf_interval
[1])
2142 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2144 vty_out (vty
, " spf-interval %d%s",
2145 area
->min_spf_interval
[0], VTY_NEWLINE
);
2151 if (area
->min_spf_interval
[0] != MINIMUM_SPF_INTERVAL
)
2153 vty_out (vty
, " spf-interval level-1 %d%s",
2154 area
->min_spf_interval
[0], VTY_NEWLINE
);
2157 if (area
->min_spf_interval
[1] != MINIMUM_SPF_INTERVAL
)
2159 vty_out (vty
, " spf-interval level-2 %d%s",
2160 area
->min_spf_interval
[1], VTY_NEWLINE
);
2164 /* Authentication passwords. */
2165 if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2167 vty_out(vty
, " area-password md5 %s", area
->area_passwd
.passwd
);
2168 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2170 vty_out(vty
, " authenticate snp ");
2171 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2172 vty_out(vty
, "validate");
2174 vty_out(vty
, "send-only");
2176 vty_out(vty
, "%s", VTY_NEWLINE
);
2179 else if (area
->area_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
2181 vty_out(vty
, " area-password clear %s", area
->area_passwd
.passwd
);
2182 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_SEND
))
2184 vty_out(vty
, " authenticate snp ");
2185 if (CHECK_FLAG(area
->area_passwd
.snp_auth
, SNP_AUTH_RECV
))
2186 vty_out(vty
, "validate");
2188 vty_out(vty
, "send-only");
2190 vty_out(vty
, "%s", VTY_NEWLINE
);
2193 if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_HMAC_MD5
)
2195 vty_out(vty
, " domain-password md5 %s",
2196 area
->domain_passwd
.passwd
);
2197 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
2199 vty_out(vty
, " authenticate snp ");
2200 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
2201 vty_out(vty
, "validate");
2203 vty_out(vty
, "send-only");
2205 vty_out(vty
, "%s", VTY_NEWLINE
);
2208 else if (area
->domain_passwd
.type
== ISIS_PASSWD_TYPE_CLEARTXT
)
2210 vty_out(vty
, " domain-password clear %s",
2211 area
->domain_passwd
.passwd
);
2212 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_SEND
))
2214 vty_out(vty
, " authenticate snp ");
2215 if (CHECK_FLAG(area
->domain_passwd
.snp_auth
, SNP_AUTH_RECV
))
2216 vty_out(vty
, "validate");
2218 vty_out(vty
, "send-only");
2220 vty_out(vty
, "%s", VTY_NEWLINE
);
2224 if (area
->log_adj_changes
)
2226 vty_out (vty
, " log-adjacency-changes%s", VTY_NEWLINE
);
2230 #ifdef TOPOLOGY_GENERATE
2231 if (memcmp (area
->topology_baseis
, DEFAULT_TOPOLOGY_BASEIS
,
2234 vty_out (vty
, " topology base-is %s%s",
2235 sysid_print ((u_char
*)area
->topology_baseis
), VTY_NEWLINE
);
2238 if (area
->topology_basedynh
)
2240 vty_out (vty
, " topology base-dynh %s%s",
2241 area
->topology_basedynh
, VTY_NEWLINE
);
2244 /* We save the whole command line here. */
2245 if (strlen(area
->top_params
))
2247 vty_out (vty
, " %s%s", area
->top_params
, VTY_NEWLINE
);
2250 #endif /* TOPOLOGY_GENERATE */
2253 isis_mpls_te_config_write_router(vty
);
2259 struct cmd_node isis_node
= {
2261 "%s(config-router)# ",
2268 /* Install IS-IS top node */
2269 install_node (&isis_node
, isis_config_write
);
2271 install_element (VIEW_NODE
, &show_isis_summary_cmd
);
2273 install_element (VIEW_NODE
, &show_isis_interface_cmd
);
2274 install_element (VIEW_NODE
, &show_isis_interface_detail_cmd
);
2275 install_element (VIEW_NODE
, &show_isis_interface_arg_cmd
);
2277 install_element (VIEW_NODE
, &show_isis_neighbor_cmd
);
2278 install_element (VIEW_NODE
, &show_isis_neighbor_detail_cmd
);
2279 install_element (VIEW_NODE
, &show_isis_neighbor_arg_cmd
);
2280 install_element (VIEW_NODE
, &clear_isis_neighbor_cmd
);
2281 install_element (VIEW_NODE
, &clear_isis_neighbor_arg_cmd
);
2283 install_element (VIEW_NODE
, &show_hostname_cmd
);
2284 install_element (VIEW_NODE
, &show_database_cmd
);
2286 install_element (ENABLE_NODE
, &show_debugging_isis_cmd
);
2288 install_node (&debug_node
, config_write_debug
);
2290 install_element (ENABLE_NODE
, &debug_isis_adj_cmd
);
2291 install_element (ENABLE_NODE
, &no_debug_isis_adj_cmd
);
2292 install_element (ENABLE_NODE
, &debug_isis_csum_cmd
);
2293 install_element (ENABLE_NODE
, &no_debug_isis_csum_cmd
);
2294 install_element (ENABLE_NODE
, &debug_isis_lupd_cmd
);
2295 install_element (ENABLE_NODE
, &no_debug_isis_lupd_cmd
);
2296 install_element (ENABLE_NODE
, &debug_isis_err_cmd
);
2297 install_element (ENABLE_NODE
, &no_debug_isis_err_cmd
);
2298 install_element (ENABLE_NODE
, &debug_isis_snp_cmd
);
2299 install_element (ENABLE_NODE
, &no_debug_isis_snp_cmd
);
2300 install_element (ENABLE_NODE
, &debug_isis_upd_cmd
);
2301 install_element (ENABLE_NODE
, &no_debug_isis_upd_cmd
);
2302 install_element (ENABLE_NODE
, &debug_isis_spfevents_cmd
);
2303 install_element (ENABLE_NODE
, &no_debug_isis_spfevents_cmd
);
2304 install_element (ENABLE_NODE
, &debug_isis_spfstats_cmd
);
2305 install_element (ENABLE_NODE
, &no_debug_isis_spfstats_cmd
);
2306 install_element (ENABLE_NODE
, &debug_isis_spftrigg_cmd
);
2307 install_element (ENABLE_NODE
, &no_debug_isis_spftrigg_cmd
);
2308 install_element (ENABLE_NODE
, &debug_isis_rtevents_cmd
);
2309 install_element (ENABLE_NODE
, &no_debug_isis_rtevents_cmd
);
2310 install_element (ENABLE_NODE
, &debug_isis_events_cmd
);
2311 install_element (ENABLE_NODE
, &no_debug_isis_events_cmd
);
2312 install_element (ENABLE_NODE
, &debug_isis_packet_dump_cmd
);
2313 install_element (ENABLE_NODE
, &no_debug_isis_packet_dump_cmd
);
2314 install_element (ENABLE_NODE
, &debug_isis_lsp_gen_cmd
);
2315 install_element (ENABLE_NODE
, &no_debug_isis_lsp_gen_cmd
);
2316 install_element (ENABLE_NODE
, &debug_isis_lsp_sched_cmd
);
2317 install_element (ENABLE_NODE
, &no_debug_isis_lsp_sched_cmd
);
2319 install_element (CONFIG_NODE
, &debug_isis_adj_cmd
);
2320 install_element (CONFIG_NODE
, &no_debug_isis_adj_cmd
);
2321 install_element (CONFIG_NODE
, &debug_isis_csum_cmd
);
2322 install_element (CONFIG_NODE
, &no_debug_isis_csum_cmd
);
2323 install_element (CONFIG_NODE
, &debug_isis_lupd_cmd
);
2324 install_element (CONFIG_NODE
, &no_debug_isis_lupd_cmd
);
2325 install_element (CONFIG_NODE
, &debug_isis_err_cmd
);
2326 install_element (CONFIG_NODE
, &no_debug_isis_err_cmd
);
2327 install_element (CONFIG_NODE
, &debug_isis_snp_cmd
);
2328 install_element (CONFIG_NODE
, &no_debug_isis_snp_cmd
);
2329 install_element (CONFIG_NODE
, &debug_isis_upd_cmd
);
2330 install_element (CONFIG_NODE
, &no_debug_isis_upd_cmd
);
2331 install_element (CONFIG_NODE
, &debug_isis_spfevents_cmd
);
2332 install_element (CONFIG_NODE
, &no_debug_isis_spfevents_cmd
);
2333 install_element (CONFIG_NODE
, &debug_isis_spfstats_cmd
);
2334 install_element (CONFIG_NODE
, &no_debug_isis_spfstats_cmd
);
2335 install_element (CONFIG_NODE
, &debug_isis_spftrigg_cmd
);
2336 install_element (CONFIG_NODE
, &no_debug_isis_spftrigg_cmd
);
2337 install_element (CONFIG_NODE
, &debug_isis_rtevents_cmd
);
2338 install_element (CONFIG_NODE
, &no_debug_isis_rtevents_cmd
);
2339 install_element (CONFIG_NODE
, &debug_isis_events_cmd
);
2340 install_element (CONFIG_NODE
, &no_debug_isis_events_cmd
);
2341 install_element (CONFIG_NODE
, &debug_isis_packet_dump_cmd
);
2342 install_element (CONFIG_NODE
, &no_debug_isis_packet_dump_cmd
);
2343 install_element (CONFIG_NODE
, &debug_isis_lsp_gen_cmd
);
2344 install_element (CONFIG_NODE
, &no_debug_isis_lsp_gen_cmd
);
2345 install_element (CONFIG_NODE
, &debug_isis_lsp_sched_cmd
);
2346 install_element (CONFIG_NODE
, &no_debug_isis_lsp_sched_cmd
);
2348 install_element (CONFIG_NODE
, &router_isis_cmd
);
2349 install_element (CONFIG_NODE
, &no_router_isis_cmd
);
2351 install_default (ISIS_NODE
);
2353 install_element (ISIS_NODE
, &net_cmd
);
2354 install_element (ISIS_NODE
, &no_net_cmd
);
2356 install_element (ISIS_NODE
, &log_adj_changes_cmd
);
2357 install_element (ISIS_NODE
, &no_log_adj_changes_cmd
);
2359 #ifdef TOPOLOGY_GENERATE
2360 install_element (ISIS_NODE
, &topology_generate_grid_cmd
);
2361 install_element (ISIS_NODE
, &topology_baseis_cmd
);
2362 install_element (ISIS_NODE
, &topology_basedynh_cmd
);
2363 install_element (ISIS_NODE
, &no_topology_baseis_cmd
);
2364 install_element (VIEW_NODE
, &show_isis_generated_topology_cmd
);
2365 #endif /* TOPOLOGY_GENERATE */