Hi Sven, Which version of iptables/libipq do you use. As u said we can define a negative timeout value for ipq_read so that it returns immediately. I have iptables-1.2.1a-1.on a system. A man ipq_read there shows me that the timeout parameter for ipq_read has not yet been implemented. thanks Amit Sven Schuster <schuster.sven@xxxxxx>@lists.netfilter.org on 04/20/2004 02:16:26 PM Sent by: netfilter-admin@xxxxxxxxxxxxxxxxxxx To: "Jee J.Z." <jz105@xxxxxxxxxx> cc: netfilter@xxxxxxxxxxxxxxxxxxx Subject: Re: whether there are any packets in the ip_queue On Tue, Apr 20, 2004 at 01:16:17AM +0100, Jee J.Z. told us: > Hi all, > > I am using libipq for userspace programming on netfilter. I am having > problems to determine whether there are any packets in the ip_queue before I > call the function ipq_read(). I just don't wish to call ipq_read() when > there is no packet in the ip_queue, because I need my program to do other > things rather than waiting for a packet arriving (after calling ipq_read(), > the program will stop and wait for some time or until a packet coming from > the kernel). Are there anybody on the list who has any idea about this? Why don't you just call ipq_read with a negative timeout value?? When there's no packet available it will return immediately with a return code of 0. (see "man ipq_read") HTH Sven > > BTW, may I ask whether this is the proper list to ask about netfilter/libipq > programming, since it seems few people on the list talking about this kind > of questions? > -- Linux zion 2.6.6-rc1 #1 Sat Apr 17 11:50:12 CEST 2004 i686 athlon i386 GNU/Linux 10:44:31 up 2 days, 17:42, 1 user, load average: 0.00, 0.01, 0.00
Attachment:
C.DTF
Description: Binary data