Re: recvfrom a large packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 6, 2012 at 1:35 PM, devendra.aaru <devendra.aaru@xxxxxxxxx> wrote:
> if i do a recvfrom (sk, buf, 10000, 0, &addr, &len), shall i recv all the data
> i mean the 10000 bytes?
>
> since fragmentation happen in the ip layer and assembled happen in the
> ip layer it doesnt matter for the upper layer about the packet size.
>
>
> i wrote a test code and it seems to be working.
>
> is there any problem will come if i turn on firewall.
>
> any ideas?
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

   I think a signal can interrupt recvfrom. If you already had some
data copied in the buffer then it will return something. You should
always check what you get in the result returned by recvfrom. If
you're not satisfied with what you got you can always call again. (I
assumed it's UDP we're talking about).

   I'm not an expert, it's my two cents.

Victor.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux