Subject: Re: [PATCH iproute2 net-next] bridge: this patch adds json support for bridge mdb show

From: Stephen Hemminger <[email-masked]>
Date: Tue, 18 Jul 2017 17:33:51 -0700

On Fri,  7 Jul 2017 15:24:16 -0700
Roopa Prabhu <[email-masked]> wrote:

> From: Nikhil Gajendrakumar <[email-masked]>
> 
> This patch adds json output to bridge mdb show
> 
> Normal Output:
> $ bridge -d -s mdb show
> dev br0 port swp3 grp 239.0.0.1 temp  vid 128 172.26
> dev br0 port swp3 grp 239.0.0.1 temp  vid 64 172.26
> dev br0 port swp2 grp 239.0.0.2 temp  vid 1024 172.26
> dev br0 port swp2 grp 239.0.0.2 temp  vid 256 172.26
> dev br0 port swp2 grp 239.0.0.2 temp  vid 1 172.26
> dev br0 port swp3 grp 239.0.0.1 temp  vid 1 172.26
> router ports on br0: swp4    0.00 permanent
> router ports on br0: swp5    0.00 permanent
> 
> Json Output:
> $ bridge -d -s -j mdb show
> {
>     "mdb": [{
>             "dev": "br0",
>             "port": "swp3",
>             "grp": "239.0.0.1",
>             "state": "temp",
>             "vid": 128,
>             "timer": " 166.74"
>         },{
>             "dev": "br0",
>             "port": "swp3",
>             "grp": "239.0.0.1",
>             "state": "temp",
>             "vid": 64,
>             "timer": " 166.74"
>         },{
>             "dev": "br0",
>             "port": "swp2",
>             "grp": "239.0.0.2",
>             "state": "temp",
>             "vid": 1024,
>             "timer": " 166.74"
>         },{
>             "dev": "br0",
>             "port": "swp2",
>             "grp": "239.0.0.2",
>             "state": "temp",
>             "vid": 256,
>             "timer": " 166.74"
>         },{
>             "dev": "br0",
>             "port": "swp2",
>             "grp": "239.0.0.2",
>             "state": "temp",
>             "vid": 1,
>             "timer": " 166.74"
>         },{
>             "dev": "br0",
>             "port": "swp3",
>             "grp": "239.0.0.1",
>             "state": "temp",
>             "vid": 1,
>             "timer": " 166.74"
>         }
>     ],
>     "router": {
>         "br0": [{
>                 "port": "swp4",
>                 "timer": "   0.00",
>                 "type": "permanent"
>             },{
>                 "port": "swp5",
>                 "timer": "   0.00",
>                 "type": "permanent"
>             }
>         ]
>     }
> }
> 
> Signed-off-by: Nikhil Gajendrakumar <[email-masked]>
> Signed-off-by: Roopa Prabhu <[email-masked]>

Applied, you should also update usage message and man page.