Skip to contentSkip to conversation

stop at ipq_read(h,buf,BUFFERSIZE,0)

DISCUSSION Jee J.Z. 2 participants 2 messages Dec 1, 2003

lore
Share & tools
lore

Jee J.Z.

author
#0 lore raw

Hi all,

I try to run the example code on libipq man page. Unfortunately, the program stops at

status = ipq_read(h,buf,BUFFERSIZE,0);

It seems the program is waiting for packets input into the buffer, but packets never go in. Can anybody help me? Thank you in advance!

Jee

#1 lore raw

Hi Jee,

at first you need to

modprobe ip_queue

and then you need to add a rule like this:

iptables -A INPUT -j QUEUE

to queue packets to userspace. But take care to at first run the sample program or modify the above rule to not queue every paket (e.g. only tcp dest port 80), otherwise your box will completely lose network connectivity because every packet would be queued to userspace but due to the lack of a program processing it in userspace never be returned...

HTH

Sven

Quoted 16 lines · Jee J.Z.

Hi all,

I try to run the example code on libipq man page. Unfortunately, the program stops at

status = ipq_read(h,buf,BUFFERSIZE,0);

It seems the program is waiting for packets input into the buffer, but packets never go in. Can anybody help me? Thank you in advance!

Jee