71 lines
1.9 KiB
YAML
71 lines
1.9 KiB
YAML
type: map
|
|
mapping:
|
|
"protocol":
|
|
type: map
|
|
required: yes
|
|
mapping:
|
|
"name":
|
|
type: str
|
|
required: yes
|
|
"shortname":
|
|
type: str
|
|
"fields":
|
|
type: seq
|
|
required: yes
|
|
sequence: &fieldsseq
|
|
- type: map
|
|
mapping:
|
|
"field": #field name (best if only one word, for easier referencing)
|
|
type: str
|
|
required: yes
|
|
"desc": #short description
|
|
type: str
|
|
"length": #length in bytes, except bitfield is set to true!
|
|
type: int
|
|
"bitfield": #if this is true length is in BITS!
|
|
type: bool
|
|
"optional":
|
|
type: bool
|
|
"repeatable":
|
|
type: bool
|
|
"data": #data placeholder for next layer
|
|
type: bool
|
|
"reference": #reference another protocol directly (e.g. ethpacket->ethframe)
|
|
type: str
|
|
"subfields":
|
|
type: seq
|
|
sequence: *fieldsseq
|
|
"osilayer":
|
|
type: int
|
|
range: { max: 7, min: 1 }
|
|
required: yes
|
|
"nextlayer":
|
|
type: seq
|
|
sequence:
|
|
- type: map
|
|
mapping:
|
|
"protocol":
|
|
type: str
|
|
required: yes
|
|
"identifier":
|
|
type: int
|
|
required: yes
|
|
"extensions":
|
|
type: seq
|
|
sequence:
|
|
- type: map
|
|
mapping:
|
|
"extension":
|
|
type: map
|
|
mapping:
|
|
"name":
|
|
type: str
|
|
required: yes
|
|
"referencedfrom": #referencing field of protocol definition
|
|
type: str
|
|
required: yes
|
|
"fields":
|
|
type: seq
|
|
sequence: *fieldsseq
|
|
|