]> git.proxmox.com Git - mirror_iproute2.git/commit
tc: add json support in csum action
authorKeara Leibovitz <kleib@mojatatu.com>
Tue, 5 Jun 2018 20:44:19 +0000 (16:44 -0400)
committerDavid Ahern <dsahern@gmail.com>
Tue, 5 Jun 2018 22:30:30 +0000 (15:30 -0700)
commit831b5d40d91631b944e348fa2c5f0f2c46ffaccf
tree143edfd4de9b61232c4853bd83ed049c33f70885
parent55b973329c18627b2eac8507071e858a132e915b
tc: add json support in csum action

Add json output support for checksum action.

Example output:

~$ $TC actions add action csum udp continue index 7
~$ $TC actions add action csum icmp iph igmp pipe index 200 cookie 112233
~$ $TC -j actions ls action csum

[{
    "total acts":2
}, {
    "actions": [{
        "order":0,
        "csum":"udp",
        "control_action": {
            "type":"continue"
        },
        "index":7,
        "ref":1,
        "bind":0
    }, {
        "order":1,
        "csum":"iph, icmp, igmp",
        "control_action": {
            "type":"pipe"
        },
        "index":200,
        "ref":1,
        "bind":0,
        "cookie":"112233"
    }]
}]

v2:
    Don't initialized char buf[64];
    Add output example

Signed-off-by: Keara Leibovitz <kleib@mojatatu.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
tc/m_csum.c