Skip to content

Commit

Permalink
Initial Capture Information Block (CIB) concept.
Browse files Browse the repository at this point in the history
Adds CIB with location/orientation/velocity vectors, this is optionally attached to an IDB or referenced from EPBs.
  • Loading branch information
ryankurte committed Jun 14, 2018
1 parent ac177d5 commit 51a854d
Showing 1 changed file with 185 additions and 5 deletions.
190 changes: 185 additions & 5 deletions draft-tuexen-opsawg-pcapng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@
<list style='hanging'>
<t hangText='SHB:'>Section Header Block</t>
<t hangText='IDB:'>Interface Description Block</t>
<t hangText='ISB:'>Interface Statistics Block</t>
<t hangText='ISB:'>Interface Statistics Block</t>
<t hangText='EPB:'>Enhanced Packet Block</t>
<t hangText='SPB:'>Simple Packet Block</t>
<t hangText='NRB:'>Name Resolution Block</t>
<t hangText='NRB:'>Name Resolution Block</t>
<t hangText='CIB:'>Capture Information Block</t>
<t hangText='CB:'>Custom Block</t>
</list>

Expand Down Expand Up @@ -267,6 +268,11 @@
capture has been made. If this appears in a file, an Interface
Description Block is also required, before this block.</t>

<t><xref target="section_cib">Capture Information Block</xref>: it
defines how to store some capture information (such as location,
orientation, velocity and associated errors, as well as rf frequencies
and channels)</t>

<t><xref target="section_custom_block">Custom Block</xref>: it
contains vendor-specific data in a portable fashion.</t>

Expand Down Expand Up @@ -1193,7 +1199,7 @@ Section Header
<t>Block Type: The block type of the Enhanced Packet Block is 6.</t>

<t>Block Total Length: total size of this block, as described in
<xref target="section_block"/>.</t>
<xref target="sectdropcountion_block"/>.</t>

<t>Interface ID: it specifies the interface this packet comes
from; the correct interface will be the one whose Interface
Expand All @@ -1212,7 +1218,7 @@ Section Header
unlike timestamps in the libpcap file format, timestamps in
Enhanced Packet Blocks are not saved as two 32-bit values
that represent the seconds and microseconds that have
elapsed since 1970-01-01 00:00:00 UTC. Timestamps in Enhanced
elapsed since 1970dropcount-01-01 00:00:00 UTC. Timestamps in Enhanced
Packet Blocks are saved as two 32-bit words that represent
the upper and lower 32 bits of a single 64-bit quantity.</t>

Expand All @@ -1230,7 +1236,7 @@ Section Header
Packet Length if the packet has been truncated by the capture
process.</t>

<t>Packet Data: the data coming from the network, including
<t>Packet Data: thdropcounte data coming from the network, including
link-layer headers. The actual length of this field is
Captured Packet Length plus the padding to a 32-bit
boundary. The format of the link-layer headers depends on
Expand Down Expand Up @@ -1269,6 +1275,11 @@ Section Header
<c>4</c>
<c>8</c>
<c>no</c>

<c>epb_dib</c>
<c>4</c>
<c>4</c>
<c>no</c>
</texttable>

<t>
Expand Down Expand Up @@ -1306,6 +1317,11 @@ Section Header

<t>Example: '0'.</t>

<t hangText="epb_cib:"><vspace blankLines="0"/>The epb_cib
option is a 32-bit flags word containing link-layer information. A
complete specification of the allowed flags can be found in <xref
target="section_epb_flags"/>.</t>

</list>
</t>

Expand Down Expand Up @@ -1459,6 +1475,7 @@ Section Header
resolution when reading the capture with a machine not connected to
the network.</t>


<t>A Name Resolution Block is often placed at the beginning of the
file, but no assumptions can be taken about its position. Multiple
NRBs can exist in a pcapng file, either due to memory constraints or
Expand Down Expand Up @@ -1828,6 +1845,169 @@ Section Header

</section>

<section anchor="section_cib" title="Capture Information Block">

<t>The Capture Information Block (CIB) is used to support the addition
of metadata associated with capture interfaces or packets, including
location, orientation, velocity and related errors, as well as wireless
channel and medium options.
This block can be associated with a specific interface and applied to all
packets received on this interface, or to (a) specific packet(s).
If applied to an interface, this block effects all capture blocks following
until it is superseded by a new CIB applied to the same interface.
</t>

<t>
Tools that write / read the capture file associate an incrementing 32-bit
number (starting from '0') to each Capture Information Block, called
the CIB ID for the CIB in question. This number is unique within each Section
and identifies the CIB that is referred to in an epb_cip option; it is only
unique inside the current section, so, two Sections can have different
CIBs identified by the same CIB ID values. This unique identifier
is referenced by other blocks, such as Enhanced Packet Blocks, to indicate the
CIB to which the block refers.
</t>

<t>The format of the Capture Information Block is shown in <xref
target="format_cib"/>.</t>

<figure anchor="format_cib" title="Capture Information Block Format">
<artwork xml:space="preserve" name="" type="" align="center" alt="" width="" height="">
0 1 2 3
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
+---------------------------------------------------------------+
0 | Block Type = 0x00000006 |
+---------------------------------------------------------------+
4 | Block Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
8 / /
/ Options (variable) /
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Block Total Length |
+---------------------------------------------------------------+
</artwork>
</figure>
<t>The fields have the following meaning:
<list style="symbols">

<t>Block Type: The block type of the Capture Information Block is
6.</t>

<t>Block Total Length: total size of this block, as described in
<xref target="section_block"/>.</t>

<t>Options: optionally, a list of options (formatted according to
the rules defined in <xref target="section_opt"/>) can be present.</t>

</list>
</t>

<t>All the statistic fields are defined as options in order to deal
with systems that do not have a complete set of statistics. Therefore,
In addition to the options defined in <xref target="section_opt"/>,
the following options are valid within this block:</t>

<texttable anchor="options_cib" title="Capture Information Block Options">
<ttcol align="left">Name</ttcol>
<ttcol align="left">Code</ttcol>
<ttcol align="left">Length</ttcol>
<ttcol align="left">Multiple allowed?</ttcol>

<c>interface_id</c>
<c>1</c>
<c>4</c>
<c>no</c>

<c>global_location</c>
<c>2</c>
<c>12</c>
<c>no</c>

<c>global_location_error</c>
<c>3</c>
<c>12</c>
<c>no</c>

<c>orientation</c>
<c>4</c>
<c>12</c>
<c>no</c>

<c>orientation_error</c>
<c>5</c>
<c>12</c>
<c>no</c>

<c>velocity</c>
<c>6</c>
<c>12</c>
<c>no</c>

<c>velocity_error</c>
<c>7</c>
<c>12</c>
<c>no</c>
</texttable>

<t>
<list hangIndent="8" style="hanging">

<t hangText="cib_interface_id:"><vspace blankLines="0"/>The
interface_id option specifies the interface these statistics refers
to; the correct interface will be the one whose Interface
Description Block (within the current Section of the file) is
identified by same number (see <xref target="section_idb"/>) of
this field.</t>

<t hangText="cib_global_location"><vspace blankLines="0"/>The
cib_global_location option specifies the location of the packet
capture or interface; location is stored as three 32-bit floats
representing latitude and longitude in degrees, and altitude in
metres.</t>

<t>Example: TODO</t>

<t hangText="cib_global_location_error"><vspace blankLines="0"/>The
global_location_error option specifies the error in location capture,
this is stored as three 32-bit floats in the same order and
representation as cib_location</t>

<t>Example: TODO</t>

<t hangText="cib_orientation"><vspace blankLines="0"/>The
cib_orientation option specifies the location of the packet
capture or interface; location is stored as three 32-bit floats
representing yaw, pitch, and roll in radians.</t>

<t>Example: TODO</t>

<t hangText="cib_orientation_error"><vspace blankLines="0"/>The
orientation_error option specifies the error in orientation capture,
this is stored as three 32-bit floats in the same order and
representation as cib_orientation</t>

<t>Example: TODO</t>

<t hangText="cib_velocity"><vspace blankLines="0"/>The
cib_velocity option specifies the location of the packet
capture or interface; location is stored as three 32-bit floats
representing yaw, pitch, and roll in radians.</t>

<t>Example: TODO</t>

<t hangText="cib_velocity_error"><vspace blankLines="0"/>The
cib_velocity_error option specifies the error in velocity capture,
this is stored as three 32-bit floats in the same order and
representation as cib_velocity</t>

<t>Example: TODO</t>

</list>
</t>

</section>


<section anchor="section_custom_block" title="Custom Block">

Expand Down

0 comments on commit 51a854d

Please sign in to comment.