I used bing/google to search for your Wireshark error code. Amazingly the top 10 results are mostly garbage and incorrect information. Even the response on the wireshark forum was wrong regarding this error message. Welcome to the misinformation age.
sarali wrote:How to debug this issue further with respect to UDP client and Server?
Here is an accurate response:
In your case the error message is telling you that the IP header (total packet length - IP header length) is 728. The error message is also telling you that the UDP payload length is 736 which is 8 bytes greater than the IP tot_len value.
It's probably not a coincidence that you are off by 8 bytes... that happens to be the exact length of the UDP header.
Look through your code for the packet length calculation. I am willing to bet you missed adding the UDP header length.
Even if you forced sending this packet over the wire via raw socket... it will be dropped by the receiving side because it's considered corrupt when the packet lengths are mismatched.
You promised to send 728 but sent 736 instead.