iot-lab / aggregation-tools

Tools to aggregate iot-lab nodes tcp outputs.
Other
3 stars 7 forks source link

zeptopcap: fix timestamp microseconds #16

Closed fsaintma closed 2 years ago

fsaintma commented 3 years ago

With Python3 support the timestamp microseconds (fraction of seconds) with float type is invalid and return Wireshark error:

[Expert Info (Note/Sequence): Arrival Time: Fractional second -566447360 is invalid, the valid range is 0-1000000000]

Below you can see that in the packet header the timestamp microseconds must have int type.

typedef struct pcaprec_hdr_s {
        guint32 ts_sec;       /* timestamp seconds */
        guint32 ts_usec;      /* timestamp microseconds */
        guint32 incl_len;     /* number of octets of packet
                                 saved in file */
        guint32 orig_len;     /* actual length of packet */
} pcaprec_hdr_t;