diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2021-02-17 14:00:10 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2021-02-17 14:00:10 +0100 |
commit | a1805eb89195f9079105a5b256395306c42ede95 (patch) | |
tree | 7fa56a09a7a0ce4a07df8d7d550dc1e80dd60ddc /schema/packet_event_schema.json | |
parent | 893f43705132dfeb64dd33dc8697193f463708c0 (diff) |
Added JSON schema files and a Python schema validator.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'schema/packet_event_schema.json')
-rw-r--r-- | schema/packet_event_schema.json | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/schema/packet_event_schema.json b/schema/packet_event_schema.json new file mode 100644 index 000000000..d3f5a77d9 --- /dev/null +++ b/schema/packet_event_schema.json @@ -0,0 +1,88 @@ +{ + "type": "object", + "required": [ + "alias", + "source", + "thread_id", + "packet_id", + "packet_event_id", + "packet_event_name" + ], + "properties": { + "alias": { + "type": "string" + }, + "source": { + "type": "string" + }, + "thread_id": { + "type": "number" + }, + "packet_id": { + "type": "number" + }, + "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" + }, + "pkt_caplen": { + "type": "number", + "minimum": 1, + "maximum": 65535 + }, + "pkt_type": { + "type": "number", + "minimum": 0, + "maximum": 65535 + }, + "pkt_oversize": { + "type": "boolean" + }, + "pkt_l3_offset": { + "type": "number", + "minimum": 0, + "maximum": 65535 + }, + "pkt_l4_len": { + "type": "number", + "minimum": 0, + "maximum": 65535 + }, + "pkt_l4_offset": { + "type": "number", + "minimum": 0, + "maximum": 65535 + }, + "pkt_len": { + "type": "number", + "minimum": 0, + "maximum": 65535 + }, + "pkt_ts_usec": { + "type": "number" + }, + "pkt_ts_sec": { + "type": "number" + }, + "pkt": { + "type": "string" + } + }, + "additionalProperties": false +} |