Hi,
I think a UDP packet has the maximum size of a UDP datagram is 65507
bytes.(about 64 kb)
Theoretically, the maximum size of an IP datagram is 65535 bytes, imposed
by the 16-bit total length field in the IP header.(See the figure below)
A summary of the contents of the internet header follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Version| IHL |Type of Service| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Identification |Flags| Fragment Offset |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time to Live | Protocol | Header Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Options | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Example Internet Datagram Header
With an IP header of 20 bytes and a UDP header of 8 bytes, this leaves a
maximum of 65507 bytes of user data in a UDP datagram.
Since this is caused by the nature of the UDP, to workaround the problem,
we would better to split the data based on 64kb, i.e. if we need to
transport the data over 64kb, we can split it into a few udp packets, and
then rearrange them in the server side. To indicate the data order, we need
to spare a few bytes in the head of the udp packet, so that in the server
side we know how to rearrange them. All this relied on how you implement
the algorithm.
Hope this helps.
Best regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.