2 * Copyright (C) 2016 by Open Source Routing.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; see the file COPYING; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
26 #include "ldpd/ldpd.h"
27 #include "ldpd/ldp_vty.h"
28 #ifndef VTYSH_EXTRACT_PL
29 #include "ldpd/ldp_vty_cmds_clippy.c"
32 DEFPY_NOSH(ldp_mpls_ldp
,
35 "Global MPLS configuration subcommands\n"
36 "Label Distribution Protocol\n")
38 return (ldp_vty_mpls_ldp(vty
, NULL
));
41 DEFPY (no_ldp_mpls_ldp
,
45 "Global MPLS configuration subcommands\n"
46 "Label Distribution Protocol\n")
48 return (ldp_vty_mpls_ldp(vty
, "no"));
53 "l2vpn WORD$l2vpn_name type vpls",
54 "Configure l2vpn commands\n"
57 "Virtual Private LAN Service\n")
59 return (ldp_vty_l2vpn(vty
, NULL
, l2vpn_name
));
64 "no l2vpn WORD$l2vpn_name type vpls",
66 "Configure l2vpn commands\n"
69 "Virtual Private LAN Service\n")
71 return (ldp_vty_l2vpn(vty
, "no", l2vpn_name
));
74 DEFPY_NOSH(ldp_address_family
,
75 ldp_address_family_cmd
,
76 "address-family <ipv4|ipv6>$af",
77 "Configure Address Family and its parameters\n"
81 return (ldp_vty_address_family(vty
, NULL
, af
));
84 DEFPY (no_ldp_address_family
,
85 no_ldp_address_family_cmd
,
86 "no address-family <ipv4|ipv6>$af",
88 "Configure Address Family and its parameters\n"
92 return (ldp_vty_address_family(vty
, "no", af
));
95 DEFPY_NOSH(ldp_exit_address_family
,
96 ldp_exit_address_family_cmd
,
97 "exit-address-family",
98 "Exit from Address Family configuration mode\n")
100 if (vty
->node
== LDP_IPV4_NODE
|| vty
->node
== LDP_IPV6_NODE
)
101 vty
->node
= LDP_NODE
;
105 DEFPY (ldp_discovery_link_holdtime
,
106 ldp_discovery_link_holdtime_cmd
,
107 "[no] discovery hello holdtime (1-65535)$holdtime",
109 "Configure discovery parameters\n"
112 "Time (seconds) - 65535 implies infinite\n")
114 return (ldp_vty_disc_holdtime(vty
, no
, HELLO_LINK
, holdtime
));
117 DEFPY (ldp_discovery_targeted_holdtime
,
118 ldp_discovery_targeted_holdtime_cmd
,
119 "[no] discovery targeted-hello holdtime (1-65535)$holdtime",
121 "Configure discovery parameters\n"
122 "LDP Targeted Hellos\n"
124 "Time (seconds) - 65535 implies infinite\n")
126 return (ldp_vty_disc_holdtime(vty
, no
, HELLO_TARGETED
, holdtime
));
129 DEFPY (ldp_discovery_link_interval
,
130 ldp_discovery_link_interval_cmd
,
131 "[no] discovery hello interval (1-65535)$interval",
133 "Configure discovery parameters\n"
138 return (ldp_vty_disc_interval(vty
, no
, HELLO_LINK
, interval
));
141 DEFPY (ldp_discovery_targeted_interval
,
142 ldp_discovery_targeted_interval_cmd
,
143 "[no] discovery targeted-hello interval (1-65535)$interval",
145 "Configure discovery parameters\n"
146 "LDP Targeted Hellos\n"
150 return (ldp_vty_disc_interval(vty
, no
, HELLO_TARGETED
, interval
));
153 DEFPY (ldp_dual_stack_transport_connection_prefer_ipv4
,
154 ldp_dual_stack_transport_connection_prefer_ipv4_cmd
,
155 "[no] dual-stack transport-connection prefer ipv4",
157 "Configure dual stack parameters\n"
158 "Configure TCP transport parameters\n"
159 "Configure preferred address family for TCP transport connection with neighbor\n"
162 return (ldp_vty_trans_pref_ipv4(vty
, no
));
165 DEFPY (ldp_dual_stack_cisco_interop
,
166 ldp_dual_stack_cisco_interop_cmd
,
167 "[no] dual-stack cisco-interop",
169 "Configure dual stack parameters\n"
170 "Use Cisco non-compliant format to send and interpret the Dual-Stack capability TLV\n")
172 return (ldp_vty_ds_cisco_interop(vty
, no
));
175 DEFPY (ldp_neighbor_password
,
176 ldp_neighbor_password_cmd
,
177 "[no] neighbor A.B.C.D$neighbor password WORD$password",
179 "Configure neighbor parameters\n"
180 "LDP Id of neighbor\n"
181 "Configure password for MD5 authentication\n"
184 return (ldp_vty_neighbor_password(vty
, no
, neighbor
, password
));
187 DEFPY (ldp_neighbor_session_holdtime
,
188 ldp_neighbor_session_holdtime_cmd
,
189 "[no] neighbor A.B.C.D$neighbor session holdtime (15-65535)$holdtime",
191 "Configure neighbor parameters\n"
192 "LDP Id of neighbor\n"
193 "Configure session parameters\n"
194 "Configure session holdtime\n"
197 return (ldp_vty_nbr_session_holdtime(vty
, no
, neighbor
, holdtime
));
200 DEFPY (ldp_neighbor_ttl_security
,
201 ldp_neighbor_ttl_security_cmd
,
202 "[no] neighbor A.B.C.D$neighbor ttl-security <disable|hops (1-254)$hops>",
204 "Configure neighbor parameters\n"
205 "LDP Id of neighbor\n"
206 "LDP ttl security check\n"
207 "Disable ttl security\n"
209 "maximum number of hops\n")
211 return (ldp_vty_neighbor_ttl_security(vty
, no
, neighbor
, hops_str
));
214 DEFPY (ldp_router_id
,
216 "[no] router-id A.B.C.D$address",
218 "Configure router Id\n"
219 "LSR Id (in form of an IPv4 address)\n")
221 return (ldp_vty_router_id(vty
, no
, address
));
224 DEFPY (ldp_ordered_control
,
225 ldp_ordered_control_cmd
,
226 "[no] ordered-control",
228 "Configure LDP ordered label distribution control mode\n")
230 return (ldp_vty_ordered_control(vty
, no
));
233 DEFPY (ldp_wait_for_sync
,
234 ldp_wait_for_sync_cmd
,
235 "[no] wait-for-sync (1-10000)$waitforsync",
237 "Time to wait for LDP-IGP Sync to complete label exchange\n"
240 return (ldp_vty_wait_for_sync_interval(vty
, no
, waitforsync
));
244 DEFPY (ldp_discovery_targeted_hello_accept
,
245 ldp_discovery_targeted_hello_accept_cmd
,
246 "[no] discovery targeted-hello accept [from <(1-199)|(1300-2699)|WORD>$from_acl]",
248 "Configure discovery parameters\n"
249 "LDP Targeted Hellos\n"
250 "Accept and respond to targeted hellos\n"
251 "Access list to specify acceptable targeted hello source\n"
252 "IP access-list number\n"
253 "IP access-list number (expanded range)\n"
254 "IP access-list name\n")
256 return (ldp_vty_targeted_hello_accept(vty
, no
, from_acl
));
259 DEFPY (ldp_discovery_transport_address_ipv4
,
260 ldp_discovery_transport_address_ipv4_cmd
,
261 "[no] discovery transport-address A.B.C.D$address",
263 "Configure discovery parameters\n"
264 "Specify transport address for TCP connection\n"
265 "IP address to be used as transport address\n")
267 return (ldp_vty_trans_addr(vty
, no
, address_str
));
270 DEFPY (ldp_discovery_transport_address_ipv6
,
271 ldp_discovery_transport_address_ipv6_cmd
,
272 "[no] discovery transport-address X:X::X:X$address",
274 "Configure discovery parameters\n"
275 "Specify transport address for TCP connection\n"
276 "IPv6 address to be used as transport address\n")
278 return (ldp_vty_trans_addr(vty
, no
, address_str
));
281 DEFPY (ldp_label_local_advertise
,
282 ldp_label_local_advertise_cmd
,
283 "[no] label local advertise [{to <(1-199)|(1300-2699)|WORD>$to_acl|for <(1-199)|(1300-2699)|WORD>$for_acl}]",
285 "Configure label control and policies\n"
286 "Configure local label control and policies\n"
287 "Configure outbound label advertisement control\n"
288 "IP Access-list specifying controls on LDP Peers\n"
289 "IP access-list number\n"
290 "IP access-list number (expanded range)\n"
291 "IP access-list name\n"
292 "IP access-list for destination prefixes\n"
293 "IP access-list number\n"
294 "IP access-list number (expanded range)\n"
295 "IP access-list name\n")
297 return (ldp_vty_label_advertise(vty
, no
, to_acl
, for_acl
));
300 DEFPY (ldp_label_local_advertise_explicit_null
,
301 ldp_label_local_advertise_explicit_null_cmd
,
302 "[no] label local advertise explicit-null [for <(1-199)|(1300-2699)|WORD>$for_acl]",
304 "Configure label control and policies\n"
305 "Configure local label control and policies\n"
306 "Configure outbound label advertisement control\n"
307 "Configure explicit-null advertisement\n"
308 "IP access-list for destination prefixes\n"
309 "IP access-list number\n"
310 "IP access-list number (expanded range)\n"
311 "IP access-list name\n")
313 return (ldp_vty_label_expnull(vty
, no
, for_acl
));
316 DEFPY (ldp_label_local_allocate
,
317 ldp_label_local_allocate_cmd
,
318 "[no] label local allocate <host-routes$host_routes|for <(1-199)|(1300-2699)|WORD>$for_acl>",
320 "Configure label control and policies\n"
321 "Configure local label control and policies\n"
322 "Configure label allocation control\n"
323 "allocate local label for host routes only\n"
325 "IP access-list number\n"
326 "IP access-list number (expanded range)\n"
327 "IP access-list name\n")
329 return (ldp_vty_label_allocate(vty
, no
, host_routes
, for_acl
));
332 DEFPY (ldp_label_remote_accept
,
333 ldp_label_remote_accept_cmd
,
334 "[no] label remote accept {from <(1-199)|(1300-2699)|WORD>$from_acl|for <(1-199)|(1300-2699)|WORD>$for_acl}",
336 "Configure label control and policies\n"
337 "Configure remote/peer label control and policies\n"
338 "Configure inbound label acceptance control\n"
339 "Neighbor from whom to accept label advertisement\n"
340 "IP access-list number\n"
341 "IP access-list number (expanded range)\n"
342 "IP access-list name\n"
343 "IP access-list for destination prefixes\n"
344 "IP access-list number\n"
345 "IP access-list number (expanded range)\n"
346 "IP access-list name\n")
348 return (ldp_vty_label_accept(vty
, no
, from_acl
, for_acl
));
351 DEFPY (ldp_ttl_security_disable
,
352 ldp_ttl_security_disable_cmd
,
353 "[no] ttl-security disable",
355 "LDP ttl security check\n"
356 "Disable ttl security\n")
358 return (ldp_vty_ttl_security(vty
, no
));
361 DEFPY (ldp_session_holdtime
,
362 ldp_session_holdtime_cmd
,
363 "[no] session holdtime (15-65535)$holdtime",
365 "Configure session parameters\n"
366 "Configure session holdtime\n"
369 return (ldp_vty_af_session_holdtime(vty
, no
, holdtime
));
372 DEFPY_NOSH(ldp_interface
,
374 "interface IFNAME$ifname",
375 "Enable LDP on an interface and enter interface submode\n"
376 "Interface's name\n")
378 return (ldp_vty_interface(vty
, NULL
, ifname
));
381 DEFPY (no_ldp_interface
,
382 no_ldp_interface_cmd
,
383 "no interface IFNAME$ifname",
385 "Enable LDP on an interface and enter interface submode\n"
386 "Interface's name\n")
388 return (ldp_vty_interface(vty
, "no", ifname
));
391 DEFPY (ldp_neighbor_ipv4_targeted
,
392 ldp_neighbor_ipv4_targeted_cmd
,
393 "[no] neighbor A.B.C.D$address targeted",
395 "Configure neighbor parameters\n"
396 "IP address of neighbor\n"
397 "Establish targeted session\n")
399 return (ldp_vty_neighbor_targeted(vty
, no
, address_str
));
402 DEFPY (ldp_neighbor_ipv6_targeted
,
403 ldp_neighbor_ipv6_targeted_cmd
,
404 "[no] neighbor X:X::X:X$address targeted",
406 "Configure neighbor parameters\n"
407 "IPv6 address of neighbor\n"
408 "Establish targeted session\n")
410 return (ldp_vty_neighbor_targeted(vty
, no
, address_str
));
415 "[no] bridge IFNAME$ifname",
418 "Interface's name\n")
420 return (ldp_vty_l2vpn_bridge(vty
, no
, ifname
));
425 "[no] mtu (1500-9180)$mtu",
427 "Set Maximum Transmission Unit\n"
428 "Maximum Transmission Unit value\n")
430 return (ldp_vty_l2vpn_mtu(vty
, no
, mtu
));
433 DEFPY (ldp_member_interface
,
434 ldp_member_interface_cmd
,
435 "[no] member interface IFNAME$ifname",
437 "L2VPN member configuration\n"
439 "Interface's name\n")
441 return (ldp_vty_l2vpn_interface(vty
, no
, ifname
));
444 DEFPY_NOSH(ldp_member_pseudowire
,
445 ldp_member_pseudowire_cmd
,
446 "member pseudowire IFNAME$ifname",
447 "L2VPN member configuration\n"
448 "Pseudowire interface\n"
449 "Interface's name\n")
451 return (ldp_vty_l2vpn_pseudowire(vty
, NULL
, ifname
));
454 DEFPY (no_ldp_member_pseudowire
,
455 no_ldp_member_pseudowire_cmd
,
456 "no member pseudowire IFNAME$ifname",
458 "L2VPN member configuration\n"
459 "Pseudowire interface\n"
460 "Interface's name\n")
462 return (ldp_vty_l2vpn_pseudowire(vty
, "no", ifname
));
467 "[no] vc type <ethernet|ethernet-tagged>$vc_type",
469 "Virtual Circuit options\n"
470 "Virtual Circuit type to use\n"
471 "Ethernet (type 5)\n"
472 "Ethernet-tagged (type 4)\n")
474 return (ldp_vty_l2vpn_pwtype(vty
, no
, vc_type
));
477 DEFPY (ldp_control_word
,
478 ldp_control_word_cmd
,
479 "[no] control-word <exclude|include>$preference",
481 "Control-word options\n"
482 "Exclude control-word in pseudowire packets\n"
483 "Include control-word in pseudowire packets\n")
485 return (ldp_vty_l2vpn_pw_cword(vty
, no
, preference
));
488 DEFPY (ldp_neighbor_address
,
489 ldp_neighbor_address_cmd
,
490 "[no] neighbor address <A.B.C.D|X:X::X:X>$pw_address",
492 "Remote endpoint configuration\n"
493 "Specify the IPv4 or IPv6 address of the remote endpoint\n"
497 return (ldp_vty_l2vpn_pw_nbr_addr(vty
, no
, pw_address_str
));
500 DEFPY (ldp_neighbor_lsr_id
,
501 ldp_neighbor_lsr_id_cmd
,
502 "[no] neighbor lsr-id A.B.C.D$address",
504 "Remote endpoint configuration\n"
505 "Specify the LSR-ID of the remote endpoint\n"
508 return (ldp_vty_l2vpn_pw_nbr_id(vty
, no
, address
));
513 "[no] pw-id (1-4294967295)$pwid",
515 "Set the Virtual Circuit ID\n"
516 "Virtual Circuit ID value\n")
518 return (ldp_vty_l2vpn_pw_pwid(vty
, no
, pwid
));
521 DEFPY (ldp_pw_status_disable
,
522 ldp_pw_status_disable_cmd
,
523 "[no] pw-status disable",
525 "Configure PW status\n"
526 "Disable PW status\n")
528 return (ldp_vty_l2vpn_pw_pwstatus(vty
, no
));
531 DEFPY (ldp_clear_mpls_ldp_neighbor
,
532 ldp_clear_mpls_ldp_neighbor_cmd
,
533 "clear mpls ldp neighbor [<A.B.C.D|X:X::X:X>]$address",
535 "Reset MPLS statistical information\n"
537 "Clear LDP neighbor sessions\n"
541 return (ldp_vty_clear_nbr(vty
, address_str
));
544 DEFPY (ldp_debug_mpls_ldp_discovery_hello
,
545 ldp_debug_mpls_ldp_discovery_hello_cmd
,
546 "[no] debug mpls ldp discovery hello <recv|sent>$dir",
548 "Debugging functions\n"
550 "Label Distribution Protocol\n"
551 "Discovery messages\n"
552 "Discovery hello message\n"
553 "Received messages\n"
556 return (ldp_vty_debug(vty
, no
, "discovery", dir
, NULL
));
559 DEFPY (ldp_debug_mpls_ldp_type
,
560 ldp_debug_mpls_ldp_type_cmd
,
561 "[no] debug mpls ldp <errors|event|labels|sync|zebra>$type",
563 "Debugging functions\n"
565 "Label Distribution Protocol\n"
567 "LDP event information\n"
568 "LDP label allocation information\n"
569 "LDP sync information\n"
570 "LDP zebra information\n")
572 return (ldp_vty_debug(vty
, no
, type
, NULL
, NULL
));
575 DEFPY (ldp_debug_mpls_ldp_messages_recv
,
576 ldp_debug_mpls_ldp_messages_recv_cmd
,
577 "[no] debug mpls ldp messages recv [all]$all",
579 "Debugging functions\n"
581 "Label Distribution Protocol\n"
583 "Received messages, excluding periodic Keep Alives\n"
584 "Received messages, including periodic Keep Alives\n")
586 return (ldp_vty_debug(vty
, no
, "messages", "recv", all
));
589 DEFPY (ldp_debug_mpls_ldp_messages_sent
,
590 ldp_debug_mpls_ldp_messages_sent_cmd
,
591 "[no] debug mpls ldp messages sent [all]$all",
593 "Debugging functions\n"
595 "Label Distribution Protocol\n"
597 "Sent messages, excluding periodic Keep Alives\n"
598 "Sent messages, including periodic Keep Alives\n")
600 return (ldp_vty_debug(vty
, no
, "messages", "sent", all
));
603 DEFPY (ldp_show_mpls_ldp_binding
,
604 ldp_show_mpls_ldp_binding_cmd
,
605 "show mpls ldp [<ipv4|ipv6>]$af binding\
606 [<A.B.C.D/M|X:X::X:X/M>$prefix [longer-prefixes$longer_prefixes]]\
608 neighbor A.B.C.D$nbr\
609 |local-label (0-1048575)$local_label\
610 |remote-label (0-1048575)$remote_label\
612 [detail]$detail [json]$json",
613 "Show running system information\n"
615 "Label Distribution Protocol\n"
616 "IPv4 Address Family\n"
617 "IPv6 Address Family\n"
618 "Label Information Base (LIB) information\n"
619 "Destination prefix (IPv4)\n"
620 "Destination prefix (IPv6)\n"
621 "Include longer matches\n"
622 "Display labels from LDP neighbor\n"
624 "Match locally assigned label values\n"
625 "Locally assigned label value\n"
626 "Match remotely assigned label values\n"
627 "Remotely assigned label value\n"
628 "Show detailed information\n"
631 if (!(ldpd_conf
->flags
& F_LDPD_ENABLED
))
633 if (!local_label_str
)
634 local_label
= NO_LABEL
;
635 if (!remote_label_str
)
636 remote_label
= NO_LABEL
;
637 return (ldp_vty_show_binding(vty
, af
, prefix_str
, !!longer_prefixes
,
638 nbr_str
, local_label
, remote_label
, detail
, json
));
641 DEFPY (ldp_show_mpls_ldp_discovery
,
642 ldp_show_mpls_ldp_discovery_cmd
,
643 "show mpls ldp [<ipv4|ipv6>]$af discovery [detail]$detail [json]$json",
644 "Show running system information\n"
646 "Label Distribution Protocol\n"
647 "IPv4 Address Family\n"
648 "IPv6 Address Family\n"
649 "Discovery Hello Information\n"
650 "Show detailed information\n"
653 return (ldp_vty_show_discovery(vty
, af
, detail
, json
));
656 DEFPY (ldp_show_mpls_ldp_interface
,
657 ldp_show_mpls_ldp_interface_cmd
,
658 "show mpls ldp [<ipv4|ipv6>]$af interface [json]$json",
659 "Show running system information\n"
661 "Label Distribution Protocol\n"
662 "IPv4 Address Family\n"
663 "IPv6 Address Family\n"
664 "interface information\n"
667 return (ldp_vty_show_interface(vty
, af
, json
));
670 DEFPY (ldp_show_mpls_ldp_capabilities
,
671 ldp_show_mpls_ldp_capabilities_cmd
,
672 "show mpls ldp capabilities [json]$json",
673 "Show running system information\n"
675 "Label Distribution Protocol\n"
676 "Display LDP Capabilities information\n"
679 return (ldp_vty_show_capabilities(vty
, json
));
682 DEFPY (ldp_show_mpls_ldp_neighbor
,
683 ldp_show_mpls_ldp_neighbor_cmd
,
684 "show mpls ldp neighbor [A.B.C.D]$lsr_id [detail]$detail [json]$json",
685 "Show running system information\n"
687 "Label Distribution Protocol\n"
688 "Neighbor information\n"
690 "Show detailed information\n"
693 return (ldp_vty_show_neighbor(vty
, lsr_id_str
, 0, detail
, json
));
696 DEFPY (ldp_show_mpls_ldp_neighbor_capabilities
,
697 ldp_show_mpls_ldp_neighbor_capabilities_cmd
,
698 "show mpls ldp neighbor [A.B.C.D]$lsr_id capabilities [json]$json",
699 "Show running system information\n"
701 "Label Distribution Protocol\n"
702 "Neighbor information\n"
704 "Display neighbor capability information\n"
707 return (ldp_vty_show_neighbor(vty
, lsr_id_str
, 1, NULL
, json
));
710 DEFPY (ldp_show_mpls_ldp_igp_sync
,
711 ldp_show_mpls_ldp_igp_sync_cmd
,
712 "show mpls ldp igp-sync [json]$json",
713 "Show mpls ldp ldp-sync information\n"
715 "Label Distribution Protocol\n"
716 "LDP-IGP Sync information\n"
719 return (ldp_vty_show_ldp_sync(vty
, json
));
722 DEFPY (ldp_show_l2vpn_atom_binding
,
723 ldp_show_l2vpn_atom_binding_cmd
,
724 "show l2vpn atom binding\
727 |local-label (16-1048575)$local_label\
728 |remote-label (16-1048575)$remote_label\
731 "Show running system information\n"
732 "Show information about Layer2 VPN\n"
733 "Show Any Transport over MPLS information\n"
734 "Show AToM label binding information\n"
735 "Destination address of the VC\n"
736 "Match locally assigned label values\n"
737 "Locally assigned label value\n"
738 "Match remotely assigned label values\n"
739 "Remotely assigned label value\n"
742 if (!local_label_str
)
743 local_label
= NO_LABEL
;
744 if (!remote_label_str
)
745 remote_label
= NO_LABEL
;
746 return (ldp_vty_show_atom_binding(vty
, peer_str
, local_label
,
747 remote_label
, json
));
750 DEFPY (ldp_show_l2vpn_atom_vc
,
751 ldp_show_l2vpn_atom_vc_cmd
,
755 |interface IFNAME$ifname\
756 |vc-id (1-4294967295)$vcid\
759 "Show running system information\n"
760 "Show information about Layer2 VPN\n"
761 "Show Any Transport over MPLS information\n"
762 "Show AToM virtual circuit information\n"
763 "Destination address of the VC\n"
764 "Local interface of the pseudowire\n"
770 return (ldp_vty_show_atom_vc(vty
, peer_str
, ifname
, vcid_str
, json
));
773 DEFPY_NOSH (ldp_show_debugging_mpls_ldp
,
774 ldp_show_debugging_mpls_ldp_cmd
,
775 "show debugging [mpls ldp]",
776 "Show running system information\n"
777 "Debugging functions\n"
779 "Label Distribution Protocol\n")
781 return (ldp_vty_show_debugging(vty
));
785 l2vpn_autocomplete(vector comps
, struct cmd_token
*token
)
789 RB_FOREACH(l2vpn
, l2vpn_head
, &vty_conf
->l2vpn_tree
)
790 vector_set(comps
, XSTRDUP(MTYPE_COMPLETION
, l2vpn
->name
));
793 static const struct cmd_variable_handler l2vpn_var_handlers
[] = {
795 .varname
= "l2vpn_name",
796 .completions
= l2vpn_autocomplete
806 cmd_variable_handler_register(l2vpn_var_handlers
);
808 install_node(&ldp_node
);
809 install_node(&ldp_ipv4_node
);
810 install_node(&ldp_ipv6_node
);
811 install_node(&ldp_ipv4_iface_node
);
812 install_node(&ldp_ipv6_iface_node
);
813 install_node(&ldp_l2vpn_node
);
814 install_node(&ldp_pseudowire_node
);
815 install_node(&ldp_debug_node
);
816 install_default(LDP_NODE
);
817 install_default(LDP_IPV4_NODE
);
818 install_default(LDP_IPV6_NODE
);
819 install_default(LDP_IPV4_IFACE_NODE
);
820 install_default(LDP_IPV6_IFACE_NODE
);
821 install_default(LDP_L2VPN_NODE
);
822 install_default(LDP_PSEUDOWIRE_NODE
);
824 install_element(CONFIG_NODE
, &ldp_mpls_ldp_cmd
);
825 install_element(CONFIG_NODE
, &no_ldp_mpls_ldp_cmd
);
826 install_element(CONFIG_NODE
, &ldp_l2vpn_cmd
);
827 install_element(CONFIG_NODE
, &no_ldp_l2vpn_cmd
);
828 install_element(CONFIG_NODE
, &ldp_debug_mpls_ldp_discovery_hello_cmd
);
829 install_element(CONFIG_NODE
, &ldp_debug_mpls_ldp_type_cmd
);
830 install_element(CONFIG_NODE
, &ldp_debug_mpls_ldp_messages_recv_cmd
);
831 install_element(CONFIG_NODE
, &ldp_debug_mpls_ldp_messages_sent_cmd
);
833 install_element(LDP_NODE
, &ldp_address_family_cmd
);
834 install_element(LDP_NODE
, &no_ldp_address_family_cmd
);
835 install_element(LDP_NODE
, &ldp_discovery_link_holdtime_cmd
);
836 install_element(LDP_NODE
, &ldp_discovery_targeted_holdtime_cmd
);
837 install_element(LDP_NODE
, &ldp_discovery_link_interval_cmd
);
838 install_element(LDP_NODE
, &ldp_discovery_targeted_interval_cmd
);
839 install_element(LDP_NODE
, &ldp_dual_stack_transport_connection_prefer_ipv4_cmd
);
840 install_element(LDP_NODE
, &ldp_dual_stack_cisco_interop_cmd
);
841 install_element(LDP_NODE
, &ldp_neighbor_password_cmd
);
842 install_element(LDP_NODE
, &ldp_neighbor_session_holdtime_cmd
);
843 install_element(LDP_NODE
, &ldp_neighbor_ttl_security_cmd
);
844 install_element(LDP_NODE
, &ldp_router_id_cmd
);
845 install_element(LDP_NODE
, &ldp_ordered_control_cmd
);
846 install_element(LDP_NODE
, &ldp_wait_for_sync_cmd
);
848 install_element(LDP_IPV4_NODE
, &ldp_discovery_link_holdtime_cmd
);
849 install_element(LDP_IPV4_NODE
, &ldp_discovery_targeted_holdtime_cmd
);
850 install_element(LDP_IPV4_NODE
, &ldp_discovery_link_interval_cmd
);
851 install_element(LDP_IPV4_NODE
, &ldp_discovery_targeted_interval_cmd
);
852 install_element(LDP_IPV4_NODE
, &ldp_discovery_targeted_hello_accept_cmd
);
853 install_element(LDP_IPV4_NODE
, &ldp_discovery_transport_address_ipv4_cmd
);
854 install_element(LDP_IPV4_NODE
, &ldp_label_local_advertise_cmd
);
855 install_element(LDP_IPV4_NODE
, &ldp_label_local_advertise_explicit_null_cmd
);
856 install_element(LDP_IPV4_NODE
, &ldp_label_local_allocate_cmd
);
857 install_element(LDP_IPV4_NODE
, &ldp_label_remote_accept_cmd
);
858 install_element(LDP_IPV4_NODE
, &ldp_ttl_security_disable_cmd
);
859 install_element(LDP_IPV4_NODE
, &ldp_interface_cmd
);
860 install_element(LDP_IPV4_NODE
, &no_ldp_interface_cmd
);
861 install_element(LDP_IPV4_NODE
, &ldp_session_holdtime_cmd
);
862 install_element(LDP_IPV4_NODE
, &ldp_neighbor_ipv4_targeted_cmd
);
863 install_element(LDP_IPV4_NODE
, &ldp_exit_address_family_cmd
);
865 install_element(LDP_IPV6_NODE
, &ldp_discovery_link_holdtime_cmd
);
866 install_element(LDP_IPV6_NODE
, &ldp_discovery_targeted_holdtime_cmd
);
867 install_element(LDP_IPV6_NODE
, &ldp_discovery_link_interval_cmd
);
868 install_element(LDP_IPV6_NODE
, &ldp_discovery_targeted_interval_cmd
);
869 install_element(LDP_IPV6_NODE
, &ldp_discovery_targeted_hello_accept_cmd
);
870 install_element(LDP_IPV6_NODE
, &ldp_discovery_transport_address_ipv6_cmd
);
871 install_element(LDP_IPV6_NODE
, &ldp_label_local_advertise_cmd
);
872 install_element(LDP_IPV6_NODE
, &ldp_label_local_advertise_explicit_null_cmd
);
873 install_element(LDP_IPV6_NODE
, &ldp_label_local_allocate_cmd
);
874 install_element(LDP_IPV6_NODE
, &ldp_label_remote_accept_cmd
);
875 install_element(LDP_IPV6_NODE
, &ldp_ttl_security_disable_cmd
);
876 install_element(LDP_IPV6_NODE
, &ldp_interface_cmd
);
877 install_element(LDP_IPV6_NODE
, &no_ldp_interface_cmd
);
878 install_element(LDP_IPV6_NODE
, &ldp_session_holdtime_cmd
);
879 install_element(LDP_IPV6_NODE
, &ldp_neighbor_ipv6_targeted_cmd
);
880 install_element(LDP_IPV6_NODE
, &ldp_exit_address_family_cmd
);
882 install_element(LDP_IPV4_IFACE_NODE
, &ldp_discovery_link_holdtime_cmd
);
883 install_element(LDP_IPV4_IFACE_NODE
, &ldp_discovery_link_interval_cmd
);
885 install_element(LDP_IPV6_IFACE_NODE
, &ldp_discovery_link_holdtime_cmd
);
886 install_element(LDP_IPV6_IFACE_NODE
, &ldp_discovery_link_interval_cmd
);
888 install_element(LDP_L2VPN_NODE
, &ldp_bridge_cmd
);
889 install_element(LDP_L2VPN_NODE
, &ldp_mtu_cmd
);
890 install_element(LDP_L2VPN_NODE
, &ldp_member_interface_cmd
);
891 install_element(LDP_L2VPN_NODE
, &ldp_member_pseudowire_cmd
);
892 install_element(LDP_L2VPN_NODE
, &no_ldp_member_pseudowire_cmd
);
893 install_element(LDP_L2VPN_NODE
, &ldp_vc_type_cmd
);
895 install_element(LDP_PSEUDOWIRE_NODE
, &ldp_control_word_cmd
);
896 install_element(LDP_PSEUDOWIRE_NODE
, &ldp_neighbor_address_cmd
);
897 install_element(LDP_PSEUDOWIRE_NODE
, &ldp_neighbor_lsr_id_cmd
);
898 install_element(LDP_PSEUDOWIRE_NODE
, &ldp_pw_id_cmd
);
899 install_element(LDP_PSEUDOWIRE_NODE
, &ldp_pw_status_disable_cmd
);
901 install_element(ENABLE_NODE
, &ldp_clear_mpls_ldp_neighbor_cmd
);
902 install_element(ENABLE_NODE
, &ldp_debug_mpls_ldp_discovery_hello_cmd
);
903 install_element(ENABLE_NODE
, &ldp_debug_mpls_ldp_type_cmd
);
904 install_element(ENABLE_NODE
, &ldp_debug_mpls_ldp_messages_recv_cmd
);
905 install_element(ENABLE_NODE
, &ldp_debug_mpls_ldp_messages_sent_cmd
);
907 install_element(VIEW_NODE
, &ldp_show_mpls_ldp_binding_cmd
);
908 install_element(VIEW_NODE
, &ldp_show_mpls_ldp_discovery_cmd
);
909 install_element(VIEW_NODE
, &ldp_show_mpls_ldp_interface_cmd
);
910 install_element(VIEW_NODE
, &ldp_show_mpls_ldp_capabilities_cmd
);
911 install_element(VIEW_NODE
, &ldp_show_mpls_ldp_neighbor_cmd
);
912 install_element(VIEW_NODE
, &ldp_show_mpls_ldp_neighbor_capabilities_cmd
);
913 install_element(VIEW_NODE
, &ldp_show_l2vpn_atom_binding_cmd
);
914 install_element(VIEW_NODE
, &ldp_show_l2vpn_atom_vc_cmd
);
915 install_element(VIEW_NODE
, &ldp_show_debugging_mpls_ldp_cmd
);
916 install_element(VIEW_NODE
, &ldp_show_mpls_ldp_igp_sync_cmd
);