net: Add IPv4/IPv6 header data to net_* tracepoints
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Mon, 11 Jul 2016 13:34:02 +0000 (09:34 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 14 Jul 2016 15:42:59 +0000 (11:42 -0400)
commite5990fd415d46da69523dfe7943bc3168664fde8
tree7ebf43d6ba52fe1cc3a1e020d4a3104790f17539
parent578e68ec82a889d3864e90ddc203d69360362110
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>
instrumentation/events/lttng-module/net.h
This page took 0.026618 seconds and 4 git commands to generate.