[lwip-users] UDP fragmentation works or not?

122 views
Skip to first unread message

Andrey Skladchikov

unread,
Mar 21, 2012, 11:30:05 AM3/21/12
to lwip-...@nongnu.org
Hello. I try to send an data array throw the UDP in lwip. When data is
ready, i create a pbuf and link pbuf->payload to my dataarray.
Next, i send it.

Receiver is C# .NET udp datagram socket. Im receiving data using
socket.ReceiveFrom().

So. If i send more then 1470 bytes throw UDP, the package not coming
into socket - no socket.Avaible increases. Under the sniffer i see the
package is comed from device, but in one large package (or my sniffer
construct it from fragments?). Fragmentation is ON in opt.h. So, whats
happend? It is useful to send one large array once than manually split
it for little blocks and construct on the host again.

--
Regards
Andrey Skladhikov

_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users

gold...@gmx.de

unread,
Mar 22, 2012, 1:51:09 PM3/22/12
to Mailing list for lwIP users
Andrey Skladchikov wrote:
> Hello. I try to send an data array throw the UDP in lwip. When data is
> ready, i create a pbuf and link pbuf->payload to my dataarray.
> Next, i send it.
>
> Receiver is C# .NET udp datagram socket. Im receiving data using
> socket.ReceiveFrom().
>
> So. If i send more then 1470 bytes throw UDP, the package not coming
> into socket - no socket.Avaible increases.

If everything else is configured correctly (and you know your C# host
supports fragmented packets), that suggests a problem with your lwIP
port or netif driver, as IP fragmentation should work (in current
versions of lwIP - don't know what you are using).

> Under the sniffer i see the
> package is comed from device, but in one large package (or my sniffer
> construct it from fragments?).

No way to tell without knowing your sniffer. Generally, you should be
able to tell by the Ethernet telegram length if it is a big packet or
multiple small packets.


Simon

Reply all
Reply to author
Forward
0 new messages