UDP data packet on W5500


I am looking at the code for the UDP receive function, UDPRecv.
It is taking the first 6 bytes as being the destination IP address?
I thought the header was like this:
2 bytes, source port
2 bytes, destination port
2 bytes, data length
2 bytes, check sum
Then the data.

Is the W5500 changing the UDP header, or am I missing something here?


Yes, the W5500 (and also W5200 and W5100) return a custom UDP packet info structure.

I think the W5500 manual misses this information, but the W5200 manual has it, look it up there.

UDP data is specially structured in the RX memory, like this:

4 bytes: destination IP address
2 bytes: destination port number
2 bytes: byte size (N) of data packet
N bytes: real data

As ventosus said, The rx buffer for UDP have no 2byte checksum because it is off-loaed by W5500.
The udp header info rx buffer is re-ordered by WIZnet.
Thank you.


W5x00 series all have the same UDP header frame.

Best regards.

Thanks for the reply.
I got the W5200 manual and that answered a few questions I had.
The whole section 5 of the W5200 data sheet is missing from the W5500 manual,
I hope this gets included in the W5500 datasheet for people like me that have not
used a previous wiz chip.



I am a bit confused about this UDP checksum.
Does W5500 generate it? If not, who does?

Below is a screenshot of a of package sent by w5500. Checksum is definitely present.
Where is it generated? Can it be configured?

Thank you.

Dear Luckyluka!

Unverified Checksum caused by wireshark setting.
Refer to Wireshark · Wireshark-dev: [Wireshark-dev] checksum standardization

Thank you.