net: Add IPv4/IPv6 header data to net_* tracepoints
This patch adds an enum field for the type of network header and a variant
field for the details of IPv4 and IPv6 headers. Any other network header is
empty.
Example babeltrace output:
[16:04:07.
443810277] (+0.
110633000) host0 net_dev_queue: { cpu_id = 0 },
{ skbaddr = 0xFFFF88003D9F4B00, len = 1462, name = "ens3",
network_header_type = ( "_ipv4" : container = 1 ),
network_header = { ipv4 = { version = 4, ihl = 5, tos = 0, tot_len = 1448,
id = 0x0, frag_off = 16384, ttl = 64, protocol = 6, checksum = 0xB04,
saddr_padding = { }, saddr = [ [0] = 10, [1] = 0, [2] = 10, [3] = 24 ],
daddr_padding = { }, daddr = [ [0] = 10, [1] = 0, [2] = 12, [3] = 42 ] }
} }
[16:04:10.
452192462] (+0.
000283214) host0 net_if_receive_skb: { cpu_id = 0 },
{ skbaddr = 0xFFFF88003D9F4900, len = 118, name = "ens3",
network_header_type = ( "_ipv6" : container = 2 ),
network_header = { ipv6 = { version = 6, prio = 0, flow_lbl_padding = { },
flow_lbl = [ [0] = 0x88, [1] = 0x41, [2] = 0x6F ], payload_len = 64,
nexthdr = 58, hop_limit = 64, saddr_padding = { },
saddr = [ [0] = 0xFE80, [1] = 0x0, [2] = 0x0, [3] = 0x0, [4] = 0x5054,
[5] = 0xFF, [6] = 0xFE12, [7] = 0x3456 ],
daddr_padding = { },
daddr = [ [0] = 0xFE80, [1] = 0x0, [2] = 0x0, [3] = 0x0, [4] = 0x40C,
[5] = 0xA9FF, [6] = 0xFEB5, [7] = 0xA75B ] }
} }
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>