thanks brad.I compiled tcpdump against PF_RING enabled PCAP.It also gave the segmentation fault.Now iam trying things with 2.6.x kernel.
i think problem is in ring_create function in ring packet.c.In that function struct sock * sk is created & it is not initialised for kernel 2.4.x.It is then dereferenced in sock_init_data function in net/core/sock.c.That is where the socket call fails.
so i think sk not being initialised might cause the problem.
s.lakshmi narasimhan
On Fri, 07 Oct 2005 Brad Doctor wrote :
>You'll need to include a lot more information than this. I would also suggest
>compiling a PCAP-enabled application (using PF_RING PCAP obviously) to ensure
>there is nothing wrong with your 2.4.x kernel. And if possible you may
>experience some benefits by upgrading to a 2.6 kernel. But at the least be
>sure to have a working, known and trusted implementation first.
>
>-brad
>
>
> > ?
>hi ,
> I am using kernel version 2.4.31.I compiled it with latest PF_RING obtained from www.ntop.org
>Then i did insmod ring.o.Every thing is fine till this point,but when i tried to call
> int fd;
> fd = socket(PF_RING,SOCK_RAW,htons(ETH_P_ALL);
>
>it gives me a segmentation fault.I checked the 'dmesg' with ksymoops.The problem seems to be in call 'sock_init_data('.could anyone please help me out?
>My test program just creates a socket nothing else.My ethernet interface is up.
> Thanking you,
> S.lakshmi narasimhan
>
>
> > _______________________________________________
> > Ntop-misc mailing list
> > [email protected]
> > http://listgateway.unipi.it/mailman/listinfo/ntop-misc
>
>--
>Brad Doctor, CISSP
_______________________________________________ Ntop-misc mailing list [email protected] http://listgateway.unipi.it/mailman/listinfo/ntop-misc
