]>
git.proxmox.com Git - mirror_iproute2.git/commit
ip: iplink_can.c: add json output support
Schema: IFLA_INFO_DATA
{
"ctrlmode": {
"type": "array",
"attr": "IFLA_CAN_CTRLMODE",
"array": [
{
"type": "string"
}
]
},
"state": {
"type": "string",
"attr": "IFLA_CAN_STATE"
},
"berr_counter": {
"type": "dict",
"attr": "IFLA_CAN_BERR_COUNTER",
"dict": {
"tx": {
"type": "int"
},
"rx": {
"type": "int"
}
}
},
"restart_ms": {
"type": "int",
"attr": "IFLA_CAN_RESTART_MS"
},
"bittiming": {
"type": "dict",
"attr": "IFLA_CAN_BITTIMING",
"dict": {
"bitrate": {
"type": "int"
},
"sample_point": {
"type": "float"
},
"tq": {
"type": "int"
},
"prop_seg": {
"type": "int"
},
"phase_seg1": {
"type": "int"
},
"phase_seg2": {
"type": "int"
},
"sjw": {
"type": "int"
}
}
},
"bittiming_const": {
"type": "dict",
"attr": "IFLA_CAN_BITTIMING_CONST",
"dict": {
"name": {
"type": "string"
},
"tseg1": {
"type": "dict",
"dict": {
"min": {
"type": "int"
},
"max": {
"type": "int"
}
}
},
"tseg2": {
"type": "dict",
"dict": {
"min": {
"type": "int"
},
"max": {
"type": "int"
}
}
},
"sjw": {
"type": "dict",
"dict": {
"min": {
"type": "int"
},
"max": {
"type": "int"
}
}
},
"brp": {
"type": "dict",
"dict": {
"min": {
"type": "int"
},
"max": {
"type": "int"
}
}
},
"brp_inc": {
"type": "int"
}
}
},
"bittiming_bitrate": {
"type": "uint",
"attr": "IFLA_CAN_BITTIMING"
},
"bitrate_const": {
"type": "array",
"attr": "IFLA_CAN_BITRATE_CONST",
"array": [
{
"type": "uint"
}
]
},
"data_bittiming": {
"type": "dict",
"attr": "IFLA_CAN_DATA_BITTIMING",
"dict": {
"bitrate": {
"type": "int"
},
"sample_point": {
"type": "float"
},
"tq": {
"type": "int"
},
"prop_seg": {
"type": "int"
},
"phase_seg1": {
"type": "int"
},
"phase_seg2": {
"type": "int"
},
"sjw": {
"type": "int"
}
}
},
"data_bittiming_const": {
"type": "dict",
"attr": "IFLA_CAN_DATA_BITTIMING_CONST",
"dict": {
"name": {
"type": "string"
},
"tseg1": {
"type": "dict",
"dict": {
"min": {
"type": "int"
},
"max": {
"type": "int"
}
}
},
"tseg2": {
"type": "dict",
"dict": {
"min": {
"type": "int"
},
"max": {
"type": "int"
}
}
},
"sjw": {
"type": "dict",
"dict": {
"min": {
"type": "int"
},
"max": {
"type": "int"
}
}
},
"brp": {
"type": "dict",
"dict": {
"min": {
"type": "int"
},
"max": {
"type": "int"
}
}
},
"brp_inc": {
"type": "int"
}
}
},
"data_bittiming_bitrate": {
"type": "uint",
"attr": "IFLA_CAN_DATA_BITTIMING"
},
"data_bitrate_const": {
"type": "array",
"attr": "IFLA_CAN_DATA_BITRATE_CONST",
"array": [
{
"type": "uint"
}
]
},
"termination": {
"type": "unsigned short",
"attr": "IFLA_CAN_TERMINATION"
},
"termination_const": {
"type": "array",
"attr": "IFLA_CAN_TERMINATION_CONST",
"array": [
{
"type": "unsigned short"
}
]
},
"clock": {
"type": "int",
"attr": "IFLA_CAN_CLOCK"
}
}
IFLA_INFO_XSTATS
{
"restarts": {
"type": "int"
},
"bus_error": {
"type": "int"
},
"arbitration_lost": {
"type": "int"
},
"error_warning": {
"type": "int"
},
"error_passive": {
"type": "int"
},
"bus_off": {
"type": "int"
}
}
Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>