diff --git a/protocols/osi3/ipv4.yml b/protocols/osi3/ipv4.yml index 722d53b..3449b17 100644 --- a/protocols/osi3/ipv4.yml +++ b/protocols/osi3/ipv4.yml @@ -1,7 +1,7 @@ --- protocol: - name: internet protocol version 4 - shortname: ipv4 + name: ipv4 + longname: internet protocol version 4 osilayer: 3 fields: - field: version @@ -67,8 +67,5 @@ protocol: optional: yes - field: data data: true - nextlayer: - - { protocol: tcp, identifier: 6 } - - { protocol: udp, identifier: 17 } \ No newline at end of file diff --git a/protocols/osi3/ipv6.yml b/protocols/osi3/ipv6.yml index 46b2296..de2a217 100644 --- a/protocols/osi3/ipv6.yml +++ b/protocols/osi3/ipv6.yml @@ -30,16 +30,6 @@ protocol: - field: dstaddress desc: destination address 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 extensions: - extension: diff --git a/protocols/osi4/udp.yml b/protocols/osi4/udp.yml index dffcdeb..98745e8 100644 --- a/protocols/osi4/udp.yml +++ b/protocols/osi4/udp.yml @@ -1,7 +1,7 @@ --- protocol: name: udp - shortname: udp + longname: udp osilayer: 4 fields: - field: srcport diff --git a/protocols/transitionids2.yml b/protocols/transitionids2.yml new file mode 100644 index 0000000..666c354 --- /dev/null +++ b/protocols/transitionids2.yml @@ -0,0 +1,9 @@ +--- +layertransition: + layers: { from: 2, to: 3 } + protocols: + - eth-frame + nextlayer: + - { idhex: 0x0800, protocol: ipv4 } + - { idhex: 0x0806, protocol: arp } + \ No newline at end of file diff --git a/protocols/transitionids3.yml b/protocols/transitionids3.yml new file mode 100644 index 0000000..257701a --- /dev/null +++ b/protocols/transitionids3.yml @@ -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 } + \ No newline at end of file diff --git a/structure-schema.yml b/structure-schema.yml index ae06650..cea0576 100644 --- a/structure-schema.yml +++ b/structure-schema.yml @@ -7,7 +7,7 @@ mapping: "name": type: str required: yes - "shortname": + "longname": type: str "fields": type: seq @@ -41,19 +41,6 @@ mapping: type: int range: { max: 7, min: 1 } 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": type: str "extensions": @@ -95,7 +82,6 @@ mapping: "desc": # description type: str required: yes - ... #kwalify needs this, or it goes crazy validating, but only when there are comments beneath diff --git a/transition-schema.yml b/transition-schema.yml new file mode 100644 index 0000000..8abfe21 --- /dev/null +++ b/transition-schema.yml @@ -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 +