The maximum length of a Datagram Packet is 65,536 or 65,535?

Solution 1:

Reddy's hit the nail on the head: https://stackoverflow.com/questions/42609561/udp-maximum-packet-size

The maximum IP packet size is 65,535 bytes (216-1), including all headers and usually requiring fragmentation. Assuming standard headers, IPv4 uses 20 bytes and UDP 8 bytes. The resulting maximum UDP payload size over IPv4 is 65,507 bytes. The maximum UDP datagram includes the UDP header and is 65,515 bytes. For completeness, UDP over IPv6 is 20 bytes less.

If you tried to leverage the theoretical maximum UDP datagram length of 65,535 bytes you couldn't use IP to transport it with.

65,535 is the maximum value you can store in 16 bits - the largest number is binary 1111 1111 1111 1111 = decimal 65,535. There are 65,536 different values, including 0000 0000 0000 0000.