tshark.html 161 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618
  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>tshark(1)</title>
  9. <link rel="stylesheet" href="./ws.css">
  10. </head>
  11. <body class="manpage">
  12. <div id="header">
  13. <h1>tshark(1) Manual Page</h1>
  14. <h2 id="_name">NAME</h2>
  15. <div class="sectionbody">
  16. <p>tshark - Dump and analyze network traffic</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>tshark</strong></span>
  25. <span class="nowrap">[ <strong>-i</strong> &lt;capture interface&gt;|- ]</span>
  26. <span class="nowrap">[ <strong>-f</strong> &lt;capture filter&gt; ]</span>
  27. <span class="nowrap">[ <strong>-2</strong> ]</span>
  28. <span class="nowrap">[ <strong>-r</strong> &lt;infile&gt; ]</span>
  29. <span class="nowrap">[ <strong>-w</strong> &lt;outfile&gt;|- ]</span>
  30. <span class="nowrap">[ <strong>options</strong> ]</span>
  31. <span class="nowrap">[ &lt;filter&gt; ]</span></p>
  32. </div>
  33. <div class="paragraph">
  34. <p><span class="nowrap"><strong>tshark</strong></span>
  35. <span class="nowrap"><strong>-G</strong> [ &lt;report type&gt; ] [ --elastic-mapping-filter &lt;protocols&gt; ]</span></p>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="sect1">
  40. <h2 id="_description">DESCRIPTION</h2>
  41. <div class="sectionbody">
  42. <div class="paragraph">
  43. <p><strong>TShark</strong> is a network protocol analyzer. It lets you capture packet
  44. data from a live network, or read packets from a previously saved
  45. capture file, either printing a decoded form of those packets to the
  46. standard output or writing the packets to a file. <strong>TShark</strong>'s native
  47. capture file format is <strong>pcapng</strong> format, which is also the format used
  48. by <strong>Wireshark</strong> and various other tools.</p>
  49. </div>
  50. <div class="paragraph">
  51. <p>Without any options set, <strong>TShark</strong> will work much like <strong>tcpdump</strong>. It
  52. will use the pcap library to capture traffic from the first available
  53. network interface and displays a summary line on the standard output for
  54. each received packet.</p>
  55. </div>
  56. <div class="paragraph">
  57. <p>When run with the <strong>-r</strong> option, specifying a capture file from which to
  58. read, <strong>TShark</strong> will again work much like <strong>tcpdump</strong>, reading packets
  59. from the file and displaying a summary line on the standard output for
  60. each packet read. <strong>TShark</strong> is able to detect, read and write the same
  61. capture files that are supported by <strong>Wireshark</strong>. The input file
  62. doesn&#8217;t need a specific filename extension; the file format and an
  63. optional gzip, zstd or lz4 compression will be automatically detected. Near the
  64. beginning of the DESCRIPTION section of <a href="wireshark.html">wireshark</a>(1) or
  65. <a href="https://www.wireshark.org/docs/man-pages/wireshark.html" class="bare">https://www.wireshark.org/docs/man-pages/wireshark.html</a> is a detailed
  66. description of the way <strong>Wireshark</strong> handles this, which is the same way
  67. <strong>TShark</strong> handles this.</p>
  68. </div>
  69. <div class="paragraph">
  70. <p>Compressed file support uses (and therefore requires) the zlib library.
  71. If the zlib library is not present when compiling <strong>TShark</strong>, it will be
  72. possible to compile it, but the resulting program will be unable to read
  73. compressed files.</p>
  74. </div>
  75. <div class="paragraph">
  76. <p>When displaying packets on the standard output, <strong>TShark</strong> writes, by
  77. default, a summary line containing the fields specified by the
  78. preferences file (which are also the fields displayed in the packet list
  79. pane in <strong>Wireshark</strong>), although if it&#8217;s writing packets as it captures
  80. them, rather than writing packets from a saved capture file, it won&#8217;t
  81. show the "frame number" field. If the <strong>-V</strong> option is specified, it
  82. instead writes a view of the details of the packet, showing all the
  83. fields of all protocols in the packet. If the <strong>-O</strong> option is
  84. specified, it will only show the full details for the protocols
  85. specified, and show only the top-level detail line for all other
  86. protocols. Use the output of "<strong>tshark -G protocols</strong>" to find the
  87. abbreviations of the protocols you can specify. If the <strong>-P</strong> option is
  88. specified with either the <strong>-V</strong> or <strong>-O</strong> options, both the summary line
  89. for the entire packet and the details will be displayed.</p>
  90. </div>
  91. <div class="paragraph">
  92. <p>Packet capturing is performed with the pcap library. That library
  93. supports specifying a filter expression; packets that don&#8217;t match that
  94. filter are discarded. The <strong>-f</strong> option is used to specify a capture
  95. filter. The syntax of a capture filter is defined by the pcap library;
  96. this syntax is different from the display filter syntax described below,
  97. and the filtering mechanism is limited in its abilities.</p>
  98. </div>
  99. <div class="paragraph">
  100. <p>Display filters in <strong>TShark</strong>, which allow you to select which packets are
  101. to be decoded or written to a file, are very powerful; more fields are
  102. filterable in <strong>TShark</strong> than in other protocol analyzers, and the syntax
  103. you can use to create your filters is richer. As <strong>TShark</strong> progresses,
  104. expect more and more protocol fields to be allowed in display filters.
  105. Display filters use the same syntax as display and color filters in
  106. <strong>Wireshark</strong>; a display filter is specified with the <strong>-Y</strong> option.</p>
  107. </div>
  108. <div class="paragraph">
  109. <p>Display filters can be specified when capturing or when reading from a
  110. capture file. Note that capture filters are much more efficient
  111. than display filters, and it may be more difficult for <strong>TShark</strong> to keep up
  112. with a busy network if a display filter is specified for a live capture, so
  113. you might be more likely to lose packets if you&#8217;re using a display filter.</p>
  114. </div>
  115. <div class="paragraph">
  116. <p>A capture or display filter can either be specified with the <strong>-f</strong> or <strong>-Y</strong>
  117. option, respectively, in which case the entire filter expression must be
  118. specified as a single argument (which means that if it contains spaces,
  119. it must be quoted), or can be specified with command-line arguments
  120. after the option arguments, in which case all the arguments after the
  121. filter arguments are treated as a filter expression. If the filter is
  122. specified with command-line arguments after the option arguments, it&#8217;s a
  123. capture filter if a capture is being done (i.e., if no <strong>-r</strong> option was
  124. specified) and a display filter if a capture file is being read (i.e., if a
  125. <strong>-r</strong> option was specified).</p>
  126. </div>
  127. <div class="paragraph">
  128. <p>If the <strong>-w</strong> option is specified when capturing packets or reading from
  129. a capture file, <strong>TShark</strong> does not display packets on the standard
  130. output. Instead, it writes the packets to a capture file with the name
  131. specified by the <strong>-w</strong> option. Note that display filters are currently
  132. not supported when capturing and saving the captured packets.</p>
  133. </div>
  134. <div class="paragraph">
  135. <p>If you want to write the decoded form of packets to a file, run
  136. <strong>TShark</strong> without the <strong>-w</strong> option, and redirect its standard output to
  137. the file (do <em>not</em> use the <strong>-w</strong> option).</p>
  138. </div>
  139. <div class="paragraph">
  140. <p>If you want the packets to be displayed to the standard output and also
  141. saved to a file, specify the <strong>-P</strong> option in addition to the <strong>-w</strong>
  142. option to have the summary line displayed, specify the <strong>-V</strong> option
  143. in addition to the <strong>-w</strong> option to have the details of the packet
  144. displayed, and specify the <strong>-O</strong> option, with a list of protocols, to
  145. have the full details of the specified protocols and the top-level
  146. detail line for all other protocols to be displayed. If the <strong>-P</strong>
  147. option is used together with the <strong>-V</strong> or <strong>-O</strong> option, the summary line
  148. will be displayed along with the detail lines.</p>
  149. </div>
  150. <div class="paragraph">
  151. <p>When writing packets to a file, <strong>TShark</strong>, by default, writes the file
  152. in <strong>pcapng</strong> format, and writes all of the packets it sees to the output
  153. file. The <strong>-F</strong> option can be used to specify the format in which to
  154. write the file. This list of available file formats is displayed by the
  155. <strong>-F</strong> option without a value. However, you can&#8217;t specify a file format
  156. for a live capture.</p>
  157. </div>
  158. <div class="paragraph">
  159. <p>When capturing packets, <strong>TShark</strong> writes to the standard error an
  160. initial line listing the interfaces from which packets are being
  161. captured and, if packet information isn&#8217;t being displayed to the
  162. terminal, writes a continuous count of packets captured to the standard
  163. output. If the <strong>-q</strong> option is specified, neither the continuous count
  164. nor the packet information will be displayed; instead, at the end of the
  165. capture, a count of packets captured will be displayed. If the <strong>-Q</strong>
  166. option is specified, neither the initial line, nor the packet
  167. information, nor any packet counts will be displayed. If the <strong>-q</strong> or
  168. <strong>-Q</strong> option is used, the <strong>-P</strong>, <strong>-V</strong>, or <strong>-O</strong> option can be used to
  169. cause the corresponding output to be displayed even though other output
  170. is suppressed.</p>
  171. </div>
  172. <div class="paragraph">
  173. <p>When reading packets, the <strong>-q</strong> and <strong>-Q</strong> option will suppress the
  174. display of the packet summary or details; this would be used if <strong>-z</strong>
  175. options are specified in order to display statistics, so that only the
  176. statistics, not the packet information, is displayed.</p>
  177. </div>
  178. <div class="paragraph">
  179. <p>The <strong>-G</strong> option is a special mode that simply causes <strong>TShark</strong>
  180. to dump one of several types of internal glossaries and then exit.</p>
  181. </div>
  182. </div>
  183. </div>
  184. <div class="sect1">
  185. <h2 id="_options">OPTIONS</h2>
  186. <div class="sectionbody">
  187. <div class="dlist">
  188. <dl>
  189. <dt class="hdlist1">-2</dt>
  190. <dd>
  191. <div class="openblock">
  192. <div class="content">
  193. <div class="paragraph">
  194. <p>Perform a two-pass analysis. This causes <strong>TShark</strong> to buffer output until the
  195. entire first pass is done, but allows it to fill in fields that require future
  196. knowledge, such as 'response in frame #' fields. Also permits reassembly
  197. frame dependencies to be calculated correctly.</p>
  198. </div>
  199. </div>
  200. </div>
  201. </dd>
  202. <dt class="hdlist1">-a|--autostop &lt;capture autostop condition&gt;</dt>
  203. <dd>
  204. <div class="openblock">
  205. <div class="content">
  206. <div class="paragraph">
  207. <p>Specify a criterion that specifies when <strong>TShark</strong> is to stop writing
  208. to a capture file. The criterion is of the form <em>test:value</em>,
  209. where <em>test</em> is one of:</p>
  210. </div>
  211. <div class="paragraph">
  212. <p><strong>duration</strong>:<em>value</em> Stop writing to a capture file after <em>value</em> seconds
  213. have elapsed. Floating point values (e.g. 0.5) are allowed.</p>
  214. </div>
  215. <div class="paragraph">
  216. <p><strong>files</strong>:<em>value</em> Stop writing to capture files after <em>value</em> number of files
  217. were written.</p>
  218. </div>
  219. <div class="paragraph">
  220. <p><strong>filesize</strong>:<em>value</em> Stop writing to a capture file after it reaches a size of
  221. <em>value</em> kB. If this option is used together with the -b option, <strong>TShark</strong>
  222. will stop writing to the current capture file and switch to the next one if
  223. filesize is reached. When reading a capture file, <strong>TShark</strong> will stop reading
  224. the file after the number of bytes read exceeds this number (the complete
  225. packet will be read, so more bytes than this number may be read). Note that
  226. the filesize is limited to a maximum value of 2 GiB.</p>
  227. </div>
  228. <div class="paragraph">
  229. <p><strong>packets</strong>:<em>value</em> switch to the next file after it contains <em>value</em>
  230. packets.
  231. This does not include any packets that do not pass the display filter, so it
  232. may differ from <strong>-c</strong>&lt;capture packet count&gt;.</p>
  233. </div>
  234. </div>
  235. </div>
  236. </dd>
  237. <dt class="hdlist1">-A &lt;user&gt;:&lt;password&gt;</dt>
  238. <dd>
  239. <div class="openblock">
  240. <div class="content">
  241. <div class="paragraph">
  242. <p>Specify a user and a password when <strong>TShark</strong> captures from a rpcap:// interface
  243. where authentication is required.</p>
  244. </div>
  245. <div class="paragraph">
  246. <p>This option is available with libpcap with enabled remote support.</p>
  247. </div>
  248. </div>
  249. </div>
  250. </dd>
  251. <dt class="hdlist1">-b|--ring-buffer &lt;capture ring buffer option&gt;</dt>
  252. <dd>
  253. <div class="openblock">
  254. <div class="content">
  255. <div class="paragraph">
  256. <p>Cause <strong>TShark</strong> to run in "multiple files" mode. In "multiple files" mode,
  257. <strong>TShark</strong> will write to several capture files. When the first capture file
  258. fills up, <strong>TShark</strong> will switch writing to the next file and so on.</p>
  259. </div>
  260. <div class="paragraph">
  261. <p>The created filenames are based on the filename given with the <strong>-w</strong> option,
  262. the number of the file and on the creation date and time,
  263. e.g. outfile_00001_20230714120117.pcap, outfile_00002_20230714120523.pcap, &#8230;&#8203;</p>
  264. </div>
  265. <div class="paragraph">
  266. <p>With the <em>files</em> option it&#8217;s also possible to form a "ring buffer".
  267. This will fill up new files until the number of files specified,
  268. at which point <strong>TShark</strong> will discard the data in the first file and start
  269. writing to that file and so on. If the <em>files</em> option is not set,
  270. new files filled up until one of the capture stop conditions match (or
  271. until the disk is full).</p>
  272. </div>
  273. <div class="paragraph">
  274. <p>The criterion is of the form <em>key:value</em>,
  275. where <em>key</em> is one of:</p>
  276. </div>
  277. <div class="paragraph">
  278. <p><strong>duration</strong>:<em>value</em> switch to the next file after <em>value</em> seconds have
  279. elapsed, even if the current file is not completely filled up. Floating
  280. point values (e.g. 0.5) are allowed.</p>
  281. </div>
  282. <div class="paragraph">
  283. <p><strong>files</strong>:<em>value</em> begin again with the first file after <em>value</em> number of
  284. files were written (form a ring buffer). This value must be less than 100000.
  285. Caution should be used when using large numbers of files: some filesystems do
  286. not handle many files in a single directory well. The <strong>files</strong> criterion
  287. requires either <strong>duration</strong>, <strong>interval</strong> or <strong>filesize</strong> to be specified to
  288. control when to go to the next file. It should be noted that each <strong>-b</strong>
  289. parameter takes exactly one criterion; to specify two criterion, each must be
  290. preceded by the <strong>-b</strong> option.</p>
  291. </div>
  292. <div class="paragraph">
  293. <p><strong>filesize</strong>:<em>value</em> switch to the next file after it reaches a size of
  294. <em>value</em> kB. Note that the filesize is limited to a maximum value of 2 GiB.</p>
  295. </div>
  296. <div class="paragraph">
  297. <p><strong>interval</strong>:<em>value</em> switch to the next file when the time is an exact
  298. multiple of <em>value</em> seconds. For example, use 3600 to switch to a new file
  299. every hour on the hour.</p>
  300. </div>
  301. <div class="paragraph">
  302. <p><strong>packets</strong>:<em>value</em> switch to the next file after it contains <em>value</em>
  303. packets.</p>
  304. </div>
  305. <div class="paragraph">
  306. <p><strong>nametimenum</strong>:<em>value</em> Choose between two save filename templates. If
  307. <em>value</em> is 1, make running file number part before start time part; this is
  308. the original and default behaviour (e.g. log_00001_20230714164426.pcap). If
  309. <em>value</em> is greater than 1, make start time part before running number part
  310. (e.g. log_20210828164426_00001.pcap). The latter makes alphabetical sorting
  311. order equal to creation time order, and keeps related multiple file sets in
  312. same directory close to each other.</p>
  313. </div>
  314. <div class="paragraph">
  315. <p>Example: <strong>tshark -b filesize:1000 -b files:5</strong> results in a ring buffer of five
  316. files of size one megabyte each.</p>
  317. </div>
  318. </div>
  319. </div>
  320. </dd>
  321. <dt class="hdlist1">-B|--buffer-size &lt;capture buffer size&gt;</dt>
  322. <dd>
  323. <div class="openblock">
  324. <div class="content">
  325. <div class="paragraph">
  326. <p>Set capture buffer size (in MiB, default is 2 MiB). This is used by
  327. the capture driver to buffer packet data until that data can be written
  328. to disk. If you encounter packet drops while capturing, try to increase
  329. this size. Note that, while <strong>TShark</strong> attempts to set the buffer size
  330. to 2 MiB by default, and can be told to set it to a larger value, the
  331. system or interface on which you&#8217;re capturing might silently limit the
  332. capture buffer size to a lower value or raise it to a higher value.</p>
  333. </div>
  334. <div class="paragraph">
  335. <p>This is available on UNIX systems with libpcap 1.0.0 or later and on
  336. Windows. It is not available on UNIX systems with earlier versions of
  337. libpcap.</p>
  338. </div>
  339. <div class="paragraph">
  340. <p>This option can occur multiple times. If used before the first
  341. occurrence of the <strong>-i</strong> option, it sets the default capture buffer size.
  342. If used after an <strong>-i</strong> option, it sets the capture buffer size for
  343. the interface specified by the last <strong>-i</strong> option occurring before
  344. this option. If the capture buffer size is not set specifically,
  345. the default capture buffer size is used instead.</p>
  346. </div>
  347. </div>
  348. </div>
  349. </dd>
  350. <dt class="hdlist1">-c &lt;capture packet count&gt;</dt>
  351. <dd>
  352. <div class="openblock">
  353. <div class="content">
  354. <div class="paragraph">
  355. <p>Set the maximum number of packets to read when capturing live
  356. data.
  357. If reading a capture file, set the maximum number of packets to read.
  358. This includes any packets that do not pass the display filter, so it
  359. may differ from <strong>-a packets:</strong>&lt;capture packet count&gt;.</p>
  360. </div>
  361. </div>
  362. </div>
  363. </dd>
  364. <dt class="hdlist1">-C &lt;configuration profile&gt;</dt>
  365. <dd>
  366. <div class="openblock">
  367. <div class="content">
  368. <div class="paragraph">
  369. <p>Run with the given configuration profile.</p>
  370. </div>
  371. </div>
  372. </div>
  373. </dd>
  374. <dt class="hdlist1">-d &lt;layer type&gt;==&lt;selector&gt;,&lt;decode-as protocol&gt;</dt>
  375. <dd>
  376. <div class="openblock">
  377. <div class="content">
  378. <div class="paragraph">
  379. <p>Like Wireshark&#8217;s <strong>Decode As&#8230;&#8203;</strong> feature, this lets you specify how a
  380. layer type should be dissected. If the layer type in question (for example,
  381. <strong>tcp.port</strong> or <strong>udp.port</strong> for a TCP or UDP port number) has the specified
  382. selector value, packets should be dissected as the specified protocol.</p>
  383. </div>
  384. <div class="paragraph">
  385. <p>Example: <strong>tshark -d tcp.port==8888,http</strong> will decode any traffic running over
  386. TCP port 8888 as HTTP.</p>
  387. </div>
  388. <div class="paragraph">
  389. <p>Example: <strong>tshark -d tcp.port==8888:3,http</strong> will decode any traffic running over
  390. TCP ports 8888, 8889 or 8890 as HTTP.</p>
  391. </div>
  392. <div class="paragraph">
  393. <p>Example: <strong>tshark -d tcp.port==8888-8890,http</strong> will decode any traffic running
  394. over TCP ports 8888, 8889 or 8890 as HTTP.</p>
  395. </div>
  396. <div class="paragraph">
  397. <p>Using an invalid selector or protocol will print out a list of valid selectors
  398. and protocol names, respectively.</p>
  399. </div>
  400. <div class="paragraph">
  401. <p>Example: <strong>tshark -d .</strong> is a quick way to get a list of valid selectors.</p>
  402. </div>
  403. <div class="paragraph">
  404. <p>Example: <strong>tshark -d ethertype==0x0800.</strong> is a quick way to get a list of
  405. protocols that can be selected with an ethertype.</p>
  406. </div>
  407. </div>
  408. </div>
  409. </dd>
  410. <dt class="hdlist1">-D|--list-interfaces</dt>
  411. <dd>
  412. <div class="openblock">
  413. <div class="content">
  414. <div class="paragraph">
  415. <p>Print a list of the interfaces on which <strong>TShark</strong> can capture, and
  416. exit. For each network interface, a number and an
  417. interface name, possibly followed by a text description of the
  418. interface, is printed. The interface name or the number can be supplied
  419. to the <strong>-i</strong> option to specify an interface on which to capture.</p>
  420. </div>
  421. <div class="paragraph">
  422. <p>This can be useful on systems that don&#8217;t have a command to list them
  423. (UNIX systems lacking <strong>ifconfig -a</strong> or Linux systems lacking
  424. <strong>ip link show</strong>). The number can be useful on Windows systems, where
  425. the interface name might be a long name or a GUID.</p>
  426. </div>
  427. <div class="paragraph">
  428. <p>Note that "can capture" means that <strong>TShark</strong> was able to open that
  429. device to do a live capture. Depending on your system you may need to
  430. run <strong>TShark</strong> from an account with special privileges (for example, as
  431. root) to be able to capture network traffic. If <strong>tshark -D</strong> is not run
  432. from such an account, it will not list any interfaces.</p>
  433. </div>
  434. </div>
  435. </div>
  436. </dd>
  437. <dt class="hdlist1">-e &lt;field&gt;</dt>
  438. <dd>
  439. <div class="openblock">
  440. <div class="content">
  441. <div class="paragraph">
  442. <p>Add a field to the list of fields to display if <strong>-T ek|fields|json|pdml</strong>
  443. is selected. This option can be used multiple times on the command line.
  444. At least one field must be provided if the <strong>-T fields</strong> option is
  445. selected. Column names may be used prefixed with "_ws.col."</p>
  446. </div>
  447. <div class="paragraph">
  448. <p>Example: <strong>tshark -e frame.number -e ip.addr -e udp -e _ws.col.Info</strong></p>
  449. </div>
  450. <div class="paragraph">
  451. <p>Fields are separated by tab characters by default. <strong>-E</strong> controls the
  452. format of the printed fields.
  453. Giving a protocol rather than a single field will print the protocol summary
  454. (subtree label) from the packet details as a single field.
  455. If the protocol summary contains only the protocol name
  456. (e.g. "Hypertext Transfer Protocol") then the protocol filter name ("http")
  457. will be printed.</p>
  458. </div>
  459. </div>
  460. </div>
  461. </dd>
  462. <dt class="hdlist1">-E &lt;field print option&gt;</dt>
  463. <dd>
  464. <div class="openblock">
  465. <div class="content">
  466. <div class="paragraph">
  467. <p>Set an option controlling the printing of fields when <strong>-T fields</strong> is
  468. selected.</p>
  469. </div>
  470. <div class="paragraph">
  471. <p>Options are:</p>
  472. </div>
  473. <div class="paragraph">
  474. <p><strong>bom=y|n</strong> If <strong>y</strong>, prepend output with the UTF-8 byte order mark
  475. (hexadecimal ef, bb, bf). Defaults to <strong>n</strong>.</p>
  476. </div>
  477. <div class="paragraph">
  478. <p><strong>header=y|n</strong> If <strong>y</strong>, print a list of the field names given using <strong>-e</strong>
  479. as the first line of the output; the field name will be separated using
  480. the same character as the field values. Defaults to <strong>n</strong>.</p>
  481. </div>
  482. <div class="paragraph">
  483. <p><strong>separator=/t|/s|</strong>&lt;character&gt; Set the separator character to
  484. use for fields. If <strong>/t</strong> tab will be used (this is the default), if
  485. <strong>/s</strong>, a single space will be used. Otherwise any character that can be
  486. accepted by the command line as part of the option may be used.</p>
  487. </div>
  488. <div class="paragraph">
  489. <p><strong>occurrence=f|l|a</strong> Select which occurrence to use for fields that have
  490. multiple occurrences. If <strong>f</strong> the first occurrence will be used, if <strong>l</strong>
  491. the last occurrence will be used and if <strong>a</strong> all occurrences will be used
  492. (this is the default).</p>
  493. </div>
  494. <div class="paragraph">
  495. <p><strong>aggregator=,|/s|</strong>&lt;character&gt; Set the aggregator character to
  496. use for fields that have multiple occurrences. If <strong>,</strong> a comma will be used
  497. (this is the default), if <strong>/s</strong>, a single space will be used. Otherwise
  498. any character that can be accepted by the command line as part of the
  499. option may be used.</p>
  500. </div>
  501. <div class="paragraph">
  502. <p><strong>quote=d|s|n</strong> Set the quote character to use to surround fields. <strong>d</strong>
  503. uses double-quotes, <strong>s</strong> single-quotes, <strong>n</strong> no quotes (the default).</p>
  504. </div>
  505. </div>
  506. </div>
  507. </dd>
  508. <dt class="hdlist1">-f &lt;capture filter&gt;</dt>
  509. <dd>
  510. <div class="openblock">
  511. <div class="content">
  512. <div class="paragraph">
  513. <p>Set the capture filter expression.</p>
  514. </div>
  515. <div class="paragraph">
  516. <p>This option can occur multiple times. If used before the first
  517. occurrence of the <strong>-i</strong> option, it sets the default capture filter expression.
  518. If used after an <strong>-i</strong> option, it sets the capture filter expression for
  519. the interface specified by the last <strong>-i</strong> option occurring before
  520. this option. If the capture filter expression is not set specifically,
  521. the default capture filter expression is used if provided.</p>
  522. </div>
  523. <div class="paragraph">
  524. <p>Pre-defined capture filter names, as shown in the GUI menu item Capture&#8594;Capture
  525. Filters, can be used by prefixing the argument with "predef:".
  526. Example: <strong>tshark -f "predef:MyPredefinedHostOnlyFilter"</strong></p>
  527. </div>
  528. </div>
  529. </div>
  530. </dd>
  531. <dt class="hdlist1">-F &lt;file format&gt;</dt>
  532. <dd>
  533. <div class="openblock">
  534. <div class="content">
  535. <div class="paragraph">
  536. <p>Set the file format of the output capture file written using the <strong>-w</strong>
  537. option. The output written with the <strong>-w</strong> option is raw packet data, not
  538. text, so there is no <strong>-F</strong> option to request text output. The option <strong>-F</strong>
  539. without a value will list the available formats.</p>
  540. </div>
  541. </div>
  542. </div>
  543. </dd>
  544. <dt class="hdlist1">-g</dt>
  545. <dd>
  546. <div class="openblock">
  547. <div class="content">
  548. <div class="paragraph">
  549. <p>This option causes the output file(s) to be created with group-read permission
  550. (meaning that the output file(s) can be read by other members of the calling
  551. user&#8217;s group).</p>
  552. </div>
  553. </div>
  554. </div>
  555. </dd>
  556. <dt class="hdlist1">-G [ &lt;report type&gt; ]</dt>
  557. <dd>
  558. <div class="openblock">
  559. <div class="content">
  560. <div class="paragraph">
  561. <p>The <strong>-G</strong> option will cause <strong>TShark</strong> to dump one of several types of glossaries
  562. and then exit. If no specific glossary type is specified, then the <strong>fields</strong>
  563. report will be generated by default.
  564. Using the report type of <strong>help</strong> lists all the current report types.</p>
  565. </div>
  566. <div class="paragraph">
  567. <p>The available report types include:</p>
  568. </div>
  569. <div class="paragraph">
  570. <p><strong>column-formats</strong> Dumps the column formats understood by <strong>TShark</strong>.
  571. There is one record per line. The fields are tab-delimited.</p>
  572. </div>
  573. <div class="hdlist">
  574. <table>
  575. <tr>
  576. <td class="hdlist1">
  577. Field 1
  578. </td>
  579. <td class="hdlist2">
  580. <p>format string (e.g. "%rD")</p>
  581. </td>
  582. </tr>
  583. <tr>
  584. <td class="hdlist1">
  585. Field 2
  586. </td>
  587. <td class="hdlist2">
  588. <p>text description of format string (e.g. "Dest port (resolved)")</p>
  589. </td>
  590. </tr>
  591. </table>
  592. </div>
  593. <div class="paragraph">
  594. <p><strong>currentprefs</strong> Dumps a copy of the current preferences file to stdout.</p>
  595. </div>
  596. <div class="paragraph">
  597. <p><strong>decodes</strong> Dumps the "layer type"/"decode as" associations to stdout.
  598. There is one record per line. The fields are tab-delimited.</p>
  599. </div>
  600. <div class="hdlist">
  601. <table>
  602. <tr>
  603. <td class="hdlist1">
  604. Field 1
  605. </td>
  606. <td class="hdlist2">
  607. <p>layer type, e.g. "tcp.port"</p>
  608. </td>
  609. </tr>
  610. <tr>
  611. <td class="hdlist1">
  612. Field 2
  613. </td>
  614. <td class="hdlist2">
  615. <p>selector in decimal</p>
  616. </td>
  617. </tr>
  618. <tr>
  619. <td class="hdlist1">
  620. Field 3
  621. </td>
  622. <td class="hdlist2">
  623. <p>"decode as" name, e.g. "http"</p>
  624. </td>
  625. </tr>
  626. </table>
  627. </div>
  628. <div class="paragraph">
  629. <p><strong>defaultprefs</strong> Dumps a default preferences file to stdout.</p>
  630. </div>
  631. <div class="paragraph">
  632. <p><strong>dissector-tables</strong> Dumps a list of dissector tables to stdout. There
  633. is one record per line. The fields are tab-delimited.</p>
  634. </div>
  635. <div class="hdlist">
  636. <table>
  637. <tr>
  638. <td class="hdlist1">
  639. Field 1
  640. </td>
  641. <td class="hdlist2">
  642. <p>dissector table name, e.g. "tcp.port"</p>
  643. </td>
  644. </tr>
  645. <tr>
  646. <td class="hdlist1">
  647. Field 2
  648. </td>
  649. <td class="hdlist2">
  650. <p>name used for the dissector table in the GUI</p>
  651. </td>
  652. </tr>
  653. <tr>
  654. <td class="hdlist1">
  655. Field 3
  656. </td>
  657. <td class="hdlist2">
  658. <p>type (textual representation of the ftenum type)</p>
  659. </td>
  660. </tr>
  661. <tr>
  662. <td class="hdlist1">
  663. Field 4
  664. </td>
  665. <td class="hdlist2">
  666. <p>base for display (for integer types)</p>
  667. </td>
  668. </tr>
  669. <tr>
  670. <td class="hdlist1">
  671. Field 5
  672. </td>
  673. <td class="hdlist2">
  674. <p>protocol name</p>
  675. </td>
  676. </tr>
  677. <tr>
  678. <td class="hdlist1">
  679. Field 6
  680. </td>
  681. <td class="hdlist2">
  682. <p>"decode as" support</p>
  683. </td>
  684. </tr>
  685. </table>
  686. </div>
  687. <div class="paragraph">
  688. <p><strong>elastic-mapping</strong> Dumps the ElasticSearch mapping file to stdout.</p>
  689. </div>
  690. <div class="paragraph">
  691. <p><strong>fieldcount</strong> Dumps the number of header fields to stdout.</p>
  692. </div>
  693. <div class="paragraph">
  694. <p><strong>fields</strong> Dumps the contents of the registration database to
  695. stdout. An independent program can take this output and format it into nice
  696. tables or HTML or whatever. There is one record per line. Each record is
  697. either a protocol or a header field, differentiated by the first field.
  698. The fields are tab-delimited.</p>
  699. </div>
  700. <div class="hdlist">
  701. <div class="title">Protocols</div>
  702. <table>
  703. <tr>
  704. <td class="hdlist1">
  705. Field 1
  706. </td>
  707. <td class="hdlist2">
  708. <p>'P'</p>
  709. </td>
  710. </tr>
  711. <tr>
  712. <td class="hdlist1">
  713. Field 2
  714. </td>
  715. <td class="hdlist2">
  716. <p>descriptive protocol name</p>
  717. </td>
  718. </tr>
  719. <tr>
  720. <td class="hdlist1">
  721. Field 3
  722. </td>
  723. <td class="hdlist2">
  724. <p>protocol abbreviation</p>
  725. </td>
  726. </tr>
  727. </table>
  728. </div>
  729. <div class="hdlist">
  730. <div class="title">Header Fields</div>
  731. <table>
  732. <tr>
  733. <td class="hdlist1">
  734. Field 1
  735. </td>
  736. <td class="hdlist2">
  737. <p>'F'</p>
  738. </td>
  739. </tr>
  740. <tr>
  741. <td class="hdlist1">
  742. Field 2
  743. </td>
  744. <td class="hdlist2">
  745. <p>descriptive field name</p>
  746. </td>
  747. </tr>
  748. <tr>
  749. <td class="hdlist1">
  750. Field 3
  751. </td>
  752. <td class="hdlist2">
  753. <p>field abbreviation</p>
  754. </td>
  755. </tr>
  756. <tr>
  757. <td class="hdlist1">
  758. Field 4
  759. </td>
  760. <td class="hdlist2">
  761. <p>type (textual representation of the ftenum type)</p>
  762. </td>
  763. </tr>
  764. <tr>
  765. <td class="hdlist1">
  766. Field 5
  767. </td>
  768. <td class="hdlist2">
  769. <p>parent protocol abbreviation</p>
  770. </td>
  771. </tr>
  772. <tr>
  773. <td class="hdlist1">
  774. Field 6
  775. </td>
  776. <td class="hdlist2">
  777. <p>base for display (for integer types); "parent bitfield width" for FT_BOOLEAN</p>
  778. </td>
  779. </tr>
  780. <tr>
  781. <td class="hdlist1">
  782. Field 7
  783. </td>
  784. <td class="hdlist2">
  785. <p>bitmask: format: hex: 0x&#8230;&#8203;.</p>
  786. </td>
  787. </tr>
  788. <tr>
  789. <td class="hdlist1">
  790. Field 8
  791. </td>
  792. <td class="hdlist2">
  793. <p>blurb describing field</p>
  794. </td>
  795. </tr>
  796. </table>
  797. </div>
  798. <div class="paragraph">
  799. <p><strong>folders</strong> Dumps various folders used by <strong>TShark</strong>. This is essentially the
  800. same data reported in Wireshark&#8217;s About | Folders tab.
  801. There is one record per line. The fields are tab-delimited.</p>
  802. </div>
  803. <div class="hdlist">
  804. <table>
  805. <tr>
  806. <td class="hdlist1">
  807. Field 1
  808. </td>
  809. <td class="hdlist2">
  810. <p>Folder type (e.g "Personal configuration:")</p>
  811. </td>
  812. </tr>
  813. <tr>
  814. <td class="hdlist1">
  815. Field 2
  816. </td>
  817. <td class="hdlist2">
  818. <p>Folder location (e.g. "/home/vagrant/.config/wireshark/")</p>
  819. </td>
  820. </tr>
  821. </table>
  822. </div>
  823. <div class="paragraph">
  824. <p><strong>ftypes</strong> Dumps the "ftypes" (fundamental types) understood by <strong>TShark</strong>.
  825. There is one record per line. The fields are tab-delimited.</p>
  826. </div>
  827. <div class="hdlist">
  828. <table>
  829. <tr>
  830. <td class="hdlist1">
  831. Field 1
  832. </td>
  833. <td class="hdlist2">
  834. <p>FTYPE (e.g "FT_IPv6")</p>
  835. </td>
  836. </tr>
  837. <tr>
  838. <td class="hdlist1">
  839. Field 2
  840. </td>
  841. <td class="hdlist2">
  842. <p>text description of type (e.g. "IPv6 address")</p>
  843. </td>
  844. </tr>
  845. </table>
  846. </div>
  847. <div class="paragraph">
  848. <p><strong>heuristic-decodes</strong> Dumps the heuristic decodes currently installed.
  849. There is one record per line. The fields are tab-delimited.</p>
  850. </div>
  851. <div class="hdlist">
  852. <table>
  853. <tr>
  854. <td class="hdlist1">
  855. Field 1
  856. </td>
  857. <td class="hdlist2">
  858. <p>underlying dissector (e.g. "tcp")</p>
  859. </td>
  860. </tr>
  861. <tr>
  862. <td class="hdlist1">
  863. Field 2
  864. </td>
  865. <td class="hdlist2">
  866. <p>name of heuristic decoder (e.g. ucp")</p>
  867. </td>
  868. </tr>
  869. <tr>
  870. <td class="hdlist1">
  871. Field 3
  872. </td>
  873. <td class="hdlist2">
  874. <p>heuristic enabled (e.g. "T" or "F")</p>
  875. </td>
  876. </tr>
  877. </table>
  878. </div>
  879. <div class="paragraph">
  880. <p><strong>help</strong> Displays the available report types.</p>
  881. </div>
  882. <div class="paragraph">
  883. <p><strong>plugins</strong> Dumps the plugins currently installed.
  884. There is one record per line. The fields are tab-delimited.</p>
  885. </div>
  886. <div class="hdlist">
  887. <table>
  888. <tr>
  889. <td class="hdlist1">
  890. Field 1
  891. </td>
  892. <td class="hdlist2">
  893. <p>plugin library/Lua script/extcap executable (e.g. "gryphon.so")</p>
  894. </td>
  895. </tr>
  896. <tr>
  897. <td class="hdlist1">
  898. Field 2
  899. </td>
  900. <td class="hdlist2">
  901. <p>plugin version (e.g. 0.0.4)</p>
  902. </td>
  903. </tr>
  904. <tr>
  905. <td class="hdlist1">
  906. Field 3
  907. </td>
  908. <td class="hdlist2">
  909. <p>plugin type ("dissector", "tap", "file type", etc.)</p>
  910. </td>
  911. </tr>
  912. <tr>
  913. <td class="hdlist1">
  914. Field 4
  915. </td>
  916. <td class="hdlist2">
  917. <p>full path to plugin file</p>
  918. </td>
  919. </tr>
  920. </table>
  921. </div>
  922. <div class="paragraph">
  923. <p><strong>protocols</strong> Dumps the protocols in the registration database to stdout.
  924. An independent program can take this output and format it into nice tables
  925. or HTML or whatever. There is one record per line. The fields are tab-delimited.</p>
  926. </div>
  927. <div class="hdlist">
  928. <table>
  929. <tr>
  930. <td class="hdlist1">
  931. Field 1
  932. </td>
  933. <td class="hdlist2">
  934. <p>protocol name</p>
  935. </td>
  936. </tr>
  937. <tr>
  938. <td class="hdlist1">
  939. Field 2
  940. </td>
  941. <td class="hdlist2">
  942. <p>protocol short name</p>
  943. </td>
  944. </tr>
  945. <tr>
  946. <td class="hdlist1">
  947. Field 3
  948. </td>
  949. <td class="hdlist2">
  950. <p>protocol filter name</p>
  951. </td>
  952. </tr>
  953. </table>
  954. </div>
  955. <div class="paragraph">
  956. <p><strong>values</strong> Dumps the value_strings, range_strings or true/false strings
  957. for fields that have them. There is one record per line. Fields are
  958. tab-delimited. There are three types of records: Value String, Range
  959. String and True/False String. The first field, 'V', 'R' or 'T', indicates
  960. the type of record.</p>
  961. </div>
  962. <div class="hdlist">
  963. <div class="title">Value Strings</div>
  964. <table>
  965. <tr>
  966. <td class="hdlist1">
  967. Field 1
  968. </td>
  969. <td class="hdlist2">
  970. <p>'V'</p>
  971. </td>
  972. </tr>
  973. <tr>
  974. <td class="hdlist1">
  975. Field 2
  976. </td>
  977. <td class="hdlist2">
  978. <p>field abbreviation to which this value string corresponds</p>
  979. </td>
  980. </tr>
  981. <tr>
  982. <td class="hdlist1">
  983. Field 3
  984. </td>
  985. <td class="hdlist2">
  986. <p>Integer value</p>
  987. </td>
  988. </tr>
  989. <tr>
  990. <td class="hdlist1">
  991. Field 4
  992. </td>
  993. <td class="hdlist2">
  994. <p>String</p>
  995. </td>
  996. </tr>
  997. </table>
  998. </div>
  999. <div class="hdlist">
  1000. <div class="title">Range Strings</div>
  1001. <table>
  1002. <tr>
  1003. <td class="hdlist1">
  1004. Field 1
  1005. </td>
  1006. <td class="hdlist2">
  1007. <p>'R'</p>
  1008. </td>
  1009. </tr>
  1010. <tr>
  1011. <td class="hdlist1">
  1012. Field 2
  1013. </td>
  1014. <td class="hdlist2">
  1015. <p>field abbreviation to which this range string corresponds</p>
  1016. </td>
  1017. </tr>
  1018. <tr>
  1019. <td class="hdlist1">
  1020. Field 3
  1021. </td>
  1022. <td class="hdlist2">
  1023. <p>Integer value: lower bound</p>
  1024. </td>
  1025. </tr>
  1026. <tr>
  1027. <td class="hdlist1">
  1028. Field 4
  1029. </td>
  1030. <td class="hdlist2">
  1031. <p>Integer value: upper bound</p>
  1032. </td>
  1033. </tr>
  1034. <tr>
  1035. <td class="hdlist1">
  1036. Field 5
  1037. </td>
  1038. <td class="hdlist2">
  1039. <p>String</p>
  1040. </td>
  1041. </tr>
  1042. </table>
  1043. </div>
  1044. <div class="hdlist">
  1045. <div class="title">True/False Strings</div>
  1046. <table>
  1047. <tr>
  1048. <td class="hdlist1">
  1049. Field 1
  1050. </td>
  1051. <td class="hdlist2">
  1052. <p>'T'</p>
  1053. </td>
  1054. </tr>
  1055. <tr>
  1056. <td class="hdlist1">
  1057. Field 2
  1058. </td>
  1059. <td class="hdlist2">
  1060. <p>field abbreviation to which this true/false string corresponds</p>
  1061. </td>
  1062. </tr>
  1063. <tr>
  1064. <td class="hdlist1">
  1065. Field 3
  1066. </td>
  1067. <td class="hdlist2">
  1068. <p>True String</p>
  1069. </td>
  1070. </tr>
  1071. <tr>
  1072. <td class="hdlist1">
  1073. Field 4
  1074. </td>
  1075. <td class="hdlist2">
  1076. <p>False String</p>
  1077. </td>
  1078. </tr>
  1079. </table>
  1080. </div>
  1081. </div>
  1082. </div>
  1083. </dd>
  1084. <dt class="hdlist1">-h|--help</dt>
  1085. <dd>
  1086. <div class="openblock">
  1087. <div class="content">
  1088. <div class="paragraph">
  1089. <p>Print the version and options and exit.</p>
  1090. </div>
  1091. </div>
  1092. </div>
  1093. </dd>
  1094. <dt class="hdlist1">-H &lt;input hosts file&gt;</dt>
  1095. <dd>
  1096. <div class="openblock">
  1097. <div class="content">
  1098. <div class="paragraph">
  1099. <p>Read a list of entries from a "hosts" file, which will then be written
  1100. to a capture file. Implies <strong>-W n</strong>. Can be called multiple times.</p>
  1101. </div>
  1102. <div class="paragraph">
  1103. <p>The "hosts" file format is documented at
  1104. <a href="https://en.wikipedia.org/wiki/Hosts_(file" class="bare">https://en.wikipedia.org/wiki/Hosts_(file</a>).</p>
  1105. </div>
  1106. </div>
  1107. </div>
  1108. </dd>
  1109. <dt class="hdlist1">-i|--interface &lt;capture interface&gt; | -</dt>
  1110. <dd>
  1111. <div class="openblock">
  1112. <div class="content">
  1113. <div class="paragraph">
  1114. <p>Set the name of the network interface or pipe to use for live packet
  1115. capture.</p>
  1116. </div>
  1117. <div class="paragraph">
  1118. <p>Network interface names should match one of the names listed in
  1119. "<strong>tshark -D</strong>" (described above); a number, as reported by
  1120. "<strong>tshark -D</strong>", can also be used. If you&#8217;re using UNIX, "<strong>netstat
  1121. -i</strong>", "<strong>ifconfig -a</strong>" or "<strong>ip link</strong>" might also work to list interface names,
  1122. although not all versions of UNIX support the <strong>-a</strong> option to <strong>ifconfig</strong>.</p>
  1123. </div>
  1124. <div class="paragraph">
  1125. <p>If no interface is specified, <strong>TShark</strong> searches the list of
  1126. interfaces, choosing the first non-loopback interface if there are any
  1127. non-loopback interfaces, and choosing the first loopback interface if
  1128. there are no non-loopback interfaces. If there are no interfaces at all,
  1129. <strong>TShark</strong> reports an error and doesn&#8217;t start the capture.</p>
  1130. </div>
  1131. <div class="paragraph">
  1132. <p>Pipe names should be either the name of a FIFO (named pipe) or "-" to
  1133. read data from the standard input. On Windows systems, pipe names must be
  1134. of the form "\\.\pipe\<strong>pipename</strong>". Data read from pipes must be in
  1135. standard pcapng or pcap format. Pcapng data must have the same
  1136. endianness as the capturing host.</p>
  1137. </div>
  1138. <div class="paragraph">
  1139. <p>"TCP@&lt;host&gt;:&lt;port&gt;" causes <strong>TShark</strong> to attempt to connect to the
  1140. specified port on the specified host and read pcapng or pcap data.</p>
  1141. </div>
  1142. <div class="paragraph">
  1143. <p>This option can occur multiple times. When capturing from multiple
  1144. interfaces, the capture file will be saved in pcapng format.</p>
  1145. </div>
  1146. </div>
  1147. </div>
  1148. </dd>
  1149. <dt class="hdlist1">-I|--monitor-mode</dt>
  1150. <dd>
  1151. <div class="openblock">
  1152. <div class="content">
  1153. <div class="paragraph">
  1154. <p>Put the interface in "monitor mode"; this is supported only on IEEE
  1155. 802.11 Wi-Fi interfaces, and supported only on some operating systems.</p>
  1156. </div>
  1157. <div class="paragraph">
  1158. <p>Note that in monitor mode the adapter might disassociate from the
  1159. network with which it&#8217;s associated, so that you will not be able to use
  1160. any wireless networks with that adapter. This could prevent accessing
  1161. files on a network server, or resolving host names or network addresses,
  1162. if you are capturing in monitor mode and are not connected to another
  1163. network with another adapter.</p>
  1164. </div>
  1165. <div class="paragraph">
  1166. <p>This option can occur multiple times. If used before the first
  1167. occurrence of the <strong>-i</strong> option, it enables the monitor mode for all interfaces.
  1168. If used after an <strong>-i</strong> option, it enables the monitor mode for
  1169. the interface specified by the last <strong>-i</strong> option occurring before
  1170. this option.</p>
  1171. </div>
  1172. </div>
  1173. </div>
  1174. </dd>
  1175. <dt class="hdlist1">-j &lt;protocol match filter&gt;</dt>
  1176. <dd>
  1177. <div class="openblock">
  1178. <div class="content">
  1179. <div class="paragraph">
  1180. <p>Protocol match filter used for ek|json|jsonraw|pdml output file types.
  1181. Only the protocol&#8217;s parent node is included. Child nodes are only
  1182. included if explicitly specified in the filter.</p>
  1183. </div>
  1184. <div class="paragraph">
  1185. <p>Example: <strong>tshark -j "ip ip.flags http"</strong></p>
  1186. </div>
  1187. </div>
  1188. </div>
  1189. </dd>
  1190. <dt class="hdlist1">-J &lt;protocol match filter&gt;</dt>
  1191. <dd>
  1192. <div class="openblock">
  1193. <div class="content">
  1194. <div class="paragraph">
  1195. <p>Protocol top level filter used for ek|json|jsonraw|pdml output file types.
  1196. The protocol&#8217;s parent node and all child nodes are included.
  1197. Lower-level protocols must be explicitly specified in the filter.</p>
  1198. </div>
  1199. <div class="paragraph">
  1200. <p>Example: <strong>tshark -J "tcp http"</strong></p>
  1201. </div>
  1202. </div>
  1203. </div>
  1204. </dd>
  1205. <dt class="hdlist1">-K &lt;keytab&gt;</dt>
  1206. <dd>
  1207. <div class="openblock">
  1208. <div class="content">
  1209. <div class="paragraph">
  1210. <p>Load kerberos crypto keys from the specified keytab file.
  1211. This option can be used multiple times to load keys from several files.</p>
  1212. </div>
  1213. <div class="paragraph">
  1214. <p>Example: <strong>tshark -K krb5.keytab</strong></p>
  1215. </div>
  1216. </div>
  1217. </div>
  1218. </dd>
  1219. <dt class="hdlist1">-l</dt>
  1220. <dd>
  1221. <div class="openblock">
  1222. <div class="content">
  1223. <div class="paragraph">
  1224. <p>Flush the standard output after the information for each packet is
  1225. printed. (This is not, strictly speaking, line-buffered if <strong>-V</strong>
  1226. was specified; however, it is the same as line-buffered if <strong>-V</strong> wasn&#8217;t
  1227. specified, as only one line is printed for each packet, and, as <strong>-l</strong> is
  1228. normally used when piping a live capture to a program or script, so that
  1229. output for a packet shows up as soon as the packet is seen and
  1230. dissected, it should work just as well as true line-buffering. We do
  1231. this as a workaround for a deficiency in the Microsoft Visual C++ C
  1232. library.)</p>
  1233. </div>
  1234. <div class="paragraph">
  1235. <p>This may be useful when piping the output of <strong>TShark</strong> to another
  1236. program, as it means that the program to which the output is piped will
  1237. see the dissected data for a packet as soon as <strong>TShark</strong> sees the
  1238. packet and generates that output, rather than seeing it only when the
  1239. standard output buffer containing that data fills up.</p>
  1240. </div>
  1241. </div>
  1242. </div>
  1243. </dd>
  1244. <dt class="hdlist1">-L|--list-data-link-types</dt>
  1245. <dd>
  1246. <div class="openblock">
  1247. <div class="content">
  1248. <div class="paragraph">
  1249. <p>List the data link types supported by the interface and exit. The reported
  1250. link types can be used for the <strong>-y</strong> option.</p>
  1251. </div>
  1252. </div>
  1253. </div>
  1254. </dd>
  1255. <dt class="hdlist1">-n</dt>
  1256. <dd>
  1257. <div class="openblock">
  1258. <div class="content">
  1259. <div class="paragraph">
  1260. <p>Disable network object name resolution (such as hostname, TCP and UDP port
  1261. names); the <strong>-N</strong> option might override this one.</p>
  1262. </div>
  1263. </div>
  1264. </div>
  1265. </dd>
  1266. <dt class="hdlist1">-N &lt;name resolving flags&gt;</dt>
  1267. <dd>
  1268. <div class="openblock">
  1269. <div class="content">
  1270. <div class="paragraph">
  1271. <p>Turn on name resolving only for particular types of addresses and port
  1272. numbers, with name resolving for other types of addresses and port
  1273. numbers turned off. This option overrides <strong>-n</strong> if both <strong>-N</strong> and <strong>-n</strong>
  1274. are present. This option and <strong>-n</strong> override the options from the preferences,
  1275. including preferences set via the <strong>-o</strong> option. If both <strong>-N</strong> and <strong>-n</strong> options
  1276. are not present, the values from the preferences are used, which default to
  1277. <strong>d</strong>, <strong>m</strong>, and <strong>N</strong> turned on and the other options turned off. (NB, <strong>N</strong> does
  1278. not actually do anything without <strong>n</strong> enabled as well.)</p>
  1279. </div>
  1280. <div class="paragraph">
  1281. <p>The argument is a string that may contain the letters:</p>
  1282. </div>
  1283. <div class="paragraph">
  1284. <p><strong>d</strong> to enable resolution from captured DNS packets</p>
  1285. </div>
  1286. <div class="paragraph">
  1287. <p><strong>m</strong> to enable MAC address resolution</p>
  1288. </div>
  1289. <div class="paragraph">
  1290. <p><strong>n</strong> to enable network address resolution</p>
  1291. </div>
  1292. <div class="paragraph">
  1293. <p><strong>N</strong> to enable using external resolvers (e.g., DNS) for network address
  1294. resolution; no effect without <strong>n</strong> also enabled</p>
  1295. </div>
  1296. <div class="paragraph">
  1297. <p><strong>t</strong> to enable transport-layer port number resolution</p>
  1298. </div>
  1299. <div class="paragraph">
  1300. <p><strong>v</strong> to enable VLAN IDs to names resolution</p>
  1301. </div>
  1302. </div>
  1303. </div>
  1304. </dd>
  1305. <dt class="hdlist1">-o &lt;preference&gt;:&lt;value&gt;</dt>
  1306. <dd>
  1307. <div class="openblock">
  1308. <div class="content">
  1309. <div class="paragraph">
  1310. <p>Set a preference value, overriding the default value and any value read
  1311. from a preference file. The argument to the option is a string of the
  1312. form <em>prefname:value</em>, where <em>prefname</em> is the name of the
  1313. preference (which is the same name that would appear in the preference
  1314. file), and <em>value</em> is the value to which it should be set.</p>
  1315. </div>
  1316. </div>
  1317. </div>
  1318. </dd>
  1319. <dt class="hdlist1">-O &lt;protocols&gt;</dt>
  1320. <dd>
  1321. <div class="openblock">
  1322. <div class="content">
  1323. <div class="paragraph">
  1324. <p>Similar to the <strong>-V</strong> option, but causes <strong>TShark</strong> to only show a
  1325. detailed view of the comma-separated list of <em>protocols</em> specified, and
  1326. show only the top-level detail line for all other protocols, rather than
  1327. a detailed view of all protocols. Use the output of "<strong>tshark -G
  1328. protocols</strong>" to find the abbreviations of the protocols you can specify.</p>
  1329. </div>
  1330. </div>
  1331. </div>
  1332. </dd>
  1333. <dt class="hdlist1">-p|--no-promiscuous-mode</dt>
  1334. <dd>
  1335. <div class="openblock">
  1336. <div class="content">
  1337. <div class="paragraph">
  1338. <p><em>Don&#8217;t</em> put the interface into promiscuous mode. Note that the
  1339. interface might be in promiscuous mode for some other reason; hence,
  1340. <strong>-p</strong> cannot be used to ensure that the only traffic that is captured is
  1341. traffic sent to or from the machine on which <strong>TShark</strong> is running,
  1342. broadcast traffic, and multicast traffic to addresses received by that
  1343. machine.</p>
  1344. </div>
  1345. <div class="paragraph">
  1346. <p>This option can occur multiple times. If used before the first
  1347. occurrence of the <strong>-i</strong> option, no interface will be put into the
  1348. promiscuous mode.
  1349. If used after an <strong>-i</strong> option, the interface specified by the last <strong>-i</strong>
  1350. option occurring before this option will not be put into the
  1351. promiscuous mode.</p>
  1352. </div>
  1353. </div>
  1354. </div>
  1355. </dd>
  1356. <dt class="hdlist1">-P|--print</dt>
  1357. <dd>
  1358. <div class="openblock">
  1359. <div class="content">
  1360. <div class="paragraph">
  1361. <p>Decode and display the packet summary or details, even if writing raw
  1362. packet data using the <strong>-w</strong> option, and even if packet output is
  1363. otherwise suppressed with <strong>-Q</strong>.</p>
  1364. </div>
  1365. </div>
  1366. </div>
  1367. </dd>
  1368. <dt class="hdlist1">-q</dt>
  1369. <dd>
  1370. <div class="openblock">
  1371. <div class="content">
  1372. <div class="paragraph">
  1373. <p>When capturing packets, don&#8217;t display the continuous count of packets
  1374. captured that is normally shown when saving a capture to a file;
  1375. instead, just display, at the end of the capture, a count of packets
  1376. captured. On systems that support the SIGINFO signal, such as various
  1377. BSDs, you can cause the current count to be displayed by typing your
  1378. "status" character (typically control-T, although it
  1379. might be set to "disabled" by default on at least some BSDs, so you&#8217;d
  1380. have to explicitly set it to use it).</p>
  1381. </div>
  1382. <div class="paragraph">
  1383. <p>When reading a capture file, or when capturing and not saving to a file,
  1384. don&#8217;t print packet information; this is useful if you&#8217;re using a <strong>-z</strong>
  1385. option to calculate statistics and don&#8217;t want the packet information
  1386. printed, just the statistics.</p>
  1387. </div>
  1388. </div>
  1389. </div>
  1390. </dd>
  1391. <dt class="hdlist1">-Q</dt>
  1392. <dd>
  1393. <div class="openblock">
  1394. <div class="content">
  1395. <div class="paragraph">
  1396. <p>When capturing packets, don&#8217;t display, on the standard error, the
  1397. initial message indicating on which interfaces the capture is being
  1398. done, the continuous count of packets captured shown when saving a
  1399. capture to a file, and the final message giving the count of packets
  1400. captured. Only true errors are displayed on the standard error.</p>
  1401. </div>
  1402. <div class="paragraph">
  1403. <p>only display true errors; don&#8217;t display the
  1404. initial message indicating the. This outputs less
  1405. than the <strong>-q</strong> option, so the interface name and total packet
  1406. count and the end of a capture are not sent to stderr.</p>
  1407. </div>
  1408. <div class="paragraph">
  1409. <p>When reading a capture file, or when capturing and not saving to a file,
  1410. don&#8217;t print packet information; this is useful if you&#8217;re using a <strong>-z</strong>
  1411. option to calculate statistics and don&#8217;t want the packet information
  1412. printed, just the statistics.</p>
  1413. </div>
  1414. </div>
  1415. </div>
  1416. </dd>
  1417. <dt class="hdlist1">-r|--read-file &lt;infile&gt;</dt>
  1418. <dd>
  1419. <div class="openblock">
  1420. <div class="content">
  1421. <div class="paragraph">
  1422. <p>Read packet data from <em>infile</em>, can be any supported capture file format
  1423. (including gzipped files). It is possible to use named pipes or stdin (-)
  1424. here but only with certain (not compressed) capture file formats (in
  1425. particular: those that can be read without seeking backwards).</p>
  1426. </div>
  1427. </div>
  1428. </div>
  1429. </dd>
  1430. <dt class="hdlist1">-R|--read-filter &lt;Read filter&gt;</dt>
  1431. <dd>
  1432. <div class="openblock">
  1433. <div class="content">
  1434. <div class="paragraph">
  1435. <p>Cause the specified filter (which uses the syntax of read/display filters,
  1436. rather than that of capture filters) to be applied during the first pass of
  1437. analysis. Packets not matching the filter are not considered for future
  1438. passes. Only makes sense with multiple passes, see -2. For regular filtering
  1439. on single-pass dissect see -Y instead.</p>
  1440. </div>
  1441. <div class="paragraph">
  1442. <p>Note that forward-looking fields such as 'response in frame #' cannot be used
  1443. with this filter, since they will not have been calculate when this filter is
  1444. applied.</p>
  1445. </div>
  1446. </div>
  1447. </div>
  1448. </dd>
  1449. <dt class="hdlist1">-s|--snapshot-length &lt;capture snaplen&gt;</dt>
  1450. <dd>
  1451. <div class="openblock">
  1452. <div class="content">
  1453. <div class="paragraph">
  1454. <p>Set the default snapshot length to use when capturing live data.
  1455. No more than <em>snaplen</em> bytes of each network packet will be read into
  1456. memory, or saved to disk. A value of 0 specifies a snapshot length of
  1457. 262144, so that the full packet is captured; this is the default.</p>
  1458. </div>
  1459. <div class="paragraph">
  1460. <p>This option can occur multiple times. If used before the first
  1461. occurrence of the <strong>-i</strong> option, it sets the default snapshot length.
  1462. If used after an <strong>-i</strong> option, it sets the snapshot length for
  1463. the interface specified by the last <strong>-i</strong> option occurring before
  1464. this option. If the snapshot length is not set specifically,
  1465. the default snapshot length is used if provided.</p>
  1466. </div>
  1467. </div>
  1468. </div>
  1469. </dd>
  1470. <dt class="hdlist1">-S &lt;separator&gt;</dt>
  1471. <dd>
  1472. <div class="openblock">
  1473. <div class="content">
  1474. <div class="paragraph">
  1475. <p>Set the line separator to be printed between packets.</p>
  1476. </div>
  1477. </div>
  1478. </div>
  1479. </dd>
  1480. <dt class="hdlist1">-t a|ad|adoy|d|dd|e|r|u|ud|udoy</dt>
  1481. <dd>
  1482. <div class="openblock">
  1483. <div class="content">
  1484. <div class="paragraph">
  1485. <p>Set the format of the packet timestamp printed in summary lines.
  1486. The format can be one of:</p>
  1487. </div>
  1488. <div class="paragraph">
  1489. <p><strong>a</strong> absolute: The absolute time, as local time in your time zone,
  1490. is the actual time the packet was captured, with no date displayed</p>
  1491. </div>
  1492. <div class="paragraph">
  1493. <p><strong>ad</strong> absolute with date: The absolute date, displayed as YYYY-MM-DD,
  1494. and time, as local time in your time zone, is the actual time and date
  1495. the packet was captured</p>
  1496. </div>
  1497. <div class="paragraph">
  1498. <p><strong>adoy</strong> absolute with date using day of year: The absolute date,
  1499. displayed as YYYY/DOY, and time, as local time in your time zone,
  1500. is the actual time and date the packet was captured</p>
  1501. </div>
  1502. <div class="paragraph">
  1503. <p><strong>d</strong> delta: The delta time is the time since the previous packet was
  1504. captured</p>
  1505. </div>
  1506. <div class="paragraph">
  1507. <p><strong>dd</strong> delta_displayed: The delta_displayed time is the time since the
  1508. previous displayed packet was captured</p>
  1509. </div>
  1510. <div class="paragraph">
  1511. <p><strong>e</strong> epoch: The time in seconds since epoch (Jan 1, 1970 00:00:00)</p>
  1512. </div>
  1513. <div class="paragraph">
  1514. <p><strong>r</strong> relative: The relative time is the time elapsed between the first packet
  1515. and the current packet</p>
  1516. </div>
  1517. <div class="paragraph">
  1518. <p><strong>u</strong> UTC: The absolute time, as UTC, is the actual time the packet was
  1519. captured, with no date displayed</p>
  1520. </div>
  1521. <div class="paragraph">
  1522. <p><strong>ud</strong> UTC with date: The absolute date, displayed as YYYY-MM-DD,
  1523. and time, as UTC, is the actual time and date the packet was captured</p>
  1524. </div>
  1525. <div class="paragraph">
  1526. <p><strong>udoy</strong> UTC with date using day of year: The absolute date, displayed
  1527. as YYYY/DOY, and time, as UTC, is the actual time and date the packet
  1528. was captured</p>
  1529. </div>
  1530. <div class="paragraph">
  1531. <p>The default format is relative.</p>
  1532. </div>
  1533. </div>
  1534. </div>
  1535. </dd>
  1536. <dt class="hdlist1">-T ek|fields|json|jsonraw|pdml|ps|psml|tabs|text</dt>
  1537. <dd>
  1538. <div class="openblock">
  1539. <div class="content">
  1540. <div class="paragraph">
  1541. <p>Set the format of the output when viewing decoded packet data. The
  1542. options are one of:</p>
  1543. </div>
  1544. <div class="paragraph">
  1545. <p><strong>ek</strong> Newline delimited JSON format for bulk import into Elasticsearch.
  1546. It can be used with <strong>-j</strong> or <strong>-J</strong> to specify
  1547. which protocols to include or with
  1548. <strong>-x</strong> to include raw hex-encoded packet data.
  1549. If <strong>-P</strong> is specified it will print the packet summary only, with both
  1550. <strong>-P</strong> and <strong>-V</strong> it will print the packet summary and packet details.
  1551. If neither <strong>-P</strong> or <strong>-V</strong> are used it will print the packet details only.
  1552. Example of usage to import data into Elasticsearch:</p>
  1553. </div>
  1554. <div class="literalblock">
  1555. <div class="content">
  1556. <pre>tshark -T ek -j "http tcp ip" -P -V -x -r file.pcap &gt; file.json
  1557. curl -H "Content-Type: application/x-ndjson" -XPOST http://elasticsearch:9200/_bulk --data-binary "@file.json"</pre>
  1558. </div>
  1559. </div>
  1560. <div class="paragraph">
  1561. <p>Elastic requires a mapping file to be loaded as template for packets-*
  1562. index in order to convert Wireshark types to elastic types. This file
  1563. can be auto-generated with the command "tshark -G elastic-mapping". Since
  1564. the mapping file can be huge, protocols can be selected by using the option
  1565. --elastic-mapping-filter:</p>
  1566. </div>
  1567. <div class="literalblock">
  1568. <div class="content">
  1569. <pre>tshark -G elastic-mapping --elastic-mapping-filter ip,udp,dns</pre>
  1570. </div>
  1571. </div>
  1572. <div class="paragraph">
  1573. <p><strong>fields</strong> The values of fields specified with the <strong>-e</strong> option, in a
  1574. form specified by the <strong>-E</strong> option. For example,</p>
  1575. </div>
  1576. <div class="literalblock">
  1577. <div class="content">
  1578. <pre>tshark -T fields -E separator=, -E quote=d</pre>
  1579. </div>
  1580. </div>
  1581. <div class="paragraph">
  1582. <p>would generate comma-separated values (CSV) output suitable for importing
  1583. into your favorite spreadsheet program.</p>
  1584. </div>
  1585. <div class="paragraph">
  1586. <p><strong>json</strong> JSON file format. It can be used with <strong>-j</strong> or <strong>-J</strong> to specify
  1587. which protocols to include or with <strong>-x</strong> option to include
  1588. raw hex-encoded packet data. Example of usage:</p>
  1589. </div>
  1590. <div class="literalblock">
  1591. <div class="content">
  1592. <pre>tshark -T json -r file.pcap
  1593. tshark -T json -j "http tcp ip" -x -r file.pcap</pre>
  1594. </div>
  1595. </div>
  1596. <div class="paragraph">
  1597. <p><strong>jsonraw</strong> JSON file format including only raw hex-encoded packet data.
  1598. It can be used with <strong>-j</strong> or <strong>-J</strong> to specify which protocols to include.
  1599. Example of usage:</p>
  1600. </div>
  1601. <div class="literalblock">
  1602. <div class="content">
  1603. <pre>tshark -T jsonraw -r file.pcap
  1604. tshark -T jsonraw -j "http tcp ip" -x -r file.pcap</pre>
  1605. </div>
  1606. </div>
  1607. <div class="paragraph">
  1608. <p><strong>pdml</strong> Packet Details Markup Language, an XML-based format for the
  1609. details of a decoded packet. This information is equivalent to the
  1610. packet details printed with the <strong>-V</strong> option. Using the --color option
  1611. will add color attributes to <strong>pdml</strong> output. These attributes are
  1612. nonstandard.</p>
  1613. </div>
  1614. <div class="paragraph">
  1615. <p><strong>ps</strong> PostScript for a human-readable one-line summary of each of the
  1616. packets, or a multi-line view of the details of each of the packets,
  1617. depending on whether the <strong>-V</strong> option was specified.</p>
  1618. </div>
  1619. <div class="paragraph">
  1620. <p><strong>psml</strong> Packet Summary Markup Language, an XML-based format for the summary
  1621. information of a decoded packet. This information is equivalent to the
  1622. information shown in the one-line summary printed by default.
  1623. Using the --color option will add color attributes to <strong>pdml</strong> output. These
  1624. attributes are nonstandard.</p>
  1625. </div>
  1626. <div class="paragraph">
  1627. <p><strong>tabs</strong> Similar to the default <strong>text</strong> report except the human-readable one-line
  1628. summary of each packet will include an ASCII horizontal tab (0x09) character
  1629. as a delimiter between each column.</p>
  1630. </div>
  1631. <div class="paragraph">
  1632. <p><strong>text</strong> Text of a human-readable one-line summary of each of the packets, or a
  1633. multi-line view of the details of each of the packets, depending on
  1634. whether the <strong>-V</strong> option was specified. This is the default.</p>
  1635. </div>
  1636. </div>
  1637. </div>
  1638. </dd>
  1639. <dt class="hdlist1">--temp-dir &lt;directory&gt;</dt>
  1640. <dd>
  1641. <div class="openblock">
  1642. <div class="content">
  1643. <div class="paragraph">
  1644. <p>Specifies the directory into which temporary files (including capture files)
  1645. are to be written. The default behaviour is to use your system&#8217;s temporary
  1646. directory (typically <em>/tmp</em> on Linux, and <em>C:\\Temp</em> on Windows).</p>
  1647. </div>
  1648. </div>
  1649. </div>
  1650. </dd>
  1651. <dt class="hdlist1">-u &lt;seconds type&gt;</dt>
  1652. <dd>
  1653. <div class="openblock">
  1654. <div class="content">
  1655. <div class="paragraph">
  1656. <p>Specifies the seconds type. Valid choices are:</p>
  1657. </div>
  1658. <div class="paragraph">
  1659. <p><strong>s</strong> for seconds</p>
  1660. </div>
  1661. <div class="paragraph">
  1662. <p><strong>hms</strong> for hours, minutes and seconds</p>
  1663. </div>
  1664. </div>
  1665. </div>
  1666. </dd>
  1667. <dt class="hdlist1">-U &lt;tap name&gt;</dt>
  1668. <dd>
  1669. <div class="openblock">
  1670. <div class="content">
  1671. <div class="paragraph">
  1672. <p>PDUs export, exports PDUs from infile to outfile according to the tap
  1673. name given. Use -Y to filter.</p>
  1674. </div>
  1675. <div class="paragraph">
  1676. <p>Enter an empty tap name "" or a tap name of ? to get a list of available
  1677. names.</p>
  1678. </div>
  1679. </div>
  1680. </div>
  1681. </dd>
  1682. <dt class="hdlist1">-v|--version</dt>
  1683. <dd>
  1684. <div class="openblock">
  1685. <div class="content">
  1686. <div class="paragraph">
  1687. <p>Print the version and exit.</p>
  1688. </div>
  1689. </div>
  1690. </div>
  1691. </dd>
  1692. <dt class="hdlist1">-V</dt>
  1693. <dd>
  1694. <div class="openblock">
  1695. <div class="content">
  1696. <div class="paragraph">
  1697. <p>Cause <strong>TShark</strong> to print a view of the packet details.</p>
  1698. </div>
  1699. </div>
  1700. </div>
  1701. </dd>
  1702. <dt class="hdlist1">-w &lt;outfile&gt; | -</dt>
  1703. <dd>
  1704. <div class="openblock">
  1705. <div class="content">
  1706. <div class="paragraph">
  1707. <p>Write raw packet data to <em>outfile</em> or to the standard output if
  1708. <em>outfile</em> is '-'.</p>
  1709. </div>
  1710. <div class="admonitionblock note">
  1711. <table>
  1712. <tr>
  1713. <td class="icon">
  1714. <div class="title">Note</div>
  1715. </td>
  1716. <td class="content">
  1717. -w provides raw packet data, not text. If you want text output
  1718. you need to redirect stdout (e.g. using '&gt;'), don&#8217;t use the <strong>-w</strong>
  1719. option for this.
  1720. </td>
  1721. </tr>
  1722. </table>
  1723. </div>
  1724. </div>
  1725. </div>
  1726. </dd>
  1727. <dt class="hdlist1">-W &lt;file format option&gt;</dt>
  1728. <dd>
  1729. <div class="openblock">
  1730. <div class="content">
  1731. <div class="paragraph">
  1732. <p>Save extra information in the file if the format supports it. For
  1733. example,</p>
  1734. </div>
  1735. <div class="literalblock">
  1736. <div class="content">
  1737. <pre>tshark -F pcapng -W n</pre>
  1738. </div>
  1739. </div>
  1740. <div class="paragraph">
  1741. <p>will save host name resolution records along with captured packets.</p>
  1742. </div>
  1743. <div class="paragraph">
  1744. <p>Future versions of <strong>TShark</strong> may automatically change the capture format
  1745. to <strong>pcapng</strong> as needed.</p>
  1746. </div>
  1747. <div class="paragraph">
  1748. <p>The argument is a string that may contain the following letter:</p>
  1749. </div>
  1750. <div class="paragraph">
  1751. <p><strong>n</strong> write network address resolution information (pcapng only)</p>
  1752. </div>
  1753. </div>
  1754. </div>
  1755. </dd>
  1756. <dt class="hdlist1">-x</dt>
  1757. <dd>
  1758. <div class="openblock">
  1759. <div class="content">
  1760. <div class="paragraph">
  1761. <p>Cause <strong>TShark</strong> to print a hex and ASCII dump of the packet data
  1762. after printing the summary and/or details, if either are also being displayed.</p>
  1763. </div>
  1764. </div>
  1765. </div>
  1766. </dd>
  1767. <dt class="hdlist1">--hexdump &lt;hexoption&gt;</dt>
  1768. <dd>
  1769. <div class="openblock">
  1770. <div class="content">
  1771. <div class="paragraph">
  1772. <p>Cause <strong>TShark</strong> to print a hex and ASCII dump of the packet data
  1773. with the ability to select which data sources to dump and how to
  1774. format or exclude the ASCII dump text.</p>
  1775. </div>
  1776. <div class="paragraph">
  1777. <p>This option can be used multiple times where the data source <strong>&lt;hexoption&gt;</strong>
  1778. is <strong>all</strong> or <strong>frames</strong> and the ASCII dump text <strong>&lt;hexoption&gt;</strong> is <strong>ascii</strong>,
  1779. <strong>delimit</strong>, <strong>noascii</strong>.</p>
  1780. </div>
  1781. <div class="literalblock">
  1782. <div class="content">
  1783. <pre>Example: tshark ... --hexdump frames --hexdump delimit ...</pre>
  1784. </div>
  1785. </div>
  1786. <div class="dlist">
  1787. <dl>
  1788. <dt class="hdlist1"><strong>all</strong></dt>
  1789. <dd>
  1790. <p>Enable hexdump, generate hexdump blocks for all data sources associated
  1791. with each frame. Used to negate earlier use of <code>--hexdump frames</code>.
  1792. The <strong>-x</strong> option displays all data sources by default.</p>
  1793. </dd>
  1794. <dt class="hdlist1"><strong>frames</strong></dt>
  1795. <dd>
  1796. <p>Enable hexdump, generate hexdump blocks only for the frame data. Use
  1797. this option to exclude, from hexdump output, any hexdump blocks for
  1798. secondary data sources such as 'Bitstring tvb', 'Reassembled TCP',
  1799. 'De-chunked entity body', etc.</p>
  1800. </dd>
  1801. <dt class="hdlist1"><strong>ascii</strong></dt>
  1802. <dd>
  1803. <p>Enable hexdump, with undelimited ASCII dump text. Used to negate earlier
  1804. use of <code>--hexdump delimit</code> or <code>--hexdump noascii</code>. The <strong>-x</strong> option
  1805. displays undelimited ASCII dump text by default.</p>
  1806. </dd>
  1807. <dt class="hdlist1"><strong>delimit</strong></dt>
  1808. <dd>
  1809. <p>Enable hexdump with the ASCII dump text delimited with '|' characters.
  1810. This is useful to unambiguously determine the last of the hex byte text
  1811. and start of the ASCII dump text.</p>
  1812. </dd>
  1813. <dt class="hdlist1"><strong>noascii</strong></dt>
  1814. <dd>
  1815. <p>Enable hexdump without printing any ASCII dump text.</p>
  1816. </dd>
  1817. <dt class="hdlist1"><strong>help</strong></dt>
  1818. <dd>
  1819. <p>Display --hexdump specific help then exit.</p>
  1820. </dd>
  1821. </dl>
  1822. </div>
  1823. <div class="paragraph">
  1824. <p>The use of <strong>--hexdump &lt;hexoption&gt;</strong> is particularly useful to generate output
  1825. that can be used to create a pcap or pcapng file from a capture file type such
  1826. as Microsoft NetMon 2.x which <strong>TShark</strong> and <strong>Wireshark</strong> can read but can not
  1827. directly do a "Save as" nor export packets from.</p>
  1828. </div>
  1829. <div class="paragraph">
  1830. <p>Examples:</p>
  1831. </div>
  1832. <div class="paragraph">
  1833. <p>Generate hexdump output, with only the frame data source, with delimited ASCII
  1834. dump text, with each frame hex block preceeded by a human readable timestamp that
  1835. is directly usable by the <strong>text2pcap</strong> utility:</p>
  1836. </div>
  1837. <div class="literalblock">
  1838. <div class="content">
  1839. <pre>tshark ... --hexdump frames --hexdump delimit \
  1840. -P -t ad -o gui.column.format:"Time","%t" \
  1841. | text2pcap -n -t '%F %T.%f' - MYNEWPCAPNG</pre>
  1842. </div>
  1843. </div>
  1844. <div class="paragraph">
  1845. <p>Generate hexdump output, with only the frame data source, with no ASCII dump text,
  1846. with each frame hex block preceeded by an epoch timestamp that is directly
  1847. usable by the <strong>text2pcap</strong> utility:</p>
  1848. </div>
  1849. <div class="literalblock">
  1850. <div class="content">
  1851. <pre>tshark ... --hexdump frames --hexdump noascii \
  1852. -P -t e -o gui.column.format:"Time","%t" \
  1853. | text2pcap -n -t %s.%f - MYNEWPCAPNG</pre>
  1854. </div>
  1855. </div>
  1856. </div>
  1857. </div>
  1858. </dd>
  1859. <dt class="hdlist1">-X &lt;eXtension options&gt;</dt>
  1860. <dd>
  1861. <div class="openblock">
  1862. <div class="content">
  1863. <div class="paragraph">
  1864. <p>Specify an option to be passed to a <strong>TShark</strong> module. The eXtension option
  1865. is in the form <em>extension_key:value</em>, where <em>extension_key</em> can be:</p>
  1866. </div>
  1867. <div class="paragraph">
  1868. <p><strong>lua_script</strong>:<em>lua_script_filename</em> tells <strong>TShark</strong> to load the given script in
  1869. addition to the default Lua scripts.</p>
  1870. </div>
  1871. <div class="paragraph">
  1872. <p><strong>lua_script</strong><em>num</em>:<em>argument</em> tells <strong>TShark</strong> to pass the given argument
  1873. to the lua script identified by 'num', which is the number indexed order of the
  1874. 'lua_script' command. For example, if only one script was loaded with
  1875. '-X lua_script:my.lua', then '-X lua_script1:foo' will pass the string 'foo' to
  1876. the 'my.lua' script. If two scripts were loaded, such as '-X lua_script:my.lua'
  1877. and '-X lua_script:other.lua' in that order, then a '-X lua_script2:bar' would
  1878. pass the string 'bar' to the second lua script, namely 'other.lua'.</p>
  1879. </div>
  1880. <div class="paragraph">
  1881. <p><strong>read_format</strong>:<em>file_format</em> tells <strong>TShark</strong> to use the given file format to
  1882. read in the file (the file given in the <strong>-r</strong> command option). Providing no
  1883. <em>file_format</em> argument, or an invalid one, will produce a list of available
  1884. file formats to use. For example,</p>
  1885. </div>
  1886. <div class="literalblock">
  1887. <div class="content">
  1888. <pre>tshark -r rtcp_broken.pcapng -X read_format:"MIME Files Format" -V</pre>
  1889. </div>
  1890. </div>
  1891. <div class="paragraph">
  1892. <p>will display the internal file structure and allow access to the
  1893. <code>file-pcapng</code> fields.</p>
  1894. </div>
  1895. </div>
  1896. </div>
  1897. </dd>
  1898. <dt class="hdlist1">-y|--linktype &lt;capture link type&gt;</dt>
  1899. <dd>
  1900. <div class="openblock">
  1901. <div class="content">
  1902. <div class="paragraph">
  1903. <p>Set the data link type to use while capturing packets. The values
  1904. reported by <strong>-L</strong> are the values that can be used.</p>
  1905. </div>
  1906. <div class="paragraph">
  1907. <p>This option can occur multiple times. If used before the first
  1908. occurrence of the <strong>-i</strong> option, it sets the default capture link type.
  1909. If used after an <strong>-i</strong> option, it sets the capture link type for
  1910. the interface specified by the last <strong>-i</strong> option occurring before
  1911. this option. If the capture link type is not set specifically,
  1912. the default capture link type is used if provided.</p>
  1913. </div>
  1914. </div>
  1915. </div>
  1916. </dd>
  1917. <dt class="hdlist1">-Y|--display-filter &lt;displaY filter&gt;</dt>
  1918. <dd>
  1919. <div class="openblock">
  1920. <div class="content">
  1921. <div class="paragraph">
  1922. <p>Cause the specified filter (which uses the syntax of read/display filters,
  1923. rather than that of capture filters) to be applied before printing a
  1924. decoded form of packets or writing packets to a file. Packets matching the
  1925. filter are printed or written to file; packets that the matching packets
  1926. depend upon (e.g., fragments), are not printed but are written to file;
  1927. packets not matching the filter nor depended upon are discarded rather
  1928. than being printed or written.</p>
  1929. </div>
  1930. <div class="paragraph">
  1931. <p>Use this instead of -R for filtering using single-pass analysis. If doing
  1932. two-pass analysis (see -2) then only packets matching the read filter (if there
  1933. is one) will be checked against this filter.</p>
  1934. </div>
  1935. </div>
  1936. </div>
  1937. </dd>
  1938. <dt class="hdlist1">-M &lt;auto session reset&gt;</dt>
  1939. <dd>
  1940. <div class="openblock">
  1941. <div class="content">
  1942. <div class="paragraph">
  1943. <p>Automatically reset internal session when reached to specified number of packets.
  1944. For example,</p>
  1945. </div>
  1946. <div class="literalblock">
  1947. <div class="content">
  1948. <pre>tshark -M 100000</pre>
  1949. </div>
  1950. </div>
  1951. <div class="paragraph">
  1952. <p>will reset session every 100000 packets.</p>
  1953. </div>
  1954. <div class="paragraph">
  1955. <p>This feature does not support -2 two-pass analysis</p>
  1956. </div>
  1957. </div>
  1958. </div>
  1959. </dd>
  1960. <dt class="hdlist1">-z &lt;statistics&gt;</dt>
  1961. <dd>
  1962. <div class="openblock">
  1963. <div class="content">
  1964. <div class="paragraph">
  1965. <p>Get <strong>TShark</strong> to collect various types of statistics and display the
  1966. result after finishing reading the capture file. Use the <strong>-q</strong> option
  1967. if you&#8217;re reading a capture file and only want the statistics printed,
  1968. not any per-packet information.</p>
  1969. </div>
  1970. <div class="paragraph">
  1971. <p>Statistics are calculated independently of the normal per-packet output,
  1972. unaffected by the main display filter. However, most have their own
  1973. optional <em>filter</em> parameter, and only packets that match that filter (and
  1974. any capture filter or read filter) will be used in the calculations.</p>
  1975. </div>
  1976. <div class="paragraph">
  1977. <p>Note that the <strong>-z proto</strong> option is different - it doesn&#8217;t cause
  1978. statistics to be gathered and printed when the capture is complete, it
  1979. modifies the regular packet summary output to include the values of
  1980. fields specified with the option. Therefore you must not use the <strong>-q</strong>
  1981. option, as that option would suppress the printing of the regular packet
  1982. summary output, and must also not use the <strong>-V</strong> option, as that would
  1983. cause packet detail information rather than packet summary information
  1984. to be printed.</p>
  1985. </div>
  1986. <div class="paragraph">
  1987. <p>Some of the currently implemented statistics are:</p>
  1988. </div>
  1989. </div>
  1990. </div>
  1991. </dd>
  1992. <dt class="hdlist1"><strong>-z help</strong></dt>
  1993. <dd>
  1994. <div class="openblock">
  1995. <div class="content">
  1996. <div class="paragraph">
  1997. <p>Display all possible values for <strong>-z</strong>.</p>
  1998. </div>
  1999. </div>
  2000. </div>
  2001. </dd>
  2002. <dt class="hdlist1"><strong>-z</strong> afp,srt[,<em>filter</em>]</dt>
  2003. <dd>
  2004. <div class="openblock">
  2005. <div class="content">
  2006. <div class="paragraph">
  2007. <p>Show Apple Filing Protocol service response time statistics.</p>
  2008. </div>
  2009. </div>
  2010. </div>
  2011. </dd>
  2012. <dt class="hdlist1"><strong>-z</strong> ancp,tree[,<em>filter</em>]</dt>
  2013. <dd>
  2014. <div class="openblock">
  2015. <div class="content">
  2016. <div class="paragraph">
  2017. <p>Calculate statistics on Access Node Control Protocol message types
  2018. and adjacency packet codes.</p>
  2019. </div>
  2020. </div>
  2021. </div>
  2022. </dd>
  2023. <dt class="hdlist1"><strong>-z</strong> ansi_a,bsmap[,<em>filter</em>]</dt>
  2024. <dd>
  2025. <div class="openblock">
  2026. <div class="content">
  2027. <div class="paragraph">
  2028. <p>Count the number of ANSI A-I/F BSMAP messages of each type.</p>
  2029. </div>
  2030. </div>
  2031. </div>
  2032. </dd>
  2033. <dt class="hdlist1"><strong>-z</strong> ansi_a,dtap[,<em>filter</em>]</dt>
  2034. <dd>
  2035. <div class="openblock">
  2036. <div class="content">
  2037. <div class="paragraph">
  2038. <p>Count the number of ANSI A-I/F DTAP messages of each type.</p>
  2039. </div>
  2040. </div>
  2041. </div>
  2042. </dd>
  2043. <dt class="hdlist1"><strong>-z</strong> ansi_map[,<em>filter</em>]</dt>
  2044. <dd>
  2045. <div class="openblock">
  2046. <div class="content">
  2047. <div class="paragraph">
  2048. <p>Count the number of ANSI MAP messages of each type, and calculate the
  2049. total number of bytes and average bytes of each message type.</p>
  2050. </div>
  2051. </div>
  2052. </div>
  2053. </dd>
  2054. <dt class="hdlist1"><strong>-z</strong> asap,stat[,<em>filter</em>]</dt>
  2055. <dd>
  2056. <div class="openblock">
  2057. <div class="content">
  2058. <div class="paragraph">
  2059. <p>Calculate statistics on Aggregate Service Access Protocol (ASAP).
  2060. For each ASAP message type, displays the number, rate, and share among
  2061. all ASAP message types of both packets and bytes, and the first and last
  2062. time that it is seen.</p>
  2063. </div>
  2064. </div>
  2065. </div>
  2066. </dd>
  2067. <dt class="hdlist1"><strong>-z</strong> bacapp_instanceid,tree[,<em>filter</em>]</dt>
  2068. <dd>
  2069. <div class="openblock">
  2070. <div class="content">
  2071. <div class="paragraph">
  2072. <p>Calculate statistics on BACnet APDUs, collated by instance ID.
  2073. Displayed information includes source and destination address and
  2074. service type.</p>
  2075. </div>
  2076. </div>
  2077. </div>
  2078. </dd>
  2079. <dt class="hdlist1"><strong>-z</strong> bacapp_ip,tree[,<em>filter</em>]</dt>
  2080. <dd>
  2081. <div class="openblock">
  2082. <div class="content">
  2083. <div class="paragraph">
  2084. <p>Calculate statistics on BACnet APDUs, collated by source and destination
  2085. address. Displayed information includes service type, object ID, and
  2086. instance ID.</p>
  2087. </div>
  2088. </div>
  2089. </div>
  2090. </dd>
  2091. <dt class="hdlist1"><strong>-z</strong> bacapp_objectid,tree[,<em>filter</em>]</dt>
  2092. <dd>
  2093. <div class="openblock">
  2094. <div class="content">
  2095. <div class="paragraph">
  2096. <p>Calculate statistics on BACnet APDUs, collated by object ID.
  2097. Displayed information includes source and destination address,
  2098. service type, and instance ID.</p>
  2099. </div>
  2100. </div>
  2101. </div>
  2102. </dd>
  2103. <dt class="hdlist1"><strong>-z</strong> bacapp_service,tree[,<em>filter</em>]</dt>
  2104. <dd>
  2105. <div class="openblock">
  2106. <div class="content">
  2107. <div class="paragraph">
  2108. <p>Calculate statistics on BACnet APDUs, collated by service type.
  2109. Displayed information includes source and destination address,
  2110. object ID, and instance ID.</p>
  2111. </div>
  2112. </div>
  2113. </div>
  2114. </dd>
  2115. <dt class="hdlist1"><strong>-z</strong> calcappprotocol,stat[,<em>filter</em>]</dt>
  2116. <dd>
  2117. <div class="openblock">
  2118. <div class="content">
  2119. <div class="paragraph">
  2120. <p>Calculate statistics on the Calculation Application Protocol of
  2121. Reliable Server Pooling. For each message type, displays the number,
  2122. rate, and share among all message types of both packets and bytes,
  2123. and the first and last time that it is seen.</p>
  2124. </div>
  2125. </div>
  2126. </div>
  2127. </dd>
  2128. <dt class="hdlist1"><strong>-z</strong> camel,counter[,<em>filter</em>]</dt>
  2129. <dd>
  2130. <div class="openblock">
  2131. <div class="content">
  2132. <div class="paragraph">
  2133. <p>Count the number of CAMEL messages for each opcode.</p>
  2134. </div>
  2135. </div>
  2136. </div>
  2137. </dd>
  2138. <dt class="hdlist1"><strong>-z</strong> camel,srt[,<em>filter</em>]</dt>
  2139. <dd>
  2140. <div class="openblock">
  2141. <div class="content">
  2142. <div class="paragraph">
  2143. <p>Collect requests/response SRT (Service Response Time) data for CAMEL.
  2144. Data collected is number of request messages with corresponding response
  2145. of each CAMEL message type, along with the minimum, maximum, and average
  2146. response time.</p>
  2147. </div>
  2148. </div>
  2149. </div>
  2150. </dd>
  2151. <dt class="hdlist1"><strong>-z</strong> collectd,tree[,<em>filter</em>]</dt>
  2152. <dd>
  2153. <div class="openblock">
  2154. <div class="content">
  2155. <div class="paragraph">
  2156. <p>Calculate statistics for collectd. The gathered statistics are the number
  2157. of collectd packets and the total number of value segments, along with the
  2158. host, plugin, and type of the values.</p>
  2159. </div>
  2160. </div>
  2161. </div>
  2162. </dd>
  2163. <dt class="hdlist1"><strong>-z</strong> componentstatusprotocol,stat[,<em>filter</em>]</dt>
  2164. <dd>
  2165. <div class="openblock">
  2166. <div class="content">
  2167. <div class="paragraph">
  2168. <p>Calculate statistics on the Calculation Status Protocol of Reliable
  2169. Server Pooling. For each message type, displays the number, rate
  2170. and share among all message types of both packets and bytes, and the
  2171. first and last time that it is seen.</p>
  2172. </div>
  2173. </div>
  2174. </div>
  2175. </dd>
  2176. <dt class="hdlist1"><strong>-z</strong> conv,<em>type</em>[,<em>filter</em>]</dt>
  2177. <dd>
  2178. <div class="openblock">
  2179. <div class="content">
  2180. <div class="paragraph">
  2181. <p>Create a table that lists all conversations that could be seen in the
  2182. capture. <em>type</em> specifies the conversation endpoint type for which we
  2183. want to generate the statistics; currently the supported ones are:</p>
  2184. </div>
  2185. <div class="literalblock">
  2186. <div class="content">
  2187. <pre>"bluetooth" Bluetooth addresses
  2188. "dccp" DCCP/IP socket pairs Both IPv4 and IPv6 are supported
  2189. "eth" Ethernet addresses
  2190. "fc" Fibre Channel addresses
  2191. "fddi" FDDI addresses
  2192. "ip" IPv4 addresses
  2193. "ipv6" IPv6 addresses
  2194. "ipx" IPX addresses
  2195. "jxta" JXTA message addresses
  2196. "mptcp" Multipath TCP connections
  2197. "ncp" NCP connections
  2198. "rsvp" RSVP connections
  2199. "sctp" SCTP/IP socket pairs Both IPv4 and IPv6 are supported
  2200. "sll" Linux "cooked mode" capture addresses
  2201. "tcp" TCP/IP socket pairs Both IPv4 and IPv6 are supported
  2202. "tr" Token Ring addresses
  2203. "udp" UDP/IP socket pairs Both IPv4 and IPv6 are supported
  2204. "usb" USB addresses
  2205. "wlan" IEEE 802.11 addresses
  2206. "wpan" IEEE 802.15.4 addresses
  2207. "zbee_nwk" ZigBee Network Layer addresses</pre>
  2208. </div>
  2209. </div>
  2210. <div class="paragraph">
  2211. <p>The table is presented with one line for each conversation which displays
  2212. the number of frames/bytes in each direction, the total number of
  2213. frames/bytes, relative start time and duration.
  2214. The table is sorted according to the total number of frames.</p>
  2215. </div>
  2216. </div>
  2217. </div>
  2218. </dd>
  2219. <dt class="hdlist1"><strong>-z</strong> credentials</dt>
  2220. <dd>
  2221. <div class="openblock">
  2222. <div class="content">
  2223. <div class="paragraph">
  2224. <p>Collect credentials (username/passwords) from packets. The report includes
  2225. the packet number, the protocol that had that credential, the username and
  2226. the password. For protocols just using one single field as authentication,
  2227. this is provided as a password and a placeholder in place of the user.
  2228. Currently implemented protocols include FTP, HTTP, IMAP, POP, and SMTP.</p>
  2229. </div>
  2230. </div>
  2231. </div>
  2232. </dd>
  2233. <dt class="hdlist1"><strong>-z</strong> dcerpc,srt,<em>uuid</em>,<em>major</em>.<em>minor</em>[,<em>filter</em>]</dt>
  2234. <dd>
  2235. <div class="openblock">
  2236. <div class="content">
  2237. <div class="paragraph">
  2238. <p>Collect call/reply SRT (Service Response Time) data for DCERPC interface <em>uuid</em>,
  2239. version <em>major</em>.<em>minor</em>.
  2240. Data collected is the number of calls for each procedure, MinSRT, MaxSRT
  2241. and AvgSRT.</p>
  2242. </div>
  2243. <div class="paragraph">
  2244. <p>Example: <span class="nowrap"><strong>-z dcerpc,srt,12345778-1234-abcd-ef00-0123456789ac,1.0</strong></span> will
  2245. collect data for the CIFS SAMR Interface.</p>
  2246. </div>
  2247. <div class="paragraph">
  2248. <p>This option can be used multiple times on the command line.</p>
  2249. </div>
  2250. <div class="paragraph">
  2251. <p>Example: <span class="nowrap"><strong>-z dcerpc,srt,12345778-1234-abcd-ef00-0123456789ac,1.0,ip.addr==1.2.3.4</strong></span> will collect SAMR
  2252. SRT statistics for a specific host.</p>
  2253. </div>
  2254. </div>
  2255. </div>
  2256. </dd>
  2257. <dt class="hdlist1"><strong>-z</strong> dests,tree[,<em>filter</em>]</dt>
  2258. <dd>
  2259. <div class="openblock">
  2260. <div class="content">
  2261. <div class="paragraph">
  2262. <p>Calculate statistics on IPv4 destination addresses and the protocols
  2263. and ports appearing on each address.</p>
  2264. </div>
  2265. </div>
  2266. </div>
  2267. </dd>
  2268. <dt class="hdlist1"><strong>-z</strong> dhcp,stat[,<em>filter</em>]</dt>
  2269. <dd>
  2270. <div class="openblock">
  2271. <div class="content">
  2272. <div class="paragraph">
  2273. <p>Show DHCP (BOOTP) statistics.</p>
  2274. </div>
  2275. </div>
  2276. </div>
  2277. </dd>
  2278. <dt class="hdlist1"><strong>-z</strong> diameter,avp[,<em>cmd.code</em>,<em>field</em>,<em>field</em>,<em>&#8230;&#8203;</em>]</dt>
  2279. <dd>
  2280. <div class="openblock">
  2281. <div class="content">
  2282. <div class="paragraph">
  2283. <p>This option enables extraction of most important diameter fields from large
  2284. capture files. Exactly one text line for each diameter message with matched
  2285. <strong>diameter.cmd.code</strong> will be printed.</p>
  2286. </div>
  2287. <div class="paragraph">
  2288. <p>Empty diameter command code or '*' can be specified to match any <strong>diameter.cmd.code</strong></p>
  2289. </div>
  2290. <div class="paragraph">
  2291. <p>Example: <strong>-z diameter,avp</strong> extract default field set from diameter messages.</p>
  2292. </div>
  2293. <div class="paragraph">
  2294. <p>Example: <strong>-z diameter,avp,280</strong> extract default field set from diameter DWR messages.</p>
  2295. </div>
  2296. <div class="paragraph">
  2297. <p>Example: <strong>-z diameter,avp,272</strong> extract default field set from diameter CC messages.</p>
  2298. </div>
  2299. <div class="paragraph">
  2300. <p>Extract most important fields from diameter CC messages:</p>
  2301. </div>
  2302. <div class="paragraph">
  2303. <p><strong>tshark -r file.cap.gz -q -z diameter,avp,272,CC-Request-Type,CC-Request-Number,Session-Id,Subscription-Id-Data,Rating-Group,Result-Code</strong></p>
  2304. </div>
  2305. <div class="paragraph">
  2306. <p>Following fields will be printed out for each diameter message:</p>
  2307. </div>
  2308. <div class="literalblock">
  2309. <div class="content">
  2310. <pre>"frame" Frame number.
  2311. "time" Unix time of the frame arrival.
  2312. "src" Source address.
  2313. "srcport" Source port.
  2314. "dst" Destination address.
  2315. "dstport" Destination port.
  2316. "proto" Constant string 'diameter', which can be used for post processing of tshark output. E.g. grep/sed/awk.
  2317. "msgnr" seq. number of diameter message within the frame. E.g. '2' for the third diameter message in the same frame.
  2318. "is_request" '0' if message is a request, '1' if message is an answer.
  2319. "cmd" diameter.cmd_code, E.g. '272' for credit control messages.
  2320. "req_frame" Number of frame where matched request was found or '0'.
  2321. "ans_frame" Number of frame where matched answer was found or '0'.
  2322. "resp_time" response time in seconds, '0' in case if matched Request/Answer is not found in trace. E.g. in the begin or end of capture.</pre>
  2323. </div>
  2324. </div>
  2325. <div class="paragraph">
  2326. <p><strong>-z diameter,avp</strong> option is much faster than <strong>-V -T text</strong> or <strong>-T pdml</strong> options.</p>
  2327. </div>
  2328. <div class="paragraph">
  2329. <p><strong>-z diameter,avp</strong> option is more powerful than <strong>-T field</strong> and <strong>-z proto,colinfo</strong> options.</p>
  2330. </div>
  2331. <div class="paragraph">
  2332. <p>Multiple diameter messages in one frame are supported.</p>
  2333. </div>
  2334. <div class="paragraph">
  2335. <p>Several fields with same name within one diameter message are supported, e.g.
  2336. <em>diameter.Subscription-Id-Data</em> or <em>diameter.Rating-Group</em>.</p>
  2337. </div>
  2338. <div class="paragraph">
  2339. <p>Note: <strong>tshark -q</strong> option is recommended to suppress default <strong>TShark</strong> output.</p>
  2340. </div>
  2341. </div>
  2342. </div>
  2343. </dd>
  2344. <dt class="hdlist1"><strong>-z</strong> diameter,srt[,<em>filter</em>]</dt>
  2345. <dd>
  2346. <div class="openblock">
  2347. <div class="content">
  2348. <div class="paragraph">
  2349. <p>Collect requests/response SRT (Service Response Time) data for Diameter.
  2350. Data collected is number of request and response pairs of each Diameter
  2351. command code, Minimum SRT, Maximum SRT, Average SRT, and Sum SRT.
  2352. Currently no statistics are gathered on unpaired messages.</p>
  2353. </div>
  2354. </div>
  2355. </div>
  2356. </dd>
  2357. <dt class="hdlist1"><strong>-z</strong> dns,tree[,<em>filter</em>]</dt>
  2358. <dd>
  2359. <div class="openblock">
  2360. <div class="content">
  2361. <div class="paragraph">
  2362. <p>Create a summary of the captured DNS packets. General information are collected
  2363. such as qtype and qclass distribution. For some data (as qname length or DNS
  2364. payload) max, min and average values are also displayed.</p>
  2365. </div>
  2366. </div>
  2367. </div>
  2368. </dd>
  2369. <dt class="hdlist1"><strong>-z</strong> endpoints,<em>type</em>[,<em>filter</em>]</dt>
  2370. <dd>
  2371. <div class="openblock">
  2372. <div class="content">
  2373. <div class="paragraph">
  2374. <p>Create a table that lists all endpoints that could be seen in the
  2375. capture. <em>type</em> specifies the endpoint type for which we
  2376. want to generate the statistics; currently the supported ones are:</p>
  2377. </div>
  2378. <div class="literalblock">
  2379. <div class="content">
  2380. <pre>"bluetooth" Bluetooth addresses
  2381. "dccp" DCCP/IP socket pairs Both IPv4 and IPv6 are supported
  2382. "eth" Ethernet addresses
  2383. "fc" Fibre Channel addresses
  2384. "fddi" FDDI addresses
  2385. "ip" IPv4 addresses
  2386. "ipv6" IPv6 addresses
  2387. "ipx" IPX addresses
  2388. "jxta" JXTA message addresses
  2389. "mptcp" Multipath TCP connections
  2390. "ncp" NCP connections
  2391. "rsvp" RSVP connections
  2392. "sctp" SCTP/IP socket pairs Both IPv4 and IPv6 are supported
  2393. "sll" Linux "cooked mode" capture addresses
  2394. "tcp" TCP/IP socket pairs Both IPv4 and IPv6 are supported
  2395. "tr" Token Ring addresses
  2396. "udp" UDP/IP socket pairs Both IPv4 and IPv6 are supported
  2397. "usb" USB addresses
  2398. "wlan" IEEE 802.11 addresses
  2399. "wpan" IEEE 802.15.4 addresses
  2400. "zbee_nwk" ZigBee Network Layer addresses</pre>
  2401. </div>
  2402. </div>
  2403. <div class="paragraph">
  2404. <p>The table is presented with one line for each endpoint which displays
  2405. the total number of packets/bytes and the number of packets/bytes in
  2406. each direction.
  2407. The table is sorted according to the total number of packets.</p>
  2408. </div>
  2409. </div>
  2410. </div>
  2411. </dd>
  2412. <dt class="hdlist1"><strong>-z</strong> enrp,stat[,<em>filter</em>]</dt>
  2413. <dd>
  2414. <div class="openblock">
  2415. <div class="content">
  2416. <div class="paragraph">
  2417. <p>Calculate statistics on Endpoint Handlespace Redundancy Protocol (ENRP).
  2418. For each message type, displays the number, rate, and share among
  2419. all message types of both packets and bytes, and the first and last
  2420. time that it is seen.</p>
  2421. </div>
  2422. </div>
  2423. </div>
  2424. </dd>
  2425. <dt class="hdlist1"><strong>-z</strong> expert[<em>,error|,warn|,note|,chat|,comment</em>][,<em>filter</em>]</dt>
  2426. <dd>
  2427. <div class="openblock">
  2428. <div class="content">
  2429. <div class="paragraph">
  2430. <p>Collects information about all expert info, and will display them in order,
  2431. grouped by severity.</p>
  2432. </div>
  2433. <div class="paragraph">
  2434. <p>Example: <strong>-z expert,sip</strong> will show expert items of all severity for frames that
  2435. match the sip protocol.</p>
  2436. </div>
  2437. <div class="paragraph">
  2438. <p>This option can be used multiple times on the command line.</p>
  2439. </div>
  2440. <div class="paragraph">
  2441. <p>Example: <strong>-z "expert,note,tcp"</strong> will only collect expert items for frames that
  2442. include the tcp protocol, with a severity of note or higher.</p>
  2443. </div>
  2444. </div>
  2445. </div>
  2446. </dd>
  2447. <dt class="hdlist1"><strong>-z</strong> f1ap,tree[,<em>filter</em>]</dt>
  2448. <dd>
  2449. <div class="openblock">
  2450. <div class="content">
  2451. <div class="paragraph">
  2452. <p>Calculate the distribution of F1AP packets, grouped by packet types.</p>
  2453. </div>
  2454. </div>
  2455. </div>
  2456. </dd>
  2457. <dt class="hdlist1"><strong>-z</strong> f5_tmm_dist,tree[,<em>filter</em>]</dt>
  2458. <dd>
  2459. <div class="openblock">
  2460. <div class="content">
  2461. <div class="paragraph">
  2462. <p>Calculate the F5 Ethernet trailer Traffic Managment Microkernel distribution.
  2463. Displayed information is the number of packets and bytes, grouped by the TMM
  2464. slot and number, whether packets are ingress or egress, and whether there is
  2465. a flow ID and virtual server name, a flow ID without virtual server name, or
  2466. no flow ID, along with total for all packets with F5 trailers.</p>
  2467. </div>
  2468. </div>
  2469. </div>
  2470. </dd>
  2471. <dt class="hdlist1"><strong>-z</strong> f5_virt_dist,tree[,<em>filter</em>]</dt>
  2472. <dd>
  2473. <div class="openblock">
  2474. <div class="content">
  2475. <div class="paragraph">
  2476. <p>Calculate F5 Ethernet trailer Virtual Server distribution.
  2477. Displayed information is the number of packets and bytes, grouped by the
  2478. virtual server name if it exists, or by whether there is a flow ID or not
  2479. if there is no virtual server name, as well as totals for all packets with
  2480. F5 trailers.</p>
  2481. </div>
  2482. </div>
  2483. </div>
  2484. </dd>
  2485. <dt class="hdlist1"><strong>-z</strong> fc,srt[,<em>filter</em>]</dt>
  2486. <dd>
  2487. <div class="openblock">
  2488. <div class="content">
  2489. <div class="paragraph">
  2490. <p>Collect requests/response SRT (Service Response Time) data for GTP.
  2491. Data collected is the number of request/response pairs, mimimum SRT,
  2492. maximum SRT, average SRT, and sum SRT for each value of the Type field
  2493. (next protocol). No statistics are gathered on unpaired messages.</p>
  2494. </div>
  2495. </div>
  2496. </div>
  2497. </dd>
  2498. <dt class="hdlist1"><strong>-z</strong> flow,<em>name</em>,<em>mode</em>[,<em>filter</em>]</dt>
  2499. <dd>
  2500. <div class="openblock">
  2501. <div class="content">
  2502. <div class="paragraph">
  2503. <p>Displays the flow of data between two nodes. Output is the same as ASCII format
  2504. saved from GUI.</p>
  2505. </div>
  2506. <div class="paragraph">
  2507. <p><em>name</em> specifies the flow name. It can be one of:</p>
  2508. </div>
  2509. <div class="literalblock">
  2510. <div class="content">
  2511. <pre>any All frames
  2512. icmp ICMP
  2513. icmpv6 ICMPv6
  2514. lbm_uim UIM
  2515. tcp TCP</pre>
  2516. </div>
  2517. </div>
  2518. <div class="paragraph">
  2519. <p><em>mode</em> specifies the address type. It can be one of:</p>
  2520. </div>
  2521. <div class="literalblock">
  2522. <div class="content">
  2523. <pre>standard Any address
  2524. network Network address</pre>
  2525. </div>
  2526. </div>
  2527. <div class="paragraph">
  2528. <p>Example: <strong>-z flow,tcp,network</strong> will show data flow for all TCP frames</p>
  2529. </div>
  2530. </div>
  2531. </div>
  2532. </dd>
  2533. <dt class="hdlist1"><strong>-z</strong> follow,<em>prot</em>,<em>mode</em>,<em>filter</em>[,<em>range</em>]</dt>
  2534. <dd>
  2535. <div class="openblock">
  2536. <div class="content">
  2537. <div class="paragraph">
  2538. <p>Displays the contents of a TCP or UDP stream between two nodes. The data
  2539. sent by the second node is prefixed with a tab to differentiate it from the
  2540. data sent by the first node.</p>
  2541. </div>
  2542. <div class="paragraph">
  2543. <p><em>prot</em> specifies the transport protocol. It can be one of:</p>
  2544. </div>
  2545. <div class="literalblock">
  2546. <div class="content">
  2547. <pre>tcp TCP
  2548. udp UDP
  2549. dccp DCCP
  2550. tls TLS or SSL
  2551. http HTTP streams
  2552. http2 HTTP/2 streams
  2553. quic QUIC streams</pre>
  2554. </div>
  2555. </div>
  2556. <div class="admonitionblock note">
  2557. <table>
  2558. <tr>
  2559. <td class="icon">
  2560. <div class="title">Note</div>
  2561. </td>
  2562. <td class="content">
  2563. While the usage help presents sip as an option, the proper
  2564. stream filters are not implemented so SIP calls cannot be followed
  2565. in <strong>TShark</strong>, only in <strong>Wireshark</strong>.
  2566. </td>
  2567. </tr>
  2568. </table>
  2569. </div>
  2570. <div class="paragraph">
  2571. <p><em>mode</em> specifies the output mode. It can be one of:</p>
  2572. </div>
  2573. <div class="literalblock">
  2574. <div class="content">
  2575. <pre>ascii ASCII output with dots for non-printable characters
  2576. ebcdic EBCDIC output with dots for non-printable characters
  2577. hex Hexadecimal and ASCII data with offsets
  2578. raw Hexadecimal data
  2579. yaml YAML format</pre>
  2580. </div>
  2581. </div>
  2582. <div class="paragraph">
  2583. <p>Since the output in <strong>ascii</strong> or <strong>ebcdic</strong> mode may contain newlines, the length
  2584. of each section of output plus a newline precedes each section of output.</p>
  2585. </div>
  2586. <div class="paragraph">
  2587. <p><em>filter</em> specifies the stream to be displayed. There are three formats:</p>
  2588. </div>
  2589. <div class="literalblock">
  2590. <div class="content">
  2591. <pre>ip-addr0:port0,ip-addr1:port1
  2592. stream-index
  2593. stream-index,substream-index</pre>
  2594. </div>
  2595. </div>
  2596. <div class="paragraph">
  2597. <p>The first format specifies IP addresses and TCP, UDP, or DCCP port pairs.
  2598. (TCP ports are used for TLS, HTTP, and HTTP2; QUIC does not support address
  2599. and port matching because of connection migration.)</p>
  2600. </div>
  2601. <div class="paragraph">
  2602. <p>The second format specifies stream indices, and is used for TCP, UDP, DCCP,
  2603. TLS, and HTTP. (TLS and HTTP use TCP stream indices.)</p>
  2604. </div>
  2605. <div class="paragraph">
  2606. <p>The third format, specifying streams and substreams, is used for HTTP/2 and
  2607. QUIC due to their use of multiplexing. (TCP stream and HTTP/2 stream indices
  2608. for HTTP/2, QUIC connection number and stream ID for QUIC.)</p>
  2609. </div>
  2610. <div class="paragraph">
  2611. <p><em>range</em> optionally specifies which "chunks" of the stream should be displayed.</p>
  2612. </div>
  2613. <div class="paragraph">
  2614. <p>Example: <strong>-z "follow,tcp,hex,1"</strong> will display the contents of the second TCP
  2615. stream (the first is stream 0) in "hex" format.</p>
  2616. </div>
  2617. <div class="literalblock">
  2618. <div class="content">
  2619. <pre>===================================================================
  2620. Follow: tcp,hex
  2621. Filter: tcp.stream eq 1
  2622. Node 0: 200.57.7.197:32891
  2623. Node 1: 200.57.7.198:2906
  2624. 00000000 00 00 00 22 00 00 00 07 00 0a 85 02 07 e9 00 02 ...".... ........
  2625. 00000010 07 e9 06 0f 00 0d 00 04 00 00 00 01 00 03 00 06 ........ ........
  2626. 00000020 1f 00 06 04 00 00 ......
  2627. 00000000 00 01 00 00 ....
  2628. 00000026 00 02 00 00</pre>
  2629. </div>
  2630. </div>
  2631. <div class="paragraph">
  2632. <p>Example: <strong>-z "follow,tcp,ascii,200.57.7.197:32891,200.57.7.198:2906"</strong> will
  2633. display the contents of a TCP stream between 200.57.7.197 port 32891 and
  2634. 200.57.7.98 port 2906.</p>
  2635. </div>
  2636. <div class="literalblock">
  2637. <div class="content">
  2638. <pre>===================================================================
  2639. Follow: tcp,ascii
  2640. Filter: (omitted for readability)
  2641. Node 0: 200.57.7.197:32891
  2642. Node 1: 200.57.7.198:2906
  2643. 38
  2644. ...".....
  2645. ................
  2646. 4
  2647. ....</pre>
  2648. </div>
  2649. </div>
  2650. <div class="paragraph">
  2651. <p>Example: <strong>-z "follow,http2,hex,0,1"</strong> will display the contents of a HTTP/2
  2652. stream on the first TCP session (index 0) with HTTP/2 Stream ID 1.</p>
  2653. </div>
  2654. <div class="literalblock">
  2655. <div class="content">
  2656. <pre>===================================================================
  2657. Follow: http2,hex
  2658. Filter: tcp.stream eq 0 and http2.streamid eq 1
  2659. Node 0: 172.16.5.1:49178
  2660. Node 1: 172.16.5.10:8443
  2661. 00000000 00 00 2c 01 05 00 00 00 01 82 04 8b 63 c1 ac 2a ..,..... ....c..*
  2662. 00000010 27 1d 9d 57 ae a9 bf 87 41 8c 0b a2 5c 2e 2e da '..W.... A...\...
  2663. 00000020 e1 05 c7 9a 69 9f 7a 88 25 b6 50 c3 ab b6 25 c3 ....i.z. %.P...%.
  2664. 00000030 53 03 2a 2f 2a S.*/*
  2665. 00000000 00 00 22 01 04 00 00 00 01 88 5f 87 35 23 98 ac .."..... .._.5#..
  2666. 00000010 57 54 df 61 96 c3 61 be 94 03 8a 61 2c 6a 08 2f WT.a..a. ...a,j./
  2667. 00000020 34 a0 5b b8 21 5c 0b ea 62 d1 bf 4.[.!\.. b..
  2668. 0000002B 00 40 00 00 00 00 00 00 01 89 50 4e 47 0d 0a 1a .@...... ..PNG...</pre>
  2669. </div>
  2670. </div>
  2671. </div>
  2672. </div>
  2673. </dd>
  2674. <dt class="hdlist1"><strong>-z</strong> fractalgeneratorprotocol,stat[,<em>filter</em>]</dt>
  2675. <dd>
  2676. <div class="openblock">
  2677. <div class="content">
  2678. <div class="paragraph">
  2679. <p>Calculate statistics on the Fractal Generator Protocol of Reliable
  2680. Server Pooling. For each message type, displays the number, rate
  2681. and share among all message types of both packets and bytes, and the
  2682. first and last time that it is seen.</p>
  2683. </div>
  2684. </div>
  2685. </div>
  2686. </dd>
  2687. <dt class="hdlist1"><strong>-z</strong> gsm_a</dt>
  2688. <dd>
  2689. <div class="openblock">
  2690. <div class="content">
  2691. <div class="paragraph">
  2692. <p>Count the number of GSM A-I/F messages of each type within the following
  2693. categories: BSSMAP, DTAP Mobility Management, DTAP Radio Resource
  2694. Management, DTAP Call Control, DTAP GPRS Mobility Management, DTAP SMS
  2695. messages, DTAP GPRS Session Management, DTAP Supplementary Services, DTAP
  2696. Special Conformance Testing Functions, and SACCH Radio Resource Management.</p>
  2697. </div>
  2698. <div class="paragraph">
  2699. <p>Unlike the individual statistics for each category that follow, this only
  2700. prints a line for each message type that appears, instead of including lines
  2701. for message types with a count of zero.</p>
  2702. </div>
  2703. </div>
  2704. </div>
  2705. </dd>
  2706. <dt class="hdlist1"><strong>-z</strong> gsm_a,<em>category</em>[,<em>filter</em>]</dt>
  2707. <dd>
  2708. <div class="openblock">
  2709. <div class="content">
  2710. <div class="paragraph">
  2711. <p>Count the number of messages of each type in GSM A-I/F <em>category</em>, which
  2712. can be one of:</p>
  2713. </div>
  2714. <div class="literalblock">
  2715. <div class="content">
  2716. <pre>bssmap BSSMAP
  2717. dtap_cc DTAP Call Control
  2718. dtap_gmm DTAP GPRS Mobility Management
  2719. dtap_mm DTAP Mobility Management
  2720. dtap_rr DTAP Radio Resource Management
  2721. dtap_sacch SACCH Radio Resource Management
  2722. dtap_sm DTAP GPRS Session Managment
  2723. dtap_sms DTAP Short Message Service
  2724. dtap_ss DTAP Supplementary Services
  2725. dtap_tp DTAP Special Conformance Testing Functions</pre>
  2726. </div>
  2727. </div>
  2728. </div>
  2729. </div>
  2730. </dd>
  2731. <dt class="hdlist1"><strong>-z</strong> gsm_map,operation[,<em>filter</em>]</dt>
  2732. <dd>
  2733. <div class="openblock">
  2734. <div class="content">
  2735. <div class="paragraph">
  2736. <p>Calculate statistics on GSM MAP. For each op code, the total number of
  2737. invokes and results, along with the average and total bytes for invokes
  2738. and results separately and combined is displayed.</p>
  2739. </div>
  2740. </div>
  2741. </div>
  2742. </dd>
  2743. <dt class="hdlist1"><strong>-z</strong> gtp,srt[,<em>filter</em>]</dt>
  2744. <dd>
  2745. <div class="openblock">
  2746. <div class="content">
  2747. <div class="paragraph">
  2748. <p>Collect requests/response SRT (Service Response Time) data for GTP.
  2749. Data collected is the number of calls, mimimum SRT, maximum SRT, average
  2750. SRT, and sum SRT for Echo and Create/Update/Delete PDP context commands only.
  2751. Currently no statistics are gathered on unpaired messages.</p>
  2752. </div>
  2753. </div>
  2754. </div>
  2755. </dd>
  2756. <dt class="hdlist1"><strong>-z</strong> h225,counter[,<em>filter</em>]</dt>
  2757. <dd>
  2758. <div class="openblock">
  2759. <div class="content">
  2760. <div class="paragraph">
  2761. <p>Count ITU-T H.225 messages and their reasons. In the first column you get a
  2762. list of H.225 messages and H.225 message reasons, which occur in the current
  2763. capture file. The number of occurrences of each message or reason is displayed
  2764. in the second column.</p>
  2765. </div>
  2766. <div class="paragraph">
  2767. <p>Example: <strong>-z h225,counter</strong>.</p>
  2768. </div>
  2769. <div class="paragraph">
  2770. <p>Example: use <strong>-z "h225,counter,ip.addr==1.2.3.4"</strong> to only collect stats for
  2771. H.225 packets exchanged by the host at IP address 1.2.3.4 .</p>
  2772. </div>
  2773. <div class="paragraph">
  2774. <p>This option can be used multiple times on the command line.</p>
  2775. </div>
  2776. </div>
  2777. </div>
  2778. </dd>
  2779. <dt class="hdlist1"><strong>-z</strong> h225_ras,rtd[,<em>filter</em>]</dt>
  2780. <dd>
  2781. <div class="openblock">
  2782. <div class="content">
  2783. <div class="paragraph">
  2784. <p>Collect requests/response RTD (Response Time Delay) data for ITU-T H.225 RAS.
  2785. Data collected is number of calls of each ITU-T H.225 RAS Message Type,
  2786. Minimum RTD, Maximum RTD, Average RTD, Minimum in Frame, and Maximum in Frame.
  2787. You will also get the number of Open Requests (Unresponded Requests),
  2788. Discarded Responses (Responses without matching request) and Duplicate Messages.</p>
  2789. </div>
  2790. <div class="paragraph">
  2791. <p>Example: <strong>tshark -z h225_ras,rtd</strong></p>
  2792. </div>
  2793. <div class="paragraph">
  2794. <p>This option can be used multiple times on the command line.</p>
  2795. </div>
  2796. <div class="paragraph">
  2797. <p>Example: <strong>-z "h225_ras,rtd,ip.addr==1.2.3.4"</strong> will only collect stats for
  2798. ITU-T H.225 RAS packets exchanged by the host at IP address 1.2.3.4 .</p>
  2799. </div>
  2800. </div>
  2801. </div>
  2802. </dd>
  2803. <dt class="hdlist1"><strong>-z</strong> hart_ip,tree[,<em>filter</em>]</dt>
  2804. <dd>
  2805. <div class="openblock">
  2806. <div class="content">
  2807. <div class="paragraph">
  2808. <p>Calculate statistics on HART-IP packets, grouping by message types and
  2809. message IDs within types.</p>
  2810. </div>
  2811. </div>
  2812. </div>
  2813. </dd>
  2814. <dt class="hdlist1"><strong>-z</strong> hosts[,ip][,ipv4][,ipv6]</dt>
  2815. <dd>
  2816. <div class="openblock">
  2817. <div class="content">
  2818. <div class="paragraph">
  2819. <p>Dump any collected resolved IPv4 and/or IPv6 addresses in "hosts" format.
  2820. Both IPv4 and IPv6 addresses are dumped by default. "ip" argument will dump
  2821. only IPv4 addresses.</p>
  2822. </div>
  2823. <div class="paragraph">
  2824. <p>Addresses are collected from a number of sources, including standard "hosts"
  2825. files and captured traffic. Resolution must be enabled, e.g. through the
  2826. <strong>-n</strong> option.</p>
  2827. </div>
  2828. </div>
  2829. </div>
  2830. </dd>
  2831. <dt class="hdlist1"><strong>-z</strong> hpfeeds,tree[,<em>filter</em>]</dt>
  2832. <dd>
  2833. <div class="openblock">
  2834. <div class="content">
  2835. <div class="paragraph">
  2836. <p>Calculate statistics for HPFEEDS traffic such as publish per channel, and opcode
  2837. distribution.</p>
  2838. </div>
  2839. </div>
  2840. </div>
  2841. </dd>
  2842. <dt class="hdlist1"><strong>-z</strong> http,stat[,<em>filter</em>]</dt>
  2843. <dd>
  2844. <div class="openblock">
  2845. <div class="content">
  2846. <div class="paragraph">
  2847. <p>Count the HTTP response status codes and the HTTP request methods.</p>
  2848. </div>
  2849. </div>
  2850. </div>
  2851. </dd>
  2852. <dt class="hdlist1"><strong>-z</strong> http,tree[,<em>filter</em>]</dt>
  2853. <dd>
  2854. <div class="openblock">
  2855. <div class="content">
  2856. <div class="paragraph">
  2857. <p>Calculate the HTTP packet distribution. Displayed values are the
  2858. response status codes and request methods.</p>
  2859. </div>
  2860. </div>
  2861. </div>
  2862. </dd>
  2863. <dt class="hdlist1"><strong>-z</strong> http_req,tree[,<em>filter</em>]</dt>
  2864. <dd>
  2865. <div class="openblock">
  2866. <div class="content">
  2867. <div class="paragraph">
  2868. <p>Calculate the HTTP requests by server. Displayed values are the
  2869. server name and the URI path.</p>
  2870. </div>
  2871. </div>
  2872. </div>
  2873. </dd>
  2874. <dt class="hdlist1"><strong>-z</strong> http_seq,tree[,<em>filter</em>]</dt>
  2875. <dd>
  2876. <div class="openblock">
  2877. <div class="content">
  2878. <div class="paragraph">
  2879. <p>Calculate the HTTP request sequence statistics, which correlate
  2880. referring URIs with request URIs.</p>
  2881. </div>
  2882. </div>
  2883. </div>
  2884. </dd>
  2885. <dt class="hdlist1"><strong>-z</strong> http_srv,tree[,<em>filter</em>]</dt>
  2886. <dd>
  2887. <div class="openblock">
  2888. <div class="content">
  2889. <div class="paragraph">
  2890. <p>Calculate the HTTP requests and responses by server. For the HTTP
  2891. requests, displayed values are the server IP address and server
  2892. hostname. For the HTTP responses, displayed values are the server
  2893. IP address and status.</p>
  2894. </div>
  2895. </div>
  2896. </div>
  2897. </dd>
  2898. <dt class="hdlist1"><strong>-z</strong> http2,tree[,<em>filter</em>]</dt>
  2899. <dd>
  2900. <div class="openblock">
  2901. <div class="content">
  2902. <div class="paragraph">
  2903. <p>Calculate the HTTP/2 packet distribution. Displayed values are the
  2904. frame types.</p>
  2905. </div>
  2906. </div>
  2907. </div>
  2908. </dd>
  2909. <dt class="hdlist1"><strong>-z</strong> icmp,srt[,<em>filter</em>]</dt>
  2910. <dd>
  2911. <div class="openblock">
  2912. <div class="content">
  2913. <div class="paragraph">
  2914. <p>Compute total ICMP echo requests, replies, loss, and percent loss, as well as
  2915. minimum, maximum, mean, median and sample standard deviation SRT statistics
  2916. typical of what ping provides.</p>
  2917. </div>
  2918. <div class="paragraph">
  2919. <p>Example: <span class="nowrap"><strong>-z icmp,srt,ip.src==1.2.3.4</strong></span> will collect ICMP SRT statistics
  2920. for ICMP echo request packets originating from a specific host.</p>
  2921. </div>
  2922. <div class="paragraph">
  2923. <p>This option can be used multiple times on the command line.</p>
  2924. </div>
  2925. </div>
  2926. </div>
  2927. </dd>
  2928. <dt class="hdlist1"><strong>-z</strong> icmpv6,srt[,<em>filter</em>]</dt>
  2929. <dd>
  2930. <div class="openblock">
  2931. <div class="content">
  2932. <div class="paragraph">
  2933. <p>Compute total ICMPv6 echo requests, replies, loss, and percent loss, as well as
  2934. minimum, maximum, mean, median and sample standard deviation SRT statistics
  2935. typical of what ping provides.</p>
  2936. </div>
  2937. <div class="paragraph">
  2938. <p>Example: <span class="nowrap"><strong>-z icmpv6,srt,ipv6.src==fe80::1</strong></span> will collect ICMPv6 SRT statistics
  2939. for ICMPv6 echo request packets originating from a specific host.</p>
  2940. </div>
  2941. <div class="paragraph">
  2942. <p>This option can be used multiple times on the command line.</p>
  2943. </div>
  2944. </div>
  2945. </div>
  2946. </dd>
  2947. <dt class="hdlist1"><strong>-z</strong> io,phs[,<em>filter</em>]</dt>
  2948. <dd>
  2949. <div class="openblock">
  2950. <div class="content">
  2951. <div class="paragraph">
  2952. <p>Create Protocol Hierarchy Statistics listing both number of packets and bytes.</p>
  2953. </div>
  2954. <div class="paragraph">
  2955. <p>This option can be used multiple times on the command line.</p>
  2956. </div>
  2957. </div>
  2958. </div>
  2959. </dd>
  2960. <dt class="hdlist1"><strong>-z</strong> io,stat,<em>interval</em>[,<em>filter</em>][,<em>filter</em>][,<em>filter</em>]&#8230;&#8203;</dt>
  2961. <dd>
  2962. <div class="openblock">
  2963. <div class="content">
  2964. <div class="paragraph">
  2965. <p>Collect packet/bytes statistics for the capture in intervals of
  2966. <em>interval</em> seconds. <em>Interval</em> can be specified either as a whole or
  2967. fractional second and can be specified with microsecond (us) resolution.
  2968. If <em>interval</em> is 0, the statistics will be calculated over all packets.</p>
  2969. </div>
  2970. <div class="paragraph">
  2971. <p>If one or more <em>filters</em> are specified statistics will be calculated for
  2972. all filters and presented with one column of statistics for each filter.</p>
  2973. </div>
  2974. <div class="paragraph">
  2975. <p>This option can be used multiple times on the command line.</p>
  2976. </div>
  2977. <div class="paragraph">
  2978. <p>Example: <strong>-z io,stat,1,ip.addr==1.2.3.4</strong> will generate 1 second
  2979. statistics for all traffic to/from host 1.2.3.4.</p>
  2980. </div>
  2981. <div class="paragraph">
  2982. <p>Example: <strong>-z "io,stat,0.001,smb&amp;&amp;ip.addr==1.2.3.4"</strong> will generate 1ms
  2983. statistics for all SMB packets to/from host 1.2.3.4.</p>
  2984. </div>
  2985. <div class="paragraph">
  2986. <p>The examples above all use the standard syntax for generating statistics
  2987. which only calculates the number of packets and bytes in each interval.</p>
  2988. </div>
  2989. <div class="paragraph">
  2990. <p><strong>io,stat</strong> can also do much more statistics and calculate COUNT(), SUM(),
  2991. MIN(), MAX(), AVG() and LOAD() using a slightly different filter syntax:</p>
  2992. </div>
  2993. </div>
  2994. </div>
  2995. </dd>
  2996. <dt class="hdlist1">-z io,stat,<em>interval</em>,"COUNT|SUM|MIN|MAX|AVG|LOAD(<em>field</em>)<em>filter</em>"</dt>
  2997. <dd>
  2998. <div class="openblock">
  2999. <div class="content">
  3000. <div class="admonitionblock note">
  3001. <table>
  3002. <tr>
  3003. <td class="icon">
  3004. <div class="title">Note</div>
  3005. </td>
  3006. <td class="content">
  3007. One important thing to note here is that the filter is not optional
  3008. and that the field that the calculation is based on MUST be part of the filter
  3009. string or the calculation will fail.
  3010. </td>
  3011. </tr>
  3012. </table>
  3013. </div>
  3014. <div class="paragraph">
  3015. <p>So: <strong>-z io,stat,0.010,AVG(smb.time)</strong> does not work. Use <strong>-z
  3016. io,stat,0.010,AVG(smb.time)smb.time</strong> instead. Also be aware that a field
  3017. can exist multiple times inside the same packet and will then be counted
  3018. multiple times in those packets.</p>
  3019. </div>
  3020. <div class="admonitionblock note">
  3021. <table>
  3022. <tr>
  3023. <td class="icon">
  3024. <div class="title">Note</div>
  3025. </td>
  3026. <td class="content">
  3027. A second important thing to note is that the system setting for
  3028. decimal separator must be set to "."! If it is set to "," the statistics
  3029. will not be displayed per filter.
  3030. </td>
  3031. </tr>
  3032. </table>
  3033. </div>
  3034. <div class="paragraph">
  3035. <p><strong>COUNT</strong> - Calculates the number of times that the
  3036. field <em>name</em> (not its value) appears per interval in the filtered packet list.
  3037. ''<em>field</em>'' can be any display filter name.</p>
  3038. </div>
  3039. <div class="paragraph">
  3040. <p>Example: <strong>-z io,stat,0.010,"COUNT(smb.sid)smb.sid"</strong></p>
  3041. </div>
  3042. <div class="paragraph">
  3043. <p>This will count the total number of SIDs seen in each 10ms interval.</p>
  3044. </div>
  3045. <div class="paragraph">
  3046. <p><strong>SUM</strong> - Unlike COUNT, the <em>values</em> of the
  3047. specified field are summed per time interval.
  3048. ''<em>field</em>'' can only be a named integer, float, double or relative time field.</p>
  3049. </div>
  3050. <div class="paragraph">
  3051. <p>Example: <strong>tshark -z io,stat,0.010,"SUM(frame.len)frame.len"</strong></p>
  3052. </div>
  3053. <div class="paragraph">
  3054. <p>Reports the total number of bytes that were transmitted bidirectionally in
  3055. all the packets within a 10 millisecond interval.</p>
  3056. </div>
  3057. <div class="paragraph">
  3058. <p><strong>MIN/MAX/AVG</strong> - The minimum, maximum, or average field value
  3059. in each interval is calculated. The specified field must be a named integer,
  3060. float, double or relative time field. For relative time fields, the output is
  3061. presented in seconds with six decimal digits of precision rounded to the nearest
  3062. microsecond.</p>
  3063. </div>
  3064. <div class="paragraph">
  3065. <p>In the following example, the time of the first Read_AndX call, the last Read_AndX
  3066. response values are displayed and the minimum, maximum, and average Read response times
  3067. (SRTs) are calculated. NOTE: If the DOS command shell line continuation character, ''^''
  3068. is used, each line cannot end in a comma so it is placed at the beginning of each
  3069. continuation line:</p>
  3070. </div>
  3071. <div class="literalblock">
  3072. <div class="content">
  3073. <pre>tshark -o tcp.desegment_tcp_streams:FALSE -n -q -r smb_reads.cap -z io,stat,0,
  3074. "MIN(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==0",
  3075. "MAX(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==1",
  3076. "MIN(smb.time)smb.time and smb.cmd==0x2e",
  3077. "MAX(smb.time)smb.time and smb.cmd==0x2e",
  3078. "AVG(smb.time)smb.time and smb.cmd==0x2e"</pre>
  3079. </div>
  3080. </div>
  3081. <div class="literalblock">
  3082. <div class="content">
  3083. <pre>======================================================================================================
  3084. IO Statistics
  3085. Column #0: MIN(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==0
  3086. Column #1: MAX(frame.time_relative)frame.time_relative and smb.cmd==0x2e and smb.flags.response==1
  3087. Column #2: MIN(smb.time)smb.time and smb.cmd==0x2e
  3088. Column #3: MAX(smb.time)smb.time and smb.cmd==0x2e
  3089. Column #4: AVG(smb.time)smb.time and smb.cmd==0x2e
  3090. | Column #0 | Column #1 | Column #2 | Column #3 | Column #4 |
  3091. Time | MIN | MAX | MIN | MAX | AVG |
  3092. 000.000- 0.000000 7.704054 0.000072 0.005539 0.000295
  3093. ======================================================================================================</pre>
  3094. </div>
  3095. </div>
  3096. <div class="paragraph">
  3097. <p>The following command displays the average SMB Read response PDU size, the
  3098. total number of read PDU bytes, the average SMB Write request PDU size, and
  3099. the total number of bytes transferred in SMB Write PDUs:</p>
  3100. </div>
  3101. <div class="literalblock">
  3102. <div class="content">
  3103. <pre>tshark -n -q -r smb_reads_writes.cap -z io,stat,0,
  3104. "AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to",
  3105. "SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to",
  3106. "AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to",
  3107. "SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to"</pre>
  3108. </div>
  3109. </div>
  3110. <div class="literalblock">
  3111. <div class="content">
  3112. <pre>=====================================================================================
  3113. IO Statistics
  3114. Column #0: AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to
  3115. Column #1: SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2e and smb.response_to
  3116. Column #2: AVG(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to
  3117. Column #3: SUM(smb.file.rw.length)smb.file.rw.length and smb.cmd==0x2f and not smb.response_to
  3118. | Column #0 | Column #1 | Column #2 | Column #3 |
  3119. Time | AVG | SUM | AVG | SUM |
  3120. 000.000- 30018 28067522 72 3240
  3121. =====================================================================================</pre>
  3122. </div>
  3123. </div>
  3124. <div class="paragraph">
  3125. <p><strong>LOAD</strong> - The LOAD/Queue-Depth
  3126. in each interval is calculated. The specified field must be a relative time field that represents a response time. For example smb.time.
  3127. For each interval the Queue-Depth for the specified protocol is calculated.</p>
  3128. </div>
  3129. <div class="paragraph">
  3130. <p>The following command displays the average SMB LOAD.
  3131. A value of 1.0 represents one I/O in flight.</p>
  3132. </div>
  3133. <div class="literalblock">
  3134. <div class="content">
  3135. <pre>tshark -n -q -r smb_reads_writes.cap
  3136. -z "io,stat,0.001,LOAD(smb.time)smb.time"</pre>
  3137. </div>
  3138. </div>
  3139. <div class="literalblock">
  3140. <div class="content">
  3141. <pre>============================================================================
  3142. IO Statistics
  3143. Interval: 0.001000 secs
  3144. Column #0: LOAD(smb.time)smb.time
  3145. | Column #0 |
  3146. Time | LOAD |
  3147. 0000.000000-0000.001000 1.000000
  3148. 0000.001000-0000.002000 0.741000
  3149. 0000.002000-0000.003000 0.000000
  3150. 0000.003000-0000.004000 1.000000</pre>
  3151. </div>
  3152. </div>
  3153. <div class="paragraph">
  3154. <p><strong>FRAMES | BYTES</strong>[()<em>filter</em>] - Displays the total number of frames or bytes.
  3155. The filter field is optional but if included it must be prepended with ''()''.</p>
  3156. </div>
  3157. <div class="paragraph">
  3158. <p>The following command displays five columns: the total number of frames and bytes
  3159. (transferred bidirectionally) using a single comma, the same two stats using the FRAMES and BYTES
  3160. subcommands, the total number of frames containing at least one SMB Read response, and
  3161. the total number of bytes transmitted to the client (unidirectionally) at IP address 10.1.0.64.</p>
  3162. </div>
  3163. <div class="literalblock">
  3164. <div class="content">
  3165. <pre>tshark -o tcp.desegment_tcp_streams:FALSE -n -q -r smb_reads.cap -z io,stat,0,,FRAMES,BYTES,
  3166. "FRAMES()smb.cmd==0x2e and smb.response_to","BYTES()ip.dst==10.1.0.64"</pre>
  3167. </div>
  3168. </div>
  3169. <div class="literalblock">
  3170. <div class="content">
  3171. <pre>=======================================================================================================================
  3172. IO Statistics
  3173. Column #0:
  3174. Column #1: FRAMES
  3175. Column #2: BYTES
  3176. Column #3: FRAMES()smb.cmd==0x2e and smb.response_to
  3177. Column #4: BYTES()ip.dst==10.1.0.64
  3178. | Column #0 | Column #1 | Column #2 | Column #3 | Column #4 |
  3179. Time | Frames | Bytes | FRAMES | BYTES | FRAMES | BYTES |
  3180. 000.000- 33576 29721685 33576 29721685 870 29004801
  3181. =======================================================================================================================</pre>
  3182. </div>
  3183. </div>
  3184. </div>
  3185. </div>
  3186. </dd>
  3187. <dt class="hdlist1"><strong>-z</strong> ip_hosts,tree[,<em>filter</em>]</dt>
  3188. <dd>
  3189. <div class="openblock">
  3190. <div class="content">
  3191. <div class="paragraph">
  3192. <p>Calculate statistics on IPv4 addresses, with source and destination addresses
  3193. all grouped together.</p>
  3194. </div>
  3195. </div>
  3196. </div>
  3197. </dd>
  3198. <dt class="hdlist1"><strong>-z</strong> ip_srcdst,tree[,<em>filter</em>]</dt>
  3199. <dd>
  3200. <div class="openblock">
  3201. <div class="content">
  3202. <div class="paragraph">
  3203. <p>Calculate statistics on IPv4 addresses, with source and destination addresses
  3204. separated into separate categories.</p>
  3205. </div>
  3206. </div>
  3207. </div>
  3208. </dd>
  3209. <dt class="hdlist1"><strong>-z</strong> ip6_dests,tree[,<em>filter</em>]</dt>
  3210. <dd>
  3211. <div class="openblock">
  3212. <div class="content">
  3213. <div class="paragraph">
  3214. <p>Calculate statistics on IPv6 destination addresses and the protocols
  3215. and ports appearing on each address.</p>
  3216. </div>
  3217. </div>
  3218. </div>
  3219. </dd>
  3220. <dt class="hdlist1"><strong>-z</strong> ip6_hosts,tree[,<em>filter</em>]</dt>
  3221. <dd>
  3222. <div class="openblock">
  3223. <div class="content">
  3224. <div class="paragraph">
  3225. <p>Calculate statistics on IPv6 addresses, with source and destination addresses
  3226. all grouped together.</p>
  3227. </div>
  3228. </div>
  3229. </div>
  3230. </dd>
  3231. <dt class="hdlist1"><strong>-z</strong> ip6_ptype,tree[,<em>filter</em>]</dt>
  3232. <dd>
  3233. <div class="openblock">
  3234. <div class="content">
  3235. <div class="paragraph">
  3236. <p>Calculate statistics on port types that occur on IPv6 packets.</p>
  3237. </div>
  3238. </div>
  3239. </div>
  3240. </dd>
  3241. <dt class="hdlist1"><strong>-z</strong> ip6_srcdst,tree[,<em>filter</em>]</dt>
  3242. <dd>
  3243. <div class="openblock">
  3244. <div class="content">
  3245. <div class="paragraph">
  3246. <p>Calculate statistics on IPv6 addresses, with source and destination addresses
  3247. separated into separate categories.</p>
  3248. </div>
  3249. </div>
  3250. </div>
  3251. </dd>
  3252. <dt class="hdlist1"><strong>-z</strong> isup_msg,tree[,<em>filter</em>]</dt>
  3253. <dd>
  3254. <div class="openblock">
  3255. <div class="content">
  3256. <div class="paragraph">
  3257. <p>Calculate statistics on ISUP messages. Displayed information is message
  3258. types and direction (originating point code and destination point code.)</p>
  3259. </div>
  3260. </div>
  3261. </div>
  3262. </dd>
  3263. <dt class="hdlist1"><strong>-z</strong> lbmr_queue_ads_queue,tree[,<em>filter</em>]</dt>
  3264. <dd>
  3265. <div class="openblock">
  3266. <div class="content">
  3267. <div class="paragraph">
  3268. <p>Calculate statistics on LBM Topic Resolution Packets. Displays queue
  3269. advertisements collated by queue name and then source addresses and port.</p>
  3270. </div>
  3271. </div>
  3272. </div>
  3273. </dd>
  3274. <dt class="hdlist1"><strong>-z</strong> lbmr_queue_ads_source,tree[,<em>filter</em>]</dt>
  3275. <dd>
  3276. <div class="openblock">
  3277. <div class="content">
  3278. <div class="paragraph">
  3279. <p>Calculate statistics on LBM Topic Resolution Packets. Displays queue
  3280. advertisements collated by source address and then queue and port.</p>
  3281. </div>
  3282. </div>
  3283. </div>
  3284. </dd>
  3285. <dt class="hdlist1"><strong>-z</strong> lbmr_queue_queries_queue,tree[,<em>filter</em>]</dt>
  3286. <dd>
  3287. <div class="openblock">
  3288. <div class="content">
  3289. <div class="paragraph">
  3290. <p>Calculate statistics on LBM Topic Resolution Packets. Displays queue
  3291. queries collated by queue name and then receiver addresses.</p>
  3292. </div>
  3293. </div>
  3294. </div>
  3295. </dd>
  3296. <dt class="hdlist1"><strong>-z</strong> lbmr_queue_queries_receiver,tree[,<em>filter</em>]</dt>
  3297. <dd>
  3298. <div class="openblock">
  3299. <div class="content">
  3300. <div class="paragraph">
  3301. <p>Calculate statistics on LBM Topic Resolution Packets. Displays queue
  3302. queries collated by receiver address and then queue.</p>
  3303. </div>
  3304. </div>
  3305. </div>
  3306. </dd>
  3307. <dt class="hdlist1"><strong>-z</strong> lbmr_topic_ads_source,tree[,<em>filter</em>]</dt>
  3308. <dd>
  3309. <div class="openblock">
  3310. <div class="content">
  3311. <div class="paragraph">
  3312. <p>Calculate statistics on LBM Topic Resolution Packets. Displays topic
  3313. advertisements collated by source address and then topic name and
  3314. source string.</p>
  3315. </div>
  3316. </div>
  3317. </div>
  3318. </dd>
  3319. <dt class="hdlist1"><strong>-z</strong> lbmr_topic_ads_topic,tree[,<em>filter</em>]</dt>
  3320. <dd>
  3321. <div class="openblock">
  3322. <div class="content">
  3323. <div class="paragraph">
  3324. <p>Calculate statistics on LBM Topic Resolution Packets. Displays topic
  3325. advertisements collated by topic name and then source address and
  3326. source string.</p>
  3327. </div>
  3328. </div>
  3329. </div>
  3330. </dd>
  3331. <dt class="hdlist1"><strong>-z</strong> lbmr_topic_ads_transport,tree[,<em>filter</em>]</dt>
  3332. <dd>
  3333. <div class="openblock">
  3334. <div class="content">
  3335. <div class="paragraph">
  3336. <p>Calculate statistics on LBM Topic Resolution Packets. Displays topic
  3337. advertisements collated by source string and then topic name.</p>
  3338. </div>
  3339. </div>
  3340. </div>
  3341. </dd>
  3342. <dt class="hdlist1"><strong>-z</strong> lbmr_topic_queries_pattern,tree[,<em>filter</em>]</dt>
  3343. <dd>
  3344. <div class="openblock">
  3345. <div class="content">
  3346. <div class="paragraph">
  3347. <p>Calculate statistics on LBM Topic Resolution Packets. Displays topic
  3348. queries collated by pattern and then receiver address.</p>
  3349. </div>
  3350. </div>
  3351. </div>
  3352. </dd>
  3353. <dt class="hdlist1"><strong>-z</strong> lbmr_topic_queries_pattern_receiver,tree[,<em>filter</em>]</dt>
  3354. <dd>
  3355. <div class="openblock">
  3356. <div class="content">
  3357. <div class="paragraph">
  3358. <p>Calculate statistics on LBM Topic Resolution Packets. Displays topic
  3359. queries collated by receiver address and then pattern.</p>
  3360. </div>
  3361. </div>
  3362. </div>
  3363. </dd>
  3364. <dt class="hdlist1"><strong>-z</strong> lbmr_topic_queries_receiver,tree[,<em>filter</em>]</dt>
  3365. <dd>
  3366. <div class="openblock">
  3367. <div class="content">
  3368. <div class="paragraph">
  3369. <p>Calculate statistics on LBM Topic Resolution Packets. Displays topic
  3370. queries collated by receiver address and then topic name.</p>
  3371. </div>
  3372. </div>
  3373. </div>
  3374. </dd>
  3375. <dt class="hdlist1"><strong>-z</strong> lbmr_topic_queries_topic,tree[,<em>filter</em>]</dt>
  3376. <dd>
  3377. <div class="openblock">
  3378. <div class="content">
  3379. <div class="paragraph">
  3380. <p>Calculate statistics on LBM Topic Resolution Packets. Displays topic
  3381. queries collated by topic name and then receiver address.</p>
  3382. </div>
  3383. </div>
  3384. </div>
  3385. </dd>
  3386. <dt class="hdlist1"><strong>-z</strong> mac-lte,stat[,<em>filter</em>]</dt>
  3387. <dd>
  3388. <div class="openblock">
  3389. <div class="content">
  3390. <div class="paragraph">
  3391. <p>This option will activate a counter for LTE MAC messages. You will get
  3392. information about the maximum number of UEs/TTI, common messages and
  3393. various counters for each UE that appears in the log.</p>
  3394. </div>
  3395. <div class="paragraph">
  3396. <p>Example: <strong>tshark -z mac-lte,stat</strong>.</p>
  3397. </div>
  3398. <div class="paragraph">
  3399. <p>This option can be used multiple times on the command line.</p>
  3400. </div>
  3401. <div class="paragraph">
  3402. <p>Example: <strong>-z "mac-lte,stat,mac-lte.rnti&gt;3000"</strong> will only collect stats for
  3403. UEs with an assigned RNTI whose value is more than 3000.</p>
  3404. </div>
  3405. </div>
  3406. </div>
  3407. </dd>
  3408. <dt class="hdlist1"><strong>-z</strong> megaco,rtd[,<em>filter</em>]</dt>
  3409. <dd>
  3410. <div class="openblock">
  3411. <div class="content">
  3412. <div class="paragraph">
  3413. <p>Collect requests/response RTD (Response Time Delay) data for MEGACO.
  3414. (This is similar to <strong>-z smb,srt</strong>). Data collected is the number of calls
  3415. for each known MEGACO Type, MinRTD, MaxRTD and AvgRTD.
  3416. Additionally you get the number of duplicate requests/responses,
  3417. unresponded requests, responses, which don&#8217;t match with any request.
  3418. Example: <strong>-z megaco,rtd</strong>.</p>
  3419. </div>
  3420. <div class="paragraph">
  3421. <p>Example: <strong>-z "megaco,rtd,ip.addr==1.2.3.4"</strong> will only collect stats for
  3422. MEGACO packets exchanged by the host at IP address 1.2.3.4 .</p>
  3423. </div>
  3424. <div class="paragraph">
  3425. <p>This option can be used multiple times on the command line.</p>
  3426. </div>
  3427. </div>
  3428. </div>
  3429. </dd>
  3430. <dt class="hdlist1"><strong>-z</strong> mgcp,rtd[,<em>filter</em>]</dt>
  3431. <dd>
  3432. <div class="openblock">
  3433. <div class="content">
  3434. <div class="paragraph">
  3435. <p>Collect requests/response RTD (Response Time Delay) data for MGCP.
  3436. (This is similar to <strong>-z smb,srt</strong>). Data collected is the number of calls
  3437. for each known MGCP Type, MinRTD, MaxRTD and AvgRTD.
  3438. Additionally you get the number of duplicate requests/responses,
  3439. unresponded requests, responses, which don&#8217;t match with any request.
  3440. Example: <strong>-z mgcp,rtd</strong>.</p>
  3441. </div>
  3442. <div class="paragraph">
  3443. <p>This option can be used multiple times on the command line.</p>
  3444. </div>
  3445. <div class="paragraph">
  3446. <p>Example: <strong>-z "mgcp,rtd,ip.addr==1.2.3.4"</strong> will only collect stats for
  3447. MGCP packets exchanged by the host at IP address 1.2.3.4 .</p>
  3448. </div>
  3449. </div>
  3450. </div>
  3451. </dd>
  3452. <dt class="hdlist1"><strong>-z</strong> mtp3,msus[,<em>filter</em>]</dt>
  3453. <dd>
  3454. <div class="openblock">
  3455. <div class="content">
  3456. <div class="paragraph">
  3457. <p>Calculate statisics on MTP3 MSUs. For each combination of originating
  3458. point code, destination point code, and service indicator, calculates
  3459. the total number of MSUs, the total bytes, and the average bytes per MSU.</p>
  3460. </div>
  3461. </div>
  3462. </div>
  3463. </dd>
  3464. <dt class="hdlist1"><strong>-z</strong> ncp,srt[,<em>filter</em>]</dt>
  3465. <dd>
  3466. <div class="openblock">
  3467. <div class="content">
  3468. <div class="paragraph">
  3469. <p>Collect requests/response SRT (Service Response Time) data for Netware
  3470. Core Protocol. Minimum SRT, maximum SRT, average SRT, and sum SRT is
  3471. displayed for request/response pairs, organized by group, function and
  3472. subfunction, and verb. No statistics are gathered on unpaired messages.</p>
  3473. </div>
  3474. </div>
  3475. </div>
  3476. </dd>
  3477. <dt class="hdlist1"><strong>-z</strong> osmux,tree[,<em>filter</em>]</dt>
  3478. <dd>
  3479. <div class="openblock">
  3480. <div class="content">
  3481. <div class="paragraph">
  3482. <p>Calculate statistics for the OSmux voice/signaling multiplex protocol.
  3483. Displays the total number of OSmux packets, and displays for each stream
  3484. the number of packets, number of packets with the RTP market bit set,
  3485. number of AMR frames, jitter analysis, and sequence number analysis.</p>
  3486. </div>
  3487. </div>
  3488. </div>
  3489. </dd>
  3490. <dt class="hdlist1"><strong>-z</strong> pingpongprotocol,stat[,<em>filter</em>]</dt>
  3491. <dd>
  3492. <div class="openblock">
  3493. <div class="content">
  3494. <div class="paragraph">
  3495. <p>Calculate statistics on the Ping Pong Protocol of Reliable
  3496. Server Pooling. For each message type, displays the number, rate
  3497. and share among all message types of both packets and bytes, and the
  3498. first and last time that it is seen.</p>
  3499. </div>
  3500. </div>
  3501. </div>
  3502. </dd>
  3503. <dt class="hdlist1"><strong>-z</strong> plen,tree[,<em>filter</em>]</dt>
  3504. <dd>
  3505. <div class="openblock">
  3506. <div class="content">
  3507. <div class="paragraph">
  3508. <p>Calculate statistics on packet lengths. Packets are grouped into buckets
  3509. that grow exponentially with powers of two.</p>
  3510. </div>
  3511. </div>
  3512. </div>
  3513. </dd>
  3514. <dt class="hdlist1"><strong>-z</strong> proto,colinfo,<em>filter</em>,<em>field</em></dt>
  3515. <dd>
  3516. <div class="openblock">
  3517. <div class="content">
  3518. <div class="paragraph">
  3519. <p>Append all <em>field</em> values for the packet to the Info column of the
  3520. one-line summary output.
  3521. This feature can be used to append arbitrary fields to the Info column
  3522. in addition to the normal content of that column.
  3523. <em>field</em> is the display-filter name of a field which value should be placed
  3524. in the Info column.
  3525. <em>filter</em> is a filter string that controls for which packets the field value
  3526. will be presented in the info column. <em>field</em> will only be presented in the
  3527. Info column for the packets which match <em>filter</em>.</p>
  3528. </div>
  3529. <div class="admonitionblock note">
  3530. <table>
  3531. <tr>
  3532. <td class="icon">
  3533. <div class="title">Note</div>
  3534. </td>
  3535. <td class="content">
  3536. In order for <strong>TShark</strong> to be able to extract the <em>field</em> value
  3537. from the packet, <em>field</em> MUST be part of the <em>filter</em> string. If not,
  3538. <strong>TShark</strong> will not be able to extract its value.
  3539. </td>
  3540. </tr>
  3541. </table>
  3542. </div>
  3543. <div class="paragraph">
  3544. <p>For a simple example to add the "nfs.fh.hash" field to the Info column
  3545. for all packets containing the "nfs.fh.hash" field, use</p>
  3546. </div>
  3547. <div class="paragraph">
  3548. <p><strong>-z proto,colinfo,nfs.fh.hash,nfs.fh.hash</strong></p>
  3549. </div>
  3550. <div class="paragraph">
  3551. <p>To put "nfs.fh.hash" in the Info column but only for packets coming from
  3552. host 1.2.3.4 use:</p>
  3553. </div>
  3554. <div class="paragraph">
  3555. <p><strong>-z "proto,colinfo,nfs.fh.hash &amp;&amp; ip.src==1.2.3.4,nfs.fh.hash"</strong></p>
  3556. </div>
  3557. <div class="paragraph">
  3558. <p>This option can be used multiple times on the command line.</p>
  3559. </div>
  3560. </div>
  3561. </div>
  3562. </dd>
  3563. <dt class="hdlist1"><strong>-z</strong> ptype,tree[,<em>filter</em>]</dt>
  3564. <dd>
  3565. <div class="openblock">
  3566. <div class="content">
  3567. <div class="paragraph">
  3568. <p>Calculate statistics on port types that occur on IPv4 packets.</p>
  3569. </div>
  3570. </div>
  3571. </div>
  3572. </dd>
  3573. <dt class="hdlist1"><strong>-z</strong> radius,rtd[,<em>filter</em>]</dt>
  3574. <dd>
  3575. <div class="openblock">
  3576. <div class="content">
  3577. <div class="paragraph">
  3578. <p>Collect requests/response RTD (Response Time Delay) data for RAIDUS.
  3579. The data collected for each RADIUS code is the number of calls,
  3580. Minimum RTD, Maximum RTD, Average RTD, Minimum in Frame, and Maximum in Frame,
  3581. along with the number of Open Requests (Unresponded Requests), Discarded
  3582. Responses (Responses without matching request) and Duplicate Messages.</p>
  3583. </div>
  3584. </div>
  3585. </div>
  3586. </dd>
  3587. <dt class="hdlist1"><strong>-z</strong> rlc-lte,stat[,<em>filter</em>]</dt>
  3588. <dd>
  3589. <div class="openblock">
  3590. <div class="content">
  3591. <div class="paragraph">
  3592. <p>This option will activate a counter for LTE RLC messages. You will get
  3593. information about common messages and various counters for each UE that appears
  3594. in the log.</p>
  3595. </div>
  3596. <div class="paragraph">
  3597. <p>Example: <strong>tshark -z rlc-lte,stat</strong>.</p>
  3598. </div>
  3599. <div class="paragraph">
  3600. <p>This option can be used multiple times on the command line.</p>
  3601. </div>
  3602. <div class="paragraph">
  3603. <p>Example: <strong>-z "rlc-lte,stat,rlc-lte.ueid&gt;3000"</strong> will only collect stats for
  3604. UEs with a UEId of more than 3000.</p>
  3605. </div>
  3606. </div>
  3607. </div>
  3608. </dd>
  3609. <dt class="hdlist1"><strong>-z</strong> rpc,programs</dt>
  3610. <dd>
  3611. <div class="openblock">
  3612. <div class="content">
  3613. <div class="paragraph">
  3614. <p>Collect call/reply SRT data for all known ONC-RPC programs/versions.
  3615. Data collected is number of calls for each protocol/version, MinSRT,
  3616. MaxSRT and AvgSRT.
  3617. This option can only be used once on the command line.</p>
  3618. </div>
  3619. </div>
  3620. </div>
  3621. </dd>
  3622. <dt class="hdlist1"><strong>-z</strong> rpc,srt,<em>program</em>,<em>version</em>[,<em>filter</em>]</dt>
  3623. <dd>
  3624. <div class="openblock">
  3625. <div class="content">
  3626. <div class="paragraph">
  3627. <p>Collect call/reply SRT (Service Response Time) data for <em>program</em>/<em>version</em>.
  3628. Data collected is the number of calls for each procedure, MinSRT, MaxSRT,
  3629. AvgSRT, and the total time taken for each procedure.</p>
  3630. </div>
  3631. <div class="paragraph">
  3632. <p>Example: <strong>tshark -z rpc,srt,100003,3</strong> will collect data for NFS v3.</p>
  3633. </div>
  3634. <div class="paragraph">
  3635. <p>This option can be used multiple times on the command line.</p>
  3636. </div>
  3637. <div class="paragraph">
  3638. <p>Example: <strong>-z rpc,srt,100003,3,nfs.fh.hash==0x12345678</strong> will collect NFS v3
  3639. SRT statistics for a specific file.</p>
  3640. </div>
  3641. </div>
  3642. </div>
  3643. </dd>
  3644. <dt class="hdlist1"><strong>-z</strong> rtp,streams</dt>
  3645. <dd>
  3646. <div class="openblock">
  3647. <div class="content">
  3648. <div class="paragraph">
  3649. <p>Collect statistics for all RTP streams and calculate max. delta, max. and
  3650. mean jitter and packet loss percentages.</p>
  3651. </div>
  3652. </div>
  3653. </div>
  3654. </dd>
  3655. <dt class="hdlist1"><strong>-z</strong> rtsp,stat[,<em>filter</em>]</dt>
  3656. <dd>
  3657. <div class="openblock">
  3658. <div class="content">
  3659. <div class="paragraph">
  3660. <p>Count the RTSP response status codes and the RSTP request methods.</p>
  3661. </div>
  3662. </div>
  3663. </div>
  3664. </dd>
  3665. <dt class="hdlist1"><strong>-z</strong> rtsp,tree[,<em>filter</em>]</dt>
  3666. <dd>
  3667. <div class="openblock">
  3668. <div class="content">
  3669. <div class="paragraph">
  3670. <p>Calculate the RTSP packet distribution. Displayed values are the
  3671. response status codes and request methods.</p>
  3672. </div>
  3673. </div>
  3674. </div>
  3675. </dd>
  3676. <dt class="hdlist1"><strong>-z</strong> sametime,tree[,<em>filter</em>]</dt>
  3677. <dd>
  3678. <div class="openblock">
  3679. <div class="content">
  3680. <div class="paragraph">
  3681. <p>Calculate statistics on SAMETIME messages. Displayed values are the
  3682. messages type, send type, and user status.</p>
  3683. </div>
  3684. </div>
  3685. </div>
  3686. </dd>
  3687. <dt class="hdlist1"><strong>-z</strong> scsi,srt,<em>cmdset</em>[,<em>filter</em>]</dt>
  3688. <dd>
  3689. <div class="openblock">
  3690. <div class="content">
  3691. <div class="paragraph">
  3692. <p>Collect call/reply SRT (Service Response Time) data for SCSI commandset <em>cmdset</em>.</p>
  3693. </div>
  3694. <div class="paragraph">
  3695. <p>Commandsets are 0:SBC 1:SSC 5:MMC</p>
  3696. </div>
  3697. <div class="paragraph">
  3698. <p>Data collected
  3699. is the number of calls for each procedure, MinSRT, MaxSRT and AvgSRT.</p>
  3700. </div>
  3701. <div class="paragraph">
  3702. <p>Example: <strong>-z scsi,srt,0</strong> will collect data for SCSI BLOCK COMMANDS (SBC).</p>
  3703. </div>
  3704. <div class="paragraph">
  3705. <p>This option can be used multiple times on the command line.</p>
  3706. </div>
  3707. <div class="paragraph">
  3708. <p>Example: <strong>-z scsi,srt,0,ip.addr==1.2.3.4</strong> will collect SCSI SBC
  3709. SRT statistics for a specific iscsi/ifcp/fcip host.</p>
  3710. </div>
  3711. </div>
  3712. </div>
  3713. </dd>
  3714. <dt class="hdlist1"><strong>-z</strong> sctp,stat</dt>
  3715. <dd>
  3716. <div class="openblock">
  3717. <div class="content">
  3718. <div class="paragraph">
  3719. <p>Activate a counter for SCTP chunks. In addition to the total number of
  3720. SCTP packets, for each source and destination address and port combination
  3721. the number of chunks of the most common types (DATA, SACK, HEARTBEAT,
  3722. HEARTBEAT ACK, INIT, INIT ACK, COOKIE ECHO, COOKIE ACK, ABORT, and ERROR)
  3723. are displayed.</p>
  3724. </div>
  3725. </div>
  3726. </div>
  3727. </dd>
  3728. <dt class="hdlist1"><strong>-z</strong> sip,stat[,<em>filter</em>]</dt>
  3729. <dd>
  3730. <div class="openblock">
  3731. <div class="content">
  3732. <div class="paragraph">
  3733. <p>This option will activate a counter for SIP messages. You will get the number
  3734. of occurrences of each SIP Method and of each SIP Status-Code. Additionally
  3735. you also get the number of resent SIP Messages (only for SIP over UDP).</p>
  3736. </div>
  3737. <div class="paragraph">
  3738. <p>Example: <strong>-z sip,stat</strong>.</p>
  3739. </div>
  3740. <div class="paragraph">
  3741. <p>This option can be used multiple times on the command line.</p>
  3742. </div>
  3743. <div class="paragraph">
  3744. <p>Example: <strong>-z "sip,stat,ip.addr==1.2.3.4"</strong> will only collect stats for
  3745. SIP packets exchanged by the host at IP address 1.2.3.4 .</p>
  3746. </div>
  3747. </div>
  3748. </div>
  3749. </dd>
  3750. <dt class="hdlist1"><strong>-z</strong> smb,sids</dt>
  3751. <dd>
  3752. <div class="openblock">
  3753. <div class="content">
  3754. <div class="paragraph">
  3755. <p>When this feature is used <strong>TShark</strong> will print a report with all the
  3756. discovered SID and account name mappings. Only those SIDs where the
  3757. account name is known will be presented in the table.</p>
  3758. </div>
  3759. <div class="paragraph">
  3760. <p>For this feature to work you will need to either to enable
  3761. "Edit/Preferences/Protocols/SMB/Snoop SID to name mappings" in the
  3762. preferences or you can override the preferences by specifying
  3763. <span class="nowrap"><strong>-o "smb.sid_name_snooping:TRUE"</strong></span> on the <strong>TShark</strong> command line.</p>
  3764. </div>
  3765. <div class="paragraph">
  3766. <p>The current method used by <strong>TShark</strong> to find the SID&#8594;name mapping
  3767. is relatively restricted with a hope of future expansion.</p>
  3768. </div>
  3769. </div>
  3770. </div>
  3771. </dd>
  3772. <dt class="hdlist1"><strong>-z</strong> smb,srt[,<em>filter</em>]</dt>
  3773. <dd>
  3774. <div class="openblock">
  3775. <div class="content">
  3776. <div class="paragraph">
  3777. <p>Collect call/reply SRT (Service Response Time) data for SMB. Data collected
  3778. is number of calls for each SMB command, MinSRT, MaxSRT and AvgSRT.</p>
  3779. </div>
  3780. <div class="paragraph">
  3781. <p>Example: <strong>-z smb,srt</strong></p>
  3782. </div>
  3783. <div class="paragraph">
  3784. <p>The data will be presented as separate tables for all normal SMB commands,
  3785. all Transaction2 commands and all NT Transaction commands.
  3786. Only those commands that are seen in the capture will have its stats
  3787. displayed.
  3788. Only the first command in a xAndX command chain will be used in the
  3789. calculation. So for common SessionSetupAndX + TreeConnectAndX chains,
  3790. only the SessionSetupAndX call will be used in the statistics.
  3791. This is a flaw that might be fixed in the future.</p>
  3792. </div>
  3793. <div class="paragraph">
  3794. <p>This option can be used multiple times on the command line.</p>
  3795. </div>
  3796. <div class="paragraph">
  3797. <p>Example: <strong>-z "smb,srt,ip.addr==1.2.3.4"</strong> will only collect stats for
  3798. SMB packets exchanged by the host at IP address 1.2.3.4 .</p>
  3799. </div>
  3800. </div>
  3801. </div>
  3802. </dd>
  3803. <dt class="hdlist1"><strong>-z</strong> smb2,srt[,<em>filter</em>]</dt>
  3804. <dd>
  3805. <div class="openblock">
  3806. <div class="content">
  3807. <div class="paragraph">
  3808. <p>Collect call/reply SRT (Service Response Time) data for SMB versions 2 and 3.
  3809. The data collected for each normal command type is the number of calls,
  3810. MinSRT, MaxSRT, AvgSRT, and SumSRT. No data is collected on cancel or
  3811. oplock break requests, or on unpaired commands. Only the first response to
  3812. a given request is used; retransmissions are not included in the calculation.</p>
  3813. </div>
  3814. </div>
  3815. </div>
  3816. </dd>
  3817. <dt class="hdlist1"><strong>-z</strong> smpp_commands,tree[,<em>filter</em>]</dt>
  3818. <dd>
  3819. <div class="openblock">
  3820. <div class="content">
  3821. <div class="paragraph">
  3822. <p>Calculate the SMPP command distribution. Displayed values are
  3823. command IDs for both requests and responses, and status for responses.</p>
  3824. </div>
  3825. </div>
  3826. </div>
  3827. </dd>
  3828. <dt class="hdlist1"><strong>-z</strong> snmp,srt[,<em>filter</em>]</dt>
  3829. <dd>
  3830. <div class="openblock">
  3831. <div class="content">
  3832. <div class="paragraph">
  3833. <p>Collect call/reply SRT (Service Response Time) data for SNMP. The data
  3834. collected for each PDU type is the number of request/response pairs,
  3835. MinSRT, MaxSRT, AvgSRT, and SumSRT. No data is collected on unpaired
  3836. messages.</p>
  3837. </div>
  3838. </div>
  3839. </div>
  3840. </dd>
  3841. <dt class="hdlist1"><strong>-z</strong> someip_messages,tree[,<em>filter</em>]</dt>
  3842. <dd>
  3843. <div class="openblock">
  3844. <div class="content">
  3845. <div class="paragraph">
  3846. <p>Create statistic of SOME/IP messages. Messages are counted and displayed
  3847. as Messages grouped by sender/receiver.</p>
  3848. </div>
  3849. </div>
  3850. </div>
  3851. </dd>
  3852. <dt class="hdlist1"><strong>-z</strong> someipsd_entries,tree[,<em>filter</em>]</dt>
  3853. <dd>
  3854. <div class="openblock">
  3855. <div class="content">
  3856. <div class="paragraph">
  3857. <p>Create statistic of SOME/IP-SD entries. Entries are counted and displayed
  3858. as Entries grouped by sender/receiver.</p>
  3859. </div>
  3860. </div>
  3861. </div>
  3862. </dd>
  3863. <dt class="hdlist1"><strong>-z</strong> sv</dt>
  3864. <dd>
  3865. <div class="openblock">
  3866. <div class="content">
  3867. <div class="paragraph">
  3868. <p>Print out the time since the start of the capture and sample count for each
  3869. IEC 61850 Sampled Values packet.</p>
  3870. </div>
  3871. </div>
  3872. </div>
  3873. </dd>
  3874. <dt class="hdlist1"><strong>-z</strong> ucp_messages,tree[,<em>filter</em>]</dt>
  3875. <dd>
  3876. <div class="openblock">
  3877. <div class="content">
  3878. <div class="paragraph">
  3879. <p>Calculate the message distribution of UCP packets. Displayed values are
  3880. operation types for both operations and results, and whether results are
  3881. positive or negative, with error codes displayed for negative results.</p>
  3882. </div>
  3883. </div>
  3884. </div>
  3885. </dd>
  3886. <dt class="hdlist1"><strong>-z</strong> wsp,stat[,<em>filter</em>]</dt>
  3887. <dd>
  3888. <div class="openblock">
  3889. <div class="content">
  3890. <div class="paragraph">
  3891. <p>Count the PDU types and the status codes of reply packets for WSP packets.</p>
  3892. </div>
  3893. </div>
  3894. </div>
  3895. </dd>
  3896. <dt class="hdlist1">--capture-comment &lt;comment&gt;</dt>
  3897. <dd>
  3898. <div class="openblock">
  3899. <div class="content">
  3900. <div class="paragraph">
  3901. <p>Add a capture comment to the output file, if supported by the output
  3902. file format.</p>
  3903. </div>
  3904. <div class="paragraph">
  3905. <p>This option may be specified multiple times. Note that Wireshark
  3906. currently only displays the first comment of a capture file.</p>
  3907. </div>
  3908. </div>
  3909. </div>
  3910. </dd>
  3911. <dt class="hdlist1">--list-time-stamp-types</dt>
  3912. <dd>
  3913. <div class="openblock">
  3914. <div class="content">
  3915. <div class="paragraph">
  3916. <p>List time stamp types supported for the interface. If no time stamp type can be
  3917. set, no time stamp types are listed.</p>
  3918. </div>
  3919. </div>
  3920. </div>
  3921. </dd>
  3922. <dt class="hdlist1">--time-stamp-type &lt;type&gt;</dt>
  3923. <dd>
  3924. <div class="openblock">
  3925. <div class="content">
  3926. <div class="paragraph">
  3927. <p>Change the interface&#8217;s timestamp method.</p>
  3928. </div>
  3929. </div>
  3930. </div>
  3931. </dd>
  3932. <dt class="hdlist1">--color</dt>
  3933. <dd>
  3934. <div class="openblock">
  3935. <div class="content">
  3936. <div class="paragraph">
  3937. <p>Enable coloring of packets according to standard Wireshark color
  3938. filters. On Windows colors are limited to the standard console
  3939. character attribute colors. Other platforms require a terminal that
  3940. handles 24-bit "true color" terminal escape sequences. See
  3941. <a href="https://gitlab.com/wireshark/wireshark/-/wikis/ColoringRules" class="bare">https://gitlab.com/wireshark/wireshark/-/wikis/ColoringRules</a> for more information on
  3942. configuring color filters.</p>
  3943. </div>
  3944. </div>
  3945. </div>
  3946. </dd>
  3947. <dt class="hdlist1">--no-duplicate-keys</dt>
  3948. <dd>
  3949. <div class="openblock">
  3950. <div class="content">
  3951. <div class="paragraph">
  3952. <p>If a key appears multiple times in an object, only write it a single time with
  3953. as value a json array containing all the separate values. (Only works with
  3954. -T json)</p>
  3955. </div>
  3956. </div>
  3957. </div>
  3958. </dd>
  3959. <dt class="hdlist1">--elastic-mapping-filter &lt;protocol&gt;,&lt;protocol&gt;,&#8230;&#8203;</dt>
  3960. <dd>
  3961. <div class="openblock">
  3962. <div class="content">
  3963. <div class="paragraph">
  3964. <p>When generating the ElasticSearch mapping file, only put the specified protocols
  3965. in it, to avoid a huge mapping file that can choke some software (such as Kibana).
  3966. The option takes a list of wanted protocol abbreviations, separated by comma.</p>
  3967. </div>
  3968. <div class="paragraph">
  3969. <p>Example: ip,udp,dns puts only those three protocols in the mapping file.</p>
  3970. </div>
  3971. </div>
  3972. </div>
  3973. </dd>
  3974. <dt class="hdlist1">--export-objects &lt;protocol&gt;,&lt;destdir&gt;</dt>
  3975. <dd>
  3976. <div class="openblock">
  3977. <div class="content">
  3978. <div class="paragraph">
  3979. <p>Export all objects within a protocol into directory <strong>destdir</strong>. The available
  3980. values for <strong>protocol</strong> can be listed with <strong>--export-objects help</strong>.</p>
  3981. </div>
  3982. <div class="paragraph">
  3983. <p>The objects are directly saved in the given directory. Filenames are dependent
  3984. on the dissector, but typically it is named after the basename of a file.
  3985. Duplicate files are not overwritten, instead an increasing number is appended
  3986. before the file extension.</p>
  3987. </div>
  3988. <div class="paragraph">
  3989. <p>This interface is subject to change, adding the possibility to filter on files.</p>
  3990. </div>
  3991. </div>
  3992. </div>
  3993. </dd>
  3994. <dt class="hdlist1">--enable-protocol &lt;proto_name&gt;</dt>
  3995. <dd>
  3996. <div class="openblock">
  3997. <div class="content">
  3998. <div class="paragraph">
  3999. <p>Enable dissection of proto_name.</p>
  4000. </div>
  4001. </div>
  4002. </div>
  4003. </dd>
  4004. <dt class="hdlist1">--disable-protocol &lt;proto_name&gt;</dt>
  4005. <dd>
  4006. <div class="openblock">
  4007. <div class="content">
  4008. <div class="paragraph">
  4009. <p>Disable dissection of proto_name.</p>
  4010. </div>
  4011. </div>
  4012. </div>
  4013. </dd>
  4014. <dt class="hdlist1">--enable-heuristic &lt;short_name&gt;</dt>
  4015. <dd>
  4016. <div class="openblock">
  4017. <div class="content">
  4018. <div class="paragraph">
  4019. <p>Enable dissection of heuristic protocol.</p>
  4020. </div>
  4021. </div>
  4022. </div>
  4023. </dd>
  4024. <dt class="hdlist1">--disable-heuristic &lt;short_name&gt;</dt>
  4025. <dd>
  4026. <div class="openblock">
  4027. <div class="content">
  4028. <div class="paragraph">
  4029. <p>Disable dissection of heuristic protocol.</p>
  4030. </div>
  4031. </div>
  4032. </div>
  4033. </dd>
  4034. </dl>
  4035. </div>
  4036. </div>
  4037. </div>
  4038. <div class="sect1">
  4039. <h2 id="_diagnostic_options">DIAGNOSTIC OPTIONS</h2>
  4040. <div class="sectionbody">
  4041. <div class="dlist">
  4042. <dl>
  4043. <dt class="hdlist1">--log-level &lt;level&gt;</dt>
  4044. <dd>
  4045. <p>Set the active log level.
  4046. Supported levels in lowest to highest order are "noisy", "debug", "info", "message", "warning", "critical", and "error".
  4047. Messages at each level and higher will be printed, for example "warning" prints "warning", "critical", and "error" messages and "noisy" prints all messages.
  4048. Levels are case insensitive.</p>
  4049. </dd>
  4050. <dt class="hdlist1">--log-fatal &lt;level&gt;</dt>
  4051. <dd>
  4052. <p>Abort the program if any messages are logged at the specified level or higher.
  4053. For example, "warning" aborts on any "warning", "critical", or "error" messages.</p>
  4054. </dd>
  4055. </dl>
  4056. </div>
  4057. <div class="dlist">
  4058. <dl>
  4059. <dt class="hdlist1">--log-domains &lt;list&gt;</dt>
  4060. <dd>
  4061. <p>Only print messages for the specified log domains, e.g. "GUI,Epan,sshdump".
  4062. List of domains must be comma-separated.</p>
  4063. </dd>
  4064. <dt class="hdlist1">--log-debug &lt;list&gt;</dt>
  4065. <dd>
  4066. <p>Force the specified domains to log at the "debug" level.
  4067. List of domains must be comma-separated.</p>
  4068. </dd>
  4069. <dt class="hdlist1">--log-noisy &lt;list&gt;</dt>
  4070. <dd>
  4071. <p>Force the specified domains to log at the "noisy" level.
  4072. List of domains must be comma-separated.</p>
  4073. </dd>
  4074. <dt class="hdlist1">--log-file &lt;path&gt;</dt>
  4075. <dd>
  4076. <p>Write log messages and stderr output to the specified file.</p>
  4077. </dd>
  4078. </dl>
  4079. </div>
  4080. </div>
  4081. </div>
  4082. <div class="sect1">
  4083. <h2 id="_capture_filter_syntax">CAPTURE FILTER SYNTAX</h2>
  4084. <div class="sectionbody">
  4085. <div class="paragraph">
  4086. <p>See the manual page of <a href="https://www.tcpdump.org/manpages/pcap-filter.7.html">pcap-filter</a>(7) or, if that doesn&#8217;t exist, <a href="https://www.tcpdump.org/manpages/tcpdump.1.html">tcpdump</a>(8),
  4087. or, if that doesn&#8217;t exist, <a href="https://gitlab.com/wireshark/wireshark/-/wikis/CaptureFilters" class="bare">https://gitlab.com/wireshark/wireshark/-/wikis/CaptureFilters</a>.</p>
  4088. </div>
  4089. </div>
  4090. </div>
  4091. <div class="sect1">
  4092. <h2 id="_read_filter_syntax">READ FILTER SYNTAX</h2>
  4093. <div class="sectionbody">
  4094. <div class="paragraph">
  4095. <p>For a complete table of protocol and protocol fields that are filterable
  4096. in <strong>TShark</strong> see the <a href="wireshark-filter.html">wireshark-filter</a>(4) manual page.</p>
  4097. </div>
  4098. </div>
  4099. </div>
  4100. <div class="sect1">
  4101. <h2 id="_files">FILES</h2>
  4102. <div class="sectionbody">
  4103. <div class="paragraph">
  4104. <p>These files contains various <strong>Wireshark</strong> configuration values.</p>
  4105. </div>
  4106. <div class="dlist">
  4107. <dl>
  4108. <dt class="hdlist1">Preferences</dt>
  4109. <dd>
  4110. <div class="openblock">
  4111. <div class="content">
  4112. <div class="paragraph">
  4113. <p>The <em>preferences</em> files contain global (system-wide) and personal
  4114. preference settings. If the system-wide preference file exists, it is
  4115. read first, overriding the default settings. If the personal preferences
  4116. file exists, it is read next, overriding any previous values. Note: If
  4117. the command line option <strong>-o</strong> is used (possibly more than once), it will
  4118. in turn override values from the preferences files.</p>
  4119. </div>
  4120. <div class="paragraph">
  4121. <p>The preferences settings are in the form <em>prefname:value</em>,
  4122. one per line,
  4123. where <em>prefname</em> is the name of the preference
  4124. and <em>value</em> is the value to
  4125. which it should be set; white space is allowed between <strong>:</strong> and
  4126. <em>value</em>. A preference setting can be continued on subsequent lines by
  4127. indenting the continuation lines with white space. A <strong>#</strong> character
  4128. starts a comment that runs to the end of the line:</p>
  4129. </div>
  4130. <div class="literalblock">
  4131. <div class="content">
  4132. <pre># Capture in promiscuous mode?
  4133. # TRUE or FALSE (case-insensitive).
  4134. capture.prom_mode: TRUE</pre>
  4135. </div>
  4136. </div>
  4137. <div class="paragraph">
  4138. <p>The global preferences file is looked for in the <em>wireshark</em> directory
  4139. under the <em>share</em> subdirectory of the main installation directory (for
  4140. example, <em>/usr/local/share/wireshark/preferences</em>) on UNIX-compatible
  4141. systems, and in the main installation directory (for example,
  4142. <em>C:\Program Files\Wireshark\preferences</em>) on Windows systems.</p>
  4143. </div>
  4144. <div class="paragraph">
  4145. <p>The personal preferences file is looked for in
  4146. <em>$XDG_CONFIG_HOME/wireshark/preferences</em>
  4147. (or, if <em>$XDG_CONFIG_HOME/wireshark</em> does not exist while <em>$HOME/.wireshark</em>
  4148. is present, <em>$HOME/.wireshark/preferences</em>) on
  4149. UNIX-compatible systems and <em>%APPDATA%\Wireshark\preferences</em> (or, if
  4150. %APPDATA% isn&#8217;t defined, <em>%USERPROFILE%\Application
  4151. Data\Wireshark\preferences</em>) on Windows systems.</p>
  4152. </div>
  4153. </div>
  4154. </div>
  4155. </dd>
  4156. <dt class="hdlist1">Disabled (Enabled) Protocols</dt>
  4157. <dd>
  4158. <div class="openblock">
  4159. <div class="content">
  4160. <div class="paragraph">
  4161. <p>The <em>disabled_protos</em> files contain system-wide and personal lists of
  4162. protocols that have been disabled, so that their dissectors are never
  4163. called. The files contain protocol names, one per line, where the
  4164. protocol name is the same name that would be used in a display filter
  4165. for the protocol:</p>
  4166. </div>
  4167. <div class="literalblock">
  4168. <div class="content">
  4169. <pre>http
  4170. tcp # a comment</pre>
  4171. </div>
  4172. </div>
  4173. <div class="paragraph">
  4174. <p>The global <em>disabled_protos</em> file uses the same directory as the global
  4175. preferences file.</p>
  4176. </div>
  4177. <div class="paragraph">
  4178. <p>The personal <em>disabled_protos</em> file uses the same directory as the
  4179. personal preferences file.</p>
  4180. </div>
  4181. </div>
  4182. </div>
  4183. </dd>
  4184. <dt class="hdlist1">Name Resolution (hosts)</dt>
  4185. <dd>
  4186. <div class="openblock">
  4187. <div class="content">
  4188. <div class="paragraph">
  4189. <p>If the personal <em>hosts</em> file exists, it is
  4190. used to resolve IPv4 and IPv6 addresses before any other
  4191. attempts are made to resolve them. The file has the standard <em>hosts</em>
  4192. file syntax; each line contains one IP address and name, separated by
  4193. whitespace. The same directory as for the personal preferences file is
  4194. used.</p>
  4195. </div>
  4196. <div class="paragraph">
  4197. <p>Capture filter name resolution is handled by libpcap on UNIX-compatible
  4198. systems and Npcap or WinPcap on Windows. As such the Wireshark personal
  4199. <em>hosts</em> file will not be consulted for capture filter name resolution.</p>
  4200. </div>
  4201. </div>
  4202. </div>
  4203. </dd>
  4204. <dt class="hdlist1">Name Resolution (subnets)</dt>
  4205. <dd>
  4206. <div class="openblock">
  4207. <div class="content">
  4208. <div class="paragraph">
  4209. <p>If an IPv4 address cannot be translated via name resolution (no exact
  4210. match is found) then a partial match is attempted via the <em>subnets</em> file.</p>
  4211. </div>
  4212. <div class="paragraph">
  4213. <p>Each line of this file consists of an IPv4 address, a subnet mask length
  4214. separated only by a / and a name separated by whitespace. While the address
  4215. must be a full IPv4 address, any values beyond the mask length are subsequently
  4216. ignored.</p>
  4217. </div>
  4218. <div class="paragraph">
  4219. <p>An example is:</p>
  4220. </div>
  4221. <div class="paragraph">
  4222. <p># Comments must be prepended by the # sign!
  4223. 192.168.0.0/24 ws_test_network</p>
  4224. </div>
  4225. <div class="paragraph">
  4226. <p>A partially matched name will be printed as "subnet-name.remaining-address".
  4227. For example, "192.168.0.1" under the subnet above would be printed as
  4228. "ws_test_network.1"; if the mask length above had been 16 rather than 24, the
  4229. printed address would be ``ws_test_network.0.1".</p>
  4230. </div>
  4231. </div>
  4232. </div>
  4233. </dd>
  4234. <dt class="hdlist1">Name Resolution (ethers)</dt>
  4235. <dd>
  4236. <div class="openblock">
  4237. <div class="content">
  4238. <div class="paragraph">
  4239. <p>The <em>ethers</em> files are consulted to correlate 6-byte hardware addresses to
  4240. names. First the personal <em>ethers</em> file is tried and if an address is not
  4241. found there the global <em>ethers</em> file is tried next.</p>
  4242. </div>
  4243. <div class="paragraph">
  4244. <p>Each line contains one hardware address and name, separated by
  4245. whitespace. The digits of the hardware address are separated by colons
  4246. (:), dashes (-) or periods (.). The same separator character must be
  4247. used consistently in an address. The following three lines are valid
  4248. lines of an <em>ethers</em> file:</p>
  4249. </div>
  4250. <div class="literalblock">
  4251. <div class="content">
  4252. <pre>ff:ff:ff:ff:ff:ff Broadcast
  4253. c0-00-ff-ff-ff-ff TR_broadcast
  4254. 00.00.00.00.00.00 Zero_broadcast</pre>
  4255. </div>
  4256. </div>
  4257. <div class="paragraph">
  4258. <p>The global <em>ethers</em> file is looked for in the <em>/etc</em> directory on
  4259. UNIX-compatible systems, and in the main installation directory (for
  4260. example, <em>C:\Program Files\Wireshark</em>) on Windows systems.</p>
  4261. </div>
  4262. <div class="paragraph">
  4263. <p>The personal <em>ethers</em> file is looked for in the same directory as the personal
  4264. preferences file.</p>
  4265. </div>
  4266. <div class="paragraph">
  4267. <p>Capture filter name resolution is handled by libpcap on UNIX-compatible
  4268. systems and Npcap or WinPcap on Windows. As such the Wireshark personal
  4269. <em>ethers</em> file will not be consulted for capture filter name resolution.</p>
  4270. </div>
  4271. </div>
  4272. </div>
  4273. </dd>
  4274. <dt class="hdlist1">Name Resolution (manuf)</dt>
  4275. <dd>
  4276. <div class="openblock">
  4277. <div class="content">
  4278. <div class="paragraph">
  4279. <p>The <em>manuf</em> file is used to match the 3-byte vendor portion of a 6-byte
  4280. hardware address with the manufacturer&#8217;s name; it can also contain well-known
  4281. MAC addresses and address ranges specified with a netmask. The format of the
  4282. file is the same as the <em>ethers</em> files, except that entries of the form:</p>
  4283. </div>
  4284. <div class="literalblock">
  4285. <div class="content">
  4286. <pre>00:00:0C Cisco</pre>
  4287. </div>
  4288. </div>
  4289. <div class="paragraph">
  4290. <p>can be provided, with the 3-byte OUI and the name for a vendor, and
  4291. entries such as:</p>
  4292. </div>
  4293. <div class="literalblock">
  4294. <div class="content">
  4295. <pre>00-00-0C-07-AC/40 All-HSRP-routers</pre>
  4296. </div>
  4297. </div>
  4298. <div class="paragraph">
  4299. <p>can be specified, with a MAC address and a mask indicating how many bits
  4300. of the address must match. The above entry, for example, has 40
  4301. significant bits, or 5 bytes, and would match addresses from
  4302. 00-00-0C-07-AC-00 through 00-00-0C-07-AC-FF. The mask need not be a
  4303. multiple of 8.</p>
  4304. </div>
  4305. <div class="paragraph">
  4306. <p>The <em>manuf</em> file is looked for in the same directory as the global
  4307. preferences file.</p>
  4308. </div>
  4309. </div>
  4310. </div>
  4311. </dd>
  4312. <dt class="hdlist1">Name Resolution (services)</dt>
  4313. <dd>
  4314. <div class="openblock">
  4315. <div class="content">
  4316. <div class="paragraph">
  4317. <p>The <em>services</em> file is used to translate port numbers into names.</p>
  4318. </div>
  4319. <div class="paragraph">
  4320. <p>The file has the standard <em>services</em> file syntax; each line contains one
  4321. (service) name and one transport identifier separated by white space. The
  4322. transport identifier includes one port number and one transport protocol name
  4323. (typically tcp, udp, or sctp) separated by a /.</p>
  4324. </div>
  4325. <div class="paragraph">
  4326. <p>An example is:</p>
  4327. </div>
  4328. <div class="literalblock">
  4329. <div class="content">
  4330. <pre>mydns 5045/udp # My own Domain Name Server
  4331. mydns 5045/tcp # My own Domain Name Server</pre>
  4332. </div>
  4333. </div>
  4334. </div>
  4335. </div>
  4336. </dd>
  4337. <dt class="hdlist1">Name Resolution (ipxnets)</dt>
  4338. <dd>
  4339. <div class="openblock">
  4340. <div class="content">
  4341. <div class="paragraph">
  4342. <p>The <em>ipxnets</em> files are used to correlate 4-byte IPX network numbers to
  4343. names. First the global <em>ipxnets</em> file is tried and if that address is not
  4344. found there the personal one is tried next.</p>
  4345. </div>
  4346. <div class="paragraph">
  4347. <p>The format is the same as the <em>ethers</em>
  4348. file, except that each address is four bytes instead of six.
  4349. Additionally, the address can be represented as a single hexadecimal
  4350. number, as is more common in the IPX world, rather than four hex octets.
  4351. For example, these four lines are valid lines of an <em>ipxnets</em> file:</p>
  4352. </div>
  4353. <div class="literalblock">
  4354. <div class="content">
  4355. <pre>C0.A8.2C.00 HR
  4356. c0-a8-1c-00 CEO
  4357. 00:00:BE:EF IT_Server1
  4358. 110f FileServer3</pre>
  4359. </div>
  4360. </div>
  4361. <div class="paragraph">
  4362. <p>The global <em>ipxnets</em> file is looked for in the <em>/etc</em> directory on
  4363. UNIX-compatible systems, and in the main installation directory (for
  4364. example, <em>C:\Program Files\Wireshark</em>) on Windows systems.</p>
  4365. </div>
  4366. <div class="paragraph">
  4367. <p>The personal <em>ipxnets</em> file is looked for in the same directory as the
  4368. personal preferences file.</p>
  4369. </div>
  4370. </div>
  4371. </div>
  4372. </dd>
  4373. </dl>
  4374. </div>
  4375. </div>
  4376. </div>
  4377. <div class="sect1">
  4378. <h2 id="_output">OUTPUT</h2>
  4379. <div class="sectionbody">
  4380. <div class="paragraph">
  4381. <p><strong>TShark</strong> uses UTF-8 to represent strings internally. In some cases the
  4382. output might not be valid. For example, a dissector might generate
  4383. invalid UTF-8 character sequences. Programs reading <strong>TShark</strong> output
  4384. should expect UTF-8 and be prepared for invalid output.</p>
  4385. </div>
  4386. <div class="paragraph">
  4387. <p>If <strong>TShark</strong> detects that it is writing to a TTY on UNIX or Linux and
  4388. the locale does not support UTF-8, output will be re-encoded to match the
  4389. current locale.</p>
  4390. </div>
  4391. <div class="paragraph">
  4392. <p>If <strong>TShark</strong> detects that it is writing to the console on Windows,
  4393. dissection output will be encoded as UTF-16LE. Other output will be
  4394. UTF-8. If extended characters don&#8217;t display properly in your terminal
  4395. you might try setting your console code page to UTF-8 (<strong>chcp 65001</strong>)
  4396. and using a modern terminal application if possible.</p>
  4397. </div>
  4398. </div>
  4399. </div>
  4400. <div class="sect1">
  4401. <h2 id="_environment_variables">ENVIRONMENT VARIABLES</h2>
  4402. <div class="sectionbody">
  4403. <div class="dlist">
  4404. <dl>
  4405. <dt class="hdlist1">WIRESHARK_CONFIG_DIR</dt>
  4406. <dd>
  4407. <div class="openblock">
  4408. <div class="content">
  4409. <div class="paragraph">
  4410. <p>This environment variable overrides the location of personal configuration
  4411. files. It defaults to <em>$XDG_CONFIG_HOME/wireshark</em> (or <em>$HOME/.wireshark</em> if
  4412. the former is missing while the latter exists). On Windows,
  4413. <em>%APPDATA%\Wireshark</em> is used instead. Available since Wireshark 3.0.</p>
  4414. </div>
  4415. </div>
  4416. </div>
  4417. </dd>
  4418. <dt class="hdlist1">WIRESHARK_DEBUG_WMEM_OVERRIDE</dt>
  4419. <dd>
  4420. <div class="openblock">
  4421. <div class="content">
  4422. <div class="paragraph">
  4423. <p>Setting this environment variable forces the wmem framework to use the
  4424. specified allocator backend for <strong>all</strong> allocations, regardless of which
  4425. backend is normally specified by the code. This is mainly useful to developers
  4426. when testing or debugging. See <em>README.wmem</em> in the source distribution for
  4427. details.</p>
  4428. </div>
  4429. </div>
  4430. </div>
  4431. </dd>
  4432. <dt class="hdlist1">WIRESHARK_RUN_FROM_BUILD_DIRECTORY</dt>
  4433. <dd>
  4434. <div class="openblock">
  4435. <div class="content">
  4436. <div class="paragraph">
  4437. <p>This environment variable causes the plugins and other data files to be loaded
  4438. from the build directory (where the program was compiled) rather than from the
  4439. standard locations. It has no effect when the program in question is running
  4440. with root (or setuid) permissions on *NIX.</p>
  4441. </div>
  4442. </div>
  4443. </div>
  4444. </dd>
  4445. <dt class="hdlist1">WIRESHARK_DATA_DIR</dt>
  4446. <dd>
  4447. <div class="openblock">
  4448. <div class="content">
  4449. <div class="paragraph">
  4450. <p>This environment variable causes the various data files to be loaded from
  4451. a directory other than the standard locations. It has no effect when the
  4452. program in question is running with root (or setuid) permissions on *NIX.</p>
  4453. </div>
  4454. </div>
  4455. </div>
  4456. </dd>
  4457. <dt class="hdlist1">ERF_RECORDS_TO_CHECK</dt>
  4458. <dd>
  4459. <div class="openblock">
  4460. <div class="content">
  4461. <div class="paragraph">
  4462. <p>This environment variable controls the number of ERF records checked when
  4463. deciding if a file really is in the ERF format. Setting this environment
  4464. variable a number higher than the default (20) would make false positives
  4465. less likely.</p>
  4466. </div>
  4467. </div>
  4468. </div>
  4469. </dd>
  4470. <dt class="hdlist1">IPFIX_RECORDS_TO_CHECK</dt>
  4471. <dd>
  4472. <div class="openblock">
  4473. <div class="content">
  4474. <div class="paragraph">
  4475. <p>This environment variable controls the number of IPFIX records checked when
  4476. deciding if a file really is in the IPFIX format. Setting this environment
  4477. variable a number higher than the default (20) would make false positives
  4478. less likely.</p>
  4479. </div>
  4480. </div>
  4481. </div>
  4482. </dd>
  4483. <dt class="hdlist1">WIRESHARK_ABORT_ON_DISSECTOR_BUG</dt>
  4484. <dd>
  4485. <div class="openblock">
  4486. <div class="content">
  4487. <div class="paragraph">
  4488. <p>If this environment variable is set, <strong>TShark</strong> will call abort(3)
  4489. when a dissector bug is encountered. abort(3) will cause the program to
  4490. exit abnormally; if you are running <strong>TShark</strong> in a debugger, it
  4491. should halt in the debugger and allow inspection of the process, and, if
  4492. you are not running it in a debugger, it will, on some OSes, assuming
  4493. your environment is configured correctly, generate a core dump file.
  4494. This can be useful to developers attempting to troubleshoot a problem
  4495. with a protocol dissector.</p>
  4496. </div>
  4497. </div>
  4498. </div>
  4499. </dd>
  4500. <dt class="hdlist1">WIRESHARK_ABORT_ON_TOO_MANY_ITEMS</dt>
  4501. <dd>
  4502. <div class="openblock">
  4503. <div class="content">
  4504. <div class="paragraph">
  4505. <p>If this environment variable is set, <strong>TShark</strong> will call abort(3)
  4506. if a dissector tries to add too many items to a tree (generally this
  4507. is an indication of the dissector not breaking out of a loop soon enough).
  4508. abort(3) will cause the program to exit abnormally; if you are running
  4509. <strong>TShark</strong> in a debugger, it should halt in the debugger and allow
  4510. inspection of the process, and, if you are not running it in a debugger,
  4511. it will, on some OSes, assuming your environment is configured correctly,
  4512. generate a core dump file. This can be useful to developers attempting to
  4513. troubleshoot a problem with a protocol dissector.</p>
  4514. </div>
  4515. </div>
  4516. </div>
  4517. </dd>
  4518. <dt class="hdlist1">WIRESHARK_LOG_LEVEL</dt>
  4519. <dd>
  4520. <div class="openblock">
  4521. <div class="content">
  4522. <div class="paragraph">
  4523. <p>This environment variable controls the verbosity of diagnostic messages to
  4524. the console. From less verbose to most verbose levels can be <code>critical</code>,
  4525. <code>warning</code>, <code>message</code>, <code>info</code>, <code>debug</code> or <code>noisy</code>. Levels above the
  4526. current level are also active. Levels <code>critical</code> and <code>error</code> are always
  4527. active.</p>
  4528. </div>
  4529. </div>
  4530. </div>
  4531. </dd>
  4532. <dt class="hdlist1">WIRESHARK_LOG_FATAL</dt>
  4533. <dd>
  4534. <div class="openblock">
  4535. <div class="content">
  4536. <div class="paragraph">
  4537. <p>Sets the fatal log level. Fatal log levels cause the program to abort.
  4538. This level can be set to <code>Error</code>, <code>critical</code> or <code>warning</code>. <code>Error</code> is
  4539. always fatal and is the default.</p>
  4540. </div>
  4541. </div>
  4542. </div>
  4543. </dd>
  4544. <dt class="hdlist1">WIRESHARK_LOG_DOMAINS</dt>
  4545. <dd>
  4546. <div class="openblock">
  4547. <div class="content">
  4548. <div class="paragraph">
  4549. <p>This environment variable selects which log domains are active. The filter is
  4550. given as a case-insensitive comma separated list. If set only the included
  4551. domains will be enabled. The default domain is always considered to be enabled.
  4552. Domain filter lists can be preceded by '!' to invert the sense of the match.</p>
  4553. </div>
  4554. </div>
  4555. </div>
  4556. </dd>
  4557. <dt class="hdlist1">WIRESHARK_LOG_DEBUG</dt>
  4558. <dd>
  4559. <div class="openblock">
  4560. <div class="content">
  4561. <div class="paragraph">
  4562. <p>List of domains with <code>debug</code> log level. This sets the level of the provided
  4563. log domains and takes precedence over the active domains filter. If preceded
  4564. by '!' this disables the <code>debug</code> level instead.</p>
  4565. </div>
  4566. </div>
  4567. </div>
  4568. </dd>
  4569. <dt class="hdlist1">WIRESHARK_LOG_NOISY</dt>
  4570. <dd>
  4571. <div class="openblock">
  4572. <div class="content">
  4573. <div class="paragraph">
  4574. <p>Same as above but for <code>noisy</code> log level instead.</p>
  4575. </div>
  4576. </div>
  4577. </div>
  4578. </dd>
  4579. </dl>
  4580. </div>
  4581. </div>
  4582. </div>
  4583. <div class="sect1">
  4584. <h2 id="_see_also">SEE ALSO</h2>
  4585. <div class="sectionbody">
  4586. <div class="paragraph">
  4587. <p><a href="wireshark-filter.html">wireshark-filter</a>(4), <a href="wireshark.html">wireshark</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),
  4588. <a href="text2pcap.html">text2pcap</a>(1), <a href="mergecap.html">mergecap</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>
  4589. </div>
  4590. </div>
  4591. </div>
  4592. <div class="sect1">
  4593. <h2 id="_notes">NOTES</h2>
  4594. <div class="sectionbody">
  4595. <div class="paragraph">
  4596. <p>This is the manual page for <strong>TShark</strong> 4.0.5.
  4597. <strong>TShark</strong> is part of the <strong>Wireshark</strong> distribution.
  4598. 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>
  4599. </div>
  4600. <div class="paragraph">
  4601. <p>HTML versions of the Wireshark project man pages are available at
  4602. <a href="https://www.wireshark.org/docs/man-pages" class="bare">https://www.wireshark.org/docs/man-pages</a>.</p>
  4603. </div>
  4604. </div>
  4605. </div>
  4606. <div class="sect1">
  4607. <h2 id="_authors">AUTHORS</h2>
  4608. <div class="sectionbody">
  4609. <div class="paragraph">
  4610. <p><strong>TShark</strong> uses the same packet dissection code that <strong>Wireshark</strong> does,
  4611. as well as using many other modules from <strong>Wireshark</strong>; see the list of
  4612. authors in the <strong>Wireshark</strong> man page for a list of authors of that code.</p>
  4613. </div>
  4614. </div>
  4615. </div>
  4616. </div>
  4617. </body>
  4618. </html>