]>
git.proxmox.com Git - mirror_iproute2.git/commit - ip/iplink_vlan.c
ip: iplink_vlan.c: add json output support
Schema:
{
"protocol": {
"type": "string",
"attr": "IFLA_VLAN_PROTOCOL"
},
"id": {
"type": "uint",
"attr": "IFLA_VLAN_ID"
},
"flags": {
"type": "array",
"attr": "IFLA_VLAN_FLAGS",
"array": [
{
"type": "string"
}
]
},
"ingress_qos": {
"type": "array",
"attr": "IFLA_VLAN_INGRESS_QOS",
"array": [
{
"type": "dict",
"dict": {
"from": {
"type": "uint"
},
"to": {
"type": "uint"
}
}
}
]
},
"egress_qos": {
"type": "array",
"attr": "IFLA_VLAN_EGRESS_QOS",
"array": [
{
"type": "dict",
"dict": {
"from": {
"type": "uint"
},
"to": {
"type": "uint"
}
}
}
]
}
}
$ ip link add name eth0.42 link eth0 type vlan id 42
$ ip -details -json link show
[{
"ifindex": 30,
"ifname": "eth0.42",
"link": "eth0",
"flags": ["BROADCAST","MULTICAST"],
"mtu": 1500,
"qdisc": "noop",
"operstate": "DOWN",
"linkmode": "DEFAULT",
"group": "default",
"link_type": "ether",
"address": "08:00:27:db:31:88",
"broadcast": "ff:ff:ff:ff:ff:ff",
"promiscuity": 0,
"linkinfo": {
"info_kind": "vlan",
"info_data": {
"protocol": "802.1Q",
"id": 42,
"flags": ["REORDER_HDR"]
}
},
"inet6_addr_gen_mode": "eui64",
"num_tx_queues": 1,
"num_rx_queues": 1,
"gso_max_size": 65536,
"gso_max_segs": 65535
}
]
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>