* Trouble with nfq_get_timestamp
@ 2009-04-26 16:43 Kristian Evensen
2009-04-26 17:06 ` Eric Leblond
0 siblings, 1 reply; 4+ messages in thread
From: Kristian Evensen @ 2009-04-26 16:43 UTC (permalink / raw)
To: netfilter-devel
Hello,
I am currently writing a small user space application where I need the
timestamp of the packets. In the callback-function, I use
nfq_get_timestamp and provide it with the pointer to a timeval-struct
and the nfq_data sent to the callback function. However, the function
always returns -1 and failes. The get_id() and so forth works
perfectly, so I am wondering if anybody has any hints or knows how to
solve this?
I am currently using nfnetlink 0.0.39 and libnetfilter_queue 0.0.16-1,
but I have tried the newest version as well with no luck (the reason I
chose these are because they are the newest in my packet repo). My
kernel is 2.6.28.
Thanks in advance,
Kristian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Trouble with nfq_get_timestamp
2009-04-26 16:43 Trouble with nfq_get_timestamp Kristian Evensen
@ 2009-04-26 17:06 ` Eric Leblond
2009-04-26 17:12 ` Kristian Evensen
0 siblings, 1 reply; 4+ messages in thread
From: Eric Leblond @ 2009-04-26 17:06 UTC (permalink / raw)
To: Kristian Evensen; +Cc: netfilter-devel
Hi,
Le dimanche 26 avril 2009 à 18:43 +0200, Kristian Evensen a écrit :
> Hello,
>
> I am currently writing a small user space application where I need the
> timestamp of the packets. In the callback-function, I use
> nfq_get_timestamp and provide it with the pointer to a timeval-struct
> and the nfq_data sent to the callback function. However, the function
> always returns -1 and failes. The get_id() and so forth works
> perfectly, so I am wondering if anybody has any hints or knows how to
> solve this?
Are your packet coming from localhost ? It I remember correctly
timestamp is only setup for forwarded (or input) packets.
BR,
--
Eric Leblond <eleblond@inl.fr>
INL: http://www.inl.fr/
NuFW: http://www.nufw.org/
EdenWall: http://www.edenwall.com/
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Trouble with nfq_get_timestamp
2009-04-26 17:06 ` Eric Leblond
@ 2009-04-26 17:12 ` Kristian Evensen
2009-04-26 17:19 ` Kristian Evensen
0 siblings, 1 reply; 4+ messages in thread
From: Kristian Evensen @ 2009-04-26 17:12 UTC (permalink / raw)
To: Eric Leblond; +Cc: netfilter-devel
Hi,
> Are your packet coming from localhost ? It I remember correctly
> timestamp is only setup for forwarded (or input) packets.
Sorry, I forgot that parth. The packets are either on their way out
from or into the box, so I have tried bout OUTPUT and PREROUTING. I
have also tried casting the memory area after the msg_packet_hw-struct
and it seems to be zero.
-Kristian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Trouble with nfq_get_timestamp
2009-04-26 17:12 ` Kristian Evensen
@ 2009-04-26 17:19 ` Kristian Evensen
0 siblings, 0 replies; 4+ messages in thread
From: Kristian Evensen @ 2009-04-26 17:19 UTC (permalink / raw)
To: Eric Leblond; +Cc: netfilter-devel
Hi again,
I just found this:
http://lists.netfilter.org/pipermail/netfilter-devel/2006-February/023490.html
Here it says that the timestamp is never set, and even though it is
from 2006 I guess it still is valid.
-Kristian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-26 17:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-26 16:43 Trouble with nfq_get_timestamp Kristian Evensen
2009-04-26 17:06 ` Eric Leblond
2009-04-26 17:12 ` Kristian Evensen
2009-04-26 17:19 ` Kristian Evensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).