1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2<html lang="en"><head><title>PCAP New Generation Dump File Format</title> 3<meta name="description" content="PCAP New Generation Dump File Format"> 4<meta name="keywords" content="Internet-Draft, Libpcap, dump file format"> 5<meta name="generator" content="xml2rfc v1.22 (http://xml.resource.org/)"> 6<style type='text/css'> 7<!-- 8 body { 9 font-family: verdana, charcoal, helvetica, arial, sans-serif; 10 font-size: small ; color: #000000 ; background-color: #ffffff ; } 11 .title { color: #990000; font-size: x-large ; 12 font-weight: bold; text-align: right; 13 font-family: helvetica, monaco, "MS Sans Serif", arial, sans-serif; 14 background-color: transparent; } 15 .filename { color: #666666; font-size: 18px; line-height: 28px; 16 font-weight: bold; text-align: right; 17 font-family: helvetica, arial, sans-serif; 18 background-color: transparent; } 19 td.rfcbug { background-color: #000000 ; width: 30px ; height: 30px ; 20 text-align: justify; vertical-align: middle ; padding-top: 2px ; } 21 td.rfcbug span.RFC { color: #666666; font-weight: bold; text-decoration: none; 22 background-color: #000000 ; 23 font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, verdana, sans-serif; 24 font-size: x-small ; } 25 td.rfcbug span.hotText { color: #ffffff; font-weight: normal; text-decoration: none; 26 text-align: center ; 27 font-family: charcoal, monaco, geneva, "MS Sans Serif", helvetica, verdana, sans-serif; 28 font-size: x-small ; background-color: #000000; } 29 30 A { font-weight: bold; } 31 A:link { color: #990000; background-color: transparent ; } 32 A:visited { color: #333333; background-color: transparent ; } 33 A:active { color: #333333; background-color: transparent ; } 34 35 p { margin-left: 2em; margin-right: 2em; } 36 p.copyright { font-size: x-small ; } 37 p.toc { font-size: small ; font-weight: bold ; margin-left: 3em ;} 38 39 span.emph { font-style: italic; } 40 span.strong { font-weight: bold; } 41 span.verb { font-family: "Courier New", Courier, monospace ; } 42 43 ol.text { margin-left: 2em; margin-right: 2em; } 44 ul.text { margin-left: 2em; margin-right: 2em; } 45 li { margin-left: 3em; } 46 47 pre { margin-left: 3em; color: #333333; background-color: transparent; 48 font-family: "Courier New", Courier, monospace ; font-size: small ; 49 } 50 51 h3 { color: #333333; font-size: medium ; 52 font-family: helvetica, arial, sans-serif ; 53 background-color: transparent; } 54 h4 { font-size: small; font-family: helvetica, arial, sans-serif ; } 55 56 table.bug { width: 30px ; height: 15px ; } 57 td.bug { color: #ffffff ; background-color: #990000 ; 58 text-align: center ; width: 30px ; height: 15px ; 59 } 60 td.bug A.link2 { color: #ffffff ; font-weight: bold; 61 text-decoration: none; 62 font-family: monaco, charcoal, geneva, "MS Sans Serif", helvetica, sans-serif; 63 font-size: x-small ; background-color: transparent } 64 65 td.header { color: #ffffff; font-size: x-small ; 66 font-family: arial, helvetica, sans-serif; vertical-align: top; 67 background-color: #666666 ; width: 33% ; } 68 td.author { font-weight: bold; margin-left: 4em; font-size: x-small ; } 69 td.author-text { font-size: x-small; } 70 table.data { vertical-align: top ; border-collapse: collapse ; 71 border-style: solid solid solid solid ; 72 border-color: black black black black ; 73 font-size: small ; text-align: center ; } 74 table.data th { font-weight: bold ; 75 border-style: solid solid solid solid ; 76 border-color: black black black black ; } 77 table.data td { 78 border-style: solid solid solid solid ; 79 border-color: #333333 #333333 #333333 #333333 ; } 80 81 hr { height: 1px } 82--> 83</style> 84</head> 85<body> 86<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 87<table summary="layout" width="66%" border="0" cellpadding="0" cellspacing="0"><tr><td><table summary="layout" width="100%" border="0" cellpadding="2" cellspacing="1"> 88<tr><td class="header">Network Working Group</td><td class="header">L. Degioanni</td></tr> 89<tr><td class="header">Internet-Draft</td><td class="header">F. Risso</td></tr> 90<tr><td class="header">Expires: August 30, 2004</td><td class="header">Politecnico di Torino</td></tr> 91<tr><td class="header"> </td><td class="header">March 2004</td></tr> 92</table></td></tr></table> 93<div align="right"><span class="title"><br />PCAP New Generation Dump File Format</span></div> 94<div align="right"><span class="title"><br />pcap</span></div> 95 96<h3>Status of this Memo</h3> 97<p> 98This document is an Internet-Draft and is 99in full conformance with all provisions of Section 10 of RFC2026.</p> 100<p> 101Internet-Drafts are working documents of the Internet Engineering 102Task Force (IETF), its areas, and its working groups. 103Note that other groups may also distribute working documents as 104Internet-Drafts.</p> 105<p> 106Internet-Drafts are draft documents valid for a maximum of six months 107and may be updated, replaced, or obsoleted by other documents at any time. 108It is inappropriate to use Internet-Drafts as reference material or to cite 109them other than as "work in progress."</p> 110<p> 111The list of current Internet-Drafts can be accessed at 112<a href='http://www.ietf.org/ietf/1id-abstracts.txt'>http://www.ietf.org/ietf/1id-abstracts.txt</a>.</p> 113<p> 114The list of Internet-Draft Shadow Directories can be accessed at 115<a href='http://www.ietf.org/shadow.html'>http://www.ietf.org/shadow.html</a>.</p> 116<p> 117This Internet-Draft will expire on August 30, 2004.</p> 118 119<h3>Copyright Notice</h3> 120<p> 121Copyright (C) The Internet Society (2004). All Rights Reserved.</p> 122 123<h3>Abstract</h3> 124 125<p>This document describes a format to dump captured packets on a file. This format is extensible and it is currently proposed for implementation in the libpcap/WinPcap packet capture library. 126</p><a name="toc"></a><br /><hr /> 127<h3>Table of Contents</h3> 128<p class="toc"> 129<a href="#anchor1">1.</a> 130Objectives<br /> 131<a href="#anchor2">2.</a> 132General File Structure<br /> 133<a href="#sectionblock">2.1</a> 134General Block Structure<br /> 135<a href="#anchor3">2.2</a> 136Block Types<br /> 137<a href="#anchor4">2.3</a> 138Block Hierarchy and Precedence<br /> 139<a href="#anchor5">2.4</a> 140Data format<br /> 141<a href="#anchor6">3.</a> 142Block Definition<br /> 143<a href="#sectionshb">3.1</a> 144Section Header Block (mandatory)<br /> 145<a href="#sectionidb">3.2</a> 146Interface Description Block (mandatory)<br /> 147<a href="#sectionpb">3.3</a> 148Packet Block (optional)<br /> 149<a href="#anchor7">3.4</a> 150Simple Packet Block (optional)<br /> 151<a href="#anchor8">3.5</a> 152Name Resolution Block (optional)<br /> 153<a href="#anchor9">3.6</a> 154Interface Statistics Block (optional)<br /> 155<a href="#sectionopt">4.</a> 156Options<br /> 157<a href="#anchor10">5.</a> 158Experimental Blocks (deserved to a further investigation)<br /> 159<a href="#anchor11">5.1</a> 160Other Packet Blocks (experimental)<br /> 161<a href="#anchor12">5.2</a> 162Compression Block (experimental)<br /> 163<a href="#anchor13">5.3</a> 164Encryption Block (experimental)<br /> 165<a href="#anchor14">5.4</a> 166Fixed Length Block (experimental)<br /> 167<a href="#anchor15">5.5</a> 168Directory Block (experimental)<br /> 169<a href="#anchor16">5.6</a> 170Traffic Statistics and Monitoring Blocks (experimental)<br /> 171<a href="#anchor17">5.7</a> 172Event/Security Block (experimental)<br /> 173<a href="#anchor18">6.</a> 174Conclusions<br /> 175<a href="#anchor19">7.</a> 176Most important open issues<br /> 177<a href="#rfc.copyright">§</a> 178Intellectual Property and Copyright Statements<br /> 179</p> 180<br clear="all" /> 181 182<a name="anchor1"></a><br /><hr /> 183<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 184<a name="rfc.section.1"></a><h3>1. Objectives</h3> 185 186<p>The problem of exchanging packet traces becomes more and more critical every day; unfortunately, no standard solutions exist for this task right now. One of the most accepted packet interchange formats is the one defined by libpcap, which is rather old and does not fit for some of the nowadays applications especially in terms of extensibility. 187</p> 188<p>This document proposes a new format for dumping packet traces. The following goals are being pursued: 189</p> 190<ul class="text"> 191<li>Extensibility: aside of some common functionalities, third parties should be able to enrich the information embedded in the file with proprietary extensions, which will be ignored by tools that are not able to understand them. 192</li> 193<li>Portability: a capture trace must contain all the information needed to read data independently from network, hardware and operating system of the machine that made the capture. 194</li> 195<li>Merge/Append data: it should be possible to add data at the end of a given file, and the resulting file must still be readable. 196</li> 197</ul> 198<a name="anchor2"></a><br /><hr /> 199<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 200<a name="rfc.section.2"></a><h3>2. General File Structure</h3> 201 202<a name="rfc.section.2.1"></a><h4><a name="sectionblock">2.1</a> General Block Structure</h4> 203 204<p>A capture file is organized in blocks, that are appended one to another to form the file. All the blocks share a common format, which is shown in <a href="#formatblock">Figure 1</a>. 205</p><br /><hr /> 206<a name="formatblock"></a> 207<pre> 208 0 1 2 3 209 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 210 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 211 | Block Type | 212 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 213 | Block Total Length | 214 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 215 / Block Body / 216 / /* variable length, aligned to 32 bits */ / 217 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 218 | Block Total Length | 219 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 220</pre> 221<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Basic block structure. </b></font><br /></td></tr></table><hr size="1" shade="0"> 222 223<p>The fields have the following meaning: 224</p> 225<ul class="text"> 226<li>Block Type (32 bits): unique value that identifies the block. Values whose Most Significant Bit (MSB) is equal to 1 are reserved for local use. They allow to save private data to the file and to extend the file format. 227</li> 228<li>Block Total Length: total size of this block, in bytes. For instance, a block that does not have a body has a length of 12 bytes. 229</li> 230<li>Block Body: content of the block. 231</li> 232<li>Block Total Length: total size of this block, in bytes. This field is duplicated for permitting backward file navigation. 233</li> 234</ul> 235<p>This structure, shared among all blocks, makes easy to process a file and to skip unneeded or unknown blocks. Blocks can be nested one inside the others (NOTE: needed?). Some of the blocks are mandatory, i.e. a dump file is not valid if they are not present, other are optional. 236</p> 237<p>The structure of the blocks allows to define other blocks if needed. A parser that does non understand them can simply ignore their content. 238</p> 239<a name="rfc.section.2.2"></a><h4><a name="anchor3">2.2</a> Block Types</h4> 240 241<p>The currently defined blocks are the following: 242</p> 243<ol class="text"> 244<li>Section Header Block: it defines the most important characteristics of the capture file. 245</li> 246<li>Interface Description Block: it defines the most important characteristics of the interface(s) used for capturing traffic. 247</li> 248<li>Packet Block: it contains a single captured packet, or a portion of it. 249</li> 250<li>Simple Packet Block: it contains a single captured packet, or a portion of it, with only a minimal set of information about it. 251</li> 252<li>Name Resolution Block: it defines the mapping from numeric addresses present in the packet dump and the canonical name counterpart. 253</li> 254<li>Capture Statistics Block: it defines how to store some statistical data (e.g. packet dropped, etc) which can be useful to undestand the conditions in which the capture has been made. 255</li> 256<li>Compression Marker Block: TODO 257</li> 258<li>Encryption Marker Block: TODO 259</li> 260<li>Fixed Length Marker Block: TODO 261</li> 262</ol> 263<p>The following blocks instead are considered interesting but the authors believe that they deserve more in-depth discussion before being defined: 264</p> 265<ol class="text"> 266<li>Further Packet Blocks 267</li> 268<li>Directory Block 269</li> 270<li>Traffic Statistics and Monitoring Blocks 271</li> 272<li>Alert and Security Blocks 273</li> 274</ol> 275<p>TODO Currently standardized Block Type codes are specified in Appendix 1. 276</p> 277<a name="rfc.section.2.3"></a><h4><a name="anchor4">2.3</a> Block Hierarchy and Precedence</h4> 278 279<p>The file must begin with a Section Header Block. However, more than one Section Header Block can be present on the dump, each one covering the data following it till the next one (or the end of file). A Section includes the data delimited by two Section Header Blocks (or by a Section Header Block and the end of the file), including the first Section Header Block. 280</p> 281<p>In case an application cannot read a Section because of different version number, it must skip everything until the next Section Header Block. Note that, in order to properly skip the blocks until the next section, all blocks must have the fields Type and Length at the beginning. This is a mandatory requirement that must be maintained in future versions of the block format. 282</p> 283<p><a href="#fssample-SHB">Figure 2</a> shows two valid files: the first has a typical configuration, with a single Section Header that covers the whole file. The second one contains three headers, and is normally the result of file concatenation. An application that understands only version 1.0 of the file format skips the intermediate section and restart processing the packets after the third Section Header. 284</p><br /><hr /> 285<a name="fssample-SHB"></a> 286<pre> 287 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 288 | SHB v1.0 | Data | 289 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 290 Typical configuration with a single Section Header Block 291 292 293 |-- 1st Section --|-- 2nd Section --|-- 3rd Section --| 294 | | 295 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 296 | SHB v1.0 | Data | SHB V1.1 | Data | SHB V1.0 | Data | 297 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 298 Configuration with three different Section Header Blocks 299</pre> 300<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> File structure example: the Section Header Block. </b></font><br /></td></tr></table><hr size="1" shade="0"> 301 302<p>NOTE: TO BE COMPLETED with some examples of other blocks 303</p> 304<a name="rfc.section.2.4"></a><h4><a name="anchor5">2.4</a> Data format</h4> 305 306<p>Data contained in each section will always be saved according to the characteristics (little endian / big endian) of the dumping machine. This refers to all fields that are saved as numbers and that span over two or more bytes. 307</p> 308<p>The approach of having each section saved in the native format of the generating host is more efficient because it avoids translation of data when reading / writing on the host itself, which is the most common case when generating/processing capture dumps. 309</p> 310<p>TODO Probably we have to specify something more here. Is what we're saying enough to avoid any kind of ambiguity?. 311</p> 312<a name="anchor6"></a><br /><hr /> 313<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 314<a name="rfc.section.3"></a><h3>3. Block Definition</h3> 315 316<p>This section details the format of the body of the blocks currently defined. 317</p> 318<a name="rfc.section.3.1"></a><h4><a name="sectionshb">3.1</a> Section Header Block (mandatory)</h4> 319 320<p>The Section Header Block is mandatory. It identifies the beginning of a section of the capture dump file. Its format is shown in <a href="#formatSHB">Figure 3</a>. 321</p><br /><hr /> 322<a name="formatSHB"></a> 323<pre> 324 0 1 2 3 325 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 326 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 327 | Magic | 328 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 329 | Major | Minor | 330 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 331 / / 332 / Options (variable) / 333 / / 334 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 335</pre> 336<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Section Header Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 337 338<p>The meaning of the fields is: 339</p> 340<ul class="text"> 341<li>Magic: magic number, whose value is the hexadecimal number 0x1A2B3C4D. This number can be used to distinguish section that have been saved on little-endian machines from the one saved on big-endian machines. 342</li> 343<li>Major: number of the current mayor version of the format. Current value is 1. 344</li> 345<li>Minor: number of the current minor version of the format. Current value is 0. 346</li> 347<li>Options: optionally, a list of options (formatted according to the rules defined in <a href="#sectionopt">Section 4</a>) can be present. 348</li> 349</ul> 350<p>Aside form the options defined in <a href="#sectionopt">Section 4</a>, the following options are valid within this block: 351</p><a name="InterfaceOptions1"></a> 352<table class="data" align="center" border="1" cellpadding="2" cellspacing="2"> 353<tr> 354<th align="left" width="25%">Name</th> 355<th align="left" width="25%">Code</th> 356<th align="left" width="25%">Length</th> 357<th align="left" width="25%">Description</th> 358</tr> 359<tr> 360<td align="left">Hardware</td> 361<td align="left">2</td> 362<td align="left">variable</td> 363<td align="left">An ascii string containing the description of the hardware used to create this section.</td> 364</tr> 365<tr> 366<td align="left">Operating System</td> 367<td align="left">3</td> 368<td align="left">variable</td> 369<td align="left">An ascii string containing the name of the operating system used to create this section.</td> 370</tr> 371<tr> 372<td align="left">User Application</td> 373<td align="left">3</td> 374<td align="left">variable</td> 375<td align="left">An ascii string containing the name of the application used to create this section.</td> 376</tr> 377</table> 378 379<p>The Section Header Block does not contain data but it rather identifies a list of blocks (interfaces, packets) that are logically correlated. This block does not contain any reference to the size of the section it is currently delimiting, therefore the reader cannot skip a whole section at once. In case a section must be skipped, the user has to repeatedly skip all the blocks contained within it; this makes the parsing of the file slower but it permits to append several capture dumps at the same file. 380</p> 381<a name="rfc.section.3.2"></a><h4><a name="sectionidb">3.2</a> Interface Description Block (mandatory)</h4> 382 383<p>The Interface Description Block is mandatory. This block is needed to specify the characteristics of the network interface on which the capture has been made. In order to properly associate the captured data to the corresponding interface, the Interface Description Block must be defined before any other block that uses it; therefore, this block is usually placed immediately after the Section Header Block. 384</p> 385<p>An Interface Description Block is valid only inside the section which it belongs to. The structure of a Interface Description Block is shown in <a href="#formatidb">Figure 4</a>. 386</p><br /><hr /> 387<a name="formatidb"></a> 388<pre> 389 0 1 2 3 390 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 391 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 392 | Interface ID | LinkType | 393 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 394 | SnapLen | 395 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 396 / / 397 / Options (variable) / 398 / / 399 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 400 </pre> 401<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Interface Description Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 402 403<p>The meaning of the fields is: 404</p> 405<ul class="text"> 406<li>Interface ID: a progressive number that identifies uniquely any interface inside current section. Two Interface Description Blocks can have the same Interface ID only if they are in different sections of the file. The Interface ID is referenced by the packet blocks. 407</li> 408<li>LinkType: a value that defines the link layer type of this interface. 409</li> 410<li>SnapLen: maximum number of bytes dumped from each packet. The portion of each packet that exceeds this value will not be stored in the file. 411</li> 412<li>Options: optionally, a list of options (formatted according to the rules defined in <a href="#sectionopt">Section 4</a>) can be present. 413</li> 414</ul> 415<p>In addition to the options defined in <a href="#sectionopt">Section 4</a>, the following options are valid within this block: 416</p><a name="InterfaceOptions2"></a> 417<table class="data" align="center" border="1" cellpadding="2" cellspacing="2"> 418<tr> 419<th align="left" width="25%">Name</th> 420<th align="left" width="25%">Code</th> 421<th align="left" width="25%">Length</th> 422<th align="left" width="25%">Description</th> 423</tr> 424<tr> 425<td align="left">if_name</td> 426<td align="left">2</td> 427<td align="left">Variable</td> 428<td align="left">Name of the device used to capture data.</td> 429</tr> 430<tr> 431<td align="left">if_IPv4addr</td> 432<td align="left">3</td> 433<td align="left">8</td> 434<td align="left">Interface network address and netmask.</td> 435</tr> 436<tr> 437<td align="left">if_IPv6addr</td> 438<td align="left">4</td> 439<td align="left">17</td> 440<td align="left">Interface network address and prefix length (stored in the last byte).</td> 441</tr> 442<tr> 443<td align="left">if_MACaddr</td> 444<td align="left">5</td> 445<td align="left">6</td> 446<td align="left">Interface Hardware MAC address (48 bits).</td> 447</tr> 448<tr> 449<td align="left">if_EUIaddr</td> 450<td align="left">6</td> 451<td align="left">8</td> 452<td align="left">Interface Hardware EUI address (64 bits), if available.</td> 453</tr> 454<tr> 455<td align="left">if_speed</td> 456<td align="left">7</td> 457<td align="left">8</td> 458<td align="left">Interface speed (in bps).</td> 459</tr> 460<tr> 461<td align="left">if_tsaccur</td> 462<td align="left">8</td> 463<td align="left">1</td> 464<td align="left">Precision of timestamps. If the Most Significant Bit is equal to zero, the remaining bits indicates the accuracy as as a negative power of 10 (e.g. 6 means microsecond accuracy). If the Most Significant Bit is equal to zero, the remaining bits indicates the accuracy as as negative power of 2 (e.g. 10 means 1/1024 of second). If this option is not present, a precision of 10^-6 is assumed.</td> 465</tr> 466<tr> 467<td align="left">if_tzone</td> 468<td align="left">9</td> 469<td align="left">4</td> 470<td align="left">Time zone for GMT support (TODO: specify better).</td> 471</tr> 472<tr> 473<td align="left">if_flags</td> 474<td align="left">10</td> 475<td align="left">4</td> 476<td align="left">Interface flags. (TODO: specify better. Possible flags: promiscuous, inbound/outbound, traffic filtered during capture).</td> 477</tr> 478<tr> 479<td align="left">if_filter</td> 480<td align="left">11</td> 481<td align="left">variable</td> 482<td align="left">The filter (e.g. "capture only TCP traffic") used to capture traffic. The first byte of the Option Data keeps a code of the filter used (e.g. if this is a libpcap string, or BPF bytecode, and more). More details about this format will be presented in Appendix XXX (TODO).</td> 483</tr> 484<tr> 485<td align="left">if_opersystem</td> 486<td align="left">12</td> 487<td align="left">variable</td> 488<td align="left">An ascii string containing the name of the operating system of the machine that hosts this interface. This can be different from the same information that can be contained by the Section Header Block (<a href="#sectionshb">Section 3.1</a>) because the capture can have been done on a remote machine.</td> 489</tr> 490</table> 491 492<a name="rfc.section.3.3"></a><h4><a name="sectionpb">3.3</a> Packet Block (optional)</h4> 493 494<p>A Packet Block is the standard container for storing the packets coming from the network. The Packet Block is optional because packets can be stored either by means of this block or the Simple Packet Block, which can be used to speed up dump generation. The format of a packet block is shown in <a href="#formatpb">Figure 5</a>. 495</p><br /><hr /> 496<a name="formatpb"></a> 497<pre> 498 0 1 2 3 499 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 500 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 501 | Interface ID | Drops Count | 502 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 503 | Timestamp (High) | 504 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 505 | Timestamp (Low) | 506 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 507 | Captured Len | 508 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 509 | Packet Len | 510 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 511 | | 512 | Packet Data | 513 | | 514 | /* variable length, byte-aligned */ | 515 | | 516 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 517 / / 518 / Options (variable) / 519 / / 520 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 521</pre> 522<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Packet Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 523 524<p>The Packet Block has the following fields: 525</p> 526<ul class="text"> 527<li>Interface ID: Specifies the interface this packet comes from, and corresponds to the ID of one of the Interface Description Blocks present in this section of the file (see <a href="#formatidb">Figure 4</a>). 528</li> 529<li>Drops Count: a local drop counter. It specified the number of packets lost (by the interface and the operating system) between this packet and the preceding one. The value xFFFF (in hexadecimal) is reserved for those systems in which this information is not available. 530</li> 531<li>Timestamp (High): the most significative part of the timestamp. in standard Unix format, i.e. from 1/1/1970. 532</li> 533<li>Timestamp (Low): the less significative part of the timestamp. The way to interpret this field is specified by the 'ts_accur' option (see <a href="#formatidb">Figure 4</a>) of the Interface Description block referenced by this packet. If the Interface Description block does not contain a 'ts_accur' option, then this field is expressed in microseconds. 534</li> 535<li>Captured Len: number of bytes captured from the packet (i.e. the length of the Packet Data field). It will be the minimum value among the actual Packet Length and the snapshot length (defined in <a href="#formatidb">Figure 4</a>). 536</li> 537<li>Packet Len: actual length of the packet when it was transmitted on the network. Can be different from Captured Len if the user wants only a snapshot of the packet. 538</li> 539<li>Packet Data: the data coming from the network, including link-layer headers. The length of this field is Captured Len. The format of the link-layer headers depends on the LinkType field specified in the Interface Description Block (see <a href="#sectionidb">Section 3.2</a>) and it is specified in Appendix XXX (TODO). 540</li> 541<li>Options: optionally, a list of options (formatted according to the rules defined in <a href="#sectionopt">Section 4</a>) can be present. 542</li> 543</ul> 544<p> 545</p> 546<a name="rfc.section.3.4"></a><h4><a name="anchor7">3.4</a> Simple Packet Block (optional)</h4> 547 548<p>The Simple Packet Block is a lightweight container for storing the packets coming from the network. Its presence is optional. 549</p> 550<p>A Simple Packet Block is similar to a Packet Block (see <a href="#sectionpb">Section 3.3</a>), but it is smaller, simpler to process and contains only a minimal set of information. This block is preferred to the standard Packet Block when performance or space occupation are critical factors, such as in sustained traffic dump applications. A capture file can contain both Packet Blocks and Simple Packet Blocks: for example, a capture tool could switch from Packet Blocks to Simple Packet Blocks when the hardware resources become critical. 551</p> 552<p>The Simple Packet Block does not contain the Interface ID field. Therefore, it must be assumed that all the Simple Packet Blocks have been captured on the interface previously specified in the Interface Description Block. 553</p> 554<p><a href="#formatpbs">Figure 6</a> shows the format of the Simple Packet Block. 555</p><br /><hr /> 556<a name="formatpbs"></a> 557<pre> 558 0 1 2 3 559 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 560 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 561 | Packet Len | 562 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 563 | | 564 | Packet Data | 565 | | 566 | /* variable length, byte-aligned */ | 567 | | 568 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 569 </pre> 570<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Simple Packet Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 571 572<p>The Packet Block has the following fields: 573</p> 574<ul class="text"> 575<li>Packet Len: actual length of the packet when it was transmitted on the network. Can be different from captured len if the packet has been truncated. 576</li> 577<li>Packet data: the data coming from the network, including link-layers headers. The length of this field can be derived from the field Block Total Length, present in the Block Header. 578</li> 579</ul> 580<p>The Simple Packet Block does not contain the timestamp because this is one of the most costly operations on PCs. Additionally, there are applications that do not require it; e.g. an Intrusion Detection System is interested in packets, not in their timestamp. 581</p> 582<p>The Simple Packet Block is very efficient in term of disk space: a snapshot of length 100 bytes requires only 16 bytes of overhead, which corresponds to an efficiency of more than 86%. 583</p> 584<a name="rfc.section.3.5"></a><h4><a name="anchor8">3.5</a> Name Resolution Block (optional)</h4> 585 586<p>The Name Resolution Block is used to support the correlation of numeric addresses (present in the captured packets) and their corresponding canonical names and it is optional. Having the literal names saved in the file, this prevents the need of a name resolution in a delayed time, when the association between names and addresses can be different from the one in use at capture time. Moreover, The Name Resolution Block avoids the need of issuing a lot of DNS requests every time the trace capture is opened, and allows to have name resolution also when reading the capture with a machine not connected to the network. 587</p> 588<p>The format of the Name Resolution Block is shown in <a href="#formatnrb">Figure 7</a>. 589</p><br /><hr /> 590<a name="formatnrb"></a> 591<pre> 592 0 1 2 3 593 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 594 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 595 | Record Type | Record Length | 596 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 597 | Record Value | 598 | /* variable length, byte-aligned */ | 599 | + + + + + + + + + + + + + + + + + + + + + + + + + 600 | | | | | 601 +-+-+-+-+-+-+-+-+ + + + + + + + + + + + + + + + + + + + + + + + + 602 . . . other records . . . 603 | Record Type == end_of_recs | Record Length == 00 | 604 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 605 / / 606 / Options (variable) / 607 / / 608 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 609 </pre> 610<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Name Resolution Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 611 612<p>A Name Resolution Block is a zero-terminated list of records (in the TLV format), each of which contains an association between a network address and a name. There are three possible types of records: 613</p><a name="nrrecords"></a> 614<table class="data" align="center" border="1" cellpadding="2" cellspacing="2"> 615<tr> 616<th align="left" width="25%">Name</th> 617<th align="left" width="25%">Code</th> 618<th align="left" width="25%">Length</th> 619<th align="left" width="25%">Description</th> 620</tr> 621<tr> 622<td align="left">end_of_recs</td> 623<td align="left">0</td> 624<td align="left">0</td> 625<td align="left">End of records</td> 626</tr> 627<tr> 628<td align="left">ip4_rec</td> 629<td align="left">1</td> 630<td align="left">Variable</td> 631<td align="left">Specifies an IPv4 address (contained in the first 4 bytes), followed by one or more zero-terminated strings containing the DNS entries for that address.</td> 632</tr> 633<tr> 634<td align="left">ip6_rec</td> 635<td align="left">1</td> 636<td align="left">Variable</td> 637<td align="left">Specifies an IPv6 address (contained in the first 16 bytes), followed by one or more zero-terminated strings containing the DNS entries for that address.</td> 638</tr> 639</table> 640 641<p>After the list or Name Resolution Records, optionally, a list of options (formatted according to the rules defined in <a href="#sectionopt">Section 4</a>) can be present. 642</p> 643<p>A Name Resolution Block is normally placed at the beginning of the file, but no assumptions can be taken about its position. Name Resolution Blocks can be added in a second time by tools that process the file, like network analyzers. 644</p> 645<p>In addiction to the options defined in <a href="#sectionopt">Section 4</a>, the following options are valid within this block: 646</p><table class="data" align="center" border="1" cellpadding="2" cellspacing="2"> 647<tr> 648<th align="left" width="25%">Name</th> 649<th align="left" width="25%">Code</th> 650<th align="left" width="25%">Length</th> 651<th align="left" width="25%">Description</th> 652</tr> 653<tr> 654<td align="left">ns_dnsname</td> 655<td align="left">2</td> 656<td align="left">Variable</td> 657<td align="left">An ascii string containing the name of the machine (DNS server) used to perform the name resolution.</td> 658</tr> 659</table> 660 661<a name="rfc.section.3.6"></a><h4><a name="anchor9">3.6</a> Interface Statistics Block (optional)</h4> 662 663<p>The Interface Statistics Block contains the capture statistics for a given interface and it is optional. The statistics are referred to the interface defined in the current Section identified by the Interface ID field. 664</p> 665<p>The format of the Interface Statistics Block is shown in <a href="#formatisb">Figure 8</a>. 666</p><br /><hr /> 667<a name="formatisb"></a> 668<pre> 669 0 1 2 3 670 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 671 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 672 | IfRecv | 673 | (high + low) | 674 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 675 | IfDrop | 676 | (high + low) | 677 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 678 | FilterAccept | 679 | (high + low) | 680 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 681 | OSDrop | 682 | (high + low) | 683 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 684 | UsrDelivered | 685 | (high + low) | 686 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 687 | Interface ID | Reserved | 688 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 689 / / 690 / Options (variable) / 691 / / 692 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 693 </pre> 694<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Interface Statistics Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 695 696<p>The fields have the following meaning: 697</p> 698<ul class="text"> 699<li>IfRecv: number of packets received from the interface during the capture. This number is reported as a 64 bits value, in which the most significat bits are located in the first four bytes of the field. 700</li> 701<li>IfDrop: number of packets dropped by the interface during the capture due to lack of resources. 702</li> 703<li>FilterAccept: number of packets accepeted by filter during current capture. 704</li> 705<li>OSDrop: number of packets dropped by the operating system during the capture. 706</li> 707<li>UsrDelivered: number of packets delivered to the user. UsrDelivered can be different from the value 'FilterAccept - OSDropped' because some packets could still lay in the OS buffers when the capture ended. 708</li> 709<li>Interface ID: reference to an Interface Description Block. 710</li> 711<li>Reserved: Reserved to future use. 712</li> 713<li>Options: optionally, a list of options (formatted according to the rules defined in <a href="#sectionopt">Section 4</a>) can be present. 714</li> 715</ul> 716<p>In addiction to the options defined in <a href="#sectionopt">Section 4</a>, the following options are valid within this block: 717</p><table class="data" align="center" border="1" cellpadding="2" cellspacing="2"> 718<tr> 719<th align="left" width="25%">Name</th> 720<th align="left" width="25%">Code</th> 721<th align="left" width="25%">Length</th> 722<th align="left" width="25%">Description</th> 723</tr> 724<tr> 725<td align="left">isb_starttime</td> 726<td align="left">2</td> 727<td align="left">8</td> 728<td align="left">Time in which the capture started; time will be stored in two blocks of four bytes each, containing the timestamp in seconds and nanoseconds.</td> 729</tr> 730<tr> 731<td align="left">isb_endtime</td> 732<td align="left">3</td> 733<td align="left">8</td> 734<td align="left">Time in which the capture started; time will be stored in two blocks of four bytes each, containing the timestamp in seconds and nanoseconds.</td> 735</tr> 736</table> 737 738<a name="sectionopt"></a><br /><hr /> 739<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 740<a name="rfc.section.4"></a><h3>4. Options</h3> 741 742<p>Almost all blocks have the possibility to embed optional fields. Optional fields can be used to insert some information that may be useful when reading data, but that it is not really needed for packet processing. Therefore, each tool can be either read the content of the optional fields (if any), or skip them at once. 743</p> 744<p>Skipping all the optional fields at once is straightforward because most of the blocks have a fixed length, therefore the field Block Length (present in the General Block Structure, see <a href="#sectionblock">Section 2.1</a>) can be used to skip everything till the next block. 745</p> 746<p>Options are a list of Type - Length - Value fields, each one containing a single value: 747</p> 748<ul class="text"> 749<li>Option Type (2 bytes): it contains the code that specifies the type of the current TLV record. Option types whose Most Significant Bit is equal to one are reserved for local use; therefore, there is no guarantee that the code used is unique among all capture files (generated by other applications). In case of vendor-specific extensions that have to be identified uniquely, vendors must request an Option Code whose MSB is equal to zero. 750</li> 751<li>Option Length (2 bytes): it contains the length of the following 'Option Value' field. 752</li> 753<li>Option Value (variable length): it contains the value of the given option. The length of this field as been specified by the Option Length field. 754</li> 755</ul> 756<p>Options may be repeated several times (e.g. an interface that has several IP addresses associated to it). The option list is terminated by a special code which is the 'End of Option'. 757</p> 758<p>The format of the optional fields is shown in <a href="#formatopt">Figure 9</a>. 759</p><br /><hr /> 760<a name="formatopt"></a> 761<pre> 762 0 1 2 3 763 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 764 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 765 | Option Code | Option Length | 766 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 767 | Option Value | 768 | /* variable length, byte-aligned */ | 769 | + + + + + + + + + + + + + + + + + + + + + + + + + 770 | / / / | 771 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 772 / / 773 / . . . other options . . . / 774 / / 775 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 776 | Option Code == opt_endofopt | Option Length == 0 | 777 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 778 </pre> 779<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Options format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 780 781<p>The following codes can always be present in any optional field: 782</p><table class="data" align="center" border="1" cellpadding="2" cellspacing="2"> 783<tr> 784<th align="left" width="25%">Name</th> 785<th align="left" width="25%">Code</th> 786<th align="left" width="25%">Length</th> 787<th align="left" width="25%">Description</th> 788</tr> 789<tr> 790<td align="left">opt_endofopt</td> 791<td align="left">0</td> 792<td align="left">0</td> 793<td align="left">End of options: it is used to delimit the end of the optional fields. This block cannot be repeated within a given list of options.</td> 794</tr> 795<tr> 796<td align="left">opt_comment</td> 797<td align="left">1</td> 798<td align="left">variable</td> 799<td align="left">Comment: it is an ascii string containing a comment that is associated to the current block.</td> 800</tr> 801</table> 802 803<a name="anchor10"></a><br /><hr /> 804<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 805<a name="rfc.section.5"></a><h3>5. Experimental Blocks (deserved to a further investigation)</h3> 806 807<a name="rfc.section.5.1"></a><h4><a name="anchor11">5.1</a> Other Packet Blocks (experimental)</h4> 808 809<p>Can some other packet blocks (besides the two described in the previous paragraphs) be useful? 810</p> 811<a name="rfc.section.5.2"></a><h4><a name="anchor12">5.2</a> Compression Block (experimental)</h4> 812 813<p>The Compression Block is optional. A file can contain an arbitrary number of these blocks. A Compression Block, as the name says, is used to store compressed data. Its format is shown in <a href="#formatcb">Figure 10</a>. 814</p><br /><hr /> 815<a name="formatcb"></a> 816<pre> 817 0 1 2 3 818 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 819 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 820 | Compr. Type | | 821 +-+-+-+-+-+-+-+-+ | 822 | | 823 | Compressed Data | 824 | | 825 | /* variable length, byte-aligned */ | 826 | | 827 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 828 </pre> 829<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Compression Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 830 831<p>The fields have the following meaning: 832</p> 833<ul class="text"> 834<li>Compression Type: specifies the compression algorithm. Possible values for this field are 0 (uncompressed), 1 (Lempel Ziv), 2 (Gzip), other?? Probably some kind of dumb and fast compression algorithm could be effective with some types of traffic (for example web), but which? 835</li> 836<li>Compressed Data: data of this block. Once decompressed, it is made of other blocks. 837</li> 838</ul> 839<a name="rfc.section.5.3"></a><h4><a name="anchor13">5.3</a> Encryption Block (experimental)</h4> 840 841<p>The Encryption Block is optional. A file can contain an arbitrary number of these blocks. An Encryption Block is used to sotre encrypted data. Its format is shown in <a href="#formateb">Figure 11</a>. 842</p><br /><hr /> 843<a name="formateb"></a> 844<pre> 845 0 1 2 3 846 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 847 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 848 | Encr. Type | | 849 +-+-+-+-+-+-+-+-+ | 850 | | 851 | Compressed Data | 852 | | 853 | /* variable length, byte-aligned */ | 854 | | 855 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 856 </pre> 857<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Encryption Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 858 859<p>The fields have the following meaning: 860</p> 861<ul class="text"> 862<li>Compression Type: specifies the encryption algorithm. Possible values for this field are ??? NOTE: this block should probably contain other fields, depending on the encryption algorithm. To be define precisely. 863</li> 864<li>Encrypted Data: data of this block. Once decripted, it consists of other blocks. 865</li> 866</ul> 867<a name="rfc.section.5.4"></a><h4><a name="anchor14">5.4</a> Fixed Length Block (experimental)</h4> 868 869<p>The Fixed Length Block is optional. A file can contain an arbitrary number of these blocks. A Fixed Length Block can be used to optimize the access to the file. Its format is shown in <a href="#formatflm">Figure 12</a>. 870A Fixed Length Block stores records with constant size. It contains a set of Blocks (normally Packet Blocks or Simple Packet Blocks), of wihich it specifies the size. Knowing this size a priori helps to scan the file and to load some portions of it without truncating a block, and is particularly useful with cell-based networks like ATM. 871</p><br /><hr /> 872<a name="formatflm"></a> 873<pre> 874 0 1 2 3 875 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 876 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 877 | Cell Size | | 878 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 879 | | 880 | Fixed Size Data | 881 | | 882 | /* variable length, byte-aligned */ | 883 | | 884 | | 885 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 886 </pre> 887<table border="0" cellpadding="0" cellspacing="2" align="center"><tr><td align="center"><font face="monaco, MS Sans Serif" size="1"><b> Fixed Length Block format. </b></font><br /></td></tr></table><hr size="1" shade="0"> 888 889<p>The fields have the following meaning: 890</p> 891<ul class="text"> 892<li>Cell size: the size of the blocks contained in the data field. 893</li> 894<li>Fixed Size Data: data of this block. 895</li> 896</ul> 897<a name="rfc.section.5.5"></a><h4><a name="anchor15">5.5</a> Directory Block (experimental)</h4> 898 899<p>If present, this block contains the following information: 900</p> 901<ul class="text"> 902<li>number of indexed packets (N) 903</li> 904<li>table with position and length of any indexed packet (N entries) 905</li> 906</ul> 907<p>A directory block must be followed by at least N packets, otherwise it must be considered invalid. It can be used to efficiently load portions of the file to memory and to support operations on memory mapped files. This block can be added by tools like network analyzers as a consequence of file processing. 908</p> 909<a name="rfc.section.5.6"></a><h4><a name="anchor16">5.6</a> Traffic Statistics and Monitoring Blocks (experimental)</h4> 910 911<p>One or more blocks could be defined to contain network statistics or traffic monitoring information. They could be use to store data collected from RMON or Netflow probes, or from other network monitoring tools. 912</p> 913<a name="rfc.section.5.7"></a><h4><a name="anchor17">5.7</a> Event/Security Block (experimental)</h4> 914 915<p>This block could be used to store events. Events could contain generic information (for example network load over 50%, server down...) or security alerts. An event could be: 916</p> 917<ul class="text"> 918<li>skipped, if the application doesn't know how to do with it 919</li> 920<li>processed independently by the packets. In other words, the applications skips the packets and processes only the alerts 921</li> 922<li>processed in relation to packets: for example, a security tool could load only the packets of the file that are near a security alert; a monitorg tool could skip the packets captured while the server was down. 923</li> 924</ul> 925<a name="anchor18"></a><br /><hr /> 926<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 927<a name="rfc.section.6"></a><h3>6. Conclusions</h3> 928 929<p>The file format proposed in this document should be very versatile and satisfy a wide range of applications. 930In the simplest case, it can contain a raw dump of the network data, made of a series of Simple Packet Blocks. 931In the most complex case, it can be used as a repository for heterogeneous information. 932In every case, the file remains easy to parse and an application can always skip the data it is not interested in; at the same time, different applications can share the file, and each of them can benfit of the information produced by the others. 933Two or more files can be concatenated obtaining another valid file. 934</p> 935<a name="anchor19"></a><br /><hr /> 936<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 937<a name="rfc.section.7"></a><h3>7. Most important open issues</h3> 938 939<ul class="text"> 940<li>Data, in the file, must be byte or word aligned? Currently, the structure of this document is not consistent with respect to this point. 941</li> 942</ul><a name="rfc.copyright"></a><br /><hr /> 943<table summary="layout" cellpadding="0" cellspacing="2" class="bug" align="right"><tr><td class="bug"><a href="#toc" class="link2"> TOC </a></td></tr></table> 944<h3>Intellectual Property Statement</h3> 945<p class='copyright'> 946The IETF takes no position regarding the validity or scope of 947any intellectual property or other rights that might be claimed 948to pertain to the implementation or use of the technology 949described in this document or the extent to which any license 950under such rights might or might not be available; neither does 951it represent that it has made any effort to identify any such 952rights. Information on the IETF's procedures with respect to 953rights in standards-track and standards-related documentation 954can be found in BCP-11. Copies of claims of rights made 955available for publication and any assurances of licenses to 956be made available, or the result of an attempt made 957to obtain a general license or permission for the use of such 958proprietary rights by implementors or users of this 959specification can be obtained from the IETF Secretariat.</p> 960<p class='copyright'> 961The IETF invites any interested party to bring to its 962attention any copyrights, patents or patent applications, or 963other proprietary rights which may cover technology that may be 964required to practice this standard. Please address the 965information to the IETF Executive Director.</p> 966<h3>Full Copyright Statement</h3> 967<p class='copyright'> 968Copyright (C) The Internet Society (2004). All Rights Reserved.</p> 969<p class='copyright'> 970This document and translations of it may be copied and furnished to 971others, and derivative works that comment on or otherwise explain it 972or assist in its implementation may be prepared, copied, published and 973distributed, in whole or in part, without restriction of any kind, 974provided that the above copyright notice and this paragraph are 975included on all such copies and derivative works. However, this 976document itself may not be modified in any way, such as by removing 977the copyright notice or references to the Internet Society or other 978Internet organizations, except as needed for the purpose of 979developing Internet standards in which case the procedures for 980copyrights defined in the Internet Standards process must be 981followed, or as required to translate it into languages other than 982English.</p> 983<p class='copyright'> 984The limited permissions granted above are perpetual and will not be 985revoked by the Internet Society or its successors or assignees.</p> 986<p class='copyright'> 987This document and the information contained herein is provided on an 988"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 989TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 990BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 991HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 992MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.</p> 993<h3>Acknowledgment</h3> 994<p class='copyright'> 995Funding for the RFC Editor function is currently provided by the 996Internet Society.</p> 997</body></html> 998