architecture/format/README.md

33 lines
1.7 KiB
Markdown
Raw Normal View History

2019-01-11 16:48:25 +01:00
# D4 encapsulation protocol version 1 (DRAFT)
2018-11-26 14:09:35 +01:00
2019-01-13 16:14:27 +01:00
![Overview of the D4 encapsulation protocol](https://raw.githubusercontent.com/D4-project/architecture/master/docs/diagram/d4-protocol-encapsulation.png)
2018-11-26 14:09:35 +01:00
## Headers
| Name | bit size | Description |
|---------------|-----------|:----------------------------------------------------------------------:|
| version | uint 8 | Version of the header |
2019-01-11 16:48:25 +01:00
| type | uint 8 | Data encapsulated type |
2019-01-13 16:14:27 +01:00
| uuid | uint 128 | Sensor UUID |
2018-11-26 14:09:35 +01:00
| timestamp | uint 64 | Encapsulation time |
2019-01-13 16:14:27 +01:00
| hmac | uint 256 | Header authentication (HMAC-SHA-256-128) |
2018-11-26 14:09:35 +01:00
| size | uint 32 | Payload size |
## Type
The type is the list of format encapsulated within the D4 protocol.
2018-11-26 14:09:35 +01:00
|Type| Description |
2019-01-11 16:48:25 +01:00
|----|:-----------------------------------|
| 0 | Reserved |
| 1 | pcap (libpcap 2.4) |
| 2 | meta header (JSON) |
| 3 | generic log line |
2019-01-15 09:25:40 +01:00
| 4 | [dnscap](https://github.com/DNS-OARC/dnscap) output |
| 5 | pcapng (diagnostic) |
2019-01-11 16:48:25 +01:00
| 6 | generic NDJSON or JSON Lines |
2019-01-15 09:25:40 +01:00
| 7 | generic [YAF](https://tools.netsa.cert.org/yaf/index.html) (Yet Another Flowmeter)|
2018-11-26 14:09:35 +01:00
The D4 type list is [available in JSON format](https://raw.githubusercontent.com/D4-project/architecture/master/format/type.json).