Skip to content

Commit 23e739f

Browse files
Capture Information Block (CIB) addition
1 parent 6a672d0 commit 23e739f

File tree

1 file changed

+185
-0
lines changed

1 file changed

+185
-0
lines changed

draft-ietf-opsawg-pcapng.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,10 @@ NRB:
155155
: Name Resolution Block
156156

157157

158+
CIB:
159+
: Capture Information Block
160+
161+
158162
CB:
159163
: Custom Block
160164

@@ -259,6 +263,10 @@ following four categories:
259263
capture has been made. If this appears in a file, an Interface
260264
Description Block is also required, before this block.
261265

266+
* [Capture Information Block](#section_cib): it
267+
defines how to store some interface information such as location,
268+
orientation, velocity, and associated errors.
269+
262270
* [Custom Block](#section_custom_block): it
263271
contains vendor-specific data in a portable fashion.
264272

@@ -2220,6 +2228,182 @@ The following is a list of Secrets Types.
22202228
{: #format_zigbee_aps title='ZigBee APS Key Data Format' artwork-align="center"}
22212229

22222230

2231+
## Capture Information Block {#section_cib}
2232+
2233+
The Capture Information Block (CIB) is used to support the addition
2234+
of time-varying metadata associated with capture interfaces, including
2235+
location, orientation, velocity, and related errors.
2236+
Each CIB is associated with a specific interface and applied to all packets
2237+
received on this interface following the CIB until superseded by a new CIB on
2238+
the same interface.
2239+
2240+
For example, a capture from a static interface may contain a single CIB at
2241+
the start of the file to apply to all packets on this interface.
2242+
A capture from a moving interface with GNSS will add a CIB each time updated
2243+
positional information is available, and this information will apply to all
2244+
packets received on this interface until the next CIB.
2245+
2246+
Note that issuing a new CIB will clear all existing CIB options on an interface,
2247+
for example, the CIBs for a non-moving but rotating interface with a known position
2248+
must all contain both location and orientation data.
2249+
2250+
The format of the Capture Information Block is shown in {{format_cib}}.
2251+
2252+
2253+
~~~~
2254+
0 1 2 3
2255+
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
2256+
+---------------------------------------------------------------+
2257+
0 | Block Type = 0x0000000B |
2258+
+---------------------------------------------------------------+
2259+
4 | Block Total Length |
2260+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2261+
8 | Interface ID |
2262+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2263+
12 / /
2264+
/ Options (variable) /
2265+
/ /
2266+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2267+
| Block Total Length |
2268+
+---------------------------------------------------------------+
2269+
~~~~
2270+
{: #format_cib title='Capture Information Block Format' artwork-align="center"}
2271+
2272+
The fields have the following meaning:
2273+
2274+
* Block Type: The block type of the Capture Information Block is 11.
2275+
2276+
* Block Total Length: total size of this block, as described in
2277+
{{section_block}}.
2278+
2279+
* Interface ID: specifies the interface for this CIB to be applied
2280+
to; the correct interface will be the one whose Interface
2281+
Description Block (within the current Section of the file) is
2282+
identified by the same number (see {{section_idb}}) of this field.
2283+
The interface ID MUST be valid, which means that an matching
2284+
interface description block MUST exist.
2285+
2286+
* Options: optionally, a list of options (formatted according to
2287+
the rules defined in {{section_opt}}) can be present.
2288+
2289+
2290+
Location information can be represented with in global (lat/lng/alt in degrees)
2291+
or local (X/Y/Z in metres) form, only one of these forms may be used in a given PCAP file.
2292+
Combining pcap files with different location formats should result in the
2293+
removal of all position information.
2294+
2295+
Velocity and Orientation are to be interpreted from the zero frame for either form.
2296+
For the global form, X corresponds to latitude, Y to longitude, and Z to altitude.
2297+
Yaw is about the X/Y or Lat/Lng plane with zero facing along Y or North,
2298+
pitch is applied with this yaw offset, and roll is applied to the combination of both.
2299+
2300+
Error options provide an optional mechanism for attaching error information to measurements,
2301+
and are only valid where the corresponding measurement (location, velocity, or orientation)
2302+
option is specified. Should an error option be present without the corresponding measurement,
2303+
this option should be ignored.
2304+
2305+
All the information fields are defined as options in order to support
2306+
systems that do not have a complete set of information. Therefore,
2307+
In addition to the options defined in {{section_opt}}, the following
2308+
options are valid within this block:
2309+
2310+
| Name | Code | Length | Multiple allowed? |
2311+
| local_location | 2 | 12 | no |
2312+
| local_location_error | 3 | 12 | no |
2313+
| global_location | 4 | 12 | no |
2314+
| global_location_error | 5 | 12 | no |
2315+
| orientation | 6 | 12 | no |
2316+
| orientation_error | 7 | 12 | no |
2317+
| velocity | 8 | 12 | no |
2318+
| velocity_error | 9 | 12 | no |
2319+
{: #options_cib title='Capture Information Block Options'}
2320+
2321+
2322+
{: indent='8'}
2323+
cib_local_location:
2324+
: The cib_local_location option specifies the local location of the packet
2325+
capture or interface in an abitrary plane; location is stored as three
2326+
32-bit floats representing X, Y (in plane), and Z (altitude) offsets in
2327+
metres.
2328+
2329+
Example: '41 24 cc cd 41 73 33 33 3f cc cc cd' decodes to
2330+
x: 10.3m, y: 15.2m, z: 1.6m
2331+
{: vspace='0'}
2332+
2333+
{: indent='8'}
2334+
cib_local_location_error:
2335+
: The cib_local_location_error option specifies the error in local location
2336+
capture; this is stored as three 32-bit floats in the same order and
2337+
representation as cib_local_location.
2338+
2339+
Example: '3f 80 00 00 3f 99 99 9a 3f cc cc cd' decodes to
2340+
x_error: 1.0m, y_error: 1.2m, z_error: 1.6m
2341+
{: vspace='0'}
2342+
2343+
{: indent='8'}
2344+
cib_global_location:
2345+
: The cib_global_location option specifies the global location of the
2346+
packet capture or interface; location is stored as three 32-bit floats
2347+
representing latitude and longitude in degrees, and altitude in
2348+
metres.
2349+
2350+
Example: 'c2 13 64 ce 43 2e c2 90 41 88 00 00' decodes to
2351+
lat: -36.8484437° lng: 174.7600023° alt: 17.0m
2352+
{: vspace='0'}
2353+
2354+
{: indent='8'}
2355+
cib_global_location_error:
2356+
: The cib_global_location_error option specifies the error in global location
2357+
capture; this is stored as three 32-bit floats in the same order and
2358+
representation as cib_global_location.
2359+
2360+
Example: '3f 80 00 00 3f 99 99 9a 3f cc cc cd' decodes to
2361+
lat_error: 0.1° lng_error: 0.2° alt_error: 1.6m
2362+
{: vspace='0'}
2363+
2364+
{: indent='8'}
2365+
cib_orientation:
2366+
: The cib_orientation option specifies the orientation of the packet
2367+
capturing antenna; orientation is stored as three 32-bit floats
2368+
representing yaw, pitch, and roll in radians.
2369+
This is relative to the zero frame for global or local location.
2370+
2371+
Example: '3f c9 0f db 3e 86 0a 92 00 00 00 00' decodes to
2372+
yaw: pi/2, pitch: -pi/12, roll: 0.0
2373+
{: vspace='0'}
2374+
2375+
{: indent='8'}
2376+
cib_orientation_error:
2377+
: The cib_orientation_error option specifies the error in orientation
2378+
capture; this is stored as three 32-bit floats in the same order and
2379+
representation as cib_orientation.
2380+
2381+
Example: '3c 23 d7 0a 3c a3 d7 0a 00 00 00 00' decodes to
2382+
yaw_error: 0.01, pitch_error: 0.02, roll_error: 0.0
2383+
{: vspace='0'}
2384+
2385+
{: indent='8'}
2386+
cib_velocity:
2387+
: The cib_velocity option specifies the velocity of the packet capture interface;
2388+
velocity is stored as three 32-bit floats representing the motion in the
2389+
X (lat), Y (lng), and Z (altitude) directions in metres per second.
2390+
This is relative to the zero frame for global or local location.
2391+
2392+
Example: '41 24 cc cd 41 73 33 33 00 00 00 00' decodes to
2393+
x: 10.3m/s, y: 15.2m/s, z: 0.0m/s
2394+
{: vspace='0'}
2395+
2396+
{: indent='8'}
2397+
cib_velocity_error:
2398+
: The cib_velocity_error option specifies the error in velocity capture;
2399+
this is stored as three 32-bit floats in the same order and
2400+
representation as cib_velocity.
2401+
2402+
Example: '3f 80 00 00 3f 99 99 9a 00 00 00 00' decodes to
2403+
x_error: 1.0m/s, y_error: 1.2m/s, z_error: 0.0m/s
2404+
{: vspace='0'}
2405+
2406+
22232407
## Custom Block {#section_custom_block}
22242408

22252409
A Custom Block (CB) is the container for storing custom data that
@@ -2495,6 +2679,7 @@ which the "XX" is from 00 to FF:
24952679
| 0x00000008 | <eref target="https://en.wikipedia.org/wiki/ARINC_429">ARINC 429</eref> in AFDX Encapsulation Information Block (requested by Gianluca Varenni \<[email protected]>, CACE Technologies LLC) |
24962680
| 0x00000009 | [systemd Journal Export Block]{{I-D.richardson-opsawg-pcapng-extras}} |
24972681
| 0x0000000A | [Decryption Secrets Block](#section_dsb) |
2682+
| 0x0000000B | [Capture Information Block](#section_cib) |
24982683
| 0x00000101 | <eref target="https://github.com/HoneProject">Hone Project</eref> <eref target="https://github.com/HoneProject/Linux-Sensor/wiki/Augmented-PCAP-Next-Generation-Dump-File-Format">Machine Info Block</eref> (see also <eref target="https://github.com/google/linux-sensor/blob/master/hone-pcapng.txt">Google version</eref>) |
24992684
| 0x00000102 | <eref target="https://github.com/HoneProject">Hone Project</eref> <eref target="https://github.com/HoneProject/Linux-Sensor/wiki/Augmented-PCAP-Next-Generation-Dump-File-Format">Connection Event Block</eref> (see also <eref target="https://github.com/google/linux-sensor/blob/master/hone-pcapng.txt">Google version</eref>) |
25002685
| 0x00000201 | <eref target="https://github.com/draios/sysdig">Sysdig</eref> Machine Info Block |

0 commit comments

Comments
 (0)