Wireshark-dev: Re: [Wireshark-dev] adding IRIG time and time of day

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 5 Nov 2013 09:19:15 -0800
On Nov 5, 2013, at 5:24 AM, "John Dill" <John.Dill@xxxxxxxxxxxxxxxxx> wrote:

> The IRIG Time Code Generator used is from ITS (GPS/IRIG B Time Code Generator/Reader, Model 6115G), and it outputs an IRIG-B time code signal which does not have the year embedded in it, so it's pre-2004 standard.

	...

> We have a CNIC-A2P3 board installed in a Compact PCI chassis.

Unfortunately, GE won't let me get either the hardware manuals for their ARINC 664 devices or the cpcap manual.

I'm guessing, perhaps incorrectly, from the "pcap" in "cpcap", that it provides a libpcap-compatible API.

The folks at GE *could* have, somewhere in the path between the hardware and the caller of cpcap:

	gotten the current year number;

	calculated the number of seconds between January 1, 1970, 00:00:00 UTC and January 1, {current year}, 00:00:00 UTC (except for leap seconds - don't ask, that's why I say "seconds-since-the-Epoch" rather than "seconds since the Epoch");

	added that to the "fractions of seconds since the beginning of the year" value from the IRIG-synchronized counter;

	when the IRIG time stamp overflows into the next year, increment the year number and recalculate the "number of seconds since..." value;

and provide *that* value as the packet time stamp (which they *especially* should have done if cpcap has what they intend to be a libpcap-compatible API!).

*Did* they do so, or do they just provide a "fractions of seconds since the beginning of the year" value?