blob: e2195381776247f278c17bb936f0915f23c01a0b [file] [log] [blame]
Junxiao Shib99fb2b2015-06-19 15:10:11 -07001ndndump
2=======
3
4Usage
5-----
6
7::
8
Davide Pesavento24c08612018-07-26 13:33:24 -04009 ndndump [-hvV] [-i INTERFACE] [-r FILE] [-f FILTER] [PCAP-FILTER]
Junxiao Shib99fb2b2015-06-19 15:10:11 -070010
11Description
12-----------
13
Davide Pesavento24c08612018-07-26 13:33:24 -040014:program:`ndndump` is a traffic analysis tool that captures NDN packets on the wire and
15displays brief information about them.
Junxiao Shib99fb2b2015-06-19 15:10:11 -070016
Vince Lehmanf8852b32016-03-07 15:51:42 -060017Currently, :program:`ndndump` is capable of extracting Interest, Data, and Nack packets from:
Junxiao Shib99fb2b2015-06-19 15:10:11 -070018
Davide Pesavento24c08612018-07-26 13:33:24 -040019* Ethernet frame
Junxiao Shib99fb2b2015-06-19 15:10:11 -070020* PPP link (e.g., pcap trace from ndnSIM)
21* IPv4 UDP unicast tunnel
22* IPv4 UDP multicast group
Davide Pesavento24c08612018-07-26 13:33:24 -040023* IPv4 TCP tunnel, when Interest/Data/Nack is aligned to the beginning of a TCP segment
24
25For more complex scenarios, including the case of NDN packets that span multiple IP fragments
26or multiple TCP segments, it is recommended to use the **NDN Wireshark dissector**, either via
27:manpage:`wireshark(1)` or :manpage:`tshark(1)`.
Junxiao Shib99fb2b2015-06-19 15:10:11 -070028
29Options
30-------
31
Davide Pesavento24c08612018-07-26 13:33:24 -040032.. option:: -h, --help
Junxiao Shib99fb2b2015-06-19 15:10:11 -070033
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -050034 Print help and exit.
Junxiao Shib99fb2b2015-06-19 15:10:11 -070035
Davide Pesavento24c08612018-07-26 13:33:24 -040036.. option:: -i INTERFACE, --interface=INTERFACE
Junxiao Shib99fb2b2015-06-19 15:10:11 -070037
Davide Pesavento24c08612018-07-26 13:33:24 -040038 Listen on *INTERFACE*.
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -050039 If unspecified, ndndump searches the system interface list for the lowest numbered,
40 configured up interface (excluding loopback).
Davide Pesavento24c08612018-07-26 13:33:24 -040041 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 Shib99fb2b2015-06-19 15:10:11 -070043
Davide Pesavento24c08612018-07-26 13:33:24 -040044.. option:: -r FILE, --read=FILE
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -050045
Davide Pesavento24c08612018-07-26 13:33:24 -040046 Read packets from *FILE*, which can be created by :manpage:`tcpdump(8)` with its
47 ``-w`` option, or by similar programs.
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -050048
Davide Pesavento24c08612018-07-26 13:33:24 -040049.. 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 Pesaventob5b8f952018-07-26 14:19:16 -040057.. option:: -t, --no-timestamp
58
59 Do not print a timestamp for each packet.
60
Davide Pesavento24c08612018-07-26 13:33:24 -040061.. option:: -v, --verbose
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -050062
63 Produce verbose output.
64
Davide Pesavento24c08612018-07-26 13:33:24 -040065.. option:: -V, --version
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -050066
Davide Pesavento24c08612018-07-26 13:33:24 -040067 Print ndndump and libpcap version strings and exit.
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -050068
Davide Pesavento24c08612018-07-26 13:33:24 -040069.. option:: PCAP-FILTER
Alexander Afanasyev20c85cb2018-03-09 17:50:14 -050070
Davide Pesavento24c08612018-07-26 13:33:24 -040071 :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 Shib99fb2b2015-06-19 15:10:11 -070075
76Examples
77--------
78
Davide Pesavento24c08612018-07-26 13:33:24 -040079Capture on eth1 and print packets containing "ping"::
Junxiao Shib99fb2b2015-06-19 15:10:11 -070080
81 ndndump -i eth1 -f '.*ping.*'