2015-01-04 11:23:12 +01:00
|
|
|
type: map
|
|
|
|
mapping:
|
|
|
|
"protocol":
|
|
|
|
type: map
|
|
|
|
required: yes
|
|
|
|
mapping:
|
|
|
|
"name":
|
|
|
|
type: str
|
|
|
|
required: yes
|
2015-01-04 12:04:36 +01:00
|
|
|
"shortname":
|
|
|
|
type: str
|
2015-01-04 11:23:12 +01:00
|
|
|
"fields":
|
|
|
|
type: seq
|
|
|
|
required: yes
|
|
|
|
sequence: &fieldsseq
|
|
|
|
- type: map
|
|
|
|
mapping:
|
2015-01-04 12:04:36 +01:00
|
|
|
"field": #field name (best if only one word, for easier referencing)
|
2015-01-04 11:23:12 +01:00
|
|
|
type: str
|
|
|
|
required: yes
|
2015-01-04 12:04:36 +01:00
|
|
|
"desc": #short description
|
|
|
|
type: str
|
2015-01-04 11:23:12 +01:00
|
|
|
"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
|
2015-01-04 12:04:36 +01:00
|
|
|
"data": #data placeholder for next layer
|
2015-01-04 11:23:12 +01:00
|
|
|
type: bool
|
2015-01-04 12:04:36 +01:00
|
|
|
"reference": #reference another protocol directly (e.g. ethpacket->ethframe)
|
|
|
|
type: str
|
2015-01-04 11:23:12 +01:00
|
|
|
"subfields":
|
|
|
|
type: seq
|
|
|
|
sequence: *fieldsseq
|
|
|
|
"osilayer":
|
2015-01-04 14:54:50 +01:00
|
|
|
type: int
|
2015-01-04 11:23:12 +01:00
|
|
|
range: { max: 7, min: 1 }
|
|
|
|
required: yes
|
2015-01-04 14:54:50 +01:00
|
|
|
"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
|
|
|
|
|