Re: SIGIO for UDP?

Chris Wedgwood (cw@ix.net.nz)
Mon, 23 Nov 1998 19:24:00 +1300


On Sat, Nov 07, 1998 at 05:02:02PM +0000, Hugo Mildenberger wrote:

> ntp tries to use SIGIO for UDP packets - but it is not implemented
> just until 2.1.126. Does the signal mechanism lead to a quicker
> response or, at least, to a more deterministic behavior compared to
> the select () system call? ntp relies on reading a timestamp
> directly after packet arrives, so using SIGIO could eventually
> increase accuracy.

if you need the time the packet arrived, and you are presently doing
something like:

recvmsg(...)
gettimeofday()

then I would suggest you look at ioctl(fd,SIOCGSTAMP,...) which will
give you the system time the last packet arrived...

-cw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/