Wireshark-dev: Re: [Wireshark-dev] IEEE 1588 PTP DataTypes

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Thu, 02 Jul 2009 18:26:11 +0200
CeSaR PrAdOs wrote:
Hi,

You might want to ask Markus as he's the one sending the latest additions
From packet-ptp.c:

 * Copyright 2007, Markus Renz <Markus.Renz@xxxxxxxxxxxxx>

Thanx,
Jaap


Hi,

I'm developing a PTP software (IEEE 1588)and I was so surprised when I saw the definitions of the data type used in WhireShark's filter for the PTP standard v2. At the beginning I was freaking out because no one of my PTP packets machted with the information in Wireshark.

This is the definition of PTP fileds in whireshark:
http://www.wireshark.org/docs/dfref/p/ptp.html

and for example the the data type for the PTP msg header, according to the spec is:

    uint4_t             messageType;
    uint4_t            transportSpecific;
uint4_t versionPTP; uint4_t reserved1;
    uint16_t         messageLength;
uint8_t domainNumber; uint8_t reserved2;
    octet            flagField[2];
    int64_t            correctionField;
    uint8_t            reserved3;
    portIdentity     sourcePortId;
    uint16_t        sequenceId;
    uint8_t            controlfield;
    int8_t            logMessageInterval;


So we have for instance in the spec

  messageType --> 4 bits

WhireShark

  messageType -->  Unsigned 8-bit integer

does anybody tell why??

I mean it's a stadard we should follow the spec literally...

Thank you,

Cesar