• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.github/H29-Dec-2021-240225

.gitlab/issue_templates/H29-Dec-2021-8442

.tx/H29-Dec-2021-2723

capture/H03-May-2022-10,6006,379

cmake/modules/H29-Dec-2021-4,4063,869

debian/H29-Dec-2021-6,9246,353

diameter/H29-Dec-2021-17,51414,983

doc/H03-May-2022-20,85116,081

docbook/H03-May-2022-25,77918,588

dtds/H29-Dec-2021-912732

epan/H03-May-2022-5,036,3734,028,681

extcap/H03-May-2022-8,5016,492

fix/H29-Dec-2021-54,62454,541

fuzz/H03-May-2022-688322

idl/H29-Dec-2021-17,31312,688

image/H03-May-2022-915761

macosx-support-lib-patches/H29-Dec-2021-12179

packaging/H29-Dec-2021-7,2955,744

plugins/H29-Dec-2021-122,85398,325

profiles/H29-Dec-2021-266256

protobuf/H29-Dec-2021-198163

radius/H29-Dec-2021-24,70022,160

randpkt_core/H03-May-2022-821616

speexdsp/H03-May-2022-1,9111,246

test/H29-Dec-2021-29,45223,361

tools/H03-May-2022-99,03776,867

tpncp/H29-Dec-2021-14,67714,676

ui/H03-May-2022-391,304328,457

wimaxasncp/H29-Dec-2021-3,4432,156

wiretap/H03-May-2022-79,69949,042

writecap/H03-May-2022-941636

wsutil/H03-May-2022-32,38018,580

.cirrus.ymlH A D29-Dec-2021353 1817

.editorconfigH A D29-Dec-20211.7 KiB11285

.gitlab-ci.ymlH A D29-Dec-202129.9 KiB698664

.mailmapH A D29-Dec-202115.9 KiB226225

.travis.ymlH A D29-Dec-20212.2 KiB8584

AUTHORSH A D29-Dec-2021149.7 KiB5,0714,395

AUTHORS.srcH A D29-Dec-2021106.1 KiB4,0243,350

CMakeGraphVizOptions.cmakeH A D29-Dec-2021475 1210

CMakeListsCustom.txt.exampleH A D29-Dec-20211.1 KiB4439

CODE_OF_CONDUCT.adocH A D29-Dec-20218.5 KiB12485

CONTRIBUTING.mdH A D29-Dec-20212.9 KiB4735

COPYINGH A D29-Dec-202126.8 KiB520424

ChangeLogH A D29-Dec-20213.8 KiB7170

ConfigureChecks.cmakeH A D29-Dec-20215.2 KiB183171

INSTALLH A D29-Dec-20218.2 KiB205155

NEWSH A D29-Dec-20216.1 KiB165116

README.DECTH A D29-Dec-20211.2 KiB4030

README.aixH A D29-Dec-202111.7 KiB341254

README.bsdH A D29-Dec-20214.2 KiB12185

README.hpuxH A D29-Dec-202112.4 KiB362270

README.linuxH A D29-Dec-20215.5 KiB11796

README.macosH A D29-Dec-20215.7 KiB135102

README.mdH A D29-Dec-20218.5 KiB223167

README.msys2H A D29-Dec-20212 KiB7245

README.windowsH A D29-Dec-2021733 2414

VagrantfileH A D29-Dec-20211.5 KiB4636

WiresharkConfig.cmake.inH A D29-Dec-2021739 2014

appveyor.ymlH A D29-Dec-20212.3 KiB7159

capinfos.cH A D29-Dec-202157.2 KiB1,8891,428

capture_opts.cH A D29-Dec-202155.3 KiB1,3731,069

capture_opts.hH A D29-Dec-202114.7 KiB399254

captype.cH A D29-Dec-20214.9 KiB216135

cfile.cH A D29-Dec-2021740 399

cfile.hH A D29-Dec-20217.6 KiB155105

cfiltersH A D29-Dec-2021582 1615

cli_main.cH A D29-Dec-20211.9 KiB7949

cli_main.hH A D29-Dec-2021681 224

cmake_uninstall.cmake.inH A D29-Dec-20211.4 KiB4339

cmakeconfig.h.inH A D03-May-20228.7 KiB326222

colorfiltersH A D29-Dec-20212 KiB2221

dfilter_macrosH A D29-Dec-2021357 76

dfiltersH A D29-Dec-2021687 1716

dftest.cH A D29-Dec-20214.4 KiB190102

doxygen.cfg.inH A D29-Dec-2021111.2 KiB2,5972,026

dumpcap.cH A D29-Dec-2021218.4 KiB5,7994,059

editcap.cH A D29-Dec-202190.9 KiB2,4691,814

enterprises.tsvH A D29-Dec-20211.5 MiB58,06958,067

extcap.cH A D03-May-202262.7 KiB2,0921,572

extcap.hH A D29-Dec-20218 KiB25780

extcap_parser.cH A D29-Dec-202133.3 KiB1,002771

extcap_parser.hH A D29-Dec-20215.1 KiB226135

file.cH A D29-Dec-2021154.9 KiB5,0333,060

file.hH A D29-Dec-202123.2 KiB749171

file_packet_provider.cH A D29-Dec-20212.8 KiB9463

fileset.cH A D29-Dec-202110.3 KiB436269

fileset.hH A D29-Dec-20212.4 KiB8828

frame_tvbuff.cH A D29-Dec-20218.4 KiB345189

frame_tvbuff.hH A D29-Dec-20211.2 KiB5219

globals.hH A D29-Dec-2021718 4112

manufH A D29-Dec-20211.8 MiB44,71044,703

manuf.tmplH A D29-Dec-202114.4 KiB309306

mergecap.cH A D29-Dec-202113 KiB440312

mmdbresolve.cH A D29-Dec-20216.8 KiB205151

org.wireshark.Wireshark-mime.xmlH A D29-Dec-20218.3 KiB246198

org.wireshark.Wireshark.desktopH A D29-Dec-20215 KiB112111

org.wireshark.Wireshark.metainfo.xmlH A D29-Dec-20212.6 KiB5955

pdml2html.xslH A D29-Dec-20216.3 KiB222175

pytest.iniH A D29-Dec-2021101 65

randpkt.cH A D29-Dec-20216.1 KiB275192

rawshark.cH A D29-Dec-202149.3 KiB1,5191,073

reordercap.cH A D29-Dec-202111.1 KiB389253

ringbuffer.cH A D29-Dec-202114.4 KiB601399

ringbuffer.hH A D29-Dec-20211.5 KiB5220

servicesH A D29-Dec-2021262 KiB6,2046,202

sharkd.cH A D29-Dec-202120.9 KiB774492

sharkd.hH A D29-Dec-20212.2 KiB7438

sharkd_daemon.cH A D29-Dec-202111.3 KiB480335

sharkd_session.cH A D29-Dec-2021138.1 KiB5,1013,537

smi_modulesH A D29-Dec-2021315 1918

sync_pipe.hH A D29-Dec-20212.8 KiB9224

sync_pipe_write.cH A D29-Dec-20212.8 KiB10647

text2pcap-scanner.lH A D29-Dec-20212.8 KiB11350

text2pcap.cH A D29-Dec-202169 KiB1,9521,449

text2pcap.hH A D29-Dec-2021881 4612

tfshark.cH A D29-Dec-202169.8 KiB2,2261,503

tshark.cH A D29-Dec-2021153.2 KiB4,5573,172

vagrant_build.shH A D29-Dec-2021548 219

wireshark.doxH A D29-Dec-2021114 105

wireshark.pc.inH A D29-Dec-2021320 1512

wkaH A D29-Dec-202111 KiB271266

ws_attributes.hH A D29-Dec-20212.1 KiB7934

ws_compiler_tests.hH A D29-Dec-20214.3 KiB13942

ws_diag_control.hH A D29-Dec-20217.7 KiB253110

ws_log_defs.hH A D29-Dec-20211.9 KiB7323

ws_symbol_export.hH A D29-Dec-20215.9 KiB20349

ws_version.h.inH A D29-Dec-2021273 117

wspcap.hH A D29-Dec-20212.5 KiB667

README.DECT

1Description:
2============
3DECT pcap files can be obtained by using tools included with the linux
4kernel driver for the Dosch-and-Amand COM-ON-AIR cards. The driver is
5called com-on-air_cs.
6
7Wireshark cannot directly record from the DECT HW, as the driver
8currently lacks a virtual network interface.
9
10There is ongoing work to change this (see this work by Patrick McHardy):
11git clone git://git.kernel.org/pub/scm/linux/kernel/git/kaber/dect-2.6.git
12git clone git://git.kernel.org/pub/scm/linux/kernel/git/kaber/libnl-dect.git
13git clone git://git.kernel.org/pub/scm/libs/netlink/libnl.git
14Also needed are a proper linktype value assigned by the libpcap team and
15the proper patches for libpcap to support this (the value used in the
16patch below is not officially assigned!):
17git://git.kernel.org/pub/scm/linux/kernel/git/kaber/libpcap-dect.git
18
19To nicely view DECT pcap files in wireshark, set up a custom layout:
20
21Edit->Preferences...
22  User Interface
23    Colums
24
25      No.      | Number
26      Protocol | Protocol
27      Frame    | Custom Column: dect.framenumber
28      TA       | Custom Column: dect.cc.TA
29      A-Field  | Custom Column: dect.cc.AField
30      B-Field  | Custom Column: dect.cc.BField
31  OK
32
33
34Edit->Configuration Profiles...
35  New
36  Profile Name = dect
37  OK
38
39
40

README.aix

1libpcap 0.7.1 and later appear to work on AIX when using AIX's native
2BPF; that appears to work better than DLPI does.  Note that you may have
3to run AIX's tcpdump, as root, before configuring, building, and
4installing libpcap, in order to create the "/dev/bpf" devices and load
5the BPF driver.
6
7However, libpcap 0.7.1 doesn't work perfectly with AIX's BPF - it
8appears that AIX's BPF devices inform their user that packets were
9dropped since the last successful read by returning -1 and setting
10"errno" to EFAULT, which libpcap 0.7.1 treats as an error.  The current
11CVS version of libpcap ignores EFAULT on AIX; it appears that this fixes
12the problem.
13
14Some earlier notes:
15
16The notes about libpcap may not apply, with libpcap 0.7.1 and later, but
17they're preserved here for historical reasons.
18
19The notes about glib, gtk+, and Ethereal may not apply, as we're now
20using GLib 2.x and GTK+ 2.x, and don't have our own gtkclist.c, but
21they're also preserved for historical reasons.
22
23After much work and toil, Craig Rodrigues was able to compile libpcap
24and Ethereal on AIX 4.3.2.  His odyssey is document in various e-mails
25at https://www.wireshark.org/lists/ethereal-dev/199911/
26
27Here are a few excerpts.  Note that, to configure "libpcap" to use DLPI
28rather than BPF (which it'll apparently use by default on AIX),
29specifying the flag
30
31	--with-pcap=dlpi
32
33to the "configure" script for "libpcap" should do the trick.
34
35The source code changes to Ethereal mentioned below should be in the
36current source tree.  The changes to the GLib configure script is in
37GLib 1.2.7; the changes for the "-lgdk" problem are probably still
38necessary in the current version of GTK+.
39
40Subject: Re: [ethereal-dev] Re: [ethereal-users] Problems compiling 0.7.7 under AIX 4.3.2
41From: Gilbert Ramirez <gram@xiexie.org>
42Date: Fri, 5 Nov 1999 16:58:17 -0600
43To: Guy Harris <guy@netapp.com>
44Cc: Craig Rodrigues <rodrigc@mediaone.net>, ethereal-dev@zing.org
45
46
47On Fri, Nov 05, 1999 at 01:42:44PM -0600, Guy Harris wrote:
48>
49>
50> Hmm.
51>
52> Looks suspiciously similar to the previous error; have you tried
53> recompiling GTK+ with "xlc_r"?
54
55I believe glib and gtk+ should both be compiled with xlc_r. I haven't
56compiled on AIX in a long time, but I think it's because glib is including
57pthread stuff, so the re-entrant C library, libc_r, is needed.
58
59
60Compiler Invocation
61
62When compiling a multi-threaded program, you should invoke the C compiler
63using one of the following commands:
64
65xlc_r
66    Invokes the compiler with default language level of ansi.
67cc_r
68    Invokes the compiler with default language level of extended.
69
70
71These commands ensure that the adequate options and libraries are used to be
72compliant with the X/Open Version 5 Standard. The POSIX Threads
73Specification 1003.1c is a subset of the X/Open Specification.
74
75The following libraries are automatically linked with your program when using these commands:
76
77libpthreads.a
78	    Threads library.
79libc.a
80	    Standard C library
81
82
83For example, the following command compiles the foo.c multi-threaded C source file and produces the foo executable file:
84
85cc_r -o foo foo.c
86
87See the cc command for more information about C For AIX.
88
89
90--gilbert
91
92
93To: ethereal-users@zing.org
94Subject: [ethereal-dev] AIX: gtk problem solved, now an ethereal problem
95From: Craig Rodrigues <rodrigc@mediaone.net>
96Date: Mon, 8 Nov 1999 10:46:25 -0500
97Cc: ethereal-dev@zing.org
98
99
100Hi,
101
102After much sweat and toil, I have managed to get gtk 1.2.6 to
103compile and not dump core under AIX.  The solutions were to
104(1) apply the attached patch to the configure.ac in the glib-1.2.6
105subdirectory
106
107(2)  In the file gtk+-1.2.6/gtk/Makefile, add a link flag -lgdk to link
108in gdk.
109
110I have submitted (1) to the gtk-devel mailing list where it has been
111accepted.  (2) is an uglier problem, but for now, adding -lgdk by hand
112seems to work.
113
114Now I have a problem....I compiled gtk, and that works.
115I compiled ethereal (after some minor mods), and it starts,
116but when I click on Capture -> Start, I get:
117
118"There are no network interfaces that can be opened."
119
120I am running as root, so I don't think permissions are a problem.
121
122Any ideas?
123
124Thanks.
125--
126Craig Rodrigues
127http://www.gis.net/~craigr
128rodrigc@mediaone.net
129
130*** configure.ac.old    Thu Oct  7 17:27:43 1999
131--- configure.ac        Sun Nov  7 19:34:36 1999
132***************
133*** 795,809 ****
134	  fi
135	  if test "$ac_cv_func_getpwuid_r" = "yes"; then
136		  AC_MSG_CHECKING(whether getpwuid_r is posix like)
137!                       # getpwuid_r(0, NULL, NULL, 0) is the signature on
138!                       # solaris, if that is not found, the prog below won't
139!                       # compile, then the posix signature is assumed as
140!                       # the default.
141!                       AC_TRY_COMPILE([#include <pwd.h>],
142!                               [getpwuid_r(0, NULL, NULL, 0);],
143!                               [AC_MSG_RESULT(no)],
144!                               [AC_MSG_RESULT(yes)
145!                               AC_DEFINE(HAVE_GETPWUID_R_POSIX)])
146	  fi
147  fi
148  if test x"$have_threads" = xposix; then
149--- 795,809 ----
150	  fi
151	  if test "$ac_cv_func_getpwuid_r" = "yes"; then
152		  AC_MSG_CHECKING(whether getpwuid_r is posix like)
153!                       # The signature for the POSIX version is:
154!                       # int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **)
155!                       AC_TRY_COMPILE([#include <pwd.h>
156!                                         #include <sys/types.h>
157!                                         #include <stdlib.h>],
158!                               [getpwuid_r((uid_t)0, NULL, NULL, (size_t)0, NULL);],
159!                               [AC_DEFINE(HAVE_GETPWUID_R_POSIX)
160!                               AC_MSG_RESULT(yes)],
161!                               [AC_MSG_RESULT(no)])
162	  fi
163  fi
164  if test x"$have_threads" = xposix; then
165
166
167
168To: ethereal-dev@zing.org
169Subject: Re: [ethereal-dev] AIX: gtk problem solved, now an ethereal problem
170From: Craig Rodrigues <rodrigc@mediaone.net>
171Date: Wed, 10 Nov 1999 12:18:47 -0500
172
173
174
175Hi,
176
177OK, I'm getting closer and closer to this working on AIX.
178
179Things I've done:
180
181(1) In a bunch of places in the code I removed '//' style C++ comments
182which the IBM C compiler didn't like.
183
184(2) I also found some places in the code like:
185
186enum some_enum {  FOO, BAR, };
187
188IBM C did not like the trailing "," after BAR.
189
190(3) In packet-ipv6.h, IPV6_VERSION is defined, but that is already
191defined in <netinet/in.h> on AIX 4.3, so for now I just commented that out.
192
193(4) in packet-afs.c, when it sucks in <netinet/in.h>,  in.h sucks in
194<sys/machine.h> which defines LITTLE_ENDIAN.  This conflicts with
195LITTLE_ENDIAN in globals.h.  So what I did was, in globals.h, I added:
196
197#ifdef HAVE_NETINET_IN_H
198#include <netinet/in.h>
199#endif
200
201So after doing all these things, I can compile ethereal and run it.
202I can list the
203correct network interfaces on my system: lo0 and en0.  However,
204when I start capturing packets on en0, they are all of the protocol type
205"TRMAC" and "TR".  The only problem is, I'm not on a Token Ring network.
206
207Any ideas?
208
209No. Time        Source                Destination           Protocol   Info
2101 0.000000    0a:30:a1:08:00:45     06:74:60:08:00:5a     TR   Token-Ring Unknown
2112 0.210304    0a:30:a1:08:00:45     06:74:60:08:00:5a     TR   Token-Ring Unknown
2123 0.926080    0a:30:a1:08:00:45     06:74:60:08:00:5a     TR   Token-Ring Unknown
2134 0.4236416   0a:30:a1:08:00:45     06:74:60:08:00:5a     TR   Token-Ring Unknown
2145 0.4712064   6f:06:74:60:08:00     5a:8a:30:a1:00:00 TR MAC Unknown Major Vector: 127
215
216
217---------------------
218It turns out that libpcap was using IFT_* numbers instead of DLT_* numbers for
219link types. That has been fixed
220---------------------
221
222
223To: tcpdump-workers@tcpdump.org
224Subject: [ethereal-dev] Sucess with libpcap under AIX
225From: Craig Rodrigues <rodrigc@mediaone.net>
226Date: Sat, 20 Nov 1999 03:34:50 -0500
227Cc: ethereal-dev@zing.org
228
229
230Hi,
231
232I have managed to successfully compile and use the latest
233snapshot of libpcap under AIX using DLPI.  bpf is majorly
234brain-dead under AIX, and very unsupported.  Rather than
235find all the bugs in AIX's bpf, I decided to try using
236dlpi, which is officially supported.
237
238The first step is to get the setup right.  To determine if
239you have the dlpi driver loaded correctly, type:
240strload -q -d dlpi
241
242If the result is:
243dlpi: yes
244
245then you are ready to use dlpi.
246
247If you get:
248dlpi: no
249
250Then you need to type:
251strload -f /etc/dlpi.conf
252
253Check again with strload -q -d dlpi that the dlpi driver is loaded.
254
255I had to make one minor code change to pcap-dlpi.c.  Maybe someone
256can explain it to me, because I am not familiar with dlpi or
257streams programming.  It took me hours to figure this out, because
258I'm not familiar with dlpi.
259
260In pcap-dlpi.c, lines 316-320:
261#if !defined(HAVE_HPUX9) && !defined(HAVE_HPUX10_20) && !defined(sinix)
262       if (dlbindreq(p->fd, 0, ebuf) < 0 ||
263	   dlbindack(p->fd, (char *)buf, ebuf) < 0)
264	    goto bad;
265#endif
266
267I changed it to:
268#if !defined(HAVE_HPUX9) && !defined(HAVE_HPUX10_20) && !defined(sinix)
269       if (dlbindreq(p->fd, 1620, ebuf) < 0 ||
270	   dlbindack(p->fd, (char *)buf, ebuf) < 0)
271	    goto bad;
272#endif
273
274I picked the number 1620 out of thin air.  The second parameter
275to dlbindreq() sets the value of dl_sap.  This dl_sap
276value is then passed along to the DLPI driver through
277the DL_BIND_REQ primitive.  I guess that it cannot be 0 under
278AIX, but I'm not sure.
279
280If someone knows anything about DLPI, I'd appreciate a clarification.
281Basically, I am just using the DLPI specification at:
282http://www.opengroup.org/onlinepubs/009638599/ which is pretty good.
283The AIX documentation is not so well written.
284
285But basically, after I fixed up pcap-dlpi.c, I managed to get libpcap
286working under AIX.  This enabled me to successfully run Ethereal,
287ie. all the packets on my Ethernet network correctly showed up
288as Ethernet and not Token Ring in the Wireshark screen.
289
290YAY!
291--
292Craig Rodrigues
293http://www.gis.net/~craigr
294rodrigc@mediaone.net
295
296Date: Thu, 11 Nov 1999 23:47:02 -0500
297From: Craig Rodrigues <rodrigc@mediaone.net>
298To: ethereal-dev@zing.org
299Subject: Re: [ethereal-dev] AIX: gtk problem solved, now an ethereal  problem
300
301On Thu, Nov 11, 1999 at 11:50:23AM -0800, Guy Harris wrote:
302> > The only differences between gtkclist.c in the gtk distribution and
303> > gtkclist.c in the ethereal distribution relate to the ROW_ELEMENT
304> > macro.  It looks like an optimization for retrieving the GList item
305> > when the requested row is the last row in the list.
306>
307> Yup - as per my other mail, Ethereal does that rather a lot when
308> building the CList, and the optimization changes quadratic behavior to
309> linear behavior.
310>
311> > Any ideas why this causes trouble?
312>
313> Mismatches between the layouts of data structures as declared in the
314> "gtk/gtk*.h" files in the Wireshark source tree and the layouts as
315> declared in the header files in the GTK+ source (either due to header
316> file differences - although the header files appear to be identical to
317> the GTK+ 1.2.6 ones - or due to compiler behavior differences)?
318
319I tried stepping things through the debugger, and constantly
320hit the same segfault inside gdk_string_width(), line 308 of gdkfont.c
321
322Fails on line: switch(font->type),
323where *font is: (type = -1, ascent = -1, descent = -1)
324
325Stack trace:
326gdk_string_width(font = 0x7caf01a4, string = "../"), line 308 in "gdkfont.c"
327gtk_file_selection_populate(fs = 0x20094468, rel_path = "", try_complete = 0), line 1341 in "gtkfilesel.c"
328gtk_file_selection_init(filesel = 0x20094468), line 513 in "gtkfilesel.c"
329gtk_type_new(0xc315), line 403 in "gtktypeutils.c"
330gtk_file_selection_new(title = "Ethereal: Open Capture File"), line 524 in "gtkfilesel.c"
331file_open_cmd_cb(0x200640f4, 0x0), line 79 in "file_dlg.c"
332
333Removing gtkclist.o from libui.a and recompiling removed this problem.
334
335Any ideas?  I'm stumped.
336
337--
338Craig Rodrigues
339http://www.gis.net/~craigr
340rodrigc@mediaone.net
341

README.bsd

1Installing Wireshark on FreeBSD/OpenBSD/NetBSD/DragonFly BSD
2========================================================================
3
4     1. Extra packages required
5     2. Compiling Wireshark
6     3. Berkeley Packet Filter (BPF) requirement
7     4. Running Wireshark as a non-root user
8
9
101. Extra packages required
11---------------------------
12Wireshark requires a number of additional programs to function.
13Install the latest versions of the following programs before compiling:
14
15The easiest way to install these is by using your operating system's
16ports or packages system.  If you prefer to build from source, the programs
17can be found at the following sites:
18
19    glib 2.32 or later:
20         ftp.gnome.org:/pub/gnome/sources/glib/
21	 http://ftp.gnome.org/pub/gnome/sources/glib/
22
23    pkgconfig:
24         http://pkgconfig.freedesktop.org/releases/
25
26    python 3.4 or later:
27         https://www.python.org/downloads/source/
28
29If you want to use the Wireshark GUI, install one or both of these toolkits:
30
31    Qt 5.3 or later:
32	 http://download.qt-project.org/official_releases/qt/
33
34
35(These programs may require additional dependencies)
36
37Additional programs can be used to enhance Wireshark's functionality.
38These can be found by typing ./configure --help or looking at the output
39at the end of running the configure script.
40
41
422. Compiling Wireshark
43-----------------------
44To compile Wireshark with the default options, run configure, make and
45make install (you may have to run "autogen.sh" first):
46
47     ./configure
48     make
49     make install
50
51The configure and make steps can be run as a non-root user and you can
52run Wireshark from the compilation directory itself.  You must run make
53install as root in order to copy the program to the proper directories.
54
55
563. Berkeley Packet Filter (BPF) requirement
57--------------------------------------------
58In order to capture packets (with Wireshark/TShark, tcpdump, or any
59other packet capture program) on a BSD system, your kernel must have the
60Berkeley Packet Filter mechanism enabled.  The default kernel
61configurations in recent versions of BSD systems have this enabled
62already.  To verify the bpf device is present, look in the /dev
63directory:
64
65    ls -l /dev/bpf*
66
67You should see one or more bpf devices listed similar to this:
68
69    crw-------  1 root  wheel    0,  90 Aug 10 21:05 /dev/bpf0
70    crw-------  1 root  wheel    0,  91 Aug 10 21:05 /dev/bpf1
71
72Packet-capturing programs will pick the first bpf device that's not in
73use.  Recent versions of most BSDs will create bpf devices as needed, so
74you don't have to configure the number of devices that will be
75available.
76
774. Running wireshark as a non-root user
78-------------------------------------------
79Since the bpf devices are read-only by the owner (root), you normally
80have to run packet capturing programs such as Wireshark as root.  It is
81safer to run programs as a non-root user if possible.  To run Wireshark
82as a non-root user, you must change the permissions on the bpf device(s).
83If you are the only user that needs to use Wireshark, the easiest way
84is to change the owner of each bpf device to your username.  You can also
85add the read/write ability to the group (typically wheel) and add users
86that need to use Wireshark to the wheel group.  Check your operating
87system's documentation on how to make permanent these changes as they
88are often reset upon reboot; if /dev is implemented with devfs, it might
89be possible to configure devfs to create all bpf devices owned by a
90particular user and/or group and with particular permissions.  In
91FreeBSD 6.0 and later this can be done by creating an /etc/devfs.rules
92file with content such as
93
94	[localrules=10]
95	add path 'bpf*' {mode and permissions}
96
97where "mode and permissions" can include clauses such as
98
99	mode {octal permissions}
100
101to set the permissions on the device (e.g., "mode 0660" to set the
102permissions to rw-rw-r--),
103
104	user {user}
105
106to set the user who owns the device, or
107
108	group {group}
109
110to set the group that owns the device and adding a line such as
111
112	devfs_system_ruleset=localrules
113
114to /etc/rc.conf.  For example, an /etc/devfs.rules file with
115
116	[localrules=10]
117	add path 'bpf*' mode 0660 group wheel
118
119will grant read and write permissions on all BPF devices to all users in
120the "wheel" group.
121

README.hpux

1
2Note: We *probably* don't support HP-UX any more, at least not in the
3sense that you can run `configure; make` or `cmake ... ; make` and
4expect everything to work out of the box. At the time of this writing
5(August 2017) the most recent version of Wireshark available at the
6HP-UX Porting and Archive Centre is 1.10.5 and the most recently
7reported HP-UX bug (#6550) was from 2012. The Porting and Archive Centre
8provides libraries required to build TShark, and while the GTK+ packages
9are current (2.24.31) they are 32-bit only. Recent Qt packages are not
10provided.
11
12Contents:
13
141 - Building wireshark
152 - Building GTK+/GLib with HP's C compiler
163 - nettl support
174 - libpcap on HP-UX
185 - HP-UX patches to fix packet capture problems
19
201 - Building wireshark
21
22The HP-UX Porting and Archive Centre, at
23
24	http://hpux.connect.org.uk/
25
26(with mirrors in various countries, listed on the Centre's home page;
27you may want to choose a mirror closer to you) has ported versions, in
28both source and binary form, for Wireshark, as well as for the libpcap,
29GLib, GTK+, and zlib libraries that it uses.
30
31The changes they've made appear largely to be compile option changes; if
32you've downloaded the source to the latest version of Wireshark (the
33version on the Centre's site may not necessarily be the latest version),
34it should be able to compile, perhaps with those changes.
35
36They appear to have used HP-UX's "cc" compiler, with the options "-Ae
37-O"; there's a comment "Add -Dhpux_9 if building under 9.X".  It may
38also build with GCC.
39
40They currently have libpcap 0.6.2; libpcap 0.6.2, and later versions,
41include changes to properly open network devices when given the name
42reported by the lanscan and ifconfig commands - earlier versions didn't
43do this correctly.  Therefore, we strongly suggest you use libpcap 0.6.2
44or later, not libpcap 0.5.2.
45
462 - Building GTK+/GLib with HP's C compiler
47
48By default, HP's C compiler doesn't support "long long int" to provide
4964-bit integral data types on 32-bit platforms; the "-Ae" flag must be
50supplied to enable extensions such as that.
51
52Wireshark's "configure" script automatically includes that flag if it
53detects that the native compiler is being used on HP-UX; however, the
54configure scripts for GTK+ and GLib don't do so, which means that 64-bit
55integer support won't be enabled.
56
57This may prevent some parts of Wireshark from compiling; in order to get
5864-bit integer support in GTK+/GLib, edit all the Makefiles for GTK+ and
59GLib, as generated by the GTK+ and GLib "configure" scripts, to add
60"-Ae" to all "CFLAGS = " definitions found in those Makefiles.  (If a
61Makefile lacks a "CFLAGS = " definition, there's no need to add a
62definition that includes "-Ae".)
63
643 - nettl support
65
66nettl is used on HP-UX to trace various streams based subsystems.  Wireshark
67can read nettl files containing raw IP frames (NS_LS_IP, NS_LS_TCP,
68NS_LS_UDP, NS_LS_ICMP subsystems), all ethernet/tokenring/fddi driver
69level frames (such as BTLAN, BASE100, GELAN, IGELAN subsystems) and LAPB
70frames (SX25L2 subsystem).  Use "ioscan -kfClan" to see the driver
71names and compare that to /etc/nettlgen.conf to find the nettl subsystem
72name for your particular release.
73
74It has been tested with files generated on HP-UX 9.04, 10.20, and 11.x.
75
76Use the following commands to generate a trace (cf. nettl(1M)):
77
78# IP capture:
79nettl -tn pduin pduout -e NS_LS_IP -f tracefile
80# Driver level capture.  Replace btlan with the name of your interface:
81nettl -tn pduin pduout -e btlan -f tracefile
82# X25 capture. You must specify an interface :
83nettl -tn pduin pduout -e SX25l2 -d /dev/x25_0 -f tracefile
84# stop capture. subsystem is NS_LS_IP, btlan, SX25L2 :
85nettl -tf -e subsystem
86
87You may have to use "-tn 0x30000000" instead of "-tn pduin pduout"
88on old versions of 10.20 and 9.04.
89
904 - libpcap on HP-UX
91
92If you want to use Wireshark to capture packets, you will have to install
93libpcap; binary distributions are, as noted above, available from the
94Software Porting And Archive Centre for HP-UX, as well as source code.
95
96Versions of libpcap prior to 0.6 didn't handle HP-UX as well as 0.6 and
97later versions do.  You should install the latest version.
98
99The source code is also available from the official home of libpcap and
100tcpdump, at
101
102	https://www.tcpdump.org/
103
104if you want a version later than the version available from the Software
105Porting And Archive Centre; however, the versions available from
106tcpdump.org might not, for example, include support for building libpcap
107as a shared library.
108
1095 - HP-UX patches to fix packet capture problems
110
111Note that packet-capture programs such as Wireshark/TShark or tcpdump
112may, on HP-UX, not be able to see packets sent from the machine on which
113they're running.  Make sure you have a recent "LAN Cummulative/DLPI" patch
114installed.
115
116Some articles on groups.google.com discussing this are:
117
118	https://groups.google.com/forum/#!msg/comp.sys.hp.hpux/HRiDV1oLps0/fPz4gsZNvmMJ
119
120which says:
121
122  Newsgroups: comp.sys.hp.hpux
123  Subject:  Re: Did someone made tcpdump working on 10.20 ?
124  Date: 12/08/1999
125  From: Lutz Jaenicke <jaenicke@emserv1.ee.TU-Berlin.DE>
126
127  In article <82ks5i$5vc$1@news1.dti.ne.jp>, mtsat <mtsat@iris.dti.ne.jp>
128  wrote:
129   >Hello,
130   >
131   >I downloaded and compiled tcpdump3.4 a couple of week ago. I tried to use
132   >it, but I can only see incoming data, never outgoing.
133   >Someone (raj) explained me that a patch was missing, and that this patch
134   >must me "patched" (poked) in order to see outbound data in promiscuous mode.
135   >Many things to do .... So the question is : did someone has already this
136   >"ready to use" PHNE_**** patch ?
137
138   Two things:
139   1. You do need a late "LAN products cumulative patch" (e.g.  PHNE_18173
140  for   s700/10.20).
141   2. You must use
142echo 'lanc_outbound_promisc_flag/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem
143     You can insert this e.g. into /sbin/init.d/lan
144
145   Best regards,
146   Lutz
147
148and
149
150	https://groups.google.com/d/msg/comp.sys.hp.hpux/p_Z7GlZ_A7Q/RW2jDa6gB7kJ
151
152which says:
153
154  Newsgroups: comp.sys.hp.hpux
155  Subject: Re: tcpdump only shows incoming packets
156  Date: 02/15/2000
157  From: Rick Jones <foo@bar.baz.invalid>
158
159  Harald Skotnes <harald@cc.uit.no> wrote:
160  > I am running HPUX 11.0 on a C200 hanging on a 100Mb switch. I have
161  > compiled libpcap-0.4 an tcpdump-3.4 and it seems to work. But at a
162  > closer look I only get to see the incoming packets not the
163  > outgoing. I have tried tcpflow-0.12 which also uses libpcap and the
164  > same thing happens.  Could someone please give me a hint on how to
165  > get this right?
166
167  Search/Read the archives ?-)
168
169  What you are seeing is expected, un-patched, behaviour for an HP-UX
170  system.  On 11.00, you need to install the latest lancommon/DLPI
171  patches, and then the latest driver patch for the interface(s) in use.
172  At that point, a miracle happens and you should start seeing outbound
173  traffic.
174
175[That article also mentions the patch that appears below.]
176
177and
178
179	https://groups.google.com/d/msg/comp.sys.hp.hpux/p_Z7GlZ_A7Q/Q3Jg6069KB0J
180
181which says:
182
183  Newsgroups: comp.sys.hp.hpux
184  Subject: Re: tcpdump only shows incoming packets
185  Date: 02/16/2000
186  From: Harald Skotnes <harald@cc.uit.no>
187
188  Rick Jones wrote:
189
190	...
191
192  > What you are seeing is expected, un-patched, behaviour for an HP-UX
193  > system. On 11.00, you need to install the latest lancommon/DLPI
194  > patches, and then the latest driver patch for the interface(s) in
195  > use. At that point, a miracle happens and you should start seeing
196  > outbound traffic.
197
198  Thanks a lot.  I have this problem on several machines running HPUX
199  10.20 and 11.00.  The machines where patched up before y2k so did not
200  know what to think.  Anyway I have now installed PHNE_19766,
201  PHNE_19826, PHNE_20008, PHNE_20735 on the C200 and now I can see the
202  outbound traffic too.  Thanks again.
203
204(although those patches may not be the ones to install - there may be
205later patches).
206
207And another message to tcpdump-workers@tcpdump.org, from Rick Jones:
208
209  Date: Mon, 29 Apr 2002 15:59:55 -0700
210  From: Rick Jones
211  To: tcpdump-workers@tcpdump.org
212  Subject: Re: [tcpdump-workers] I Can't Capture the Outbound Traffic
213
214	...
215
216  http://itrc.hp.com/ would be one place to start in a search for the most
217  up-to-date patches for DLPI and the lan driver(s) used on your system (I
218  cannot guess because 9000/800 is too generic - one hs to use the "model"
219  command these days and/or an ioscan command (see manpage) to guess what
220  the drivers (btlan[3456], gelan, etc) might be involved in addition to
221  DLPI.
222
223  Another option is to upgrade to 11i as outbound promiscuous mode support
224  is there in the base OS, no patches required.
225
226Another posting:
227
228	https://groups.google.com/d/msg/comp.sys.hp.hpux/5x0bKAUDCeM/Xufd5Xx05iUJ
229
230indicates that you need to install the optional STREAMS product to do
231captures on HP-UX 9.x:
232
233  Newsgroups: comp.sys.hp.hpux
234  Subject:  Re: tcpdump HP/UX 9.x
235  Date: 03/22/1999
236  From: Rick Jones <foo@bar.baz>
237
238  Dave Barr (barr@cis.ohio-state.edu) wrote:
239  : Has anyone ported tcpdump (or something similar) to HP/UX 9.x?
240
241  I'm reasonably confident that any port of tcpdump to 9.X would require
242  the (then optional) STREAMS product.  This would bring DLPI, which is
243  what one uses to access interfaces in promiscuous mode.
244
245  I'm not sure that HP even sells the 9.X STREAMS product any longer,
246  since HP-UX 9.X is off the pricelist (well, maybe 9.10 for the old 68K
247  devices).
248
249  Your best bet is to be up on 10.20 or better if that is at all
250  possible.  If your hardware is supported by it, I'd go with HP-UX 11.
251  If you want to see the system's own outbound traffic, you'll never get
252  that functionality on 9.X, but it might happen at some point for 10.20
253  and 11.X.
254
255  rick jones
256
257(as per other messages cited here, the ability to see the system's own
258outbound traffic did happen).
259
260Rick Jones reports that HP-UX 11i needs no patches for outbound
261promiscuous mode support.
262
263An additional note, from Jost Martin, for HP-UX 10.20:
264
265	Q: How do I get wireshark on HPUX to capture the _outgoing_ packets
266	   of an interface
267	A: You need to get PHNE_20892,PHNE_20725 and PHCO_10947 (or
268	   newer, this is as of 4.4.00) and its dependencies.  Then you can
269	   enable the feature as described below:
270
271	Patch Name: PHNE_20892
272	Patch Description: s700 10.20 PCI 100Base-T cumulative patch
273		To trace the outbound packets, please do the following
274		to turn on a global promiscuous switch before running
275		the promiscuous applications like snoop or tcpdump:
276
277		adb -w /stand/vmunix /dev/mem
278		lanc_outbound_promisc_flag/W 1
279		(adb will echo the result showing that the flag has
280		been changed)
281		$quit
282	(Thanks for this part to HP-support, Ratingen)
283
284		The attached hack does this and some security-related stuff
285	(thanks to hildeb@www.stahl.bau.tu-bs.de (Ralf Hildebrandt) who
286	posted the security-part some time ago)
287
288		 <<hack_ip_stack>>
289
290		(Don't switch IP-forwarding off, if you need it !)
291		Install the hack as /sbin/init.d/hacl_ip_stack (adjust
292	permissions !) and make a sequencing-symlink
293	/sbin/rc2.d/S350hack_ip_stack pointing to this script.
294		Now all this is done on every reboot.
295
296According to Rick Jones, the global promiscuous switch also has to be
297turned on for HP-UX 11.00, but not for 11i - and, in fact, the switch
298doesn't even exist on 11i.
299
300Here's the "hack_ip_stack" script:
301
302-----------------------------------Cut Here-------------------------------------
303#!/sbin/sh
304#
305# nettune:  hack kernel parms for safety
306
307OKAY=0
308ERROR=-1
309
310# /usr/contrib/bin fuer nettune auf Pfad
311PATH=/sbin:/usr/sbin:/usr/bin:/usr/contrib/bin
312export PATH
313
314
315##########
316#  main  #
317##########
318
319case $1 in
320   start_msg)
321      print "Tune IP-Stack for security"
322      exit $OKAY
323      ;;
324
325   stop_msg)
326      print "This action is not applicable"
327      exit $OKAY
328      ;;
329
330   stop)
331      exit $OKAY
332      ;;
333
334   start)
335      ;;  # fall through
336
337   *)
338      print "USAGE: $0 {start_msg | stop_msg | start | stop}" >&2
339      exit $ERROR
340      ;;
341   esac
342
343###########
344#  start  #
345###########
346
347#
348# tcp-Sequence-Numbers nicht mehr inkrementieren sondern random
349# Syn-Flood-Protection an
350# ip_forwarding aus
351# Source-Routing aus
352# Ausgehende Packets an ethereal/tcpdump etc.
353
354/usr/contrib/bin/nettune -s tcp_random_seq 2 || exit $ERROR
355/usr/contrib/bin/nettune -s hp_syn_protect 1 || exit $ERROR
356/usr/contrib/bin/nettune -s ip_forwarding 0 || exit $ERROR
357echo 'ip_block_source_routed/W1' | /usr/bin/adb -w /stand/vmunix /dev/kmem || exit $ERROR
358echo 'lanc_outbound_promisc_flag/W 1' | adb -w /stand/vmunix /dev/mem  || exit $ERROR
359
360exit $OKAY
361-----------------------------------Cut Here-------------------------------------
362

README.linux

1In order to capture packets (with Wireshark/TShark, tcpdump, or any
2other libpcap-based packet capture program) on a Linux system, the
3"packet" protocol must be supported by your kernel.  If it is not, you
4may get error messages such as
5
6	modprobe: can't locate module net-pf-17
7
8in "/var/adm/messages", or may get messages such as
9
10	socket: Address family not supported by protocol
11
12from applications using libpcap.
13
14Most recent Linux distributions will have this configured in by default.
15If it is not configured in with the default kernel, and if it is not a
16module loaded by default, you must configure the kernel with the
17CONFIG_PACKET option for this protocol; the following note is from the
18Linux "Configure.help" file for the 2.0[.x] kernel:
19
20	Packet socket
21	CONFIG_PACKET
22	  The Packet protocol is used by applications which communicate
23	  directly with network devices without an intermediate network
24	  protocol implemented in the kernel, e.g. tcpdump. If you want them
25	  to work, choose Y.
26
27	  This driver is also available as a module called af_packet.o ( =
28	  code which can be inserted in and removed from the running kernel
29	  whenever you want). If you want to compile it as a module, say M
30	  here and read Documentation/modules.txt; if you use modprobe or
31	  kmod, you may also want to add "alias net-pf-17 af_packet" to
32	  /etc/modules.conf.
33
34and the note for the 2.2[.x] kernel says:
35
36	Packet socket
37	CONFIG_PACKET
38	  The Packet protocol is used by applications which communicate
39	  directly with network devices without an intermediate network
40	  protocol implemented in the kernel, e.g. tcpdump. If you want them
41	  to work, choose Y. This driver is also available as a module called
42	  af_packet.o ( = code which can be inserted in and removed from the
43	  running kernel whenever you want). If you want to compile it as a
44	  module, say M here and read Documentation/modules.txt.  You will
45	  need to add 'alias net-pf-17 af_packet' to your /etc/conf.modules
46	  file for the module version to function automatically.  If unsure,
47	  say Y.
48
49In addition, there is an option that, in 2.2 and later kernels, will
50allow packet capture filters specified to programs such as tcpdump to be
51executed in the kernel, so that packets that don't pass the filter won't
52be copied from the kernel to the program, rather than having all packets
53copied to the program and libpcap doing the filtering in user mode.
54
55Copying packets from the kernel to the program consumes a significant
56amount of CPU, so filtering in the kernel can reduce the overhead of
57capturing packets if a filter has been specified that discards a
58significant number of packets.  (If no filter is specified, it makes no
59difference whether the filtering isn't performed in the kernel or isn't
60performed in user mode. :-))
61
62Most recent Linux distributions will have this configured in by default.
63If it is not configured in with the default kernel, you must configure
64the kernel with the CONFIG_FILTER option; the "Configure.help" file
65says:
66
67	Socket filtering
68	CONFIG_FILTER
69	  The Linux Socket Filter is derived from the Berkeley Packet Filter.
70	  If you say Y here, user-space programs can attach a filter to any
71	  socket and thereby tell the kernel that it should allow or disallow
72	  certain types of data to get through the socket. Linux Socket
73	  Filtering works on all socket types except TCP for now. See the text
74	  file linux/Documentation/networking/filter.txt for more information.
75	  If unsure, say N.
76
77An additional problem, on Linux, with older versions of libpcap, is that
78capture filters do not work when snooping loopback devices; if you're
79capturing on a Linux loopback device, do not use a capture filter, as it
80will probably reject most if not all packets, including the packets it's
81intended to accept - instead, capture all packets and use a display
82filter to select the packets you want to see.  Most recent Linux
83distribution releases will not have this problem.
84
85In addition, older versions of libpcap will, on Linux systems with a
862.0[.x] kernel, or if built for systems with a 2.0[.x] kernel, not turn
87promiscuous mode off on a network device until the program using
88promiscuous mode exits, so if you start a capture with Wireshark on some
89Linux distributions, the network interface will be put in promiscuous
90mode and will remain in promiscuous mode until Wireshark exits.  There
91might be additional libpcap bugs that cause it not to be turned off even
92when Wireshark exits; if your network is busy, this could cause the Linux
93networking stack to do a lot more work discarding packets not intended
94for the machine, so you may want to check, after running Wireshark,
95whether any network interfaces are in promiscuous mode (the output of
96"ifconfig -a" will say something such as
97
98eth0      Link encap:Ethernet  HWaddr 00:00:66:66:66:66
99          inet addr:66.66.66.66  Bcast:66.66.66.255  Mask:255.255.255.0
100          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
101          RX packets:6493 errors:0 dropped:0 overruns:0 frame:0
102          TX packets:3380 errors:0 dropped:0 overruns:0 carrier:0
103          collisions:0 txqueuelen:100
104          Interrupt:18 Base address:0xfc80
105
106with "PROMISC" indicating that the interface is in promiscuous mode),
107and, if any interfaces are in promiscuous mode and no capture is being
108done on that interface, turn promiscuous mode off by hand with
109
110	ifconfig <ifname> -promisc
111
112where "<ifname>" is the name of the interface.
113
114Newer versions of libpcap shouldn't have this problem, even on 2.0[.x]
115kernels; no version of libpcap should have that problem on systems with
1162.2 or later kernels.
117

README.macos

1This file tries to help building Wireshark for macOS (The Operating
2System Formerly Known As Mac OS X And Then OS X) (Wireshark does not
3work on the classic Mac OS).
4
5You must have the developer tools (called Xcode) installed.  For
6versions of macOS up to and including Snow Leopard, Xcode 3 should be
7available on the install DVD; Xcode 4 is available for download from
8developer.apple.com and, for Lion and later releases, from the Mac App
9Store.  See
10
11	https://guide.macports.org/#installing.xcode
12
13for details.  For Xcode 4, you will need to install the command-line
14tools; select Preferences from the Xcode menu, select Downloads in the
15Preferences window, and install Command Line Tools.
16
17You must also have GLib and, if you want to build Wireshark as well as
18TShark, you must have also Qt installed.  You can download precompiled
19Qt packages and source code from
20
21	https://www.qt.io/download
22
23or use the tools/macos-setup.sh script described below.
24
25You should have CMake installed; you can download binary distributions
26for macOS from
27
28	https://cmake.org/download/
29
30The tools/macos-setup.sh script can be used to download, patch as
31necessary, build as necessary, and install those libraries and the
32libraries on which they depend, along with tools such as CMake; it will,
33by default, also install other libraries that can be used by Wireshark
34and TShark.  The versions of libraries and tools to download are
35specified by variables set early in the script; you can comment out the
36settings of optional libraries if you don't want them downloaded and
37installed.  Before running the tools/macos-setup.sh script, and before
38attempting to build Wireshark, make sure your PKG_CONFIG_PATH
39environment variable's setting includes /usr/local/lib/pkgconfig.
40
41The tools/macos-setup.sh script must be run from the top-level source
42directory.
43
44After you have installed those libraries:
45
46 1. If you have installed Qt into some non-standard place, as is
47	distinctly possible with the build included with
48	macos-setup.sh, you must inform cmake by either including its
49	"bin" directory as part of the PATH environment variable or
50	setting CMAKE_PREFIX_PATH to the directory above Qt's "lib"
51	directory.  For Qt 5.8 installed into one's home directory,
52	for instance:
53
54	% export CMAKE_PREFIX_PATH=~/Qt5.8.0/5.8/clang_64
55
56	This step is unnecessary if you've used a recent version of
57	Homebrew, as the CMake build scripts will find Qt.
58
59 2. Make a directory in which Wireshark is to be built, separate
60	from the top-level source directory for Wireshark - it can be a
61	subdirectory of that top-level source directory;
62
63 3. cd to that directory, and run CMake, with an argument that is a
64	path to the top-level source directory;
65
66 4. When CMake finishes, run make to build Wireshark.
67
68For example, to build Wireshark in a subdirectory of the top-level
69source directory, named "build", do, from the top-level source
70directory;
71
72	mkdir build
73	cd build
74	cmake ..
75	make
76
77It is also possible to use the Xcode IDE to build and debug Wireshark
78using cmake's Xcode generator. Create a separate build directory, as
79described above and run cmake with the "-G Xcode" argument to create
80a Xcode project file in the current directory.
81
82	cmake -G Xcode ..
83
84 1. Double click Wireshark.xcodeproj
85
86 2. Choose to create schemes manually
87
88 3. Create a scheme for the ALL_BUILD target
89
90 4. Edit the scheme, go to the run configuration and select Wireshark.app
91  as executable
92
93If you upgrade the major release of macOS on which you are building
94Wireshark, we advise that, before you do any builds after the upgrade,
95you remove the build directory and all its subdiretories, and repeat the
96above process, re-running CMake and rebuilding from scratch.
97
98On Snow Leopard (10.6) and later releases, if you are building on a
99machine with a 64-bit processor (with the exception of the early Intel
100Core Duo and Intel Core Solo machines, all Apple machines with Intel
101processors have 64-bit processors), the C/C++/Objective-C compiler will
102build 64-bit by default.
103
104This means that you will, by default, get a 64-bit version of Wireshark.
105
106One consequence of this is that, if you built and installed any required
107or optional libraries for Wireshark on an earlier release of macOS, those
108are probably 32-bit versions of the libraries, and you will need to
109un-install them and rebuild them on your current version of macOS, to get
11064-bit versions.
111
112Some required and optional libraries require special attention if you
113install them by building from source code on Snow Leopard and later
114releases; the tools/macos-setup.sh script will handle that for you.
115
116GLib - the GLib configuration script determines whether the system's
117libiconv is GNU iconv or not by checking whether it has libiconv_open(),
118and the compile will fail if that test doesn't correctly indicate
119whether libiconv is GNU iconv.  In macOS, libiconv is GNU iconv, but the
12064-bit version doesn't have libiconv_open(); a workaround for this is to
121replace all occurrences of "libiconv_open" with "iconv_open" in the
122configure script before running the script.  The tools/macos-setup.sh
123setup script will patch GLib to work around this.
124
125libgcrypt - the libgcrypt configuration script attempts to determine
126which flavor of assembler-language routines to use based on the platform
127type determined by standard autoconf code.  That code uses uname to
128determine the processor type; however, in macOS, uname always reports
129"i386" as the processor type on Intel machines, even Intel machines with
13064-bit processors, so it will attempt to assemble the 32-bit x86
131assembler-language routines, which will fail.  The workaround for this
132is to run the configure script with the --disable-asm argument, so that
133the assembler-language routines are not used.  The tools/macos-setup.sh
134will configure libgcrypt with that option.
135

README.md

1General Information
2-------------------
3
4Wireshark is a network traffic analyzer, or "sniffer", for Linux, macOS,
5\*BSD and other Unix and Unix-like operating systems and for Windows.
6It uses Qt, a graphical user interface library, and libpcap and npcap as
7packet capture and filtering libraries.
8
9The Wireshark distribution also comes with TShark, which is a
10line-oriented sniffer (similar to Sun's snoop or tcpdump) that uses the
11same dissection, capture-file reading and writing, and packet filtering
12code as Wireshark, and with editcap, which is a program to read capture
13files and write the packets from that capture file, possibly in a
14different capture file format, and with some packets possibly removed
15from the capture.
16
17The official home of Wireshark is https://www.wireshark.org.
18
19The latest distribution can be found in the subdirectory https://www.wireshark.org/download
20
21
22Installation
23------------
24
25The Wireshark project builds and tests regularly on the following platforms:
26
27  - Linux (Ubuntu)
28  - Microsoft Windows
29  - macOS / {Mac} OS X
30
31Official installation packages are available for Microsoft Windows and
32macOS.
33
34It is available as either a standard or add-on package for many popular
35operating systems and Linux distributions including Debian, Ubuntu, Fedora,
36CentOS, RHEL, Arch, Gentoo, openSUSE, FreeBSD, DragonFly BSD, NetBSD, and
37OpenBSD.
38
39Additionally it is available through many third-party packaging systems
40such as pkgsrc, OpenCSW, Homebrew, and MacPorts.
41
42It should run on other Unix-ish systems without too much trouble.
43
44In some cases the current version of Wireshark might not support your
45operating system. This is the case for Windows XP, which is supported by
46Wireshark 1.10 and earlier. In other cases the standard package for
47Wireshark might simply be old. This is the case for Solaris and HP-UX.
48
49Both Perl and Python 3 are needed, the former for building the man
50pages.
51
52You must therefore install Perl, Python, GNU "make", and "flex" (vanilla
53"lex" won't work) on systems that lack them.
54
55Full installation instructions can be found in the INSTALL file and in the
56Developer's Guide at https://www.wireshark.org/docs/wsdg_html_chunked/
57
58See also the appropriate README._OS_ files for OS-specific installation
59instructions.
60
61Usage
62-----
63
64In order to capture packets from the network, you need to make the
65dumpcap program set-UID to root or you need to have access to the
66appropriate entry under `/dev` if your system is so inclined (BSD-derived
67systems, and systems such as Solaris and HP-UX that support DLPI,
68typically fall into this category).  Although it might be tempting to
69make the Wireshark and TShark executables setuid root, or to run them as
70root please don't.  The capture process has been isolated in dumpcap;
71this simple program is less likely to contain security holes and is thus
72safer to run as root.
73
74Please consult the man page for a description of each command-line
75option and interface feature.
76
77
78Multiple File Types
79-------------------
80
81Wireshark can read packets from a number of different file types.  See
82the Wireshark man page or the Wireshark User's Guide for a list of
83supported file formats.
84
85Wireshark can transparently read compressed versions of any of those files if
86the required compression library was available when Wireshark was compiled.
87Currently supported compression formats are:
88
89- GZIP
90- ZSTD
91- LZ4
92
93You can disable zlib support by running `cmake -DENABLE_ZLIB=OFF`.
94
95Although Wireshark can read AIX iptrace files, the documentation on
96AIX's iptrace packet-trace command is sparse.  The `iptrace` command
97starts a daemon which you must kill in order to stop the trace. Through
98experimentation it appears that sending a HUP signal to that iptrace
99daemon causes a graceful shutdown and a complete packet is written
100to the trace file. If a partial packet is saved at the end, Wireshark
101will complain when reading that file, but you will be able to read all
102other packets.  If this occurs, please let the Wireshark developers know
103at wireshark-dev@wireshark.org; be sure to send us a copy of that trace
104file if it's small and contains non-sensitive data.
105
106Support for Lucent/Ascend products is limited to the debug trace output
107generated by the MAX and Pipline series of products.  Wireshark can read
108the output of the `wandsession`, `wandisplay`, `wannext`, and `wdd`
109commands.
110
111Wireshark can also read dump trace output from the Toshiba "Compact Router"
112line of ISDN routers (TR-600 and TR-650). You can telnet to the router
113and start a dump session with `snoop dump`.
114
115CoSine L2 debug output can also be read by Wireshark. To get the L2
116debug output first enter the diags mode and then use
117`create-pkt-log-profile` and `apply-pkt-lozg-profile` commands under
118layer-2 category. For more detail how to use these commands, you
119should examine the help command by `layer-2 create ?` or `layer-2 apply ?`.
120
121To use the Lucent/Ascend, Toshiba and CoSine traces with Wireshark, you must
122capture the trace output to a file on disk.  The trace is happening inside
123the router and the router has no way of saving the trace to a file for you.
124An easy way of doing this under Unix is to run `telnet <ascend> | tee <outfile>`.
125Or, if your system has the "script" command installed, you can save
126a shell session, including telnet, to a file. For example to log to a file
127named tracefile.out:
128
129~~~
130$ script tracefile.out
131Script started on <date/time>
132$ telnet router
133..... do your trace, then exit from the router's telnet session.
134$ exit
135Script done on <date/time>
136~~~
137
138
139Name Resolution
140---------------
141
142Wireshark will attempt to use reverse name resolution capabilities
143when decoding IPv4 and IPv6 packets.
144
145If you want to turn off name resolution while using Wireshark, start
146Wireshark with the `-n` option to turn off all name resolution (including
147resolution of MAC addresses and TCP/UDP/SMTP port numbers to names) or
148with the `-N mt` option to turn off name resolution for all
149network-layer addresses (IPv4, IPv6, IPX).
150
151You can make that the default setting by opening the Preferences dialog
152using the Preferences item in the Edit menu, selecting "Name resolution",
153turning off the appropriate name resolution options, and clicking "OK".
154
155
156SNMP
157----
158
159Wireshark can do some basic decoding of SNMP packets; it can also use
160the libsmi library to do more sophisticated decoding by reading MIB
161files and using the information in those files to display OIDs and
162variable binding values in a friendlier fashion.  CMake  will automatically
163determine whether you have the libsmi library on your system.  If you
164have the libsmi library but _do not_ want Wireshark to use it, you can run
165cmake with the `-DENABLE_SMI=OFF` option.
166
167How to Report a Bug
168-------------------
169
170Wireshark is under constant development, so it is possible that you will
171encounter a bug while using it. Please report bugs at https://gitlab.com/wireshark/wireshark/-/issues.
172Be sure you enter into the bug:
173
1741. The complete build information from the "About Wireshark"
175   item in the Help menu or the output of `wireshark -v` for
176   Wireshark bugs and the output of `tshark -v` for TShark bugs;
177
1782. If the bug happened on Linux, the Linux distribution you were
179   using, and the version of that distribution;
180
1813. The command you used to invoke Wireshark, if you ran
182   Wireshark from the command line, or TShark, if you ran
183   TShark, and the sequence of operations you performed that
184   caused the bug to appear.
185
186If the bug is produced by a particular trace file, please be sure to
187attach to the bug a trace file along with your bug description.  If the
188trace file contains sensitive information (e.g., passwords), then please
189do not send it.
190
191If Wireshark died on you with a 'segmentation violation', 'bus error',
192'abort', or other error that produces a UNIX core dump file, you can
193help the developers a lot if you have a debugger installed.  A stack
194trace can be obtained by using your debugger ('gdb' in this example),
195the wireshark binary, and the resulting core file.  Here's an example of
196how to use the gdb command 'backtrace' to do so.
197
198~~~
199$ gdb wireshark core
200(gdb) backtrace
201..... prints the stack trace
202(gdb) quit
203$
204~~~
205
206The core dump file may be named "wireshark.core" rather than "core" on
207some platforms (e.g., BSD systems).  If you got a core dump with
208TShark rather than Wireshark, use "tshark" as the first argument to
209the debugger; the core dump may be named "tshark.core".
210
211Disclaimer
212----------
213
214There is no warranty, expressed or implied, associated with this product.
215Use at your own risk.
216
217
218Gerald Combs <gerald@wireshark.org>
219
220Gilbert Ramirez <gram@alumni.rice.edu>
221
222Guy Harris <gharris@sonic.net>
223

README.msys2

1This document contains instructions to build Wireshark natively on Windows
2using GCC and MinGW-w64 with the MSYS2 distribution.
3
4Steps to setup the build environment:
5
61. Download and install MSYS2 from https://www.msys2.org.
7
82. Open the MSYS2 MSYS shell.
9
103. Update with "pacman -Syu" as many times as necessary. You may also wish
11   to install base-devel at this point: pacman -S base-devel. Anytime you
12   want to run pacman it's recommended to do so from the MSYS shell.
13
144. Install pactoys for convenience:
15
16     $ pacman -S pactoys
17
185. Install the toolchain:
19
20     $ pacboy -S toolchain:x cmake:x ninja:x ccache:x
21
22From this point on it's a typical ninja build:
23
241. Open the MSYS2 MINGW64 shell.
25
262. Create the build directory. This example will assume the build directory
27   is under the source directory:
28
29     $ cd $srcdir && mkdir build && cd build
30
313. Run cmake:
32
33     $ cmake -DENABLE_CCACHE=Yes -DDISABLE_WERROR=Yes ..
34
354. Instal missing dependencies using pacman (there are a few gaps) and
36   re-run cmake, e.g.:
37
38     $ pacboy -S glib2:x libpcap:x libgcrypt:x gnutls:x qt5:x \
39     asciidoctor:x libssh:x libmaxminddb:x snappy:x spandsp:x \
40     libilbc:x doxygen:x winsparkle:x opus:x
41
425. Build by running "ninja" in the build directory:
43
44     $ ninja
45
46There isn't a native git package provided with MSYS2 so it's recommended that
47you continue using the Git-For-Windows installer (or see [1]).
48
49Currently the Wireshark MinGW-w64 build using MSYS2 has the following
50limitations:
51
52* The ETW extcap (etwdump) does not build.
53
54* Some optional dependencies are not available in the official MSYS2
55  repositories. These are:
56    * AirPcap
57    * libsmi
58    * Kerberos
59    * Lua-unicode (Lua 5.1 is available and can be used instead)
60    * SBC codec
61    * BCG729 codec
62
63* There is no Wireshark binary package available. More work is
64  needed to implement this. To be decided if it will use NSIS or something
65  else.
66
67* Many compiler warnings to be fixed.
68
69References:
70
71[1]https://github.com/git-for-windows/git/wiki/Install-inside-MSYS2-proper
72

README.windows

1Installing Wireshark on Windows
2===============================
3
4To install Wireshark, simply download the appropriate installer program from
5
6https://www.wireshark.org/download.html
7
8and start it. Just keep the default settings and start Wireshark after the
9installation finished (e.g. using the start menu entry).
10
11For detailed descriptions on how to install and use Wireshark and the
12related command line tools, see the Wireshark User's Guide at:
13
14https://www.wireshark.org/docs/
15
16
17Compiling the Wireshark distribution from source
18================================================
19
20If you want to develop Wireshark code yourself, you can find
21comprehensive information in the Developer's Guide at:
22
23https://www.wireshark.org/docs/
24