rawshark.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <meta name="generator" content="Asciidoctor 2.0.17">
  8. <title>rawshark(1)</title>
  9. <link rel="stylesheet" href="./ws.css">
  10. </head>
  11. <body class="manpage">
  12. <div id="header">
  13. <h1>rawshark(1) Manual Page</h1>
  14. <h2 id="_name">NAME</h2>
  15. <div class="sectionbody">
  16. <p>rawshark - Dump and analyze raw pcap data</p>
  17. </div>
  18. </div>
  19. <div id="content">
  20. <div class="sect1">
  21. <h2 id="_synopsis">SYNOPSIS</h2>
  22. <div class="sectionbody">
  23. <div class="paragraph">
  24. <p><span class="nowrap"><strong>rawshark</strong></span>
  25. <span class="nowrap">[ <strong>-d</strong> &lt;encap:linktype&gt;|&lt;proto:protoname&gt; ]</span>
  26. <span class="nowrap">[ <strong>-F</strong> &lt;field to display&gt; ]</span>
  27. <span class="nowrap">[ <strong>-h</strong> ]</span>
  28. <span class="nowrap">[ <strong>-l</strong> ]</span>
  29. <span class="nowrap">[ <strong>-m</strong> &lt;bytes&gt; ]</span>
  30. <span class="nowrap">[ <strong>-n</strong> ]</span>
  31. <span class="nowrap">[ <strong>-N</strong> &lt;name resolving flags&gt; ]</span>
  32. <span class="nowrap">[ <strong>-o</strong> &lt;preference setting&gt; ] &#8230;&#8203;</span>
  33. <span class="nowrap">[ <strong>-p</strong> ]</span>
  34. <span class="nowrap">[ <strong>-r</strong> &lt;pipe&gt;|- ]</span>
  35. <span class="nowrap">[ <strong>-R</strong> &lt;read (display) filter&gt; ]</span>
  36. <span class="nowrap">[ <strong>-s</strong> ]</span>
  37. <span class="nowrap">[ <strong>-S</strong> &lt;field format&gt; ]</span>
  38. <span class="nowrap">[ <strong>-t</strong> a|ad|adoy|d|dd|e|r|u|ud|udoy ]</span>
  39. <span class="nowrap">[ <strong>-v</strong> ]</span></p>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="sect1">
  44. <h2 id="_description">DESCRIPTION</h2>
  45. <div class="sectionbody">
  46. <div class="paragraph">
  47. <p><strong>Rawshark</strong> reads a stream of packets from a file or pipe, and prints a line
  48. describing its output, followed by a set of matching fields for each packet
  49. on stdout.</p>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="sect1">
  54. <h2 id="_input">INPUT</h2>
  55. <div class="sectionbody">
  56. <div class="paragraph">
  57. <p>Unlike <strong>TShark</strong>, <strong>Rawshark</strong> makes no assumptions about encapsulation or
  58. input. The <strong>-d</strong> and <strong>-r</strong> flags must be specified in order for it to run.
  59. One or more <strong>-F</strong> flags should be specified in order for the output to be
  60. useful. The other flags listed above follow the same conventions as
  61. <strong>Wireshark</strong> and <strong>TShark</strong>.</p>
  62. </div>
  63. <div class="paragraph">
  64. <p><strong>Rawshark</strong> expects input records with the following format by default. This
  65. matches the format of the packet header and packet data in a pcap-formatted
  66. file on disk.</p>
  67. </div>
  68. <div class="literalblock">
  69. <div class="content">
  70. <pre>struct rawshark_rec_s {
  71. uint32_t ts_sec; /* Time stamp (seconds) */
  72. uint32_t ts_usec; /* Time stamp (microseconds) */
  73. uint32_t caplen; /* Length of the packet buffer */
  74. uint32_t len; /* "On the wire" length of the packet */
  75. uint8_t data[caplen]; /* Packet data */
  76. };</pre>
  77. </div>
  78. </div>
  79. <div class="paragraph">
  80. <p>If <strong>-p</strong> is supplied <strong>rawshark</strong> expects the following format. This
  81. matches the <em>struct pcap_pkthdr</em> structure and packet data used in
  82. libpcap, Npcap, or WinPcap. This structure&#8217;s format is platform-dependent; the
  83. size of the <em>tv_sec</em> field in the <em>struct timeval</em> structure could be
  84. 32 bits or 64 bits. For <strong>rawshark</strong> to work, the layout of the
  85. structure in the input must match the layout of the structure in
  86. <strong>rawshark</strong>. Note that this format will probably be the same as the
  87. previous format if <strong>rawshark</strong> is a 32-bit program, but will not
  88. necessarily be the same if <strong>rawshark</strong> is a 64-bit program.</p>
  89. </div>
  90. <div class="literalblock">
  91. <div class="content">
  92. <pre>struct rawshark_rec_s {
  93. struct timeval ts; /* Time stamp */
  94. uint32_t caplen; /* Length of the packet buffer */
  95. uint32_t len; /* "On the wire" length of the packet */
  96. uint8_t data[caplen]; /* Packet data */
  97. };</pre>
  98. </div>
  99. </div>
  100. <div class="paragraph">
  101. <p>In either case, the endianness (byte ordering) of each integer must match the
  102. system on which <strong>rawshark</strong> is running.</p>
  103. </div>
  104. </div>
  105. </div>
  106. <div class="sect1">
  107. <h2 id="_output">OUTPUT</h2>
  108. <div class="sectionbody">
  109. <div class="paragraph">
  110. <p>If one or more fields are specified via the <strong>-F</strong> flag, <strong>Rawshark</strong> prints
  111. the number, field type, and display format for each field on the first line
  112. as "packet number" 0. For each record, the packet number, matching fields,
  113. and a "1" or "0" are printed to indicate if the field matched any supplied
  114. display filter. A "-" is used to signal the end of a field description and
  115. at the end of each packet line. For example, the flags <strong>-F ip.src -F
  116. dns.qry.type</strong> might generate the following output:</p>
  117. </div>
  118. <div class="literalblock">
  119. <div class="content">
  120. <pre>0 FT_IPv4 BASE_NONE - 1 FT_UINT16 BASE_HEX -
  121. 1 1="1" 0="192.168.77.10" 1 -
  122. 2 1="1" 0="192.168.77.250" 1 -
  123. 3 0="192.168.77.10" 1 -
  124. 4 0="74.125.19.104" 1 -</pre>
  125. </div>
  126. </div>
  127. <div class="paragraph">
  128. <p>Note that packets 1 and 2 are DNS queries, and 3 and 4 are not. Adding <strong>-R "not dns"</strong> still prints each line, but there&#8217;s an indication
  129. that packets 1 and 2 didn&#8217;t pass the filter:</p>
  130. </div>
  131. <div class="literalblock">
  132. <div class="content">
  133. <pre>0 FT_IPv4 BASE_NONE - 1 FT_UINT16 BASE_HEX -
  134. 1 1="1" 0="192.168.77.10" 0 -
  135. 2 1="1" 0="192.168.77.250" 0 -
  136. 3 0="192.168.77.10" 1 -
  137. 4 0="74.125.19.104" 1 -</pre>
  138. </div>
  139. </div>
  140. <div class="paragraph">
  141. <p>Also note that the output may be in any order, and that multiple matching
  142. fields might be displayed.</p>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="sect1">
  147. <h2 id="_options">OPTIONS</h2>
  148. <div class="sectionbody">
  149. <div class="dlist">
  150. <dl>
  151. <dt class="hdlist1">-d &lt;encapsulation&gt;</dt>
  152. <dd>
  153. <div class="openblock">
  154. <div class="content">
  155. <div class="paragraph">
  156. <p>Specify how the packet data should be dissected. The encapsulation is of the
  157. form <em>type:value</em>, where <em>type</em> is one of:</p>
  158. </div>
  159. <div class="paragraph">
  160. <p><strong>encap</strong>:<em>name</em> Packet data should be dissected using the
  161. libpcap/Npcap/WinPcap data link type (DLT) <em>name</em>, e.g. <strong>encap:EN10MB</strong> for
  162. Ethernet. Names are converted using pcap_datalink_name_to_val().
  163. A complete list of DLTs can be found at
  164. <a href="https://www.tcpdump.org/linktypes.html" class="bare">https://www.tcpdump.org/linktypes.html</a>.</p>
  165. </div>
  166. <div class="paragraph">
  167. <p><strong>encap</strong>:<em>number</em> Packet data should be dissected using the
  168. libpcap/Npcap/WinPcap LINKTYPE_ <em>number</em>, e.g. <strong>encap:105</strong> for raw IEEE
  169. 802.11 or <strong>encap:101</strong> for raw IP.</p>
  170. </div>
  171. <div class="paragraph">
  172. <p><strong>proto</strong>:<em>protocol</em> Packet data should be passed to the specified Wireshark
  173. protocol dissector, e.g. <strong>proto:http</strong> for HTTP data.</p>
  174. </div>
  175. </div>
  176. </div>
  177. </dd>
  178. <dt class="hdlist1">-F &lt;field to display&gt;</dt>
  179. <dd>
  180. <div class="openblock">
  181. <div class="content">
  182. <div class="paragraph">
  183. <p>Add the matching field to the output. Fields are any valid display filter
  184. field. More than one <strong>-F</strong> flag may be specified, and each field can match
  185. multiple times in a given packet. A single field may be specified per <strong>-F</strong>
  186. flag. If you want to apply a display filter, use the <strong>-R</strong> flag.</p>
  187. </div>
  188. </div>
  189. </div>
  190. </dd>
  191. <dt class="hdlist1">-h</dt>
  192. <dd>
  193. <div class="openblock">
  194. <div class="content">
  195. <div class="paragraph">
  196. <p>Print the version and options and exits.</p>
  197. </div>
  198. </div>
  199. </div>
  200. </dd>
  201. <dt class="hdlist1">-l</dt>
  202. <dd>
  203. <div class="openblock">
  204. <div class="content">
  205. <div class="paragraph">
  206. <p>Flush the standard output after the information for each packet is
  207. printed. (This is not, strictly speaking, line-buffered if <strong>-V</strong>
  208. was specified; however, it is the same as line-buffered if <strong>-V</strong> wasn&#8217;t
  209. specified, as only one line is printed for each packet, and, as <strong>-l</strong> is
  210. normally used when piping a live capture to a program or script, so that
  211. output for a packet shows up as soon as the packet is seen and
  212. dissected, it should work just as well as true line-buffering. We do
  213. this as a workaround for a deficiency in the Microsoft Visual C++ C
  214. library.)</p>
  215. </div>
  216. <div class="paragraph">
  217. <p>This may be useful when piping the output of <strong>TShark</strong> to another
  218. program, as it means that the program to which the output is piped will
  219. see the dissected data for a packet as soon as <strong>TShark</strong> sees the
  220. packet and generates that output, rather than seeing it only when the
  221. standard output buffer containing that data fills up.</p>
  222. </div>
  223. </div>
  224. </div>
  225. </dd>
  226. <dt class="hdlist1">-m &lt;memory limit bytes&gt;</dt>
  227. <dd>
  228. <div class="openblock">
  229. <div class="content">
  230. <div class="paragraph">
  231. <p>Limit rawshark&#8217;s memory usage to the specified number of bytes. POSIX
  232. (non-Windows) only.</p>
  233. </div>
  234. </div>
  235. </div>
  236. </dd>
  237. <dt class="hdlist1">-n</dt>
  238. <dd>
  239. <div class="openblock">
  240. <div class="content">
  241. <div class="paragraph">
  242. <p>Disable network object name resolution (such as hostname, TCP and UDP port
  243. names), the <strong>-N</strong> flag might override this one.</p>
  244. </div>
  245. </div>
  246. </div>
  247. </dd>
  248. <dt class="hdlist1">-N &lt;name resolving flags&gt;</dt>
  249. <dd>
  250. <div class="openblock">
  251. <div class="content">
  252. <div class="paragraph">
  253. <p>Turn on name resolving only for particular types of addresses and port
  254. numbers, with name resolving for other types of addresses and port
  255. numbers turned off. This flag overrides <strong>-n</strong> if both <strong>-N</strong> and <strong>-n</strong> are
  256. present. If both <strong>-N</strong> and <strong>-n</strong> flags are not present, all name resolutions are
  257. turned on.</p>
  258. </div>
  259. <div class="paragraph">
  260. <p>The argument is a string that may contain the letters:</p>
  261. </div>
  262. <div class="paragraph">
  263. <p><strong>m</strong> to enable MAC address resolution</p>
  264. </div>
  265. <div class="paragraph">
  266. <p><strong>n</strong> to enable network address resolution</p>
  267. </div>
  268. <div class="paragraph">
  269. <p><strong>N</strong> to enable using external resolvers (e.g., DNS) for network address
  270. resolution</p>
  271. </div>
  272. <div class="paragraph">
  273. <p><strong>t</strong> to enable transport-layer port number resolution</p>
  274. </div>
  275. <div class="paragraph">
  276. <p><strong>d</strong> to enable resolution from captured DNS packets</p>
  277. </div>
  278. <div class="paragraph">
  279. <p><strong>v</strong> to enable VLAN IDs to names resolution</p>
  280. </div>
  281. </div>
  282. </div>
  283. </dd>
  284. <dt class="hdlist1">-o &lt;preference&gt;:&lt;value&gt;</dt>
  285. <dd>
  286. <div class="openblock">
  287. <div class="content">
  288. <div class="paragraph">
  289. <p>Set a preference value, overriding the default value and any value read
  290. from a preference file. The argument to the option is a string of the
  291. form <em>prefname:value</em>, where <em>prefname</em> is the name of the
  292. preference (which is the same name that would appear in the preference
  293. file), and <em>value</em> is the value to which it should be set.</p>
  294. </div>
  295. </div>
  296. </div>
  297. </dd>
  298. <dt class="hdlist1">-p</dt>
  299. <dd>
  300. <div class="openblock">
  301. <div class="content">
  302. <div class="paragraph">
  303. <p>Assume that packet data is preceded by a pcap_pkthdr struct as defined in
  304. pcap.h. On some systems the size of the timestamp data will be different from
  305. the data written to disk. On other systems they are identical and this flag has
  306. no effect.</p>
  307. </div>
  308. </div>
  309. </div>
  310. </dd>
  311. <dt class="hdlist1">-r &lt;pipe&gt;|-</dt>
  312. <dd>
  313. <div class="openblock">
  314. <div class="content">
  315. <div class="paragraph">
  316. <p>Read packet data from <em>input source</em>. It can be either the name of a FIFO
  317. (named pipe) or ``-'' to read data from the standard input, and must have
  318. the record format specified above.</p>
  319. </div>
  320. <div class="paragraph">
  321. <p>If you are sending data to rawshark from a parent process on Windows you
  322. should not close rawshark&#8217;s standard input handle prematurely, otherwise
  323. the C runtime might trigger an exception.</p>
  324. </div>
  325. </div>
  326. </div>
  327. </dd>
  328. <dt class="hdlist1">-R &lt;read (display) filter&gt;</dt>
  329. <dd>
  330. <div class="openblock">
  331. <div class="content">
  332. <div class="paragraph">
  333. <p>Cause the specified filter (which uses the syntax of read/display filters,
  334. rather than that of capture filters) to be applied before printing the output.</p>
  335. </div>
  336. </div>
  337. </div>
  338. </dd>
  339. <dt class="hdlist1">-s</dt>
  340. <dd>
  341. <div class="openblock">
  342. <div class="content">
  343. <div class="paragraph">
  344. <p>Allows standard pcap files to be used as input, by skipping over the 24
  345. byte pcap file header.</p>
  346. </div>
  347. </div>
  348. </div>
  349. </dd>
  350. <dt class="hdlist1">-S</dt>
  351. <dd>
  352. <div class="openblock">
  353. <div class="content">
  354. <div class="paragraph">
  355. <p>Use the specified format string to print each field. The following formats
  356. are supported:</p>
  357. </div>
  358. <div class="paragraph">
  359. <p><strong>%D</strong> Field name or description, e.g. "Type" for dns.qry.type</p>
  360. </div>
  361. <div class="paragraph">
  362. <p><strong>%N</strong> Base 10 numeric value of the field.</p>
  363. </div>
  364. <div class="paragraph">
  365. <p><strong>%S</strong> String value of the field.</p>
  366. </div>
  367. <div class="paragraph">
  368. <p>For something similar to Wireshark&#8217;s standard display ("Type: A (1)") you
  369. could use <strong>%D: %S (%N)</strong>.</p>
  370. </div>
  371. </div>
  372. </div>
  373. </dd>
  374. <dt class="hdlist1">-t a|ad|adoy|d|dd|e|r|u|ud|udoy</dt>
  375. <dd>
  376. <div class="openblock">
  377. <div class="content">
  378. <div class="paragraph">
  379. <p>Set the format of the packet timestamp printed in summary lines.
  380. The format can be one of:</p>
  381. </div>
  382. <div class="paragraph">
  383. <p><strong>a</strong> absolute: The absolute time, as local time in your time zone,
  384. is the actual time the packet was captured, with no date displayed</p>
  385. </div>
  386. <div class="paragraph">
  387. <p><strong>ad</strong> absolute with date: The absolute date, displayed as YYYY-MM-DD,
  388. and time, as local time in your time zone, is the actual time and date
  389. the packet was captured</p>
  390. </div>
  391. <div class="paragraph">
  392. <p><strong>adoy</strong> absolute with date using day of year: The absolute date,
  393. displayed as YYYY/DOY, and time, as local time in your time zone,
  394. is the actual time and date the packet was captured</p>
  395. </div>
  396. <div class="paragraph">
  397. <p><strong>d</strong> delta: The delta time is the time since the previous packet was
  398. captured</p>
  399. </div>
  400. <div class="paragraph">
  401. <p><strong>dd</strong> delta_displayed: The delta_displayed time is the time since the
  402. previous displayed packet was captured</p>
  403. </div>
  404. <div class="paragraph">
  405. <p><strong>e</strong> epoch: The time in seconds since epoch (Jan 1, 1970 00:00:00)</p>
  406. </div>
  407. <div class="paragraph">
  408. <p><strong>r</strong> relative: The relative time is the time elapsed between the first packet
  409. and the current packet</p>
  410. </div>
  411. <div class="paragraph">
  412. <p><strong>u</strong> UTC: The absolute time, as UTC, is the actual time the packet was
  413. captured, with no date displayed</p>
  414. </div>
  415. <div class="paragraph">
  416. <p><strong>ud</strong> UTC with date: The absolute date, displayed as YYYY-MM-DD,
  417. and time, as UTC, is the actual time and date the packet was captured</p>
  418. </div>
  419. <div class="paragraph">
  420. <p><strong>udoy</strong> UTC with date using day of year: The absolute date, displayed
  421. as YYYY/DOY, and time, as UTC, is the actual time and date the packet
  422. was captured</p>
  423. </div>
  424. <div class="paragraph">
  425. <p>The default format is relative.</p>
  426. </div>
  427. </div>
  428. </div>
  429. </dd>
  430. <dt class="hdlist1">-v</dt>
  431. <dd>
  432. <div class="openblock">
  433. <div class="content">
  434. <div class="paragraph">
  435. <p>Print the version and exit.</p>
  436. </div>
  437. </div>
  438. </div>
  439. </dd>
  440. </dl>
  441. </div>
  442. </div>
  443. </div>
  444. <div class="sect1">
  445. <h2 id="_diagnostic_options">DIAGNOSTIC OPTIONS</h2>
  446. <div class="sectionbody">
  447. <div class="dlist">
  448. <dl>
  449. <dt class="hdlist1">--log-level &lt;level&gt;</dt>
  450. <dd>
  451. <p>Set the active log level.
  452. Supported levels in lowest to highest order are "noisy", "debug", "info", "message", "warning", "critical", and "error".
  453. Messages at each level and higher will be printed, for example "warning" prints "warning", "critical", and "error" messages and "noisy" prints all messages.
  454. Levels are case insensitive.</p>
  455. </dd>
  456. <dt class="hdlist1">--log-fatal &lt;level&gt;</dt>
  457. <dd>
  458. <p>Abort the program if any messages are logged at the specified level or higher.
  459. For example, "warning" aborts on any "warning", "critical", or "error" messages.</p>
  460. </dd>
  461. </dl>
  462. </div>
  463. <div class="dlist">
  464. <dl>
  465. <dt class="hdlist1">--log-domains &lt;list&gt;</dt>
  466. <dd>
  467. <p>Only print messages for the specified log domains, e.g. "GUI,Epan,sshdump".
  468. List of domains must be comma-separated.</p>
  469. </dd>
  470. <dt class="hdlist1">--log-debug &lt;list&gt;</dt>
  471. <dd>
  472. <p>Force the specified domains to log at the "debug" level.
  473. List of domains must be comma-separated.</p>
  474. </dd>
  475. <dt class="hdlist1">--log-noisy &lt;list&gt;</dt>
  476. <dd>
  477. <p>Force the specified domains to log at the "noisy" level.
  478. List of domains must be comma-separated.</p>
  479. </dd>
  480. <dt class="hdlist1">--log-file &lt;path&gt;</dt>
  481. <dd>
  482. <p>Write log messages and stderr output to the specified file.</p>
  483. </dd>
  484. </dl>
  485. </div>
  486. </div>
  487. </div>
  488. <div class="sect1">
  489. <h2 id="_read_filter_syntax">READ FILTER SYNTAX</h2>
  490. <div class="sectionbody">
  491. <div class="paragraph">
  492. <p>For a complete table of protocol and protocol fields that are filterable
  493. in <strong>TShark</strong> see the <a href="wireshark-filter.html">wireshark-filter</a>(4) manual page.</p>
  494. </div>
  495. </div>
  496. </div>
  497. <div class="sect1">
  498. <h2 id="_files">FILES</h2>
  499. <div class="sectionbody">
  500. <div class="paragraph">
  501. <p>These files contains various <strong>Wireshark</strong> configuration values.</p>
  502. </div>
  503. <div class="dlist">
  504. <dl>
  505. <dt class="hdlist1">Preferences</dt>
  506. <dd>
  507. <div class="openblock">
  508. <div class="content">
  509. <div class="paragraph">
  510. <p>The <em>preferences</em> files contain global (system-wide) and personal
  511. preference settings. If the system-wide preference file exists, it is
  512. read first, overriding the default settings. If the personal preferences
  513. file exists, it is read next, overriding any previous values. Note: If
  514. the command line option <strong>-o</strong> is used (possibly more than once), it will
  515. in turn override values from the preferences files.</p>
  516. </div>
  517. <div class="paragraph">
  518. <p>The preferences settings are in the form <em>prefname:value</em>,
  519. one per line,
  520. where <em>prefname</em> is the name of the preference
  521. and <em>value</em> is the value to
  522. which it should be set; white space is allowed between <strong>:</strong> and
  523. <em>value</em>. A preference setting can be continued on subsequent lines by
  524. indenting the continuation lines with white space. A <strong>#</strong> character
  525. starts a comment that runs to the end of the line:</p>
  526. </div>
  527. <div class="literalblock">
  528. <div class="content">
  529. <pre># Capture in promiscuous mode?
  530. # TRUE or FALSE (case-insensitive).
  531. capture.prom_mode: TRUE</pre>
  532. </div>
  533. </div>
  534. <div class="paragraph">
  535. <p>The global preferences file is looked for in the <em>wireshark</em> directory
  536. under the <em>share</em> subdirectory of the main installation directory (for
  537. example, <em>/usr/local/share/wireshark/preferences</em>) on UNIX-compatible
  538. systems, and in the main installation directory (for example,
  539. <em>C:\Program Files\Wireshark\preferences</em>) on Windows systems.</p>
  540. </div>
  541. <div class="paragraph">
  542. <p>The personal preferences file is looked for in
  543. <em>$XDG_CONFIG_HOME/wireshark/preferences</em>
  544. (or, if <em>$XDG_CONFIG_HOME/wireshark</em> does not exist while <em>$HOME/.wireshark</em>
  545. is present, <em>$HOME/.wireshark/preferences</em>) on
  546. UNIX-compatible systems and <em>%APPDATA%\Wireshark\preferences</em> (or, if
  547. %APPDATA% isn&#8217;t defined, <em>%USERPROFILE%\Application
  548. Data\Wireshark\preferences</em>) on Windows systems.</p>
  549. </div>
  550. </div>
  551. </div>
  552. </dd>
  553. <dt class="hdlist1">Disabled (Enabled) Protocols</dt>
  554. <dd>
  555. <div class="openblock">
  556. <div class="content">
  557. <div class="paragraph">
  558. <p>The <em>disabled_protos</em> files contain system-wide and personal lists of
  559. protocols that have been disabled, so that their dissectors are never
  560. called. The files contain protocol names, one per line, where the
  561. protocol name is the same name that would be used in a display filter
  562. for the protocol:</p>
  563. </div>
  564. <div class="literalblock">
  565. <div class="content">
  566. <pre>http
  567. tcp # a comment</pre>
  568. </div>
  569. </div>
  570. <div class="paragraph">
  571. <p>The global <em>disabled_protos</em> file uses the same directory as the global
  572. preferences file.</p>
  573. </div>
  574. <div class="paragraph">
  575. <p>The personal <em>disabled_protos</em> file uses the same directory as the
  576. personal preferences file.</p>
  577. </div>
  578. </div>
  579. </div>
  580. </dd>
  581. <dt class="hdlist1">Name Resolution (hosts)</dt>
  582. <dd>
  583. <div class="openblock">
  584. <div class="content">
  585. <div class="paragraph">
  586. <p>If the personal <em>hosts</em> file exists, it is
  587. used to resolve IPv4 and IPv6 addresses before any other
  588. attempts are made to resolve them. The file has the standard <em>hosts</em>
  589. file syntax; each line contains one IP address and name, separated by
  590. whitespace. The same directory as for the personal preferences file is
  591. used.</p>
  592. </div>
  593. <div class="paragraph">
  594. <p>Capture filter name resolution is handled by libpcap on UNIX-compatible
  595. systems and Npcap or WinPcap on Windows. As such the Wireshark personal
  596. <em>hosts</em> file will not be consulted for capture filter name resolution.</p>
  597. </div>
  598. </div>
  599. </div>
  600. </dd>
  601. <dt class="hdlist1">Name Resolution (subnets)</dt>
  602. <dd>
  603. <div class="openblock">
  604. <div class="content">
  605. <div class="paragraph">
  606. <p>If an IPv4 address cannot be translated via name resolution (no exact
  607. match is found) then a partial match is attempted via the <em>subnets</em> file.</p>
  608. </div>
  609. <div class="paragraph">
  610. <p>Each line of this file consists of an IPv4 address, a subnet mask length
  611. separated only by a / and a name separated by whitespace. While the address
  612. must be a full IPv4 address, any values beyond the mask length are subsequently
  613. ignored.</p>
  614. </div>
  615. <div class="paragraph">
  616. <p>An example is:</p>
  617. </div>
  618. <div class="paragraph">
  619. <p># Comments must be prepended by the # sign!
  620. 192.168.0.0/24 ws_test_network</p>
  621. </div>
  622. <div class="paragraph">
  623. <p>A partially matched name will be printed as "subnet-name.remaining-address".
  624. For example, "192.168.0.1" under the subnet above would be printed as
  625. "ws_test_network.1"; if the mask length above had been 16 rather than 24, the
  626. printed address would be ``ws_test_network.0.1".</p>
  627. </div>
  628. </div>
  629. </div>
  630. </dd>
  631. <dt class="hdlist1">Name Resolution (ethers)</dt>
  632. <dd>
  633. <div class="openblock">
  634. <div class="content">
  635. <div class="paragraph">
  636. <p>The <em>ethers</em> files are consulted to correlate 6-byte hardware addresses to
  637. names. First the personal <em>ethers</em> file is tried and if an address is not
  638. found there the global <em>ethers</em> file is tried next.</p>
  639. </div>
  640. <div class="paragraph">
  641. <p>Each line contains one hardware address and name, separated by
  642. whitespace. The digits of the hardware address are separated by colons
  643. (:), dashes (-) or periods (.). The same separator character must be
  644. used consistently in an address. The following three lines are valid
  645. lines of an <em>ethers</em> file:</p>
  646. </div>
  647. <div class="literalblock">
  648. <div class="content">
  649. <pre>ff:ff:ff:ff:ff:ff Broadcast
  650. c0-00-ff-ff-ff-ff TR_broadcast
  651. 00.00.00.00.00.00 Zero_broadcast</pre>
  652. </div>
  653. </div>
  654. <div class="paragraph">
  655. <p>The global <em>ethers</em> file is looked for in the <em>/etc</em> directory on
  656. UNIX-compatible systems, and in the main installation directory (for
  657. example, <em>C:\Program Files\Wireshark</em>) on Windows systems.</p>
  658. </div>
  659. <div class="paragraph">
  660. <p>The personal <em>ethers</em> file is looked for in the same directory as the personal
  661. preferences file.</p>
  662. </div>
  663. <div class="paragraph">
  664. <p>Capture filter name resolution is handled by libpcap on UNIX-compatible
  665. systems and Npcap or WinPcap on Windows. As such the Wireshark personal
  666. <em>ethers</em> file will not be consulted for capture filter name resolution.</p>
  667. </div>
  668. </div>
  669. </div>
  670. </dd>
  671. <dt class="hdlist1">Name Resolution (manuf)</dt>
  672. <dd>
  673. <div class="openblock">
  674. <div class="content">
  675. <div class="paragraph">
  676. <p>The <em>manuf</em> file is used to match the 3-byte vendor portion of a 6-byte
  677. hardware address with the manufacturer&#8217;s name; it can also contain well-known
  678. MAC addresses and address ranges specified with a netmask. The format of the
  679. file is the same as the <em>ethers</em> files, except that entries of the form:</p>
  680. </div>
  681. <div class="literalblock">
  682. <div class="content">
  683. <pre>00:00:0C Cisco</pre>
  684. </div>
  685. </div>
  686. <div class="paragraph">
  687. <p>can be provided, with the 3-byte OUI and the name for a vendor, and
  688. entries such as:</p>
  689. </div>
  690. <div class="literalblock">
  691. <div class="content">
  692. <pre>00-00-0C-07-AC/40 All-HSRP-routers</pre>
  693. </div>
  694. </div>
  695. <div class="paragraph">
  696. <p>can be specified, with a MAC address and a mask indicating how many bits
  697. of the address must match. The above entry, for example, has 40
  698. significant bits, or 5 bytes, and would match addresses from
  699. 00-00-0C-07-AC-00 through 00-00-0C-07-AC-FF. The mask need not be a
  700. multiple of 8.</p>
  701. </div>
  702. <div class="paragraph">
  703. <p>The <em>manuf</em> file is looked for in the same directory as the global
  704. preferences file.</p>
  705. </div>
  706. </div>
  707. </div>
  708. </dd>
  709. <dt class="hdlist1">Name Resolution (services)</dt>
  710. <dd>
  711. <div class="openblock">
  712. <div class="content">
  713. <div class="paragraph">
  714. <p>The <em>services</em> file is used to translate port numbers into names.</p>
  715. </div>
  716. <div class="paragraph">
  717. <p>The file has the standard <em>services</em> file syntax; each line contains one
  718. (service) name and one transport identifier separated by white space. The
  719. transport identifier includes one port number and one transport protocol name
  720. (typically tcp, udp, or sctp) separated by a /.</p>
  721. </div>
  722. <div class="paragraph">
  723. <p>An example is:</p>
  724. </div>
  725. <div class="literalblock">
  726. <div class="content">
  727. <pre>mydns 5045/udp # My own Domain Name Server
  728. mydns 5045/tcp # My own Domain Name Server</pre>
  729. </div>
  730. </div>
  731. </div>
  732. </div>
  733. </dd>
  734. <dt class="hdlist1">Name Resolution (ipxnets)</dt>
  735. <dd>
  736. <div class="openblock">
  737. <div class="content">
  738. <div class="paragraph">
  739. <p>The <em>ipxnets</em> files are used to correlate 4-byte IPX network numbers to
  740. names. First the global <em>ipxnets</em> file is tried and if that address is not
  741. found there the personal one is tried next.</p>
  742. </div>
  743. <div class="paragraph">
  744. <p>The format is the same as the <em>ethers</em>
  745. file, except that each address is four bytes instead of six.
  746. Additionally, the address can be represented as a single hexadecimal
  747. number, as is more common in the IPX world, rather than four hex octets.
  748. For example, these four lines are valid lines of an <em>ipxnets</em> file:</p>
  749. </div>
  750. <div class="literalblock">
  751. <div class="content">
  752. <pre>C0.A8.2C.00 HR
  753. c0-a8-1c-00 CEO
  754. 00:00:BE:EF IT_Server1
  755. 110f FileServer3</pre>
  756. </div>
  757. </div>
  758. <div class="paragraph">
  759. <p>The global <em>ipxnets</em> file is looked for in the <em>/etc</em> directory on
  760. UNIX-compatible systems, and in the main installation directory (for
  761. example, <em>C:\Program Files\Wireshark</em>) on Windows systems.</p>
  762. </div>
  763. <div class="paragraph">
  764. <p>The personal <em>ipxnets</em> file is looked for in the same directory as the
  765. personal preferences file.</p>
  766. </div>
  767. </div>
  768. </div>
  769. </dd>
  770. </dl>
  771. </div>
  772. </div>
  773. </div>
  774. <div class="sect1">
  775. <h2 id="_environment_variables">ENVIRONMENT VARIABLES</h2>
  776. <div class="sectionbody">
  777. <div class="dlist">
  778. <dl>
  779. <dt class="hdlist1">WIRESHARK_CONFIG_DIR</dt>
  780. <dd>
  781. <div class="openblock">
  782. <div class="content">
  783. <div class="paragraph">
  784. <p>This environment variable overrides the location of personal configuration
  785. files. It defaults to <em>$XDG_CONFIG_HOME/wireshark</em> (or <em>$HOME/.wireshark</em> if
  786. the former is missing while the latter exists). On Windows,
  787. <em>%APPDATA%\Wireshark</em> is used instead. Available since Wireshark 3.0.</p>
  788. </div>
  789. </div>
  790. </div>
  791. </dd>
  792. <dt class="hdlist1">WIRESHARK_DEBUG_WMEM_OVERRIDE</dt>
  793. <dd>
  794. <div class="openblock">
  795. <div class="content">
  796. <div class="paragraph">
  797. <p>Setting this environment variable forces the wmem framework to use the
  798. specified allocator backend for <strong>all</strong> allocations, regardless of which
  799. backend is normally specified by the code. This is mainly useful to developers
  800. when testing or debugging. See <em>README.wmem</em> in the source distribution for
  801. details.</p>
  802. </div>
  803. </div>
  804. </div>
  805. </dd>
  806. <dt class="hdlist1">WIRESHARK_RUN_FROM_BUILD_DIRECTORY</dt>
  807. <dd>
  808. <div class="openblock">
  809. <div class="content">
  810. <div class="paragraph">
  811. <p>This environment variable causes the plugins and other data files to be loaded
  812. from the build directory (where the program was compiled) rather than from the
  813. standard locations. It has no effect when the program in question is running
  814. with root (or setuid) permissions on *NIX.</p>
  815. </div>
  816. </div>
  817. </div>
  818. </dd>
  819. <dt class="hdlist1">WIRESHARK_DATA_DIR</dt>
  820. <dd>
  821. <div class="openblock">
  822. <div class="content">
  823. <div class="paragraph">
  824. <p>This environment variable causes the various data files to be loaded from
  825. a directory other than the standard locations. It has no effect when the
  826. program in question is running with root (or setuid) permissions on *NIX.</p>
  827. </div>
  828. </div>
  829. </div>
  830. </dd>
  831. <dt class="hdlist1">ERF_RECORDS_TO_CHECK</dt>
  832. <dd>
  833. <div class="openblock">
  834. <div class="content">
  835. <div class="paragraph">
  836. <p>This environment variable controls the number of ERF records checked when
  837. deciding if a file really is in the ERF format. Setting this environment
  838. variable a number higher than the default (20) would make false positives
  839. less likely.</p>
  840. </div>
  841. </div>
  842. </div>
  843. </dd>
  844. <dt class="hdlist1">IPFIX_RECORDS_TO_CHECK</dt>
  845. <dd>
  846. <div class="openblock">
  847. <div class="content">
  848. <div class="paragraph">
  849. <p>This environment variable controls the number of IPFIX records checked when
  850. deciding if a file really is in the IPFIX format. Setting this environment
  851. variable a number higher than the default (20) would make false positives
  852. less likely.</p>
  853. </div>
  854. </div>
  855. </div>
  856. </dd>
  857. <dt class="hdlist1">WIRESHARK_ABORT_ON_DISSECTOR_BUG</dt>
  858. <dd>
  859. <div class="openblock">
  860. <div class="content">
  861. <div class="paragraph">
  862. <p>If this environment variable is set, <strong>Rawshark</strong> will call abort(3)
  863. when a dissector bug is encountered. abort(3) will cause the program to
  864. exit abnormally; if you are running <strong>Rawshark</strong> in a debugger, it
  865. should halt in the debugger and allow inspection of the process, and, if
  866. you are not running it in a debugger, it will, on some OSes, assuming
  867. your environment is configured correctly, generate a core dump file.
  868. This can be useful to developers attempting to troubleshoot a problem
  869. with a protocol dissector.</p>
  870. </div>
  871. </div>
  872. </div>
  873. </dd>
  874. <dt class="hdlist1">WIRESHARK_ABORT_ON_TOO_MANY_ITEMS</dt>
  875. <dd>
  876. <div class="openblock">
  877. <div class="content">
  878. <div class="paragraph">
  879. <p>If this environment variable is set, <strong>Rawshark</strong> will call abort(3)
  880. if a dissector tries to add too many items to a tree (generally this
  881. is an indication of the dissector not breaking out of a loop soon enough).
  882. abort(3) will cause the program to exit abnormally; if you are running
  883. <strong>Rawshark</strong> in a debugger, it should halt in the debugger and allow
  884. inspection of the process, and, if you are not running it in a debugger,
  885. it will, on some OSes, assuming your environment is configured correctly,
  886. generate a core dump file. This can be useful to developers attempting to
  887. troubleshoot a problem with a protocol dissector.</p>
  888. </div>
  889. </div>
  890. </div>
  891. </dd>
  892. </dl>
  893. </div>
  894. </div>
  895. </div>
  896. <div class="sect1">
  897. <h2 id="_see_also">SEE ALSO</h2>
  898. <div class="sectionbody">
  899. <div class="paragraph">
  900. <p><a href="wireshark-filter.html">wireshark-filter</a>(4), <a href="wireshark.html">wireshark</a>(1), <a href="tshark.html">tshark</a>(1), <a href="editcap.html">editcap</a>(1), <a href="https://www.tcpdump.org/manpages/pcap.3pcap.html">pcap</a>(3), <a href="dumpcap.html">dumpcap</a>(1),
  901. <a href="text2pcap.html">text2pcap</a>(1), <a href="https://www.tcpdump.org/manpages/pcap-filter.7.html">pcap-filter</a>(7) or <a href="https://www.tcpdump.org/manpages/tcpdump.1.html">tcpdump</a>(8)</p>
  902. </div>
  903. </div>
  904. </div>
  905. <div class="sect1">
  906. <h2 id="_notes">NOTES</h2>
  907. <div class="sectionbody">
  908. <div class="paragraph">
  909. <p>This is the manual page for <strong>Rawshark</strong> 4.0.5.
  910. <strong>Rawshark</strong> is part of the <strong>Wireshark</strong> distribution.
  911. The latest version of <strong>Wireshark</strong> can be found at <a href="https://www.wireshark.org" class="bare">https://www.wireshark.org</a>.</p>
  912. </div>
  913. <div class="paragraph">
  914. <p>HTML versions of the Wireshark project man pages are available at
  915. <a href="https://www.wireshark.org/docs/man-pages" class="bare">https://www.wireshark.org/docs/man-pages</a>.</p>
  916. </div>
  917. </div>
  918. </div>
  919. <div class="sect1">
  920. <h2 id="_authors">AUTHORS</h2>
  921. <div class="sectionbody">
  922. <div class="paragraph">
  923. <p><strong>Rawshark</strong> uses the same packet dissection code that <strong>Wireshark</strong> does, as
  924. well as using many other modules from <strong>Wireshark</strong>; see the list of authors
  925. in the <strong>Wireshark</strong> man page for a list of authors of that code.</p>
  926. </div>
  927. </div>
  928. </div>
  929. </div>
  930. </body>
  931. </html>