From 2ad156086a0156413860c6d354aacff3138284cb Mon Sep 17 00:00:00 2001 From: Marcel Date: Sun, 4 Jan 2015 17:23:56 +0100 Subject: [PATCH] put protocols to obey the latest structure schema --- protocols/osi1-2/eth-frame.yml | 41 ++++++++++++------------- protocols/osi1-2/eth-packet.yml | 7 ++--- protocols/osi4/tcp.yml | 53 +++++++++++++-------------------- 3 files changed, 43 insertions(+), 58 deletions(-) diff --git a/protocols/osi1-2/eth-frame.yml b/protocols/osi1-2/eth-frame.yml index 000a38c..1e3e4e8 100644 --- a/protocols/osi1-2/eth-frame.yml +++ b/protocols/osi1-2/eth-frame.yml @@ -4,45 +4,42 @@ protocol: ðframe 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 diff --git a/protocols/osi1-2/eth-packet.yml b/protocols/osi1-2/eth-packet.yml index fdd45c0..aa2052b 100644 --- a/protocols/osi1-2/eth-packet.yml +++ b/protocols/osi1-2/eth-packet.yml @@ -3,11 +3,10 @@ protocol: ðpacket 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 diff --git a/protocols/osi4/tcp.yml b/protocols/osi4/tcp.yml index 2446cbf..b9f563e 100644 --- a/protocols/osi4/tcp.yml +++ b/protocols/osi4/tcp.yml @@ -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