µTasker Forum
µTasker Forum => NXPTM M522XX, KINETIS and i.MX RT => Topic started by: neil on November 10, 2023, 02:56:45 PM
-
Hi Mark
Hope you are keeping well...
Where do I find max buffer size of a received UDP packet? My application can transmit 1k of data and want to make sure the buffer is large enough to hold this
Best Regards
Neil
-
Hi Neil
As long as the Ethernet Rx buffer can hold the UDP reception it will be adequate - your receive the UDP packet directly in that buffer:
#define LAN_BUFFER_SIZE 1518
is adequate for the largest Ethernet frame (excluding jumbo frames) and so UDP payload (over IPv4) is limited to 1492 bytes (I believe) - this assumes no fragmentation, which will be the case in modern local networks.
Regards
Mark