PageRenderTime 44ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/help/faq.py

https://bitbucket.org/stevexiao/wireshark
Python | 2107 lines | 2034 code | 28 blank | 45 comment | 45 complexity | ec25bd3ea2d2aaf3475f12acc5b37f08 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause
  1. #!/usr/bin/env python
  2. #
  3. # faq.py
  4. #
  5. # Routines to assemble a FAQ list for the Wireshark web site.
  6. # Questions and answer content can be found below. Section and
  7. # question numbers will be automatically generated.
  8. #
  9. # $Id: faq.py 36221 2011-03-20 23:09:36Z gerald $
  10. import sys
  11. import string
  12. class faq_section:
  13. def __init__(self, name, secnum):
  14. self.name = name
  15. self.secnum = secnum
  16. self.qa = []
  17. self.subsecs = []
  18. def add_qa(self, question, answer, tag):
  19. q_num = len(self.qa) + 1
  20. q_id = "%s.%d" % (self.get_num_string(), q_num)
  21. self.qa.append( (q_id, question, answer, tag) )
  22. def get_all_qa(self):
  23. return self.qa
  24. def add_subsec(self, subsec):
  25. self.subsecs.append(subsec)
  26. def get_all_subsecs(self):
  27. return self.subsecs
  28. def get_num_string(self):
  29. return "%d" % (self.secnum)
  30. def get_name(self):
  31. return self.name
  32. def get_num_name(self):
  33. return "%s. %s" % (self.get_num_string(), self.name)
  34. def get_header_level(self):
  35. return 3
  36. def print_index(self):
  37. print("<a href=#sec%s><h%d>%s:</h%d></a>\n" % (self.get_num_string(), self.get_header_level(), self.get_num_name(), self.get_header_level()))
  38. for qa in self.qa:
  39. id = qa[0]
  40. question = qa[1]
  41. print('<p class="faq_q">')
  42. print('<a class="faq_qnum" href=#q%s>%s %s</a>\n' % (id, id, question))
  43. print('</p>')
  44. for subsec in self.subsecs:
  45. subsec.print_index()
  46. def print_contents(self):
  47. # Table header
  48. print("""
  49. <a name="sec%s">
  50. <h%d>%s</h%d>
  51. </a>
  52. """ % (self.get_num_string(), self.get_header_level(), self.get_num_name(), self.get_header_level()))
  53. # Questions and Answers
  54. for qa in self.qa:
  55. id = qa[0]
  56. question = qa[1]
  57. answer = qa[2]
  58. tag = qa[3]
  59. print('<p class="faq_q">')
  60. print('<a class="faq_qnum" name=q%s>Q %s:</a>' % (id, id))
  61. if tag is not None:
  62. print('<a name=%s>' % tag)
  63. print('<span>%s</span>' % (question))
  64. if tag is not None:
  65. print('</a>')
  66. print('</p>')
  67. print('<p class="faq_a">')
  68. print('<span class="faq_anum">A:</span>\n')
  69. print(answer)
  70. print('</p>')
  71. # Subsections
  72. for subsec in self.subsecs:
  73. subsec.print_contents()
  74. # Table footer
  75. print("")
  76. class faq_subsection(faq_section):
  77. def __init__(self, name, secnum, subsecnum):
  78. self.name = name
  79. self.secnum = secnum
  80. self.subsecnum = subsecnum
  81. self.qa = []
  82. self.subsecs = []
  83. def get_num_string(self):
  84. return "%d.%d" % (self.secnum, self.subsecnum)
  85. def get_header_level(self):
  86. return 2
  87. class faq_subsubsection(faq_section):
  88. def __init__(self, name, secnum, subsecnum, subsubsecnum):
  89. self.name = name
  90. self.secnum = secnum
  91. self.subsecnum = subsecnum
  92. self.subsubsecnum = subsubsecnum
  93. self.qa = []
  94. self.subsecs = []
  95. def get_num_string(self):
  96. return "%d.%d.%d" % (self.secnum, self.subsecnum, self.subsubsecnum)
  97. def get_header_level(self):
  98. return 2
  99. sec_num = 0
  100. subsec_num = 0
  101. subsubsec_num = 0
  102. sections = []
  103. current_section = None
  104. parent_section = None
  105. grandparent_section = None
  106. current_question = None
  107. current_tag = None
  108. # Make a URL of itself
  109. def selflink(text):
  110. return "<a href=\"%s\">%s</a>" % (text, text)
  111. # Add a section
  112. def section(name):
  113. global sec_num
  114. global subsec_num
  115. global subsubsec_num
  116. global current_section
  117. global grandparent_section
  118. assert not current_question
  119. sec_num = sec_num + 1
  120. subsec_num = 0
  121. subsubsec_num = 0
  122. sec = faq_section(name, sec_num)
  123. sections.append(sec)
  124. current_section = sec
  125. grandparent_section = sec
  126. # Add a subsection
  127. def subsection(name):
  128. global subsec_num
  129. global subsubsec_num
  130. global current_section
  131. global parent_section
  132. global grandparent_section
  133. assert not current_question
  134. subsec_num = subsec_num + 1
  135. subsubsec_num = 0
  136. sec = faq_subsection(name, sec_num, subsec_num)
  137. grandparent_section.add_subsec(sec)
  138. current_section = sec
  139. parent_section = sec
  140. # Add a subsubsection
  141. def subsubsection(name):
  142. global subsubsec_num
  143. global current_section
  144. global parent_section
  145. assert not current_question
  146. subsubsec_num = subsubsec_num + 1
  147. sec = faq_subsubsection(name, sec_num, subsec_num, subsubsec_num)
  148. parent_section.add_subsec(sec)
  149. current_section = sec
  150. # Add a question
  151. def question(text, tag=None):
  152. global current_question
  153. global current_tag
  154. assert current_section
  155. assert not current_question
  156. assert not current_tag
  157. current_question = text
  158. current_tag = tag
  159. # Add an answer
  160. def answer(text):
  161. global current_question
  162. global current_tag
  163. assert current_section
  164. assert current_question
  165. current_section.add_qa(current_question, text, current_tag)
  166. current_question = None
  167. current_tag = None
  168. # Create the index
  169. def create_index():
  170. print("""
  171. <a name="index">
  172. <h1>Index</h1>
  173. </a>
  174. """)
  175. for sec in sections:
  176. sec.print_index()
  177. print("""
  178. """)
  179. # Print result
  180. def create_output(header='', footer=''):
  181. print(header)
  182. create_index()
  183. for sec in sections:
  184. sec.print_contents()
  185. print(footer)
  186. def main():
  187. header = '''\
  188. <?xml version="1.0" encoding="UTF-8"?>
  189. <!DOCTYPE html
  190. PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  191. "DTD/xhtml1-strict.dtd">
  192. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  193. <head>
  194. <title>Wireshark FAQ</title>
  195. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  196. </head>
  197. <body>
  198. '''
  199. footer = '''\
  200. </body>
  201. </html>
  202. '''
  203. if len(sys.argv) > 1 and sys.argv[1] == '-b': # Only print the document body
  204. header = ''
  205. footer = ''
  206. create_output(header, footer)
  207. #################################################################
  208. section("General Questions")
  209. #################################################################
  210. question("What is Wireshark?")
  211. answer("""
  212. Wireshark&#174; is a network protocol analyzer. It lets you capture and
  213. interactively browse the traffic running on a computer network. It has
  214. a rich and powerful feature set and is world's most popular tool of its
  215. kind. It runs on most computing platforms including Windows, OS X,
  216. Linux, and UNIX. Network professionals, security experts, developers,
  217. and educators around the world use it regularly. It is freely available
  218. as open source, and is released under the GNU General Public License
  219. version 2.
  220. <br />
  221. It is developed and maintained by a global team of protocol experts, and
  222. it is an example of a
  223. <a href="http://en.wikipedia.org/wiki/Disruptive_technology">disruptive
  224. technology</a>.
  225. <br />
  226. Wireshark used to be known as Ethereal&#174;. See the next question
  227. for details about the name change. If you're still using Ethereal, it
  228. is <a href="http://www.ethereal.com/appnotes/enpa-sa-00024.html">strongly
  229. recommended that you upgrade to Wireshark</a>.
  230. <br />
  231. For more information, please see the
  232. <a href="/about.html">About Wireshark</a>
  233. page.
  234. """)
  235. question("What's up with the name change? Is Wireshark a fork?")
  236. answer("""
  237. In May of 2006, Gerald Combs (the original author of Ethereal)
  238. went to work for CACE Technologies (best known for WinPcap).
  239. Unfortunately, he had to leave the Ethereal trademarks behind.
  240. <br />
  241. This left the project in an awkward position. The only reasonable way
  242. to ensure the continued success of the project was to change the name.
  243. This is how Wireshark was born.
  244. <br />
  245. Wireshark is almost (but not quite) a fork. Normally a "fork" of an open source
  246. project results in two names, web sites, development teams, support
  247. infrastructures, etc. This is the case with Wireshark except for one notable
  248. exception -- every member of the core development team is now working on
  249. Wireshark. There has been no active development on Ethereal since the name
  250. change. Several parts of the Ethereal web site (such as the mailing lists,
  251. source code repository, and build farm) have gone offline.
  252. <br />
  253. More information on the name change can be found here:
  254. <ul class="item_list">
  255. <li><href url="http://www.prweb.com/releases/2006/6/prweb396098.htm" name="Original press release">
  256. <li><href url="http://trends.newsforge.com/article.pl?sid=06/06/09/1349255&from=rss" name="NewsForge article">
  257. <li>Many other articles in <href url="bibliography.html" name="our bibliography">
  258. </ul>
  259. """)
  260. question("Where can I get help?")
  261. answer("""
  262. Community support is available on the wireshark-users mailing list.
  263. Subscription information and archives for all of Wireshark's mailing
  264. lists can be found at %s. An IRC channel dedicated to Wireshark can
  265. be found at %s.
  266. <br />
  267. Self-paced and instructor-led training is available at
  268. <a href="http://www.wiresharku.com">Wireshark University</a>. A
  269. certification program will be announced in Q3 2007.
  270. <br />
  271. Commercial support and development services are available
  272. from <a href="http://www.cacetech.com/">CACE Technologies</a>.
  273. """ % (selflink("https://www.wireshark.org/mailman/listinfo"),
  274. selflink("irc://irc.freenode.net/wireshark")
  275. ))
  276. question("What kind of shark is Wireshark?")
  277. answer("""
  278. <i>carcharodon photoshopia</i>.
  279. """)
  280. question("How is Wireshark pronounced, spelled and capitalized?")
  281. answer("""
  282. Wireshark is pronounced as the word <i>wire</i> followed immediately by
  283. the word <i>shark</i>. Exact pronunciation and emphasis may vary
  284. depending on your locale (e.g. Arkansas).
  285. <br />
  286. It's spelled with a capital <i>W</i>, followed by a lower-case
  287. <i>ireshark</i>. It is not a CamelCase word, i.e., <i>WireShark</i>
  288. is incorrect.
  289. """)
  290. question("How much does Wireshark cost?", "but_thats_not_all")
  291. answer("""
  292. Wireshark is "free software"; you can download it without paying any
  293. license fee. The version of Wireshark you download isn't a "demo"
  294. version, with limitations not present in a "full" version; it
  295. <em>is</em> the full version.
  296. <br />
  297. The license under which Wireshark is issued is <a
  298. href="http://www.gnu.org/licenses/gpl.html">the GNU General Public
  299. License version 2</a>. See <a href="http://www.gnu.org/licenses/gpl-faq.html">the
  300. GNU GPL FAQ</a> for some more information.
  301. """)
  302. question("But I just paid someone on eBay for a copy of Wireshark! Did I get ripped off?")
  303. answer("""
  304. That depends. Did they provide any sort of value-added product or service, such
  305. as installation support, installation media, training, trace file analysis, or
  306. funky-colored shark-themed socks? Probably not.
  307. <br />
  308. Wireshark is <a href="/download.html">available for anyone to download,
  309. absolutely free, at any time</a>. Paying for a copy implies that you should
  310. get something for your money.
  311. """)
  312. question("Can I use Wireshark commercially?")
  313. answer("""
  314. Yes, if, for example, you mean "I work for a commercial organization;
  315. can I use Wireshark to capture and analyze network traffic in our
  316. company's networks or in our customer's networks?"
  317. <br />
  318. If you mean "Can I use Wireshark as part of my commercial product?", see
  319. <a href="#derived_work_gpl">the next entry in the FAQ</a>.
  320. """)
  321. question("Can I use Wireshark as part of my commercial product?",
  322. "derived_work_gpl")
  323. answer("""
  324. As noted, Wireshark is licensed under <a
  325. href="http://www.gnu.org/licenses/gpl.html">the GNU General Public
  326. License</a>. The GPL imposes conditions on your use of GPL'ed code in
  327. your own products; you cannot, for example, make a "derived work" from
  328. Wireshark, by making modifications to it, and then sell the resulting
  329. derived work and not allow recipients to give away the resulting work.
  330. You must also make the changes you've made to the Wireshark source
  331. available to all recipients of your modified version; those changes
  332. must also be licensed under the terms of the GPL. See the <a
  333. href="http://www.gnu.org/licenses/gpl-faq.html">GPL FAQ</a> for more
  334. details; in particular, note the answer to <a
  335. href="http://www.gnu.org/licenses/gpl-faq.html#GPLCommercially">the
  336. question about modifying a GPLed program and selling it
  337. commercially</a>, and <a
  338. href="http://www.gnu.org/licenses/gpl-faq.html#LinkingWithGPL">the
  339. question about linking GPLed code with other code to make a proprietary
  340. program</a>.
  341. <br />
  342. You can combine a GPLed program such as Wireshark and a commercial
  343. program as long as they communicate "at arm's length", as per <a
  344. href="http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem">this
  345. item in the GPL FAQ</a>.
  346. <br />
  347. We recommend keeping Wireshark and your product completely separate,
  348. communicating over sockets or pipes. If you're loading any part of
  349. Wireshark as a DLL, you're probably doing it wrong.
  350. """)
  351. question("What protocols are currently supported?")
  352. answer("""
  353. There are currently hundreds of supported
  354. protocols and media. Details can be found in the
  355. <a href="/docs/man-pages/wireshark.html">wireshark(1)</a> man page.
  356. """)
  357. question("Are there any plans to support {your favorite protocol}?")
  358. answer("""
  359. Support for particular protocols is added to Wireshark as a result of
  360. people contributing that support; no formal plans for adding support for
  361. particular protocols in particular future releases exist.
  362. """)
  363. question("""Can Wireshark read capture files from {your favorite network
  364. analyzer}?""")
  365. answer("""
  366. Support for particular protocols is added to Wireshark as a result of
  367. people contributing that support; no formal plans for adding support for
  368. particular protocols in particular future releases exist.
  369. <br />
  370. If a network analyzer writes out files in a format already supported by
  371. Wireshark (e.g., in libpcap format), Wireshark may already be able to read
  372. them, unless the analyzer has added its own proprietary extensions to
  373. that format.
  374. <br />
  375. If a network analyzer writes out files in its own format, or has added
  376. proprietary extensions to another format, in order to make Wireshark read
  377. captures from that network analyzer, we would either have to have a
  378. specification for the file format, or the extensions, sufficient to give
  379. us enough information to read the parts of the file relevant to
  380. Wireshark, or would need at least one capture file in that format
  381. <strong>AND</strong> a detailed textual analysis of the packets in that
  382. capture file (showing packet time stamps, packet lengths, and the
  383. top-level packet header) in order to reverse-engineer the file
  384. format.
  385. <br />
  386. Note that there is no guarantee that we will be able to reverse-engineer
  387. a capture file format.
  388. """)
  389. question("What devices can Wireshark use to capture packets?")
  390. answer("""
  391. Wireshark can read live data from Ethernet, Token-Ring, FDDI, serial (PPP
  392. and SLIP) (if the OS on which it's running allows Wireshark to do so),
  393. 802.11 wireless LAN (if the OS on which it's running allows Wireshark to
  394. do so), ATM connections (if the OS on which it's running allows Wireshark
  395. to do so), and the "any" device supported on Linux by recent versions of
  396. libpcap.
  397. <br />
  398. See <a href="http://wiki.wireshark.org/CaptureSetup/NetworkMedia">the list of
  399. supported capture media on various OSes</a> for details (several items
  400. in there say "Unknown", which doesn't mean "Wireshark can't capture on
  401. them", it means "we don't know whether it can capture on them"; we
  402. expect that it will be able to capture on many of them, but we haven't
  403. tried it ourselves - if you try one of those types and it works, please
  404. update the wiki page accordingly.
  405. <br />
  406. It can also read a variety of capture file formats, including:
  407. <ul>
  408. <li> AG Group/WildPackets EtherPeek/TokenPeek/AiroPeek/EtherHelp/Packet Grabber captures
  409. <li> AIX's iptrace captures
  410. <li> Accellent's 5Views LAN agent output
  411. <li> Cinco Networks NetXRay captures
  412. <li> Cisco Secure Intrusion Detection System IPLog output
  413. <li> CoSine L2 debug output
  414. <li> DBS Etherwatch VMS text output
  415. <li> Endace Measurement Systems' ERF format captures
  416. <li> EyeSDN USB S0 traces
  417. <li> HP-UX nettl captures
  418. <li> ISDN4BSD project i4btrace captures
  419. <li> Linux Bluez Bluetooth stack hcidump -w traces
  420. <li> Lucent/Ascend router debug output
  421. <li> Microsoft Network Monitor captures
  422. <li> Network Associates Windows-based Sniffer captures
  423. <li> Network General/Network Associates DOS-based Sniffer (compressed or uncompressed) captures
  424. <li> Network Instruments Observer version 9 captures
  425. <li> Novell LANalyzer captures
  426. <li> RADCOM's WAN/LAN analyzer captures
  427. <li> Shomiti/Finisar Surveyor captures
  428. <li> Toshiba's ISDN routers dump output
  429. <li> VMS TCPIPtrace/TCPtrace/UCX$TRACE output
  430. <li> Visual Networks' Visual UpTime traffic capture
  431. <li> libpcap, tcpdump and various other tools using tcpdump's capture format
  432. <li> snoop and atmsnoop output
  433. </ul>
  434. so that it can read traces from various network types, as captured by
  435. other applications or equipment, even if it cannot itself capture on
  436. those network types.
  437. """)
  438. question("""
  439. Does Wireshark work on Windows Vista or Windows Server 2008?
  440. """)
  441. answer("""
  442. Yes, but if you want to capture packets as a normal user, you must make sure
  443. npf.sys is loaded. Wireshark's installer enables this by default. This is not a
  444. concern if you run Wireshark as Administrator, but this is discouraged. See the
  445. <a
  446. href="http://wiki.wireshark.org/CaptureSetup/CapturePrivileges#windows">CapturePrivileges</a>
  447. page on the wiki for more details.
  448. """)
  449. #################################################################
  450. section("Downloading Wireshark")
  451. #################################################################
  452. question("""Why do I get an error when I try to run the Win32 installer?""")
  453. answer("""
  454. The program you used to download it may have downloaded it incorrectly.
  455. Web browsers and download accelerators sometimes may do this.
  456. <br />
  457. Try downloading it with, for example:
  458. <ul>
  459. <li>Wget, for which Windows binaries are available from <a
  460. href="http://www.christopherlewis.com/WGet/WGetFiles.htm">Christopher Lewis</a>
  461. or
  462. <a href="http://www.jensroesner.de/wgetgui/">wGetGUI</a>, which offers a GUI
  463. interface that uses wget;
  464. <li>WS_FTP from <a href="http://www.ipswitch.com/">Ipswitch</a>,
  465. <li>the <tt>ftp</tt> command that comes with Windows.
  466. </ul>
  467. If you use the <tt>ftp</tt> command, make sure you do the transfer in
  468. binary mode rather than ASCII mode, by using the <tt>binary</tt> command
  469. before transferring the file.
  470. """)
  471. #################################################################
  472. section("Installing Wireshark")
  473. #################################################################
  474. question("""I installed the Wireshark RPM (or other package); why did
  475. it install TShark but not Wireshark?""")
  476. answer("""
  477. Many distributions have separate Wireshark packages, one for non-GUI
  478. components such as TShark, editcap, dumpcap, etc. and one for the GUI.
  479. If this is the case on your system, there's probably a separate package
  480. named <tt>wireshark-gnome</tt> or <tt>wireshark-gtk+</tt>. Find it and
  481. install it.
  482. """)
  483. #################################################################
  484. section("Building Wireshark")
  485. #################################################################
  486. question("""I have libpcap installed; why did the configure script not
  487. find pcap.h or bpf.h?""")
  488. answer("""
  489. Are you sure pcap.h and bpf.h are installed? The official distribution
  490. of libpcap only installs the libpcap.a library file when "make install"
  491. is run. To install pcap.h and bpf.h, you must run "make install-incl".
  492. If you're running Debian or Redhat, make sure you have the "libpcap-dev"
  493. or "libpcap-devel" packages installed.
  494. <br />
  495. It's also possible that pcap.h and bpf.h have been installed in a strange
  496. location. If this is the case, you may have to tweak aclocal.m4.
  497. """)
  498. question("""
  499. Why do I get the error
  500. <blockquote><samp>dftest_DEPENDENCIES was already defined in condition TRUE,
  501. which implies condition HAVE_PLUGINS_TRUE</samp></blockquote>
  502. when I try to build Wireshark from SVN or a SVN snapshot?
  503. """)
  504. answer("""
  505. You probably have automake 1.5 installed on your machine (the command
  506. <kbd>automake --version</kbd> will report the version of automake on
  507. your machine). There is a bug in that version of automake that causes
  508. this problem; upgrade to a later version of automake (1.6 or later).
  509. """)
  510. question("""
  511. Why does the linker fail with a number of "Output line too long." messages
  512. followed by linker errors when I try to build Wireshark?
  513. """)
  514. answer("""
  515. The version of the <tt>sed</tt> command on your system is incapable of
  516. handling very long lines. On Solaris, for example,
  517. <tt>/usr/bin/sed</tt> has a line length limit too low to allow
  518. <tt>libtool</tt> to work; <tt>/usr/xpg4/bin/sed</tt> can handle it, as
  519. can GNU <tt>sed</tt> if you have it installed.
  520. <br />
  521. On Solaris, changing your command search path to search
  522. <tt>/usr/xpg4/bin</tt> before <tt>/usr/bin</tt> should make the problem
  523. go away; on any platform on which you have this problem, installing GNU
  524. <tt>sed</tt> and changing your command path to search the directory in
  525. which it is installed before searching the directory with the version of
  526. <tt>sed</tt> that came with the OS should make the problem go away.
  527. """)
  528. question("""
  529. When I try to build Wireshark on Solaris, why does the link fail
  530. complaining that <tt>plugin_list</tt> is undefined?
  531. """)
  532. answer("""
  533. This appears to be due to a problem with some versions of the GTK+ and
  534. GLib packages from www.sunfreeware.org; un-install those packages, and
  535. try getting the 1.2.10 versions from that site, or the versions from <a
  536. href="http://www.thewrittenword.com">The Written Word</a>, or the
  537. versions from Sun's GNOME distribution, or the versions from the
  538. supplemental software CD that comes with the Solaris media kit, or build
  539. them from source from <a href="http://www.gtk.org/">the GTK Web
  540. site</a>. Then re-run the configuration script, and try rebuilding
  541. Wireshark. (If you get the 1.2.10 versions from www.sunfreeware.org, and
  542. the problem persists, un-install them and try installing one of the
  543. other versions mentioned.)
  544. """)
  545. question("""
  546. When I try to build Wireshark on Windows, why does the build fail because
  547. of conflicts between <tt>winsock.h</tt> and <tt>winsock2.h</tt>?
  548. """)
  549. answer("""
  550. As of Wireshark 0.9.5, you must install WinPcap 2.3 or later, and the
  551. corresponding version of the developer's pack, in order to be able to
  552. compile Wireshark; it will not compile with older versions of the
  553. developer's pack. The symptoms of this failure are conflicts between
  554. definitions in <tt>winsock.h</tt> and in <tt>winsock2.h</tt>; Wireshark
  555. uses <tt>winsock2.h</tt>, but pre-2.3 versions of the WinPcap
  556. developer's packet use <tt>winsock.h</tt>. (2.3 uses
  557. <tt>winsock2.h</tt>, so if Wireshark were to use <tt>winsock.h</tt>, it
  558. would not be able to build with current versions of the WinPcap
  559. developer's pack.)
  560. <br />
  561. Note that the installed version of the developer's pack should be the
  562. same version as the version of WinPcap you have installed.
  563. """)
  564. #################################################################
  565. section("Starting Wireshark")
  566. #################################################################
  567. question("""Why does Wireshark crash with a Bus Error when I try to run
  568. it on Solaris 8?""")
  569. answer("""
  570. Some versions of the GTK+ library from www.sunfreeware.org appear to be
  571. buggy, causing Wireshark to drop core with a Bus Error. Un-install those
  572. packages, and try getting the 1.2.10 version from that site, or the
  573. version from <a href="http://www.thewrittenword.com">The Written
  574. Word</a>, or the version from Sun's GNOME distribution, or the version
  575. from the supplemental software CD that comes with the Solaris media kit,
  576. or build it from source from <a href="http://www.gtk.org/">the GTK Web
  577. site</a>. Update the GLib library to the 1.2.10 version, from the same
  578. source, as well. (If you get the 1.2.10 versions from
  579. www.sunfreeware.org, and the problem persists, un-install them and try
  580. installing one of the other versions mentioned.)
  581. <br />
  582. Similar problems may exist with older versions of GTK+ for earlier
  583. versions of Solaris.
  584. """)
  585. question("""When I run Wireshark on Windows NT, why does it die with a Dr.
  586. Watson error, reporting an "Integer division by zero" exception, when I
  587. start it?""")
  588. answer("""
  589. In at least some case, this appears to be due to using the
  590. default VGA driver; if that's not the correct driver for your video
  591. card, try running the correct driver for your video card.
  592. """)
  593. question("""When I try to run Wireshark, why does it complain about
  594. <tt>sprint_realloc_objid</tt> being undefined?""")
  595. answer("""
  596. Wireshark can only be linked with version 4.2.2 or later of UCD SNMP.
  597. Your version of Wireshark was dynamically linked with such a version of
  598. UCD SNMP; however, you have an older version of UCD SNMP installed,
  599. which means that when Wireshark is run, it tries to link to the older
  600. version, and fails. You will have to replace that version of UCD SNMP
  601. with version 4.2.2 or a later version.
  602. """)
  603. question("""
  604. I've installed Wireshark from Fink on Mac OS X; why is it very slow to
  605. start up?
  606. """)
  607. answer("""
  608. When an application is installed on OS X, prior to 10.4, it is usually
  609. "prebound" to speed up launching the application. (That's what the
  610. "Optimizing" phase of installation is.)
  611. <br />
  612. Fink normally performs prebinding automatically when you install a
  613. package. However, in some rare cases, for whatever reason the prebinding
  614. caches get corrupt, and then not only does prebinding fail, but startup
  615. actually becomes much slower, because the system tries in vain to
  616. perform prebinding "on the fly" as you launch the application. This
  617. fails, causing sometimes huge delays.
  618. <br />
  619. To fix the prebinding caches, run the command
  620. <pre>
  621. sudo /sw/var/lib/fink/prebound/update-package-prebinding.pl -f
  622. </pre>
  623. """)
  624. #################################################################
  625. section("Crashes and other fatal errors")
  626. #################################################################
  627. question("""
  628. I have an XXX network card on my machine; if I try to capture on it, why
  629. does my machine crash or reset itself?
  630. """)
  631. answer("""
  632. This is almost certainly a problem with one or more of:
  633. <ul>
  634. <li>the operating system you're using;
  635. <li>the device driver for the interface you're using;
  636. <li>the libpcap/WinPcap library and, if this is Windows, the WinPcap
  637. device driver;
  638. </ul>
  639. so:
  640. <ul>
  641. <li>if you are using Windows, see <a
  642. href="http://www.winpcap.org/contact.htm">the WinPcap support
  643. page</a> - check the "Submitting bugs" section;
  644. <li>if you are using some Linux distribution, some version of BSD, or
  645. some other UNIX-flavored OS, you should report the problem to the
  646. company or organization that produces the OS (in the case of a Linux
  647. distribution, report the problem to whoever produces the distribution).
  648. </ul>
  649. """)
  650. question("""
  651. Why does my machine crash or reset itself when I select "Start" from the
  652. "Capture" menu or select "Preferences" from the "Edit" menu?
  653. """)
  654. answer("""
  655. Both of those operations cause Wireshark to try to build a list of the
  656. interfaces that it can open; it does so by getting a list of interfaces
  657. and trying to open them. There is probably an OS, driver, or, for
  658. Windows, WinPcap bug that causes the system to crash when this happens;
  659. see the previous question.
  660. """)
  661. #################################################################
  662. section("Capturing packets")
  663. #################################################################
  664. question("""When I use Wireshark to capture packets, why do I see only
  665. packets to and from my machine, or not see all the traffic I'm expecting
  666. to see from or to the machine I'm trying to monitor?""", "promiscsniff")
  667. answer("""
  668. This might be because the interface on which you're capturing is plugged
  669. into an Ethernet or Token Ring switch; on a switched network, unicast
  670. traffic between two ports will not necessarily appear on other ports -
  671. only broadcast and multicast traffic will be sent to all ports.
  672. <br />
  673. Note that even if your machine is plugged into a hub, the "hub" may be
  674. a switched hub, in which case you're still on a switched network.
  675. <br />
  676. Note also that on the Linksys Web site, they say that their
  677. auto-sensing hubs "broadcast the 10Mb packets to the port that operate
  678. at 10Mb only and broadcast the 100Mb packets to the ports that operate
  679. at 100Mb only", which would indicate that if you sniff on a 10Mb port,
  680. you will not see traffic coming sent to a 100Mb port, and <i>vice
  681. versa</i>. This problem has also been reported for Netgear dual-speed
  682. hubs, and may exist for other "auto-sensing" or "dual-speed" hubs.
  683. <br />
  684. Some switches have the ability to replicate all traffic on all ports to
  685. a single port so that you can plug your analyzer into that single port to
  686. sniff all traffic. You would have to check the documentation for the
  687. switch to see if this is possible and, if so, to see how to do this.
  688. See <a href="http://wiki.wireshark.org/SwitchReference">the switch
  689. reference page</a> on <a href="http://wiki.wireshark.org/">the Wireshark
  690. Wiki</a> for information on some switches. (Note that it's a Wiki, so
  691. you can update or fix that information, or add additional information on
  692. those switches or information on new switches, yourself.)
  693. <br />
  694. Note also that many firewall/NAT boxes have a switch built into them;
  695. this includes many of the "cable/DSL router" boxes. If you have a box
  696. of that sort, that has a switch with some number of Ethernet ports into
  697. which you plug machines on your network, and another Ethernet port used
  698. to connect to a cable or DSL modem, you can, at least, sniff traffic
  699. between the machines on your network and the Internet by plugging
  700. the Ethernet port on the router going to the modem, the Ethernet port on
  701. the modem, and the machine on which you're running Wireshark into a hub
  702. (make sure it's not a switching hub, and that, if it's a dual-speed hub,
  703. all three of those ports are running at the same speed.
  704. <br />
  705. If your machine is <em>not</em> plugged into a switched network or a
  706. dual-speed hub, or it is plugged into a switched network but the port is
  707. set up to have all traffic replicated to it, the problem might be that
  708. the network interface on which you're capturing doesn't support
  709. "promiscuous" mode, or because your OS can't put the interface into
  710. promiscuous mode. Normally, network interfaces supply to the host only:
  711. <ul>
  712. <li>packets sent to one of that host's link-layer addresses;
  713. <li>broadcast packets;
  714. <li>multicast packets sent to a multicast address that the host has
  715. configured the interface to accept.
  716. </ul>
  717. Most network interfaces can also be put in "promiscuous" mode, in which
  718. they supply to the host all network packets they see. Wireshark will try
  719. to put the interface on which it's capturing into promiscuous mode
  720. unless the "Capture packets in promiscuous mode" option is turned off in
  721. the "Capture Options" dialog box, and TShark will try to put the
  722. interface on which it's capturing into promiscuous mode unless the
  723. <tt>-p</tt> option was specified. However, some network interfaces
  724. don't support promiscuous mode, and some OSes might not allow interfaces
  725. to be put into promiscuous mode.
  726. <br />
  727. If the interface is not running in promiscuous mode, it won't see any
  728. traffic that isn't intended to be seen by your machine. It
  729. <strong>will</strong> see broadcast packets, and multicast packets sent
  730. to a multicast MAC address the interface is set up to receive.
  731. <br />
  732. You should ask the vendor of your network interface whether it supports
  733. promiscuous mode. If it does, you should ask whoever supplied the
  734. driver for the interface (the vendor, or the supplier of the OS you're
  735. running on your machine) whether it supports promiscuous mode with that
  736. network interface.
  737. <br />
  738. In the case of token ring interfaces, the drivers for some of them, on
  739. Windows, may require you to enable promiscuous mode in order to capture
  740. in promiscuous mode. See <a
  741. href="http://wiki.wireshark.org/CaptureSetup/TokenRing">the Wireshark
  742. Wiki item on Token Ring capturing</a> for details.
  743. <br />
  744. In the case of wireless LAN interfaces, it appears that, when those
  745. interfaces are promiscuously sniffing, they're running in a
  746. significantly different mode from the mode that they run in when they're
  747. just acting as network interfaces (to the extent that it would be a
  748. significant effort for those drivers to support for promiscuously
  749. sniffing <em>and</em> acting as regular network interfaces at the same
  750. time), so it may be that Windows drivers for those interfaces don't
  751. support promiscuous mode.
  752. """)
  753. question("""When I capture with Wireshark, why can't I see any TCP
  754. packets other than packets to and from my machine, even though another
  755. analyzer on the network sees those packets?""")
  756. answer("""
  757. You're probably not seeing <em>any</em> packets other than unicast
  758. packets to or from your machine, and broadcast and multicast packets; a
  759. switch will normally send to a port only unicast traffic sent to the MAC
  760. address for the interface on that port, and broadcast and multicast
  761. traffic - it won't send to that port unicast traffic sent to a MAC
  762. address for some other interface - and a network interface not in
  763. promiscuous mode will receive only unicast traffic sent to the MAC
  764. address for that interface, broadcast traffic, and multicast traffic
  765. sent to a multicast MAC address the interface is set up to receive.
  766. <br />
  767. TCP doesn't use broadcast or multicast, so you will only see your own
  768. TCP traffic, but UDP services may use broadcast or multicast so you'll
  769. see some UDP traffic - however, this is not a problem with TCP traffic,
  770. it's a problem with unicast traffic, as you also won't see all UDP
  771. traffic between other machines.
  772. <br />
  773. I.e., this is probably <a href="#promiscsniff">the same question
  774. as this earlier one</a>; see the response to that question.
  775. """)
  776. question("""Why am I only seeing ARP packets when I try to capture
  777. traffic?""")
  778. answer("""
  779. You're probably on a switched network, and running Wireshark on a machine
  780. that's not sending traffic to the switch and not being sent any traffic
  781. from other machines on the switch. ARP packets are often broadcast
  782. packets, which are sent to all switch ports.
  783. <br />
  784. I.e., this is probably <a href="#promiscsniff">the same question
  785. as this earlier one</a>; see the response to that question.
  786. """)
  787. question("""
  788. Why am I not seeing any traffic when I try to capture traffic?""")
  789. answer("""
  790. Is the machine running Wireshark sending out any traffic on the network
  791. interface on which you're capturing, or receiving any traffic on that
  792. network, or is there any broadcast traffic on the network or multicast
  793. traffic to a multicast group to which the machine running Wireshark
  794. belongs?
  795. <br />
  796. If not, this may just be a problem with promiscuous sniffing, either due
  797. to running on a switched network or a dual-speed hub, or due to problems
  798. with the interface not supporting promiscuous mode; see the response to
  799. <a href="#promiscsniff">this earlier question</a>.
  800. <br />
  801. Otherwise, on Windows, see the response to <a href="#capprobwin">this
  802. question</a> and, on a UNIX-flavored OS, see the response to <a
  803. href="#capprobunix">this question</a>.
  804. """)
  805. question("""
  806. Can Wireshark capture on (my T1/E1 line, SS7 links, etc.)?
  807. """)
  808. answer("""
  809. Wireshark can only capture on devices supported by libpcap/WinPcap. On
  810. most OSes, only devices that can act as network interfaces of the type
  811. that support IP are supported as capture devices for libpcap/WinPcap,
  812. although the device doesn't necessarily have to be running as an IP
  813. interface in order to support traffic capture.
  814. <br />
  815. On Linux and FreeBSD, libpcap 0.8 and later support the API for <a
  816. href="http://www.endace.com/products.htm">Endace Measurement Systems'
  817. DAG cards</a>, so that a system with one of those cards, and its driver
  818. and libraries, installed can capture traffic with those cards with
  819. libpcap-based applications. You would either have to have a version of
  820. Wireshark built with that version of libpcap, or a dynamically-linked
  821. version of Wireshark and a shared libpcap library with DAG support, in
  822. order to do so with Wireshark. You should ask Endace whether that could
  823. be used to capture traffic on, for example, your T1/E1 link.
  824. <br />
  825. See <a href="http://wiki.wireshark.org/CaptureSetup/SS7">the SS7 capture
  826. setup page</a> on <a href="http://wiki.wireshark.org/">the Wireshark
  827. Wiki</a> for current information on capturing SS7 traffic on TDM
  828. links.
  829. """)
  830. question("""How do I put an interface into promiscuous mode?""")
  831. answer("""
  832. By not disabling promiscuous mode when running Wireshark or TShark.
  833. <br />
  834. Note, however, that:
  835. <ul>
  836. <li>the form of promiscuous mode that libpcap (the library that
  837. programs such as tcpdump, Wireshark, etc. use to do packet capture)
  838. turns on will <strong>not</strong> necessarily be shown if you run
  839. <tt>ifconfig</tt> on the interface on a UNIX system;
  840. <li>some network interfaces might not support promiscuous mode, and some
  841. drivers might not allow promiscuous mode to be turned on - see <a
  842. href="#promiscsniff">this earlier question</a> for more information on
  843. that;
  844. <li>the fact that you're not seeing any traffic, or are only seeing
  845. broadcast traffic, or aren't seeing any non-broadcast traffic other than
  846. traffic to or from the machine running Wireshark, does not mean that
  847. promiscuous mode isn't on - see <a href="#promiscsniff">this earlier
  848. question</a> for more information on that.
  849. </ul>
  850. I.e., this is probably <a href="#promiscsniff">the same question
  851. as this earlier one</a>; see the response to that question.
  852. """)
  853. question("""
  854. I can set a display filter just fine; why don't capture filters work?
  855. """)
  856. answer("""
  857. Capture filters currently use a different syntax than display filters. Here's
  858. the corresponding section from the
  859. <a href="/docs/man-pages/wireshark.html">wireshark(1)</a>
  860. man page:
  861. <br />
  862. "Display filters in Wireshark are very powerful; more fields are filterable
  863. in Wireshark than in other protocol analyzers, and the syntax you can
  864. use to create your filters is richer. As Wireshark progresses, expect
  865. more and more protocol fields to be allowed in display filters.
  866. <br />
  867. Packet capturing is performed with the pcap library. The capture filter
  868. syntax follows the rules of the pcap library. This syntax is different
  869. from the display filter syntax."
  870. <br />
  871. The capture filter syntax used by libpcap can be found in the
  872. <a href="http://www.tcpdump.org/tcpdump_man.html">tcpdump(8)</a>
  873. man page.
  874. """)
  875. question("""I'm entering valid capture filters; why do I still get
  876. "parse error" errors?""")
  877. answer("""
  878. There is a bug in some versions of libpcap/WinPcap that cause it to
  879. report parse errors even for valid expressions if a previous filter
  880. expression was invalid and got a parse error.
  881. <br />
  882. Try exiting and restarting Wireshark; if you are using a version of
  883. libpcap/WinPcap with this bug, this will "erase" its memory of the
  884. previous parse error. If the capture filter that got the "parse error"
  885. now works, the earlier error with that filter was probably due to this
  886. bug.
  887. <br />
  888. The bug was fixed in libpcap 0.6; 0.4[.x] and 0.5[.x] versions of
  889. libpcap have this bug, but 0.6[.x] and later versions don't.
  890. <br />
  891. Versions of WinPcap prior to 2.3 are based on pre-0.6 versions of
  892. libpcap, and have this bug; WinPcap 2.3 is based on libpcap 0.6.2, and
  893. doesn't have this bug.
  894. <br />
  895. If you are running Wireshark on a UNIX-flavored platform, run "wireshark
  896. -v", or select "About Wireshark..." from the "Help" menu in Wireshark, to
  897. see what version of libpcap it's using. If it's not 0.6 or later, you
  898. will need either to upgrade your OS to get a later version of libpcap,
  899. or will need to build and install a later version of libpcap from <a
  900. href="http://www.tcpdump.org/">the tcpdump.org Web site</a> and then
  901. recompile Wireshark from source with that later version of libpcap.
  902. <br />
  903. If you are running Wireshark on Windows with a pre-2.3 version of
  904. WinPcap, you will need to un-install WinPcap and then download and
  905. install WinPcap 2.3.
  906. """)
  907. question("""
  908. How can I capture packets with CRC errors?
  909. """)
  910. answer("""
  911. Wireshark can capture only the packets that the packet capture library -
  912. libpcap on UNIX-flavored OSes, and the WinPcap port to Windows of libpcap
  913. on Windows - can capture, and libpcap/WinPcap can capture only the
  914. packets that the OS's raw packet capture mechanism (or the WinPcap
  915. driver, and the underlying OS networking code and network interface
  916. drivers, on Windows) will allow it to capture.
  917. <br />
  918. Unless the OS always supplies packets with errors such as invalid CRCs
  919. to the raw packet capture mechanism, or can be configured to do so,
  920. invalid CRCs to the raw packet capture mechanism, Wireshark - and other
  921. programs that capture raw packets, such as tcpdump - cannot capture
  922. those packets. You will have to determine whether your OS needs to be
  923. so configured and, if so, can be so configured, configure it if
  924. necessary and possible, and make whatever changes to libpcap and the
  925. packet capture program you're using are necessary, if any, to support
  926. capturing those packets.
  927. <br />
  928. Most OSes probably do <strong>not</strong> support capturing packets
  929. with invalid CRCs on Ethernet, and probably do not support it on most
  930. other link-layer types. Some drivers on some OSes do support it, such
  931. as some Ethernet drivers on FreeBSD; in those OSes, you might always get
  932. those packets, or you might only get them if you capture in promiscuous
  933. mode (you'd have to determine which is the case).
  934. <br />
  935. Note that libpcap does not currently supply to programs that use it an
  936. indication of whether the packet's CRC was invalid (because the drivers
  937. themselves do not supply that information to the raw packet capture
  938. mechanism); therefore, Wireshark will not indicate which packets had CRC
  939. errors unless the FCS was captured (see the next question) and you're
  940. using Wireshark 0.9.15 and later, in which case Wireshark will check the
  941. CRC and indicate whether it's correct or not.
  942. """)
  943. question("""
  944. How can I capture entire frames, including the FCS?
  945. """)
  946. answer("""
  947. Wireshark can only capture data that the packet capture library -
  948. libpcap on UNIX-flavored OSes, and the WinPcap port to Windows of
  949. libpcap on Windows - can capture, and libpcap/WinPcap can capture only
  950. the data that the OS's raw packet capture mechanism (or the WinPcap
  951. driver, and the underlying OS networking code and network interface
  952. drivers, on Windows) will allow it to capture.
  953. <br />
  954. For any particular link-layer network type, unless the OS supplies the
  955. FCS of a frame as part of the frame, or can be configured to do so,
  956. Wireshark - and other programs that capture raw packets, such as tcpdump
  957. - cannot capture the FCS of a frame. You will have to determine whether
  958. your OS needs to be so configured and, if so, can be so configured,
  959. configure it if necessary and possible, and make whatever changes to
  960. libpcap and the packet capture program you're using are necessary, if
  961. any, to support capturing the FCS of a frame.
  962. <br />
  963. Most OSes do <strong>not</strong> support capturing the FCS of a frame
  964. on Ethernet, and probably do not support it on most other link-layer
  965. types. Some drivres on some OSes do support it, such as some (all?)
  966. Ethernet drivers on NetBSD and possibly the driver for Apple's gigabit
  967. Ethernet interface in Mac OS X; in those OSes, you might always get the
  968. FCS, or you might only get the FCS if you capture in promiscuous mode
  969. (you'd have to determine which is the case).
  970. <br />
  971. Versions of Wireshark prior to 0.9.15 will not treat an Ethernet FCS in a
  972. captured packet as an FCS. 0.9.15 and later will attempt to determine
  973. whether there's an FCS at the end of the frame and, if it thinks there
  974. is, will display it as such, and will check whether it's the correct
  975. CRC-32 value or not.
  976. """)
  977. question("""
  978. I'm capturing packets on a machine on a VLAN; why don't the packets I'm
  979. capturing have VLAN tags?
  980. """)
  981. answer("""
  982. You might be capturing on what might be called a "VLAN interface" - the
  983. way a particular OS makes VLANs plug into the networking stack might,
  984. for example, be to have a network device object for the physical
  985. interface, which takes VLAN packets, strips off the VLAN header and
  986. constructs an Ethernet header, and passes that packet to an internal
  987. network device object for the VLAN, which then passes the packets onto
  988. various higher-level protocol implementations.
  989. <br />
  990. In order to see the raw Ethernet packets, rather than "de-VLANized"
  991. packets, you would have to capture not on the virtual interface for the
  992. VLAN, but on the interface corresponding to the physical network device,
  993. if possible. See <a
  994. href="http://wiki.wireshark.org/CaptureSetup/VLAN">the Wireshark Wiki
  995. item on VLAN capturing</a> for details.
  996. """)
  997. question("""
  998. Why does Wireshark hang after I stop a capture?
  999. """)
  1000. answer("""
  1001. The most likely reason for this is that Wireshark is trying to look up an
  1002. IP address in the capture to convert it to a name (so that, for example,
  1003. it can display the name in the source address or destination address
  1004. columns), and that lookup process is taking a very long time.
  1005. <br />
  1006. Wireshark calls a routine in the OS of the machine on which it's running
  1007. to convert of IP addresses to the corresponding names. That routine
  1008. probably does one or more of:
  1009. <ul><li>a search of a system file listing IP addresses and names;
  1010. <li>a lookup using DNS;
  1011. <li>on UNIX systems, a lookup using NIS;
  1012. <li>on Windows systems, a NetBIOS-over-TCP query.
  1013. </ul>
  1014. If a DNS server that's used in an address lookup is not responding, the
  1015. lookup will fail, but will only fail after a timeout while the system
  1016. routine waits for a reply.
  1017. <br />
  1018. In addition, on Windows systems, if the DNS lookup of the address fails,
  1019. either because the server isn't responding or because there are no
  1020. records in the DNS that could be used to map the address to a name, a
  1021. NetBIOS-over-TCP query will be made. That query involves sending a
  1022. message to the NetBIOS-over-TCP name service on that machine, asking for
  1023. the name and other information about the machine. If the machine isn't
  1024. running software that responds to those queries - for example, many
  1025. non-Windows machines wouldn't be running that software - the lookup will
  1026. only fail after a timeout. Those timeouts can cause the lookup to take
  1027. a long time.
  1028. <br />
  1029. If you disable network address-to-name translation - for example, by
  1030. turning off the "Enable network name resolution" option in the "Capture
  1031. Options" dialog box for starting a network capture - the lookups of the
  1032. address won't be done, which may speed up the process of reading the
  1033. capture file after the capture is stopped. You can make that setting
  1034. the default by selecting "Preferences" from the "Edit" menu, turning off
  1035. the "Enable network name resolution" option in the "Name resolution"
  1036. options in the preferences disalog box, and using the "Save" button in
  1037. that dialog box; note that this will save <em>all</em> your current
  1038. preference settings.
  1039. <br />
  1040. If Wireshark hangs when reading a capture even with network name
  1041. resolution turned off, there might, for example, be a bug in one of
  1042. Wireshark's dissectors for a protocol causing it to loop infinitely. If
  1043. you're not running the most recent release of Wireshark, you should first
  1044. upgrade to that release, as, if there's a bug of that sort, it might've
  1045. been fixed in a release after the one you're running. If the hang
  1046. occurs in the most recent release of Wireshark, the bug should be
  1047. reported to <a href="mailto:wireshark-dev@wireshark.org">the Wireshark
  1048. developers' mailing list</a> at <tt>wireshark-dev@wireshark.org</tt>.
  1049. <br />
  1050. On UNIX-flavored OSes, please try to force Wireshark to dump core, by
  1051. sending it a <tt>SIGABRT</tt> signal (usually signal 6) with the
  1052. <tt>kill</tt> command, and then get a stack trace if you have a debugger
  1053. installed. A stack trace can be obtained by using your debugger
  1054. (<tt>gdb</tt> in this example), the Wireshark binary, and the resulting
  1055. core file. Here's an example of how to use the gdb command
  1056. <tt>backtrace</tt> to do so.
  1057. <pre>
  1058. $ gdb wireshark core
  1059. (gdb) backtrace
  1060. ..... prints the stack trace
  1061. (gdb) quit
  1062. $
  1063. </pre>
  1064. The core dump file may be named "wireshark.core" rather than "core" on
  1065. some platforms (e.g., BSD systems).
  1066. <br />
  1067. Also, if at all possible, please send a copy of the capture file that
  1068. caused the problem; when capturing packets, Wireshark normally writes
  1069. captured packets to a temporary file, which will probably be in
  1070. <tt>/tmp</tt> or <tt>/var/tmp</tt> on UNIX-flavored OSes, <tt>\TEMP</tt>
  1071. on the main system disk (normally <tt>C:</tt>) on Windows 9x/Me/NT 4.0,
  1072. and <tt>\Documents and Settings\</tt><var>your login
  1073. name</var><tt>\Local Settings\Temp</tt> on the main system disk on
  1074. Windows 2000/Windows XP/Windows Server 2003, so the capture file will
  1075. probably be there. It will have a name of the form,
  1076. <tt>wireshark_iface_YYYYmmddHHMMSS_XXXXXX</tt>. Please don't send
  1077. a trace file greater than 1 MB when compressed; instead, make it
  1078. available via FTP or HTTP, or say it's available but leave it up to a
  1079. developer to ask for it. If the trace file contains sensitive
  1080. information (e.g., passwords), then please do not send it.
  1081. """)
  1082. #################################################################
  1083. section("Capturing packets on Windows")
  1084. #################################################################
  1085. question("""
  1086. I'm running Wireshark on Windows; why does some network interface on my
  1087. machine not show up in the list of interfaces in the "Interface:" field
  1088. in the dialog box popped up by "Capture->Start", and/or why does
  1089. Wireshark give me an error if I try to capture on that interface?
  1090. """, "capprobwin")
  1091. answer("""
  1092. If you are running Wireshark on Windows NT 4.0, Windows 2000, Windows XP,
  1093. or Windows Server 2003, and this is the first time you have run a
  1094. WinPcap-based program (such as Wireshark, or TShark, or WinDump, or
  1095. Analyzer, or...) since the machine was rebooted, you need to run that
  1096. program from an account with administrator privileges; once you have run
  1097. such a program, you will not need administrator privileges to run any
  1098. such programs until you reboot.
  1099. <br />
  1100. If you are running on Windows Windows 2000/Windows XP/Windows Server
  1101. 2003 and have administrator privileges or a WinPcap-based program has
  1102. been run with those privileges since the machine rebooted, this problem
  1103. <em>might</em> clear up if you completely un-install WinPcap and then
  1104. re-install it.
  1105. <br />
  1106. If that doesn't work, then note that Wireshark relies on the WinPcap
  1107. library, on the WinPcap device driver, and on the facilities that come
  1108. with the OS on which it's running in order to do captures.
  1109. <br />
  1110. Therefore, if the OS, the WinPcap library, or the WinPcap driver don't
  1111. support capturing on a particular network interface device, Wireshark
  1112. won't be able to capture on that device.
  1113. <br />
  1114. Note that:
  1115. <ol>
  1116. <li>2.02 and earlier versions of the WinPcap driver and library that
  1117. Wireshark uses for packet capture didn't support Token Ring interfaces;
  1118. versions 2.1 and later support Token Ring, and the current version of
  1119. Wireshark works with (and, in fact, requires) WinPcap 2.1 or later.
  1120. <br />
  1121. If you are having problems capturing on Token Ring interfaces, and you
  1122. have WinPcap 2.02 or an earlier version of WinPcap installed, you should
  1123. uninstall WinPcap, download and install the current version of WinPcap,
  1124. and then install the latest version of Wireshark.
  1125. <br >
  1126. <li>WinPcap 2.3 has problems supporting PPP WAN interfaces on Windows NT
  1127. 4.0, Windows 2000, Windows XP, and Windows Server 2003, and, to avoid
  1128. those problems, support for PPP WAN interfaces on those versions of
  1129. Windows has been disabled in WinPcap 3.0. Regular dial-up lines, ISDN
  1130. lines, ADSL connections using PPPoE or PPPoA, and various other lines
  1131. such as T1/E1 lines are all PPP interfaces, so those interfaces might
  1132. not show up on the list of interfaces in the "Capture Options"
  1133. dialog on those OSes.
  1134. <br />
  1135. On Windows 2000, Windows XP, and Windows Server 2003, but
  1136. <strong>not</strong> Windows NT 4.0 or Windows Vista Beta 1, you should
  1137. be able to capture on the "GenericDialupAdapter" with WinPcap 3.1. (3.1
  1138. beta releases called it the "NdisWanAdapter"; if you're using a 3.1 beta
  1139. release, you should un-install it and install the final 3.1 release.)
  1140. See <a href="http://wiki.wireshark.org/CaptureSetup/PPP">the Wireshark
  1141. Wiki item on PPP capturing</a> for details.
  1142. <br />
  1143. <li>WinPcap prior to 3.0 does not support multiprocessor machines (note
  1144. that machines with a single multi-threaded processor, such as Intel's
  1145. new multi-threaded x86 processors, are multiprocessor machines as far as
  1146. the OS and WinPcap are concerned), and recent 2.x versions of WinPcap
  1147. refuse to operate if they detect that they're running on a
  1148. multiprocessor machine, which means that they may not show any network
  1149. interfaces. You will need to use WinPcap 3.0 to capture on a
  1150. multiprocessor machine.
  1151. </ol>
  1152. <br />
  1153. If an interface doesn't show up in the list of interfaces in the
  1154. "Interface:" field, and you know the name of the interface, try entering
  1155. that name in the "Interface:" field and capturing on that device.
  1156. <br />
  1157. If the attempt to capture on it succeeds, the interface is somehow not
  1158. being reported by the mechanism Wireshark uses to get a list of
  1159. interfaces. Try listing the interfaces with WinDump; see <a
  1160. href="http://www.windump.org/">the WinDump Web site</a>
  1161. for information on using WinDump.
  1162. <br />
  1163. You would run WinDump with the <tt>-D</tt> flag; if it lists the
  1164. interface, please report this to <a
  1165. href="mailto:wireshark-dev@wireshark.org">wireshark-dev@wireshark.org</a>
  1166. giving full details of the problem, including
  1167. <ul>
  1168. <li>the operating system you're using, and the version of that operating
  1169. system;
  1170. <li>the type of network device you're using;
  1171. <li>the output of WinDump.
  1172. </ul>
  1173. If WinDump does <em>not</em> list the interface,
  1174. this is almost certainly a problem with one or more of:
  1175. <ul>
  1176. <li>the operating system you're using;
  1177. <li>the device driver for the interface you're using;
  1178. <li>the WinPcap library and/or the WinPcap device driver;
  1179. </ul>
  1180. so first check <a href="http://www.winpcap.org/misc/faq.htm">the
  1181. WinPcap FAQ</a> or <a
  1182. href="http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/misc/faq.htm">
  1183. the Wiretapped.net mirror of that FAQ</a>, to see if your problem is
  1184. mentioned there. If not, then see <a
  1185. href="http://www.winpcap.org/contact.htm">the WinPcap support page</a>
  1186. - check the "Submitting bugs" section.
  1187. <br />
  1188. If you are having trouble capturing on a particular network interface,
  1189. first try capturing on that device with WinDump; see <a
  1190. href="http://www.windump.org/">the WinDump Web site</a>
  1191. for information on using WinDump.
  1192. <br />
  1193. If you can capture on the interface with WinDump, send mail to <a
  1194. href="mailto:wireshark-users@wireshark.org">wireshark-users@wireshark.org</a>
  1195. giving full details of the problem, including
  1196. <ul>
  1197. <li>the operating system you're using, and the version of that operating
  1198. system;
  1199. <li>the type of network device you're using;
  1200. <li>the error message you get from Wireshark.
  1201. </ul>
  1202. If you <em>cannot</em> capture on the interface with WinDump,
  1203. this is almost certainly a problem with one or more of:
  1204. <ul>
  1205. <li>the operating system you're using;
  1206. <li>the device driver for the interface you're using;
  1207. <li>the WinPcap library and/or the WinPcap device driver;
  1208. </ul>
  1209. so first check <a href="http://www.winpcap.org/misc/faq.htm">the
  1210. WinPcap FAQ</a> or <a
  1211. href="http://www.mirrors.wiretapped.net/security/packet-capture/winpcap/misc/faq.htm">
  1212. the Wiretapped.net mirror of that FAQ</a>, to see if your problem is
  1213. mentioned there. If not, then see <a
  1214. href="http://www.winpcap.org/contact.htm">the WinPcap support page</a>
  1215. - check the "Submitting bugs" section.
  1216. <br />
  1217. You may also want to ask the <a
  1218. href="mailto:wireshark-users@wireshark.org">wireshark-users@wireshark.org</a>
  1219. and the <a
  1220. href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</a>
  1221. mailing lists to see if anybody happens to know about the problem and
  1222. know a workaround or fix for the problem. (Note that you will have to
  1223. subscribe to that list in order to be allowed to mail to it; see <a
  1224. href="http://www.winpcap.org/contact.htm">the WinPcap support
  1225. page</a> for information on the mailing list.) In your mail,
  1226. please give full details of the problem, as described above, and also
  1227. indicate that the problem occurs with WinDump, not just with Wireshark.
  1228. """)
  1229. question("""
  1230. I'm running Wireshark on Windows; why do no network interfaces show up in
  1231. the list of interfaces in the "Interface:" field in the dialog box
  1232. popped up by "Capture->Start"?
  1233. """)
  1234. answer("""
  1235. This is really <a href="#capprobwin">the same question as a previous
  1236. one</a>; see the response to that question.
  1237. """)
  1238. question("""
  1239. I'm running Wireshark on Windows; why doesn't my serial port/ADSL
  1240. modem/ISDN modem show up in the list of interfaces in the "Interface:"
  1241. field in the dialog box popped up by "Capture->Start"?
  1242. """)
  1243. answer("""
  1244. Internet access on those devices is often done with the Point-to-Point
  1245. (PPP) protocol; WinPcap 2.3 has problems supporting PPP WAN interfaces
  1246. on Windows NT 4.0, Windows 2000, Windows XP, and Windows Server 2003,
  1247. and, to avoid those problems, support for PPP WAN interfaces on those
  1248. versions of Windows has been disabled in WinPcap 3.0.
  1249. <br />
  1250. On Windows 2000, Windows XP, and Windows Server 2003, but
  1251. <strong>not</strong> Windows NT 4.0 or Windows Vista Beta 1, you should
  1252. be able to capture on the "GenericDialupAdapter" with WinPcap 3.1. (3.1
  1253. beta releases called it the "NdisWanAdapter"; if you're using a 3.1 beta
  1254. release, you should un-install it and install the final 3.1 release.)
  1255. See <a href="http://wiki.wireshark.org/CaptureSetup/PPP">the Wireshark
  1256. Wiki item on PPP capturing</a> for details.
  1257. """)
  1258. question("""
  1259. I'm running Wireshark on Windows NT 4.0/Windows 2000/Windows XP/Windows
  1260. Server 2003; my machine has a PPP (dial-up POTS, ISDN, etc.) interface,
  1261. and it shows up in the "Interface" item in the "Capture Options" dialog
  1262. box. Why can no packets be sent on or received from that network while
  1263. I'm trying to capture traffic on that interface?""", "nt_ppp_sniff")
  1264. answer("""
  1265. Some versions of WinPcap have problems with PPP WAN interfaces on
  1266. Windows NT 4.0, Windows 2000, Windows XP, and Windows Server 2003; one
  1267. symptom that may be seen is that attempts to capture in promiscuous mode
  1268. on the interface cause the interface to be incapable of sending or
  1269. receiving packets. You can disable promiscuous mode using the
  1270. <tt>-p</tt> command-line flag or the item in the "Capture Preferences"
  1271. dialog box, but this may mean that outgoing packets, or incoming
  1272. packets, won't be seen in the capture.
  1273. <br />
  1274. On Windows 2000, Windows XP, and Windows Server 2003, but
  1275. <strong>not</strong> Windows NT 4.0 or Windows Vista Beta 1, you should
  1276. be able to capture on the "GenericDialupAdapter" with WinPcap 3.1. (3.1
  1277. beta releases called it the "NdisWanAdapter"; if you're using a 3.1 beta
  1278. release, you should un-install it and install the final 3.1 release.)
  1279. See <a href="http://wiki.wireshark.org/CaptureSetup/PPP">the Wireshark
  1280. Wiki item on PPP capturing</a> for details.
  1281. """)
  1282. question("""
  1283. I'm running Wireshark on Windows; why am I not seeing any traffic being
  1284. sent by the machine running Wireshark?""")
  1285. answer("""
  1286. If you are running some form of VPN client software, it might be causing
  1287. this problem; people have seen this problem when they have Check Point's
  1288. VPN software installed on their machine. If that's the cause of the
  1289. problem, you will have to remove the VPN software in order to have
  1290. Wireshark (or any other application using WinPcap) see outgoing packets;
  1291. unfortunately, neither we nor the WinPcap developers know any way to
  1292. make WinPcap and the VPN software work well together.
  1293. <br />
  1294. Also, some drivers for Windows (especially some wireless network
  1295. interface drivers) apparently do not, when running in promiscuous mode,
  1296. arrange that outgoing packets are delivered to the software that
  1297. requested that the interface run promiscuously; try turning promiscuous
  1298. mode off.
  1299. """)
  1300. question("""
  1301. When I capture on Windows in promiscuous mode, I can see packets other
  1302. than those sent to or from my machine; however, those packets show up
  1303. with a "Short Frame" indication, unlike packets to or from my machine.
  1304. What should I do to arrange that I see those packets in their entirety?
  1305. """)
  1306. answer("""
  1307. In at least some cases, this appears to be the result of PGPnet running
  1308. on the network interface on which you're capturing; turn it off on that
  1309. interface.
  1310. """)
  1311. question("""
  1312. I'm trying to capture 802.11 traffic on Windows; why am I not seeing any
  1313. packets?
  1314. """, "win802_11promisc")
  1315. answer("""
  1316. At least some 802.11 card drivers on Windows appear not to see any
  1317. packets if they're running in promiscuous mode. Try turning promiscuous
  1318. mode off; you'll only be able to see packets sent by and received by
  1319. your machine, not third-party traffic, and it'll look like Ethernet
  1320. traffic and won't include any management or control frames, but that's a
  1321. limitation of the card drivers.
  1322. <br />
  1323. See <a
  1324. href="http://www.micro-logix.com/WinPcap/Supported.asp">MicroLogix's
  1325. list of cards supported with WinPcap</a> for information on
  1326. support of various adapters and drivers with WinPcap.
  1327. """)
  1328. question("""
  1329. I'm trying to capture 802.11 traffic on Windows; why am I seeing packets
  1330. received by the machine on which I'm capturing traffic, but not packets
  1331. sent by that machine?
  1332. """)
  1333. answer("""
  1334. This appears to be another problem with promiscuous mode; try turning it
  1335. off.
  1336. """)
  1337. question("""
  1338. I'm trying to capture Ethernet VLAN traffic on Windows, and I'm
  1339. capturing on a "raw" Ethernet device rather than a "VLAN interface", so
  1340. that I can see the VLAN headers; why am I seeing packets received by the
  1341. machine on which I'm capturing traffic, but not packets sent by that
  1342. machine?
  1343. """)
  1344. answer("""
  1345. The way the Windows networking code works probably means that packets
  1346. are sent on a "VLAN interface" rather than the "raw" device, so packets
  1347. sent by the machine will only be seen when you capture on the "VLAN
  1348. interface". If so, you will be unable to see outgoing packets when
  1349. capturing on the "raw" device, so you are stuck with a choice between
  1350. seeing VLAN headers and seeing outgoing packets.
  1351. """)
  1352. #################################################################
  1353. section("Capturing packets on UN*Xes")
  1354. #################################################################
  1355. question("""
  1356. I'm running Wireshark on a UNIX-flavored OS; why does some network
  1357. interface on my machine not show up in the list of interfaces in the
  1358. "Interface:" field in the dialog box popped up by "Capture->Start",
  1359. and/or why does Wireshark give me an error if I try to capture on that
  1360. interface? """, "capprobunix")
  1361. answer("""
  1362. You may need to run Wireshark from an account with sufficient privileges
  1363. to capture packets, such as the super-user account, or may need to give
  1364. your account sufficient privileges to capture packets. Only those
  1365. interfaces that Wireshark can open for capturing show up in that list; if
  1366. you don't have sufficient privileges to capture on any interfaces, no
  1367. interfaces will show up in the list. See
  1368. <a href="http://wiki.wireshark.org/CaptureSetup/CapturePrivileges">the
  1369. Wireshark Wiki item on capture privileges</a> for details on how to give
  1370. a particular account or account group capture privileges on platforms
  1371. where that can be done.
  1372. <br />
  1373. If you are running Wireshark from an account with sufficient privileges,
  1374. then note that Wireshark relies on the libpcap library, and on the
  1375. facilities that come with the OS on which it's running in order to do
  1376. captures. On some OSes, those facilities aren't present by default; see
  1377. <a href="http://wiki.wireshark.org/CaptureSetup/CaptureSupport">the
  1378. Wireshark Wiki item on adding capture support</a> for details.
  1379. <br />
  1380. And, even if you're running with an account that has sufficient
  1381. privileges to capture, and capture support is present in your OS, if the
  1382. OS or the libpcap library don't support capturing on a particular
  1383. network interface device or particular types of devices, Wireshark won't
  1384. be able to capture on that device.
  1385. <br />
  1386. On Solaris, note that libpcap 0.6.2 and earlier didn't support Token
  1387. Ring interfaces; the current version, 0.7.2, does support Token Ring,
  1388. and the current version of Wireshark works with libpcap 0.7.2 and later.
  1389. <br />
  1390. If an interface doesn't show up in the list of interfaces in the
  1391. "Interface:" field, and you know the name of the interface, try entering
  1392. that name in the "Interface:" field and capturing on that device.
  1393. <br />
  1394. If the attempt to capture on it succeeds, the interface is somehow not
  1395. being reported by the mechanism Wireshark uses to get a list of
  1396. interfaces; please report this to <a
  1397. href="mailto:wireshark-dev@wireshark.org">wireshark-dev@wireshark.org</a>
  1398. giving full details of the problem, including
  1399. <ul>
  1400. <li>the operating system you're using, and the version of that operating
  1401. system (for Linux, give both the version number of the kernel and the
  1402. name and version number of the distribution you're using);
  1403. <li>the type of network device you're using.
  1404. </ul>
  1405. If you are having trouble capturing on a particular network interface,
  1406. and you've made sure that (on platforms that require it) you've arranged
  1407. that packet capture support is present, as per the above, first try
  1408. capturing on that device with <tt>tcpdump</tt>.
  1409. <br />
  1410. If you can capture on the interface with <tt>tcpdump</tt>, send mail to
  1411. <a
  1412. href="mailto:wireshark-users@wireshark.org">wireshark-users@wireshark.org</a>
  1413. giving full details of the problem, including
  1414. <ul>
  1415. <li>the operating system you're using, and the version of that operating
  1416. system (for Linux, give both the version number of the kernel and the
  1417. name and version number of the distribution you're using);
  1418. <li>the type of network device you're using;
  1419. <li>the error message you get from Wireshark.
  1420. </ul>
  1421. If you <em>cannot</em> capture on the interface with <tt>tcpdump</tt>,
  1422. this is almost certainly a problem with one or more of:
  1423. <ul>
  1424. <li>the operating system you're using;
  1425. <li>the device driver for the interface you're using;
  1426. <li>the libpcap library;
  1427. </ul>
  1428. so you should report the problem to the company or organization that
  1429. produces the OS (in the case of a Linux distribution, report the problem
  1430. to whoever produces the distribution).
  1431. <br />
  1432. You may also want to ask the <a
  1433. href="mailto:wireshark-users@wireshark.org">wireshark-users@wireshark.org</a>
  1434. and the <a
  1435. href="mailto:tcpdump-workers@lists.tcpdump.org">tcpdump-workers@lists.tcpdump.org</a>
  1436. mailing lists to see if anybody happens to know about the problem and
  1437. know a workaround or fix for the problem. In your mail, please give
  1438. full details of the problem, as described above, and also indicate that
  1439. the problem occurs with <tt>tcpdump</tt> not just with Wireshark.
  1440. """)
  1441. question("""
  1442. I'm running Wireshark on a UNIX-flavored OS; why do no network interfaces
  1443. show up in the list of interfaces in the "Interface:" field in the
  1444. dialog box popped up by "Capture->Start"?
  1445. """)
  1446. answer("""
  1447. This is really <a href="#capprobunix">the same question as the previous
  1448. one</a>; see the response to that question.
  1449. """)
  1450. question("""I'm capturing packets on Linux; why do the time stamps have
  1451. only 100ms resolution, rather than 1us resolution?""")
  1452. answer("""
  1453. Wireshark gets time stamps from libpcap/WinPcap, and
  1454. libpcap/WinPcap get them from the OS kernel, so Wireshark - and any other
  1455. program using libpcap, such as tcpdump - is at the mercy of the time
  1456. stamping code in the OS for time stamps.
  1457. <br />
  1458. At least on x86-based machines, Linux can get high-resolution time
  1459. stamps on newer processors with the Time Stamp Counter (TSC) register;
  1460. for example, Intel x86 processors, starting with the Pentium Pro, and
  1461. including all x86 processors since then, have had a TSC, and other
  1462. vendors probably added the TSC at some point to their families of x86
  1463. processors.
  1464. The Linux kernel must be configured with the CONFIG_X86_TSC option
  1465. enabled in order to use the TSC. Make sure this option is enabled in
  1466. your kernel.
  1467. <br />
  1468. In addition, some Linux distributions may have bugs in their versions of
  1469. the kernel that cause packets not to be given high-resolution time
  1470. stamps even if the TSC is enabled. See, for example, bug 61111 for Red
  1471. Hat Linux 7.2. If your distribution has a bug such as this, you may
  1472. have to run a standard kernel from kernel.org in order to get
  1473. high-resolution time stamps.
  1474. """)
  1475. #################################################################
  1476. section("Capturing packets on wireless LANs")
  1477. #################################################################
  1478. question("""
  1479. How can I capture raw 802.11 frames, including non-data (management,
  1480. beacon) frames?
  1481. """, "raw_80211_sniff")
  1482. answer("""
  1483. That depends on the operating system on which you're running, and on the
  1484. 802.11 interface on which you're capturing.
  1485. <br />
  1486. This would probably require that you capture in promiscuous mode or in
  1487. the mode called "monitor mode" or "RFMON mode". On some platforms, or
  1488. with some cards, this might require that you capture in monitor mode -
  1489. promiscuous mode might not be sufficient. If you want to capture
  1490. traffic on networks other than the one with which you're associated, you
  1491. will have to capture in monitor mode.
  1492. <br />
  1493. Not all operating systems support capturing non-data packets and, even
  1494. on operating systems that do support it, not all drivers, and thus not
  1495. all interfaces, support it. Even on those that do, monitor mode might
  1496. not be supported by the operating system or by the drivers for all
  1497. interfaces.
  1498. <br />
  1499. <strong>NOTE:</strong> an interface running in monitor mode will, on
  1500. most if not all platforms, not be able to act as a regular network
  1501. interface; putting it into monitor mode will, in effect, take your
  1502. machine off of whatever network it's on as long as the interface is in
  1503. monitor mode, allowing it only to passively capture packets.
  1504. <br />
  1505. This means that you should disable name resolution when capturing in
  1506. monitor mode; otherwise, when Wireshark (or TShark, or tcpdump) tries
  1507. to display IP addresses as host names, it will probably block for a long
  1508. time trying to resolve the name because it will not be able to
  1509. communicate with any DNS or NIS servers.
  1510. <br />
  1511. See <a
  1512. href="http://wiki.wireshark.org/CaptureSetup/WLAN">the Wireshark
  1513. Wiki item on 802.11 capturing</a> for details.
  1514. """)
  1515. question("""
  1516. How do I capture on an 802.11 device in monitor mode?""",
  1517. "monitor")
  1518. answer("""
  1519. Whether you will be able to capture in monitor mode depends on the
  1520. operating system, adapter, and driver you're using.
  1521. See <a href="#raw_80211_sniff">the previous question</a> for information
  1522. on monitor mode, including a link to the Wireshark Wiki page that gives
  1523. details on 802.11 capturing.
  1524. """)
  1525. #################################################################
  1526. section("Viewing traffic")
  1527. #################################################################
  1528. question("Why am I seeing lots of packets with incorrect TCP checksums?")
  1529. answer("""
  1530. If the packets that have incorrect TCP checksums are all being sent by
  1531. the machine on which Wireshark is running, this is probably because the
  1532. network interface on which you're capturing does TCP checksum
  1533. offloading. That means that the TCP checksum is added to the packet by
  1534. the network interface, not by the OS's TCP/IP stack; when capturing on
  1535. an interface, packets being sent by the host on which you're capturing
  1536. are directly handed to the capture interface by the OS, which means that
  1537. they are handed to the capture interface without a TCP checksum being
  1538. added to them.
  1539. <br />
  1540. The only way to prevent this from happening would be to disable TCP
  1541. checksum offloading, but
  1542. <ol>
  1543. <li>that might not even be possible on some OSes;
  1544. <li>that could reduce networking performance significantly.
  1545. </ol>
  1546. However, you can disable the check that Wireshark does of the TCP
  1547. checksum, so that it won't report any packets as having TCP checksum
  1548. errors, and so that it won't refuse to do TCP reassembly due to a packet
  1549. having an incorrect TCP checksum. That can be set as an Wireshark
  1550. preference by selecting "Preferences" from the "Edit" menu, opening up
  1551. the "Protocols" list in the left-hand pane of the "Preferences" dialog
  1552. box, selecting "TCP", from that list, turning off the "Check the
  1553. validity of the TCP checksum when possible" option, clicking "Save" if
  1554. you want to save that setting in your preference file, and clicking
  1555. "OK".
  1556. <br />
  1557. It can also be set on the Wireshark or TShark command line with a
  1558. <tt>-o tcp.check_checksum:false</tt> command-line flag, or manually set
  1559. in your preferences file by adding a <tt>tcp.check_checksum:false</tt>
  1560. line.
  1561. """)
  1562. question("""
  1563. I've just installed Wireshark, and the traffic on my local LAN
  1564. is boring. Where can I find more interesting captures?
  1565. """)
  1566. answer("""
  1567. We have a collection of strange and exotic sample capture
  1568. files at %s""" % (selflink("http://wiki.wireshark.org/SampleCaptures")))
  1569. question("""
  1570. Why doesn't Wireshark correctly identify RTP packets? It shows them
  1571. only as UDP.""")
  1572. answer("""
  1573. Wireshark can identify a UDP datagram as containing a packet of a
  1574. particular protocol running atop UDP only if
  1575. <ol>
  1576. <li> The protocol in question has a particular standard port
  1577. number, and the UDP source or destination port number is that port
  1578. <li> Packets of that protocol can be identified by looking for a
  1579. "signature" of some type in the packet - i.e., some data
  1580. that, if Wireshark finds it in some particular part of a
  1581. packet, means that the packet is almost certainly a packet of
  1582. that type.
  1583. <li> Some <em>other</em> traffic earlier in the capture indicated that,
  1584. for example, UDP traffic between two particular addresses and
  1585. ports will be RTP traffic.
  1586. </ol>
  1587. RTP doesn't have a standard port number, so 1) doesn't work; it doesn't,
  1588. as far as I know, have any "signature", so 2) doesn't work.
  1589. <br />
  1590. That leaves 3). If there's RTSP traffic that sets up an RTP session,
  1591. then, at least in some cases, the RTSP dissector will set things up so
  1592. that subsequent RTP traffic will be identified. Currently, that's the
  1593. only place we do that; there may be other places.
  1594. <br />
  1595. However, there will always be places where Wireshark is simply
  1596. <b>incapable</b> of deducing that a given UDP flow is RTP; a mechanism
  1597. would be needed to allow the user to specify that a given conversation
  1598. should be treated as RTP. As of Wireshark 0.8.16, such a mechanism
  1599. exists; if you select a UDP or TCP packet, the right mouse button menu
  1600. will have a "Decode As..." menu item, which will pop up a dialog box
  1601. letting you specify that the source port, the destination port, or both
  1602. the source and destination ports of the packet should be dissected as
  1603. some particular protocol.
  1604. """)
  1605. question("""
  1606. Why doesn't Wireshark show Yahoo Messenger packets in captures that
  1607. contain Yahoo Messenger traffic?""")
  1608. answer("""
  1609. Wireshark only recognizes as Yahoo Messenger traffic packets to or from TCP
  1610. port 3050 that begin with "YPNS", "YHOO", or "YMSG". TCP segments that
  1611. start with the middle of a Yahoo Messenger packet that takes more than one
  1612. TCP segment will not be recognized as Yahoo Messenger packets (even if the
  1613. TCP segment also contains the beginning of another Yahoo Messenger
  1614. packet).
  1615. """)
  1616. #################################################################
  1617. section("Filtering traffic")
  1618. #################################################################
  1619. question("""I saved a filter and tried to use its name to filter the
  1620. display; why do I get an "Unexpected end of filter string" error?""")
  1621. answer("""
  1622. You cannot use the name of a saved display filter as a filter. To
  1623. filter the display, you can enter a display filter expression -
  1624. <strong>not</strong> the name of a saved display filter - in the
  1625. "Filter:" box at the bottom of the display, and type the <Enter> key or
  1626. press the "Apply" button (that does not require you to have a saved
  1627. filter), or, if you want to use a saved filter, you can press the
  1628. "Filter:" button, select the filter in the dialog box that pops up, and
  1629. press the "OK" button.""")
  1630. question("""
  1631. How can I search for, or filter, packets that have a particular string
  1632. anywhere in them?
  1633. """)
  1634. answer("""
  1635. If you want to do this when capturing, you can't. That's a feature that
  1636. would be hard to implement in capture filters without changes to the
  1637. capture filter code, which, on many platforms, is in the OS kernel and,
  1638. on other platforms, is in the libpcap library.
  1639. <br />
  1640. After capture, you can search for text by selecting <i>Edit&#8594;Find
  1641. Packet...</i> and making sure <i>String</i> is selected. Alternately, you can
  1642. use the "contains" display filter operator or "matches" operator if it's
  1643. supported on your system.
  1644. """)
  1645. question("""
  1646. How do I filter a capture to see traffic for virus XXX?
  1647. """)
  1648. answer("""
  1649. For some viruses/worms there might be a capture filter to recognize the
  1650. virus traffic. Check the <a
  1651. href="http://wiki.wireshark.org/CaptureFilters">CaptureFilters</a> page
  1652. on the <a href="http://wiki.wireshark.org/">Wireshark Wiki</a> to see if
  1653. anybody's added such a filter.
  1654. <br />
  1655. Note that Wireshark was not designed to be an intrusion detection system;
  1656. you might be able to use it as an IDS, but in most cases software
  1657. designed to be an IDS, such as <a href="http://www.snort.org/">Snort</a>
  1658. or <a href="http://www.prelude-ids.org/">Prelude</a>, will probably work
  1659. better.
  1660. <br />
  1661. The <a href="http://www.bleedingsnort.com/">Bleeding Edge of Snort</a>
  1662. has a collection of signatures for Snort to detect various viruses,
  1663. worms, and the like.
  1664. """)
  1665. #################################################################
  1666. if __name__ == '__main__':
  1667. sys.exit(main())
  1668. #################################################################