]> git.puffer.fish Git - matthieu/frr.git/commit
ldpd: add more filtering options in some "show" commands
authorRenato Westphal <renato@opensourcerouting.org>
Thu, 28 Sep 2017 22:42:46 +0000 (19:42 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 29 Sep 2017 00:51:05 +0000 (21:51 -0300)
commitf0722791a07f7ad2468be91f9c3d9399a01449f5
tree7fe124ae4c88a0657cc70c81960bef87056498e6
parent9e452e5dd18536c3fdec61c769061047af6e32ae
ldpd: add more filtering options in some "show" commands

Being able to filter the output of some "show" commands is super useful
when troubleshooting large MPLS networks.

Examples:

% show mpls ldp ipv4 binding 10.0.0.48/29 longer-prefixes neighbor 192.168.0.5
AF   Destination          Nexthop         Local Label Remote Label  In Use
ipv4 10.0.0.48/30         192.168.0.5     24          26                no
ipv4 10.0.0.52/30         192.168.0.5     25          27                no

% show mpls ldp ipv4 binding 10.0.0.48/29 longer-prefixes neighbor 192.168.0.5 detail json
{
  "10.0.0.48\/30":{
    "localLabel":"24",
    "advertisedTo":[
      {
        "neighborId":"192.168.0.5"
      }
    ],
    "remoteLabels":[
      {
        "neighborId":"192.168.0.5",
        "label":"26",
        "inUse":0
      }
    ]
  },
  "10.0.0.52\/30":{
    "localLabel":"25",
    "advertisedTo":[
      {
        "neighborId":"192.168.0.5"
      }
    ],
    "remoteLabels":[
      {
        "neighborId":"192.168.0.5",
        "label":"27",
        "inUse":0
      }
    ]
  }
}

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ldpd/ldp_vty.h
ldpd/ldp_vty_cmds.c
ldpd/ldp_vty_exec.c