summaryrefslogtreecommitdiff
path: root/schema/packet_event_schema.json
diff options
context:
space:
mode:
Diffstat (limited to 'schema/packet_event_schema.json')
-rw-r--r--schema/packet_event_schema.json122
1 files changed, 122 insertions, 0 deletions
diff --git a/schema/packet_event_schema.json b/schema/packet_event_schema.json
new file mode 100644
index 000000000..4395b4ab2
--- /dev/null
+++ b/schema/packet_event_schema.json
@@ -0,0 +1,122 @@
+{
+ "type": "object",
+ "required": [
+ "alias",
+ "source",
+ "packet_id",
+ "packet_event_id",
+ "packet_event_name",
+ "pkt_datalink",
+ "pkt_caplen",
+ "pkt_type",
+ "pkt_l3_offset",
+ "pkt_l4_offset",
+ "pkt_len",
+ "pkt_l4_len",
+ "thread_ts_usec"
+ ],
+
+ "dependencies" : {
+ "flow_id" : [ "flow_packet_id", "flow_src_last_pkt_time", "flow_dst_last_pkt_time", "flow_idle_time" ]
+ },
+
+ "if": {
+ "properties": { "packet_event_name": { "enum": ["packet-flow"] } }
+ },
+ "then": {
+ "required": [ "thread_id", "flow_id", "flow_packet_id", "flow_src_last_pkt_time", "flow_dst_last_pkt_time", "flow_idle_time" ]
+ },
+ "else": {
+ "not": { "required": [ "thread_id", "flow_id", "flow_packet_id", "flow_src_last_pkt_time", "flow_dst_last_pkt_time", "flow_idle_time" ] }
+ },
+
+ "properties": {
+ "alias": {
+ "type": "string"
+ },
+ "source": {
+ "type": "string"
+ },
+ "thread_id": {
+ "type": "number"
+ },
+ "packet_id": {
+ "type": "number",
+ "minimum": 0
+ },
+ "packet_event_id": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 2
+ },
+ "packet_event_name": {
+ "type": "string",
+ "enum": [
+ "invalid",
+ "packet",
+ "packet-flow"
+ ]
+ },
+ "flow_id": {
+ "type": "number",
+ "minimum": 1
+ },
+ "flow_packet_id": {
+ "type": "number"
+ },
+ "flow_src_last_pkt_time": {
+ "type": "number",
+ "minimum": 0
+ },
+ "flow_dst_last_pkt_time": {
+ "type": "number",
+ "minimum": 0
+ },
+ "flow_idle_time": {
+ "type": "number",
+ "minimum": 1
+ },
+ "pkt_datalink": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 292
+ },
+ "pkt_caplen": {
+ "type": "number",
+ "minimum": 1,
+ "maximum": 65535
+ },
+ "pkt_type": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 65535
+ },
+ "pkt_l3_offset": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 65535
+ },
+ "pkt_l4_len": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 65535
+ },
+ "thread_ts_usec": {
+ "type": "number",
+ "minimum": 0
+ },
+ "pkt_l4_offset": {
+ "type": "number",
+ "minimum": 0,
+ "maximum": 65535
+ },
+ "pkt_len": {
+ "type": "number",
+ "minimum": 0
+ },
+ "pkt": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+}