made own schema for layer transition ids and updated protocols and lists

accordingly.
This commit is contained in:
Marcel 2015-01-04 22:34:34 +01:00
parent 994b6d26c5
commit 8f78c01c21
7 changed files with 62 additions and 31 deletions

View File

@ -1,7 +1,7 @@
--- ---
protocol: protocol:
name: internet protocol version 4 name: ipv4
shortname: ipv4 longname: internet protocol version 4
osilayer: 3 osilayer: 3
fields: fields:
- field: version - field: version
@ -67,8 +67,5 @@ protocol:
optional: yes optional: yes
- field: data - field: data
data: true data: true
nextlayer:
- { protocol: tcp, identifier: 6 }
- { protocol: udp, identifier: 17 }

View File

@ -30,16 +30,6 @@ protocol:
- field: dstaddress - field: dstaddress
desc: destination address desc: destination address
length: 16 length: 16
nextlayer:
- { protocol: hopbyhop, identifier: 0, extension: yes }
- { protocol: destoptions, identifier: 60, extension: yes }
- { protocol: routing, identifier: 43, extension: yes }
- { protocol: fragment, identifier: 44, extension: yes }
- { protocol: ipsec_ah, identifier: 51 }
- { protocol: ipsec_esp, identifier: 50 }
- { protocol: mobility, identifier: 135, extension: yes }
- { protocol: tcp, identifier: 6 }
- { protocol: udp, identifier: 17 }
extensionreferencefield: nextheader extensionreferencefield: nextheader
extensions: extensions:
- extension: - extension:

View File

@ -1,7 +1,7 @@
--- ---
protocol: protocol:
name: udp name: udp
shortname: udp longname: udp
osilayer: 4 osilayer: 4
fields: fields:
- field: srcport - field: srcport

View File

@ -0,0 +1,9 @@
---
layertransition:
layers: { from: 2, to: 3 }
protocols:
- eth-frame
nextlayer:
- { idhex: 0x0800, protocol: ipv4 }
- { idhex: 0x0806, protocol: arp }

View File

@ -0,0 +1,12 @@
---
layertransition:
layers: { from: 3, to: 4 }
protocols:
- ipv4
- ipv6
nextlayer:
- { idhex: 0x11, protocol: udp }
- { idhex: 0x06, protocol: tcp }
- { idhex: 0x32, protocol: ipsec_esp }
- { idhex: 0x33, protocol: ipsec_ah }

View File

@ -7,7 +7,7 @@ mapping:
"name": "name":
type: str type: str
required: yes required: yes
"shortname": "longname":
type: str type: str
"fields": "fields":
type: seq type: seq
@ -41,19 +41,6 @@ mapping:
type: int type: int
range: { max: 7, min: 1 } range: { max: 7, min: 1 }
required: yes required: yes
"nextlayer": #identifier list for next layer protocols
type: seq
sequence:
- type: map
mapping:
"protocol":
type: str
required: yes
"identifier":
type: int
required: yes
"extension":
type: bool
"extensionreferencefield": "extensionreferencefield":
type: str type: str
"extensions": "extensions":
@ -95,7 +82,6 @@ mapping:
"desc": # description "desc": # description
type: str type: str
required: yes required: yes
... #kwalify needs this, or it goes crazy validating, but only when there are comments beneath ... #kwalify needs this, or it goes crazy validating, but only when there are comments beneath

37
transition-schema.yml Normal file
View File

@ -0,0 +1,37 @@
type: map
mapping:
"layertransition": #layer transition ids
type: map
required: yes
mapping:
"layers": # which layers?
type: map
required: yes
mapping:
"from":
type: int
required: yes
"to":
type: int
required: yes
"protocols": # which protocols support these ids?
required: yes
type: seq
sequence:
- type: str
required: yes
"nextlayer": # list of ids with protocol name (reference name!)
type: seq
required: yes
sequence:
- type: map
mapping:
"idhex":
type: str
required: yes
"protocol":
type: str
required: yes
"id":
type: int