>> UDP is message oriented, so you have to split your data in datagrams,
>> because a datagram must fit on an IP datagram on an Ethernet frame.
> No, IP supports fragmentation, and lwIP supports fragmented IP packets
> using the IP_FRAG compilation option.
Good point, I'm too used to stacks not supporting fragmentation quite well, and memory constraints where a full size Ethernet frame is a bit of a luxury...
As per the OP question, he then could get away with
IP_FRAG and a a big enough pbuf if he can afford it ?
lwipopts.h --> #define IP_FRAG 1
application --> udp_send(pcb, p);
Or is there another mechanism I'm not aware of ?
BTW, good to know!