WSUG: Update the filter dialog section.
[gd/wireshark/.git] / doc / extcap.pod
1 =begin man
2
3 =encoding utf8
4
5 =end man
6
7 =head1 NAME
8
9 extcap - The extcap interface
10
11 =head1 DESCRIPTION
12
13 The extcap interface is a versatile plugin interface that allows external binaries
14 to act as capture interfaces directly in wireshark. It is used in scenarios, where
15 the source of the capture is not a traditional capture model
16 (live capture from an interface, from a pipe, from a file, etc). The typical
17 example is connecting esoteric hardware of some kind to the main wireshark app.
18
19 Without extcap, a capture can always be achieved by directly writing to a capture file:
20
21     the-esoteric-binary --the-strange-flag --interface=stream1 --file dumpfile.pcap &
22     wireshark dumpfile.pcap
23
24 but the extcap interface allows for such a connection to be easily established and
25 configured using the wireshark GUI.
26
27 The extcap subsystem is made of multiple extcap binaries that are automatically
28 called by the GUI in a row. In the following chapters we will refer to them as
29 "the extcaps".
30
31 Extcaps may be any binary or script within the extcap directory. Please note, that scripts
32 need to be executable without prefacing a script interpreter before the call.
33
34 WINDOWS USER: Because of restrictions directly calling the script may not always work.
35 In such a case, a batch file may be provided, which then in turn executes the script. Please
36 refer to doc/extcap_example.py for more information.
37
38 When Wireshark launches an extcap, it automatically adds its installation path
39 (c:\Program Files\Wireshark\) to the DLL search path so that the extcap library dependencies
40 can be found (it is not designed to be launched by hand).  This is done on purpose. There should
41 only be extcap programs (executable, python scripts, ...) in the extcap folder to reduce the startup
42 time and not have Wireshark trying to execute other file types.
43
44
45 =head1 GRAMMAR ELEMENTS
46
47 Grammar elements:
48
49 =over 4
50
51 =item arg (options)
52
53 argument for CLI calling
54
55 =item number
56
57 Reference # of argument for other values, display order
58
59 =item call
60
61 Literal argument to call (--call=...)
62
63 =item display
64
65 Displayed name
66
67 =item default
68
69 Default value, in proper form for type
70
71 =item range
72
73 Range of valid values for UI checking (min,max) in proper form
74
75 =item type
76
77 Argument type for UI filtering for raw, or UI type for selector:
78
79     integer
80     unsigned
81     long (may include scientific / special notation)
82     float
83     selector (display selector table, all values as strings)
84     boolean (display checkbox)
85     radio (display group of radio buttons with provided values, all values as strings)
86     fileselect (display a dialog to select a file from the filesystem, value as string)
87     multicheck (display a textbox for selecting multiple options, values as strings)
88     password (display a textbox with masked text)
89     timestamp (display a calendar)
90
91 =item value (options)
92
93     Values for argument selection
94     arg     Argument # this value applies to
95
96 =back
97
98 =head1 EXAMPLES
99
100 Example 1:
101
102     arg {number=0}{call=--channel}{display=Wi-Fi Channel}{type=integer}{required=true}
103     arg {number=1}{call=--chanflags}{display=Channel Flags}{type=radio}
104     arg {number=2}{call=--interface}{display=Interface}{type=selector}
105     value {arg=0}{range=1,11}
106     value {arg=1}{value=ht40p}{display=HT40+}
107     value {arg=1}{value=ht40m}{display=HT40-}
108     value {arg=1}{value=ht20}{display=HT20}
109     value {arg=2}{value=wlan0}{display=wlan0}
110
111 Example 2:
112
113     arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
114     value {arg=0}{call=/dev/sysfs/usb/foo/123}{display=Ubertooth One sn 1234}
115     value {arg=0}{call=/dev/sysfs/usb/foo/456}{display=Ubertooth One sn 8901}
116
117 Example 3:
118
119     arg {number=0}{call=--usbdevice}{USB Device}{type=selector}
120     arg {number=1}{call=--server}{display=IP address for log server}{type=string}{validation=(?:\d{1,3}\.){3}\d{1,3}}
121     flag {failure=Permission denied opening Ubertooth device}
122
123 Example 4:
124     arg {number=0}{call=--username}{display=Username}{type=string}
125     arg {number=1}{call=--password}{display=Password}{type=password}
126
127 Example 5:
128     arg {number=0}{call=--start}{display=Start Time}{type=timestamp}
129     arg {number=1}{call=--end}{display=End Time}{type=timestamp}
130
131 =head1 Security awareness
132
133 =over 4
134
135 =item - Users running wireshark as root, we can't save you
136
137 =item - Dumpcap retains suid/setgid and group+x permissions to allow users in wireshark group only
138
139 =item - Third-party capture programs run w/ whatever privs they're installed with
140
141 =item - If an attacker can write to a system binary directory, we're game over anyhow
142
143 =item - Reference the folders tab in the wireshark->about information, to see from which directory extcap is being run
144
145 =back
146
147 =head1 SEE ALSO
148
149 wireshark(1), tshark(1), dumpcap(1), androiddump(1), sshdump(1), randpktdump(1)
150
151 =head1 NOTES
152
153 B<Extcap> is feature of B<Wireshark>.  The latest version
154 of B<Wireshark> can be found at L<https://www.wireshark.org>.
155
156 HTML versions of the Wireshark project man pages are available at:
157 L<https://www.wireshark.org/docs/man-pages>.