Thread (5 messages) 5 messages, 3 authors, 2012-11-07

recvfrom a large packet

From: Victor Buciuc <hidden>
Date: 2012-11-06 14:08:50

On Tue, Nov 6, 2012 at 1:35 PM, devendra.aaru [off-list ref] 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 at kernelnewbies.org
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help