genode/repos/os/src/server/nic_dump
Martin Stein 181c78d482 timeout: use uint64_t for all plain time values
This enforces the use of unsigned 64-bit values for time in the duration type,
the timeout framework, the timer session, the userland timer-drivers, and the
alarm framework on all platforms. The commit also adapts the code that uses
these tools accross all basic repositories (base, base-*, os. gems, libports,
ports, dde_*) to use unsigned 64-bit values for time as well as far as this
does not imply profound modifications.

Fixes #3208
2019-05-06 16:15:26 +02:00
..
README nic_dump: default attribute 2018-04-10 11:20:49 +02:00
component.cc os: avoid using deprecated APIs 2019-01-30 13:49:54 +01:00
component.h Add missing override annotations 2019-02-19 11:12:11 +01:00
config.xsd base: define generic config XSD types globally 2018-08-28 16:48:47 +02:00
interface.cc timeout: use uint64_t for all plain time values 2019-05-06 16:15:26 +02:00
interface.h nic_dump: default attribute 2018-04-10 11:20:49 +02:00
main.cc timeout: use uint64_t for all plain time values 2019-05-06 16:15:26 +02:00
packet_log.cc net: use Size_guard for packet-data accessors 2018-05-30 13:36:11 +02:00
packet_log.h nic_dump: make protocols configurable 2018-04-10 11:20:49 +02:00
pointer.h os/server: nic_dump 2017-03-15 12:32:26 +01:00
target.mk nic_dump: add config XML schema file 2018-04-10 11:20:49 +02:00
uplink.cc nic_dump: make protocols configurable 2018-04-10 11:20:49 +02:00
uplink.h Add missing override annotations 2019-02-19 11:12:11 +01:00

README

The 'nic_dump' component is a bump-in-the-wire component for the NIC service
that does deep packet inspection for each passing packet and dumps the
gathered information to the log. This includes information about Ethernet,
ARP, IPv4, TCP, UDP, and DHCP.


Basics
~~~~~~

this is an example configuration of the component showing all attributes with
their default values (except config.uplink and config.downlink):

! <config uplink="uplink"
!         downlink="downlink"
!         time="no"
!         default="default"
!         eth="default"
!         arp="default"
!         ipv4="default"
!         dhcp="default"
!         udp="default"
!         icmp="default"
!         tcp="default" />

The values of the 'uplink' and 'downlink' attributes are used as log labels
for the two NIC peers. These labels are only relevant for the readability of
the log. The third attribute 'time' defines wether to print timing information
or not. Furthemore, as you can see, each supported protocol has an attribute
with the name of the protocol in the config tag. Each of these attributes
accepts one of four possible values:

* no      - do not print out this protocol
* name    - print only the protocol name
* default - print a short summary of the most important header values
* all     - print all available header values

The 'default' attribute is useful to change the default value for protocol
attributes that are not explicitely set.

An example output snippet of the component might be:

! (olivia <- karl) ETH ... ARP ... time 4626 (15)
! (karl <- olivia) ETH ... ARP ... time 4639 (7)
! (olivia <- karl) ETH ... IPV4 ... TCP ... time 4644 (5)
! (karl <- olivia) ETH ... IPV4 ... TCP ... time 4660 (6)

After the NIC peer labels and the traffic direction, the unfolding of the
protocols and their information follows. The printing order is from the lowest
to the highest networking layer. At the end of each line there is the word
'time' followed by two numbers if you have enabled timing information. The
first number is the packet-arrival time (the milliseconds since 'nic_dump' was
started). The second number is the time from the last packet that passed till
this one (milliseconds).

A comprehensive example of how to use the NIC dump can be found in the test
script 'libports/run/nic_dump.run'.