Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 1 | ndndump |
| 2 | ======= |
| 3 | |
| 4 | Usage |
| 5 | ----- |
| 6 | |
| 7 | :: |
| 8 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 9 | ndndump [-hvV] [-i INTERFACE] [-r FILE] [-f FILTER] [PCAP-FILTER] |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 10 | |
| 11 | Description |
| 12 | ----------- |
| 13 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 14 | :program:`ndndump` is a traffic analysis tool that captures NDN packets on the wire and |
| 15 | displays brief information about them. |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 16 | |
Vince Lehman | f8852b3 | 2016-03-07 15:51:42 -0600 | [diff] [blame] | 17 | Currently, :program:`ndndump` is capable of extracting Interest, Data, and Nack packets from: |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 18 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 19 | * Ethernet frame |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 20 | * PPP link (e.g., pcap trace from ndnSIM) |
| 21 | * IPv4 UDP unicast tunnel |
| 22 | * IPv4 UDP multicast group |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 23 | * IPv4 TCP tunnel, when Interest/Data/Nack is aligned to the beginning of a TCP segment |
| 24 | |
| 25 | For more complex scenarios, including the case of NDN packets that span multiple IP fragments |
| 26 | or multiple TCP segments, it is recommended to use the **NDN Wireshark dissector**, either via |
| 27 | :manpage:`wireshark(1)` or :manpage:`tshark(1)`. |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 28 | |
| 29 | Options |
| 30 | ------- |
| 31 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 32 | .. option:: -h, --help |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 33 | |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 34 | Print help and exit. |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 35 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 36 | .. option:: -i INTERFACE, --interface=INTERFACE |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 37 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 38 | Listen on *INTERFACE*. |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 39 | If unspecified, ndndump searches the system interface list for the lowest numbered, |
| 40 | configured up interface (excluding loopback). |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 41 | On Linux, a value of "any" can be used to capture packets from all interfaces. |
| 42 | Note that captures on the "any" pseudo-interface will not be done in promiscuous mode. |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 43 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 44 | .. option:: -r FILE, --read=FILE |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 45 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 46 | Read packets from *FILE*, which can be created by :manpage:`tcpdump(8)` with its |
| 47 | ``-w`` option, or by similar programs. |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 48 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 49 | .. option:: -f FILTER, --filter=FILTER |
| 50 | |
| 51 | Print a packet only if its name matches the regular expression *FILTER*. |
| 52 | |
| 53 | .. option:: -p, --no-promiscuous-mode |
| 54 | |
| 55 | Do not put the interface into promiscuous mode. |
| 56 | |
Davide Pesavento | b5b8f95 | 2018-07-26 14:19:16 -0400 | [diff] [blame] | 57 | .. option:: -t, --no-timestamp |
| 58 | |
| 59 | Do not print a timestamp for each packet. |
| 60 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 61 | .. option:: -v, --verbose |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 62 | |
| 63 | Produce verbose output. |
| 64 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 65 | .. option:: -V, --version |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 66 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 67 | Print ndndump and libpcap version strings and exit. |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 68 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 69 | .. option:: PCAP-FILTER |
Alexander Afanasyev | 20c85cb | 2018-03-09 17:50:14 -0500 | [diff] [blame] | 70 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 71 | :option:`PCAP-FILTER` is an expression in :manpage:`pcap-filter(7)` format that |
| 72 | selects which packets will be analyzed. |
| 73 | If no :option:`PCAP-FILTER` is given, a default filter is used. The default filter |
| 74 | can be seen with the :option:`--help` option. |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 75 | |
| 76 | Examples |
| 77 | -------- |
| 78 | |
Davide Pesavento | 24c0861 | 2018-07-26 13:33:24 -0400 | [diff] [blame] | 79 | Capture on eth1 and print packets containing "ping":: |
Junxiao Shi | b99fb2b | 2015-06-19 15:10:11 -0700 | [diff] [blame] | 80 | |
| 81 | ndndump -i eth1 -f '.*ping.*' |