PF_PACKET Socket



Hi,
I am emanshu "munish nayyar" a linux enthusiastic. I need your
help. I am using PF_PACKET socket ( kernel-2.4.25 configured with mmap
packet capture support) to receive video stream coming at particular
port.
But the problem when the stream is coming at high rate, kernel starts
dropping packet it seems that udp_queue buffer is full. So then I
changed my approach of socket creation I update my software socket to
PF_PACKET socket like that!!
Fd=socket(PF_PACKET, SOCK_DGRAM, ETH_P_IP) // since I need only IP
based udp packet so filtering at Ethernet level.

And I am receiving the packet using,
Bytes_recv=recvfrom() call still I am unable to receive the packet if
stream is coming more than 5mbps.
Some linux gurus advice me to use mmap based PF_PACKET, they told me
that this will surely improve your performance upto large extent, then
I build my kernel with mmap packet capture support and run me apps on
that kernel still problem continue .

Please tell me where I am wrong!! does there any extra step other than
socket creation and recvfrom() call is required to use mmap() packet
capture!!

I will really appreciate any help to me!

Thanks,
Munish Nayyar

.



Relevant Pages

  • PF_PACKET Socket
    ... I am using PF_PACKET socket (kernel-2.4.25 configured with mmap ... dropping packet it seems that udp_queue buffer is full. ... Some linux gurus advice me to use mmap based PF_PACKET, ... I build my kernel with mmap packet capture support and run me apps on ...
    (comp.os.linux.embedded)
  • Re: How to terminate a socket in CLOSE_WAIT state
    ... FTP Server fixed for certain FTP clients who use both passive ... This was causing a PASSIVE opened socket to be left ... but instead expect the "half close" from the receiver. ... this sends a TCP/IP FIN packet to the ...
    (microsoft.public.win32.programmer.kernel)
  • [PATCH 2.6.15.4 1/1][RFC] ipt_owner: inode match supporting both incoming and outgoing packets
    ... I am not familiar with kernel internals, so please correct me where I am ... filter packets by the program who is going to receive the packet ... when multiple programs share a socket, ... struct vfsmount **mnt) ...
    (Linux-Kernel)
  • [PATCH 2.6.15.4 1/1][RFC] ipt_owner: inode match supporting both incoming and outgoing packets
    ... I am not familiar with kernel internals, so please correct me where I am ... filter packets by the program who is going to receive the packet ... when multiple programs share a socket, ... struct vfsmount **mnt) ...
    (Linux-Kernel)
  • Re: How to terminate a socket in CLOSE_WAIT state
    ... with the socket released within a few seconds of proper closure on both ... FTP Server fixed for certain FTP clients who use both passive ... but instead expect the "half close" from the receiver. ... this sends a TCP/IP FIN packet to the ...
    (microsoft.public.win32.programmer.kernel)