]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[ipv4] Include network device metadata in packet traces
authorMichael Brown <mcb30@ipxe.org>
Thu, 5 May 2011 17:02:44 +0000 (18:02 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 5 May 2011 17:10:31 +0000 (18:10 +0100)
commitc1cc769ef4661f121cd7664f7d8fa4bd06dde005
tree6e71bd7e992406a82094a7b70b33474dcea1286c
parente58e4238b61c40a512206afecb9ad46a5da18cc5
[ipv4] Include network device metadata in packet traces

(Ab)use the "ident" field in transmitted IPv4 packets to convey
metadata about the network device.  In particular:

    bits 0-3 represent the low bits of the "RX" good packet counter
    bits 4-7 represent the low bits of the "RXE" bad packet counter
    bits 8-15 represent the transmitted packet sequence number

This allows some relevant information about the internal state of the
network device to be read out from a packet trace from a non-debug
build of iPXE.  In particular, it allows a packet trace containing
packets transmitted by iPXE to indicate whether or not any packets
have been received by iPXE.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/ipv4.c