All of lore.kernel.org
 help / color / mirror / Atom feed
* ULOG / netlink errors
@ 2004-11-28 11:37 Abraham van der Merwe
  2004-11-28 20:37 ` Pablo Neira
  0 siblings, 1 reply; 5+ messages in thread
From: Abraham van der Merwe @ 2004-11-28 11:37 UTC (permalink / raw)
  To: Netfilter Development

Hi!

I'm trying to gather statistics (for netflow stats) using ULOG.

What I do:

# tag packets
iptables -A FORWARD -j ULOG --ulog-cprange 64 --ulog-nlgroup 1

Then I open a netlink socket (socket AF_NETLINK,SOCK_RAW,NETLINK_NFLOG),
increase the receive buffer size to NLBUFSIZ and capture messages using
recvfrom().

I keep getting these errors:

------------< snip <------< snip <------< snip <------------
root@mojo:~# ./tuxprobe
Starting to log output.
recvfrom failed: No buffer space available
recvfrom failed: No buffer space available
recvfrom failed: No buffer space available
recvfrom failed: No buffer space available
...
------------< snip <------< snip <------< snip <------------

I have tried increasing the socket buffer size with:

sysctl -w net/core/rmem_max=1048576
sysctl -w net/core/rmem_default=1048576

(and even 4MB buffer sizes)

which doesn't help. I've also decreased the capture length to 64 bytes, but
I still get the same errors.

Could somebody please tell me how to solve this problem and/or why capturing
packets via a netlink socket might be a bad idea?

With libpcap (or normal raw socket) on the same machine I have no problems
capturing all the data, even with capturing complete packets so I can't see
why above doesn't/shouldn't work.

-- 

Regards
 Abraham

TODAY the Pond!
TOMORROW the World!
                -- Frogs (1972)

___________________________________________________
 Abraham vd Merwe - Frogfoot Networks CC
 1st Floor, Albion Springs, 183 Main Road, Newlands
 Phone: +27 21 689 3876 Cell: +27 82 565 4451
 Http: http://www.frogfoot.net/ Email: abz@frogfoot.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-12-16 15:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-28 11:37 ULOG / netlink errors Abraham van der Merwe
2004-11-28 20:37 ` Pablo Neira
2004-11-28 20:50   ` Pablo Neira
2004-12-16 13:41     ` Harald Welte
2004-12-16 15:42       ` Pablo Neira

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.