tcpdump mailing list archives

Re: capturing Serial Port with pcap


From: Phil Vandry <vandry () TZoNE ORG>
Date: Sat, 31 Oct 2009 00:25:12 -0400

On 2009-10-28, at 12:06 , Paul B. wrote:
I need to simultaneously observe the timing of ethernet traffic and a discrete control signal. For the discrete signal, I was thinking that I could tie the signal to a control signal such as CTS or RTS on the serial port and modify the serial port driver to send a character or maybe a known PPP packet when the discrete signal changes. Then, pcap would timestamp and capture both the real ethernet packets and the PPP packet. Does this make sense? Has anyone done anything like this? Assuming RedHat linux on a relatively new PC what
kind of timestamp resolution might one expect?

Take a look at the source for gpsd and ntpd to see how they does it. When using a serial GPS as a stratum 0 source, a modem control signal on the serial port is used to mark the exact moment that the second changes. Because it's NTP, they have presumably gone to some length to make sure they get a good, precise timestamp.

-Phil
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: