]> git.proxmox.com Git - mirror_frr.git/blobdiff - ldpd/ldp_vty_cmds.c
doc: Add missing flowspec.rst to distribution tar file
[mirror_frr.git] / ldpd / ldp_vty_cmds.c
index 7da76185c636cf8662ffd4ca6c55622f2798faa9..8eed0899000c434469be782e488cf8f3492d3688 100644 (file)
 
 #include "command.h"
 #include "vty.h"
+#include "json.h"
+
 #include "ldpd/ldpd.h"
 #include "ldpd/ldp_vty.h"
+#ifndef VTYSH_EXTRACT_PL
 #include "ldpd/ldp_vty_cmds_clippy.c"
+#endif
 
-DEFUN_NOSH(ldp_mpls_ldp,
+DEFPY_NOSH(ldp_mpls_ldp,
        ldp_mpls_ldp_cmd,
        "mpls ldp",
        "Global MPLS configuration subcommands\n"
@@ -37,34 +41,28 @@ DEFUN_NOSH(ldp_mpls_ldp,
 DEFPY  (no_ldp_mpls_ldp,
        no_ldp_mpls_ldp_cmd,
        "no mpls ldp",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Global MPLS configuration subcommands\n"
        "Label Distribution Protocol\n")
 {
        return (ldp_vty_mpls_ldp(vty, "no"));
 }
 
-DEFUN_NOSH(ldp_l2vpn,
+DEFPY_NOSH(ldp_l2vpn,
        ldp_l2vpn_cmd,
-       "l2vpn WORD type vpls",
+       "l2vpn WORD$l2vpn_name type vpls",
        "Configure l2vpn commands\n"
        "L2VPN name\n"
        "L2VPN type\n"
        "Virtual Private LAN Service\n")
 {
-       int              idx = 0;
-       const char      *name;
-
-       argv_find(argv, argc, "WORD", &idx);
-       name = argv[idx]->arg;
-
-       return (ldp_vty_l2vpn(vty, 0, name));
+       return (ldp_vty_l2vpn(vty, NULL, l2vpn_name));
 }
 
 DEFPY  (no_ldp_l2vpn,
        no_ldp_l2vpn_cmd,
        "no l2vpn WORD$l2vpn_name type vpls",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure l2vpn commands\n"
        "L2VPN name\n"
        "L2VPN type\n"
@@ -73,26 +71,20 @@ DEFPY  (no_ldp_l2vpn,
        return (ldp_vty_l2vpn(vty, "no", l2vpn_name));
 }
 
-DEFUN_NOSH(ldp_address_family,
+DEFPY_NOSH(ldp_address_family,
        ldp_address_family_cmd,
-       "address-family <ipv4|ipv6>",
+       "address-family <ipv4|ipv6>$af",
        "Configure Address Family and its parameters\n"
        "IPv4\n"
        "IPv6\n")
 {
-       int              idx = 0;
-       const char      *af;
-
-       argv_find(argv, argc, "address-family", &idx);
-       af = argv[idx + 1]->text;
-
-       return (ldp_vty_address_family(vty, 0, af));
+       return (ldp_vty_address_family(vty, NULL, af));
 }
 
 DEFPY  (no_ldp_address_family,
        no_ldp_address_family_cmd,
        "no address-family <ipv4|ipv6>$af",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure Address Family and its parameters\n"
        "IPv4\n"
        "IPv6\n")
@@ -100,7 +92,7 @@ DEFPY  (no_ldp_address_family,
        return (ldp_vty_address_family(vty, "no", af));
 }
 
-DEFUN_NOSH(ldp_exit_address_family,
+DEFPY_NOSH(ldp_exit_address_family,
        ldp_exit_address_family_cmd,
        "exit-address-family",
        "Exit from Address Family configuration mode\n")
@@ -110,36 +102,58 @@ DEFUN_NOSH(ldp_exit_address_family,
        return CMD_SUCCESS;
 }
 
-DEFPY  (ldp_discovery_holdtime,
-       ldp_discovery_holdtime_cmd,
-       "[no] discovery <hello|targeted-hello>$hello_type holdtime (1-65535)$holdtime",
-       "Negate a command or set its defaults\n"
+DEFPY  (ldp_discovery_link_holdtime,
+       ldp_discovery_link_holdtime_cmd,
+       "[no] discovery hello holdtime (1-65535)$holdtime",
+       NO_STR
        "Configure discovery parameters\n"
        "LDP Link Hellos\n"
+       "Hello holdtime\n"
+       "Time (seconds) - 65535 implies infinite\n")
+{
+       return (ldp_vty_disc_holdtime(vty, no, HELLO_LINK, holdtime));
+}
+
+DEFPY  (ldp_discovery_targeted_holdtime,
+       ldp_discovery_targeted_holdtime_cmd,
+       "[no] discovery targeted-hello holdtime (1-65535)$holdtime",
+       NO_STR
+       "Configure discovery parameters\n"
        "LDP Targeted Hellos\n"
        "Hello holdtime\n"
        "Time (seconds) - 65535 implies infinite\n")
 {
-       return (ldp_vty_disc_holdtime(vty, no, hello_type, holdtime));
+       return (ldp_vty_disc_holdtime(vty, no, HELLO_TARGETED, holdtime));
 }
 
-DEFPY  (ldp_discovery_interval,
-       ldp_discovery_interval_cmd,
-       "[no] discovery <hello|targeted-hello>$hello_type interval (1-65535)$interval",
-       "Negate a command or set its defaults\n"
+DEFPY  (ldp_discovery_link_interval,
+       ldp_discovery_link_interval_cmd,
+       "[no] discovery hello interval (1-65535)$interval",
+       NO_STR
        "Configure discovery parameters\n"
        "LDP Link Hellos\n"
+       "Hello interval\n"
+       "Time (seconds)\n")
+{
+       return (ldp_vty_disc_interval(vty, no, HELLO_LINK, interval));
+}
+
+DEFPY  (ldp_discovery_targeted_interval,
+       ldp_discovery_targeted_interval_cmd,
+       "[no] discovery targeted-hello interval (1-65535)$interval",
+       NO_STR
+       "Configure discovery parameters\n"
        "LDP Targeted Hellos\n"
        "Hello interval\n"
        "Time (seconds)\n")
 {
-       return (ldp_vty_disc_interval(vty, no, hello_type, interval));
+       return (ldp_vty_disc_interval(vty, no, HELLO_TARGETED, interval));
 }
 
 DEFPY  (ldp_dual_stack_transport_connection_prefer_ipv4,
        ldp_dual_stack_transport_connection_prefer_ipv4_cmd,
        "[no] dual-stack transport-connection prefer ipv4",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure dual stack parameters\n"
        "Configure TCP transport parameters\n"
        "Configure prefered address family for TCP transport connection with neighbor\n"
@@ -151,7 +165,7 @@ DEFPY  (ldp_dual_stack_transport_connection_prefer_ipv4,
 DEFPY  (ldp_dual_stack_cisco_interop,
        ldp_dual_stack_cisco_interop_cmd,
        "[no] dual-stack cisco-interop",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure dual stack parameters\n"
        "Use Cisco non-compliant format to send and interpret the Dual-Stack capability TLV\n")
 {
@@ -161,7 +175,7 @@ DEFPY  (ldp_dual_stack_cisco_interop,
 DEFPY  (ldp_neighbor_password,
        ldp_neighbor_password_cmd,
        "[no] neighbor A.B.C.D$neighbor password WORD$password",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure neighbor parameters\n"
        "LDP Id of neighbor\n"
        "Configure password for MD5 authentication\n"
@@ -173,7 +187,7 @@ DEFPY  (ldp_neighbor_password,
 DEFPY  (ldp_neighbor_session_holdtime,
        ldp_neighbor_session_holdtime_cmd,
        "[no] neighbor A.B.C.D$neighbor session holdtime (15-65535)$holdtime",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure neighbor parameters\n"
        "LDP Id of neighbor\n"
        "Configure session parameters\n"
@@ -186,7 +200,7 @@ DEFPY  (ldp_neighbor_session_holdtime,
 DEFPY  (ldp_neighbor_ttl_security,
        ldp_neighbor_ttl_security_cmd,
        "[no] neighbor A.B.C.D$neighbor ttl-security <disable|hops (1-254)$hops>",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure neighbor parameters\n"
        "LDP Id of neighbor\n"
        "LDP ttl security check\n"
@@ -200,7 +214,7 @@ DEFPY  (ldp_neighbor_ttl_security,
 DEFPY  (ldp_router_id,
        ldp_router_id_cmd,
        "[no] router-id A.B.C.D$address",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure router Id\n"
        "LSR Id (in form of an IPv4 address)\n")
 {
@@ -210,7 +224,7 @@ DEFPY  (ldp_router_id,
 DEFPY  (ldp_discovery_targeted_hello_accept,
        ldp_discovery_targeted_hello_accept_cmd,
        "[no] discovery targeted-hello accept [from <(1-199)|(1300-2699)|WORD>$from_acl]",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure discovery parameters\n"
        "LDP Targeted Hellos\n"
        "Accept and respond to targeted hellos\n"
@@ -225,7 +239,7 @@ DEFPY  (ldp_discovery_targeted_hello_accept,
 DEFPY  (ldp_discovery_transport_address_ipv4,
        ldp_discovery_transport_address_ipv4_cmd,
        "[no] discovery transport-address A.B.C.D$address",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure discovery parameters\n"
        "Specify transport address for TCP connection\n"
        "IP address to be used as transport address\n")
@@ -236,7 +250,7 @@ DEFPY  (ldp_discovery_transport_address_ipv4,
 DEFPY  (ldp_discovery_transport_address_ipv6,
        ldp_discovery_transport_address_ipv6_cmd,
        "[no] discovery transport-address X:X::X:X$address",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure discovery parameters\n"
        "Specify transport address for TCP connection\n"
        "IPv6 address to be used as transport address\n")
@@ -247,7 +261,7 @@ DEFPY  (ldp_discovery_transport_address_ipv6,
 DEFPY  (ldp_label_local_advertise,
        ldp_label_local_advertise_cmd,
        "[no] label local advertise [{to <(1-199)|(1300-2699)|WORD>$to_acl|for <(1-199)|(1300-2699)|WORD>$for_acl}]",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure label control and policies\n"
        "Configure local label control and policies\n"
        "Configure outbound label advertisement control\n"
@@ -266,7 +280,7 @@ DEFPY  (ldp_label_local_advertise,
 DEFPY  (ldp_label_local_advertise_explicit_null,
        ldp_label_local_advertise_explicit_null_cmd,
        "[no] label local advertise explicit-null [for <(1-199)|(1300-2699)|WORD>$for_acl]",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure label control and policies\n"
        "Configure local label control and policies\n"
        "Configure outbound label advertisement control\n"
@@ -282,7 +296,7 @@ DEFPY  (ldp_label_local_advertise_explicit_null,
 DEFPY  (ldp_label_local_allocate,
        ldp_label_local_allocate_cmd,
        "[no] label local allocate <host-routes$host_routes|for <(1-199)|(1300-2699)|WORD>$for_acl>",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure label control and policies\n"
        "Configure local label control and policies\n"
        "Configure label allocation control\n"
@@ -298,7 +312,7 @@ DEFPY  (ldp_label_local_allocate,
 DEFPY  (ldp_label_remote_accept,
        ldp_label_remote_accept_cmd,
        "[no] label remote accept {from <(1-199)|(1300-2699)|WORD>$from_acl|for <(1-199)|(1300-2699)|WORD>$for_acl}",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure label control and policies\n"
        "Configure remote/peer label control and policies\n"
        "Configure inbound label acceptance control\n"
@@ -317,7 +331,7 @@ DEFPY  (ldp_label_remote_accept,
 DEFPY  (ldp_ttl_security_disable,
        ldp_ttl_security_disable_cmd,
        "[no] ttl-security disable",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "LDP ttl security check\n"
        "Disable ttl security\n")
 {
@@ -327,7 +341,7 @@ DEFPY  (ldp_ttl_security_disable,
 DEFPY  (ldp_session_holdtime,
        ldp_session_holdtime_cmd,
        "[no] session holdtime (15-65535)$holdtime",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure session parameters\n"
        "Configure session holdtime\n"
        "Time (seconds)\n")
@@ -335,25 +349,19 @@ DEFPY  (ldp_session_holdtime,
        return (ldp_vty_af_session_holdtime(vty, no, holdtime));
 }
 
-DEFUN_NOSH(ldp_interface,
+DEFPY_NOSH(ldp_interface,
        ldp_interface_cmd,
-       "interface IFNAME",
+       "interface IFNAME$ifname",
        "Enable LDP on an interface and enter interface submode\n"
        "Interface's name\n")
 {
-       int              idx = 0;
-       const char      *ifname;
-
-       argv_find(argv, argc, "IFNAME", &idx);
-       ifname = argv[idx]->arg;
-
-       return (ldp_vty_interface(vty, 0, ifname));
+       return (ldp_vty_interface(vty, NULL, ifname));
 }
 
 DEFPY  (no_ldp_interface,
        no_ldp_interface_cmd,
        "no interface IFNAME$ifname",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Enable LDP on an interface and enter interface submode\n"
        "Interface's name\n")
 {
@@ -363,7 +371,7 @@ DEFPY  (no_ldp_interface,
 DEFPY  (ldp_neighbor_ipv4_targeted,
        ldp_neighbor_ipv4_targeted_cmd,
        "[no] neighbor A.B.C.D$address targeted",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure neighbor parameters\n"
        "IP address of neighbor\n"
        "Establish targeted session\n")
@@ -374,7 +382,7 @@ DEFPY  (ldp_neighbor_ipv4_targeted,
 DEFPY  (ldp_neighbor_ipv6_targeted,
        ldp_neighbor_ipv6_targeted_cmd,
        "[no] neighbor X:X::X:X$address targeted",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure neighbor parameters\n"
        "IPv6 address of neighbor\n"
        "Establish targeted session\n")
@@ -385,7 +393,7 @@ DEFPY  (ldp_neighbor_ipv6_targeted,
 DEFPY  (ldp_bridge,
        ldp_bridge_cmd,
        "[no] bridge IFNAME$ifname",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Bridge interface\n"
        "Interface's name\n")
 {
@@ -395,7 +403,7 @@ DEFPY  (ldp_bridge,
 DEFPY  (ldp_mtu,
        ldp_mtu_cmd,
        "[no] mtu (1500-9180)$mtu",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Set Maximum Transmission Unit\n"
        "Maximum Transmission Unit value\n")
 {
@@ -405,7 +413,7 @@ DEFPY  (ldp_mtu,
 DEFPY  (ldp_member_interface,
        ldp_member_interface_cmd,
        "[no] member interface IFNAME$ifname",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "L2VPN member configuration\n"
        "Local interface\n"
        "Interface's name\n")
@@ -413,26 +421,20 @@ DEFPY  (ldp_member_interface,
        return (ldp_vty_l2vpn_interface(vty, no, ifname));
 }
 
-DEFUN_NOSH(ldp_member_pseudowire,
+DEFPY_NOSH(ldp_member_pseudowire,
        ldp_member_pseudowire_cmd,
-       "member pseudowire IFNAME",
+       "member pseudowire IFNAME$ifname",
        "L2VPN member configuration\n"
        "Pseudowire interface\n"
        "Interface's name\n")
 {
-       int              idx = 0;
-       const char      *ifname;
-
-       argv_find(argv, argc, "IFNAME", &idx);
-       ifname = argv[idx]->arg;
-
-       return (ldp_vty_l2vpn_pseudowire(vty, 0, ifname));
+       return (ldp_vty_l2vpn_pseudowire(vty, NULL, ifname));
 }
 
 DEFPY  (no_ldp_member_pseudowire,
        no_ldp_member_pseudowire_cmd,
        "no member pseudowire IFNAME$ifname",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "L2VPN member configuration\n"
        "Pseudowire interface\n"
        "Interface's name\n")
@@ -443,7 +445,7 @@ DEFPY  (no_ldp_member_pseudowire,
 DEFPY  (ldp_vc_type,
        ldp_vc_type_cmd,
        "[no] vc type <ethernet|ethernet-tagged>$vc_type",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Virtual Circuit options\n"
        "Virtual Circuit type to use\n"
        "Ethernet (type 5)\n"
@@ -455,7 +457,7 @@ DEFPY  (ldp_vc_type,
 DEFPY  (ldp_control_word,
        ldp_control_word_cmd,
        "[no] control-word <exclude|include>$preference",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Control-word options\n"
        "Exclude control-word in pseudowire packets\n"
        "Include control-word in pseudowire packets\n")
@@ -466,7 +468,7 @@ DEFPY  (ldp_control_word,
 DEFPY  (ldp_neighbor_address,
        ldp_neighbor_address_cmd,
        "[no] neighbor address <A.B.C.D|X:X::X:X>$pw_address",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Remote endpoint configuration\n"
        "Specify the IPv4 or IPv6 address of the remote endpoint\n"
        "IPv4 address\n"
@@ -478,7 +480,7 @@ DEFPY  (ldp_neighbor_address,
 DEFPY  (ldp_neighbor_lsr_id,
        ldp_neighbor_lsr_id_cmd,
        "[no] neighbor lsr-id A.B.C.D$address",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Remote endpoint configuration\n"
        "Specify the LSR-ID of the remote endpoint\n"
        "IPv4 address\n")
@@ -489,7 +491,7 @@ DEFPY  (ldp_neighbor_lsr_id,
 DEFPY  (ldp_pw_id,
        ldp_pw_id_cmd,
        "[no] pw-id (1-4294967295)$pwid",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Set the Virtual Circuit ID\n"
        "Virtual Circuit ID value\n")
 {
@@ -499,7 +501,7 @@ DEFPY  (ldp_pw_id,
 DEFPY  (ldp_pw_status_disable,
        ldp_pw_status_disable_cmd,
        "[no] pw-status disable",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Configure PW status\n"
        "Disable PW status\n")
 {
@@ -522,7 +524,7 @@ DEFPY  (ldp_clear_mpls_ldp_neighbor,
 DEFPY  (ldp_debug_mpls_ldp_discovery_hello,
        ldp_debug_mpls_ldp_discovery_hello_cmd,
        "[no] debug mpls ldp discovery hello <recv|sent>$dir",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Debugging functions\n"
        "MPLS information\n"
        "Label Distribution Protocol\n"
@@ -536,13 +538,14 @@ DEFPY  (ldp_debug_mpls_ldp_discovery_hello,
 
 DEFPY  (ldp_debug_mpls_ldp_type,
        ldp_debug_mpls_ldp_type_cmd,
-       "[no] debug mpls ldp <errors|event|zebra>$type",
-       "Negate a command or set its defaults\n"
+       "[no] debug mpls ldp <errors|event|labels|zebra>$type",
+       NO_STR
        "Debugging functions\n"
        "MPLS information\n"
        "Label Distribution Protocol\n"
        "Errors\n"
        "LDP event information\n"
+       "LDP label allocation information\n"
        "LDP zebra information\n")
 {
        return (ldp_vty_debug(vty, no, type, NULL, NULL));
@@ -551,7 +554,7 @@ DEFPY  (ldp_debug_mpls_ldp_type,
 DEFPY  (ldp_debug_mpls_ldp_messages_recv,
        ldp_debug_mpls_ldp_messages_recv_cmd,
        "[no] debug mpls ldp messages recv [all]$all",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Debugging functions\n"
        "MPLS information\n"
        "Label Distribution Protocol\n"
@@ -565,7 +568,7 @@ DEFPY  (ldp_debug_mpls_ldp_messages_recv,
 DEFPY  (ldp_debug_mpls_ldp_messages_sent,
        ldp_debug_mpls_ldp_messages_sent_cmd,
        "[no] debug mpls ldp messages sent [all]$all",
-       "Negate a command or set its defaults\n"
+       NO_STR
        "Debugging functions\n"
        "MPLS information\n"
        "Label Distribution Protocol\n"
@@ -578,17 +581,38 @@ DEFPY  (ldp_debug_mpls_ldp_messages_sent,
 
 DEFPY  (ldp_show_mpls_ldp_binding,
        ldp_show_mpls_ldp_binding_cmd,
-       "show mpls ldp [<ipv4|ipv6>]$af binding [detail]$detail [json]$json",
+       "show mpls ldp [<ipv4|ipv6>]$af binding\
+         [<A.B.C.D/M|X:X::X:X/M>$prefix [longer-prefixes$longer_prefixes]]\
+         [{\
+           neighbor A.B.C.D$nbr\
+           |local-label (0-1048575)$local_label\
+           |remote-label (0-1048575)$remote_label\
+         }]\
+        [detail]$detail [json]$json",
        "Show running system information\n"
        "MPLS information\n"
        "Label Distribution Protocol\n"
        "IPv4 Address Family\n"
        "IPv6 Address Family\n"
        "Label Information Base (LIB) information\n"
+       "Destination prefix (IPv4)\n"
+       "Destination prefix (IPv6)\n"
+       "Include longer matches\n"
+       "Display labels from LDP neighbor\n"
+       "Neighbor LSR-ID\n"
+       "Match locally assigned label values\n"
+       "Locally assigned label value\n"
+       "Match remotely assigned label values\n"
+       "Remotely assigned label value\n"
        "Show detailed information\n"
-       "JavaScript Object Notation\n")
+       JSON_STR)
 {
-       return (ldp_vty_show_binding(vty, af, detail, json));
+       if (!local_label_str)
+               local_label = NO_LABEL;
+       if (!remote_label_str)
+               remote_label = NO_LABEL;
+       return (ldp_vty_show_binding(vty, af, prefix_str, !!longer_prefixes,
+           nbr_str, local_label, remote_label, detail, json));
 }
 
 DEFPY  (ldp_show_mpls_ldp_discovery,
@@ -601,7 +625,7 @@ DEFPY  (ldp_show_mpls_ldp_discovery,
        "IPv6 Address Family\n"
        "Discovery Hello Information\n"
        "Show detailed information\n"
-       "JavaScript Object Notation\n")
+       JSON_STR)
 {
        return (ldp_vty_show_discovery(vty, af, detail, json));
 }
@@ -615,7 +639,7 @@ DEFPY  (ldp_show_mpls_ldp_interface,
        "IPv4 Address Family\n"
        "IPv6 Address Family\n"
        "interface information\n"
-       "JavaScript Object Notation\n")
+       JSON_STR)
 {
        return (ldp_vty_show_interface(vty, af, json));
 }
@@ -627,68 +651,97 @@ DEFPY  (ldp_show_mpls_ldp_capabilities,
        "MPLS information\n"
        "Label Distribution Protocol\n"
        "Display LDP Capabilities information\n"
-       "JavaScript Object Notation\n")
+       JSON_STR)
 {
        return (ldp_vty_show_capabilities(vty, json));
 }
 
 DEFPY  (ldp_show_mpls_ldp_neighbor,
        ldp_show_mpls_ldp_neighbor_cmd,
-       "show mpls ldp neighbor [detail]$detail [json]$json",
+       "show mpls ldp neighbor [A.B.C.D]$lsr_id [detail]$detail [json]$json",
        "Show running system information\n"
        "MPLS information\n"
        "Label Distribution Protocol\n"
        "Neighbor information\n"
+       "Neighbor LSR-ID\n"
        "Show detailed information\n"
-       "JavaScript Object Notation\n")
+       JSON_STR)
 {
-       return (ldp_vty_show_neighbor(vty, 0, detail, json));
+       return (ldp_vty_show_neighbor(vty, lsr_id_str, 0, detail, json));
 }
 
 DEFPY  (ldp_show_mpls_ldp_neighbor_capabilities,
        ldp_show_mpls_ldp_neighbor_capabilities_cmd,
-       "show mpls ldp neighbor capabilities [json]$json",
+       "show mpls ldp neighbor [A.B.C.D]$lsr_id capabilities [json]$json",
        "Show running system information\n"
        "MPLS information\n"
        "Label Distribution Protocol\n"
        "Neighbor information\n"
+       "Neighbor LSR-ID\n"
        "Display neighbor capability information\n"
-       "JavaScript Object Notation\n")
+       JSON_STR)
 {
-       return (ldp_vty_show_neighbor(vty, 1, NULL, json));
+       return (ldp_vty_show_neighbor(vty, lsr_id_str, 1, NULL, json));
 }
 
 DEFPY  (ldp_show_l2vpn_atom_binding,
        ldp_show_l2vpn_atom_binding_cmd,
-       "show l2vpn atom binding [json]$json",
+       "show l2vpn atom binding\
+         [{\
+           A.B.C.D$peer\
+           |local-label (16-1048575)$local_label\
+           |remote-label (16-1048575)$remote_label\
+         }]\
+        [json]$json",
        "Show running system information\n"
        "Show information about Layer2 VPN\n"
        "Show Any Transport over MPLS information\n"
        "Show AToM label binding information\n"
-       "JavaScript Object Notation\n")
+       "Destination address of the VC\n"
+       "Match locally assigned label values\n"
+       "Locally assigned label value\n"
+       "Match remotely assigned label values\n"
+       "Remotely assigned label value\n"
+       JSON_STR)
 {
-       return (ldp_vty_show_atom_binding(vty, json));
+       if (!local_label_str)
+               local_label = NO_LABEL;
+       if (!remote_label_str)
+               remote_label = NO_LABEL;
+       return (ldp_vty_show_atom_binding(vty, peer_str, local_label,
+           remote_label, json));
 }
 
 DEFPY  (ldp_show_l2vpn_atom_vc,
        ldp_show_l2vpn_atom_vc_cmd,
-       "show l2vpn atom vc [json]$json",
+       "show l2vpn atom vc\
+         [{\
+           A.B.C.D$peer\
+           |interface IFNAME$ifname\
+           |vc-id (1-4294967295)$vcid\
+         }]\
+        [json]$json",
        "Show running system information\n"
        "Show information about Layer2 VPN\n"
        "Show Any Transport over MPLS information\n"
        "Show AToM virtual circuit information\n"
-       "JavaScript Object Notation\n")
+       "Destination address of the VC\n"
+       "Local interface of the pseudowire\n"
+       "Interface's name\n"
+       "VC ID\n"
+       "VC ID\n"
+       JSON_STR)
 {
-       return (ldp_vty_show_atom_vc(vty, json));
+       return (ldp_vty_show_atom_vc(vty, peer_str, ifname, vcid_str, json));
 }
 
-DEFPY  (ldp_show_debugging_mpls_ldp,
-       ldp_show_debugging_mpls_ldp_cmd,
-       "show debugging mpls ldp",
-       "Show running system information\n"
-       "Debugging functions\n"
-       "MPLS information\n"
-       "Label Distribution Protocol\n")
+DEFPY_NOSH (ldp_show_debugging_mpls_ldp,
+           ldp_show_debugging_mpls_ldp_cmd,
+           "show debugging [mpls ldp]",
+           "Show running system information\n"
+           "Debugging functions\n"
+           "MPLS information\n"
+           "Label Distribution Protocol\n")
 {
        return (ldp_vty_show_debugging(vty));
 }
@@ -744,8 +797,10 @@ ldp_vty_init (void)
 
        install_element(LDP_NODE, &ldp_address_family_cmd);
        install_element(LDP_NODE, &no_ldp_address_family_cmd);
-       install_element(LDP_NODE, &ldp_discovery_holdtime_cmd);
-       install_element(LDP_NODE, &ldp_discovery_interval_cmd);
+       install_element(LDP_NODE, &ldp_discovery_link_holdtime_cmd);
+       install_element(LDP_NODE, &ldp_discovery_targeted_holdtime_cmd);
+       install_element(LDP_NODE, &ldp_discovery_link_interval_cmd);
+       install_element(LDP_NODE, &ldp_discovery_targeted_interval_cmd);
        install_element(LDP_NODE, &ldp_dual_stack_transport_connection_prefer_ipv4_cmd);
        install_element(LDP_NODE, &ldp_dual_stack_cisco_interop_cmd);
        install_element(LDP_NODE, &ldp_neighbor_password_cmd);
@@ -753,8 +808,10 @@ ldp_vty_init (void)
        install_element(LDP_NODE, &ldp_neighbor_ttl_security_cmd);
        install_element(LDP_NODE, &ldp_router_id_cmd);
 
-       install_element(LDP_IPV4_NODE, &ldp_discovery_holdtime_cmd);
-       install_element(LDP_IPV4_NODE, &ldp_discovery_interval_cmd);
+       install_element(LDP_IPV4_NODE, &ldp_discovery_link_holdtime_cmd);
+       install_element(LDP_IPV4_NODE, &ldp_discovery_targeted_holdtime_cmd);
+       install_element(LDP_IPV4_NODE, &ldp_discovery_link_interval_cmd);
+       install_element(LDP_IPV4_NODE, &ldp_discovery_targeted_interval_cmd);
        install_element(LDP_IPV4_NODE, &ldp_discovery_targeted_hello_accept_cmd);
        install_element(LDP_IPV4_NODE, &ldp_discovery_transport_address_ipv4_cmd);
        install_element(LDP_IPV4_NODE, &ldp_label_local_advertise_cmd);
@@ -768,8 +825,10 @@ ldp_vty_init (void)
        install_element(LDP_IPV4_NODE, &ldp_neighbor_ipv4_targeted_cmd);
        install_element(LDP_IPV4_NODE, &ldp_exit_address_family_cmd);
 
-       install_element(LDP_IPV6_NODE, &ldp_discovery_holdtime_cmd);
-       install_element(LDP_IPV6_NODE, &ldp_discovery_interval_cmd);
+       install_element(LDP_IPV6_NODE, &ldp_discovery_link_holdtime_cmd);
+       install_element(LDP_IPV6_NODE, &ldp_discovery_targeted_holdtime_cmd);
+       install_element(LDP_IPV6_NODE, &ldp_discovery_link_interval_cmd);
+       install_element(LDP_IPV6_NODE, &ldp_discovery_targeted_interval_cmd);
        install_element(LDP_IPV6_NODE, &ldp_discovery_targeted_hello_accept_cmd);
        install_element(LDP_IPV6_NODE, &ldp_discovery_transport_address_ipv6_cmd);
        install_element(LDP_IPV6_NODE, &ldp_label_local_advertise_cmd);
@@ -778,15 +837,16 @@ ldp_vty_init (void)
        install_element(LDP_IPV6_NODE, &ldp_label_remote_accept_cmd);
        install_element(LDP_IPV6_NODE, &ldp_ttl_security_disable_cmd);
        install_element(LDP_IPV6_NODE, &ldp_interface_cmd);
+       install_element(LDP_IPV6_NODE, &no_ldp_interface_cmd);
        install_element(LDP_IPV6_NODE, &ldp_session_holdtime_cmd);
        install_element(LDP_IPV6_NODE, &ldp_neighbor_ipv6_targeted_cmd);
        install_element(LDP_IPV6_NODE, &ldp_exit_address_family_cmd);
 
-       install_element(LDP_IPV4_IFACE_NODE, &ldp_discovery_holdtime_cmd);
-       install_element(LDP_IPV4_IFACE_NODE, &ldp_discovery_interval_cmd);
+       install_element(LDP_IPV4_IFACE_NODE, &ldp_discovery_link_holdtime_cmd);
+       install_element(LDP_IPV4_IFACE_NODE, &ldp_discovery_link_interval_cmd);
 
-       install_element(LDP_IPV6_IFACE_NODE, &ldp_discovery_holdtime_cmd);
-       install_element(LDP_IPV6_IFACE_NODE, &ldp_discovery_interval_cmd);
+       install_element(LDP_IPV6_IFACE_NODE, &ldp_discovery_link_holdtime_cmd);
+       install_element(LDP_IPV6_IFACE_NODE, &ldp_discovery_link_interval_cmd);
 
        install_element(LDP_L2VPN_NODE, &ldp_bridge_cmd);
        install_element(LDP_L2VPN_NODE, &ldp_mtu_cmd);