put protocols to obey the latest structure schema

This commit is contained in:
Marcel 2015-01-04 17:23:56 +01:00
parent 3d13e11e13
commit 2ad156086a
3 changed files with 43 additions and 58 deletions

View File

@ -4,45 +4,42 @@ protocol: &ethframe
name: eth-frame
osilayer: 2
fields:
-
field: destination MAC
- field: dstmac
desc: destination MAC
length: 6
-
field: source MAC
- field: srcmac
desc: source MAC
length: 6
-
field: vlan tag
- field: vlantag
desc: VLAN tag
length: 4
subfields:
-
field: tag protocol identifier (0x8100)
- field: tpid
desc: tag protocol identifier (0x8100)
length: 2
-
field: tag control information
- field: tci
desc: tag control information
length: 2
subfields:
-
field: priority code point (PCP)
- field: pcp
desc: priority code point (PCP)
bitfield: yes
length: 3
-
field: drop eligible indicator (DEI)
- field: dei
desc: drop eligible indicator (DEI)
bitfield: yes
length: 1
-
field: VLAN identifier (VID)
- field: vid
desc: VLAN identifier (VID)
bitfield: yes
length: 12
-
field: protocolid
- field: protocolid
desc: Ethertype (Eth II) or length (IEEE 802.3)
length: 2
nextlayer: yes
-
field: data
- field: data
data: true
-
field: CRC
- field: CRC
desc: FCS (32-bit CRC)
length: 4
optional: yes #most network stacks compute that automatically

View File

@ -3,11 +3,10 @@ protocol: &ethpacket
name: eth-packet
osilayer: 1
fields:
-
field: preamble
- field: preamble
length: 7
-
field: Start of frame delimiter
- field: sfd
desc: Start of frame delimiter
length: 1
- field: eth-frame
data: true

View File

@ -2,62 +2,51 @@
protocol: &tcp
name: TCP
fields:
-
field: source port
- field: srcport
desc: source port
length: 2
-
field: destination port
- field: dstport
desc: destination port
length: 2
-
field: sequence number
- field: seqno
desc: sequence number
length: 4
-
field: acknowledgment number
- field: ackno
desc: acknowledgment number
length: 4
-
field: data offset
- field: dataoffset
desc: data offset
bitfield: yes
length: 4
-
field: reserved
- field: reserved
bitfield: yes
length: 6
-
field: URG
- field: URG
bitfield: yes
length: 1
-
field: ACK
- field: ACK
bitfield: yes
length: 1
-
field: PSH
- field: PSH
bitfield: yes
length: 1
-
field: RST
- field: RST
bitfield: yes
length: 1
-
field: SYN
- field: SYN
bitfield: yes
length: 1
-
field: FIN
- field: FIN
bitfield: yes
length: 1
-
field: window
- field: window
length: 2
-
field: checksum
- field: checksum
length: 2
-
field: options
- field: options
length: 4
optional: true
repeatable: true
-
field: data
- field: data
data: true
osilayer: 4