* SIOCGSTAMP does not work ?
@ 2003-01-21 15:44 Maciej Soltysiak
2003-01-21 18:07 ` David S. Miller
[not found] ` <20030121165515.GB5239@riesen-pc.gr05.synopsys.com>
0 siblings, 2 replies; 3+ messages in thread
From: Maciej Soltysiak @ 2003-01-21 15:44 UTC (permalink / raw)
To: linux-kernel
Hi,
i was recently trying to use SIOCGSTAMP to get the date of the last packet
that arrived on the socket. like so:
struct timeval tv;
...
ioctl(fd, SIOCGSTAMP, &tv);
Unfortunately no matter how i tried that i always got errno: ENOENT, which
is explained by `man 7 ip':
SIOCGSTAMP was called on a socket where no packet arrived.
Little browsing through the net/ipv4 dir showed that there is a macro
TCP_CHECK_TIMER(sk) that is being used around tcp.c, tcp_ipv4.c and
tcp_timer.c
More grepping showed that TCP_CHECK_TIMER(sk) defined in include/net/tcp.h
does absolutely nothing!
#define TCP_CHECK_TIMER(sk) do { } while (0)
The questions are:
1. Is this all really related?
2. Why is TCP_CHECK_TIMER not coded ?
Regards,
Maciej Soltysiak
-----BEGIN GEEK CODE BLOCK-----
VERSION: 3.1
GIT/MU d-- s:- a-- C++ UL++++$ P L++++ E- W- N- K- w--- O! M- V- PS+ PE++
Y+ PGP- t+ 5-- X+ R tv- b DI+ D---- G e++>+++ h! y?
-----END GEEK CODE BLOCK-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SIOCGSTAMP does not work ?
2003-01-21 15:44 SIOCGSTAMP does not work ? Maciej Soltysiak
@ 2003-01-21 18:07 ` David S. Miller
[not found] ` <20030121165515.GB5239@riesen-pc.gr05.synopsys.com>
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2003-01-21 18:07 UTC (permalink / raw)
To: Maciej Soltysiak; +Cc: linux-kernel
On Tue, 2003-01-21 at 07:44, Maciej Soltysiak wrote:
> 1. Is this all really related?
No.
> 2. Why is TCP_CHECK_TIMER not coded ?
It is a debugging check, it has nothing to do with SIOCGSTAMP.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: SIOCGSTAMP does not work ?
[not found] ` <Pine.LNX.4.51.0301211759260.15348@dns.toxicfilms.tv>
@ 2003-01-22 7:45 ` Alex Riesen
0 siblings, 0 replies; 3+ messages in thread
From: Alex Riesen @ 2003-01-22 7:45 UTC (permalink / raw)
To: Maciej Soltysiak; +Cc: linux-kernel
Maciej Soltysiak, Tue, Jan 21, 2003 18:03:34 +0100:
> > > i was recently trying to use SIOCGSTAMP to get the date of the last packet
> > > that arrived on the socket. like so:
> >
> > which kernel?
> 2.4.20
>
> If you can, please try to get the timestamp on any socket using.
>
> struct timeval tv;
> ...
> ioctl (s, SIOCGSTAMP, &tv);
>
sorry for delay.
I don't think SIOCGSTAMP was designed to work on "any socket".
It retrieves the timestamp correctly for PF_PACKET sockets though.
I may want to look at the libpcap source.
-alex
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2003-01-22 7:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-21 15:44 SIOCGSTAMP does not work ? Maciej Soltysiak
2003-01-21 18:07 ` David S. Miller
[not found] ` <20030121165515.GB5239@riesen-pc.gr05.synopsys.com>
[not found] ` <Pine.LNX.4.51.0301211759260.15348@dns.toxicfilms.tv>
2003-01-22 7:45 ` Alex Riesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox