Re: Fire Engine??

From: Jamie Lokier
Date: Wed Nov 26 2003 - 18:47:30 EST


David S. Miller wrote:
> > recvmsg() doesn't return timestamps until they are requested
> > using setsockopt(...SO_TIMESTAMP...).
> >
> > See sock_recv_timestamp() in include/net/sock.h.
>
> See MSG_ERRQUEUE and net/ipv4/ip_sockglue.c

I don't see your point. The test for the SO_TIMESTAMP socket option
is _inside_ sock_recv_timestamp() (the flag is called sk_rcvtstamp).

The MSG_ERRQUEUE code simply calls sock_recv_timestamp(), which in
turn only reports the timestamp if the flag is set.

There are exactly two places where the timestamp is reported to
userspace, and both are at the request of userspace:

1. sock_recv_timestamp(), called from many places including
ip_sockglue.c. It _only_ reports it if SO_TIMESTAMP is
enabled for the socket.

2. inet_ioctl(SIOCGSTAMP)

Nowhere else is the timestamp reported to userspace.

-- Jamie

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