UDP will chop packets up, but the size of the packet is determined by the network (sort of). Therefore, don't rely on any particular packet size. Sizes can get down to below 512 Bytes, which really isn't much.

Furthermore, UDP doesn't guarantee that any particular packet makes it. Therefore, if you suspect that the data is going to exceed the packet size, you will need to have some mechanism to be sure that you can know whether you have all the data, and a means to re-submit for the missing data.

A header that tells you the total number of bytes helps, since you can determine whether or not you got the whole thing, but it doesn't tell you much about what was lost if something goes away. Solving that isn't all that easy, since you may not know how big the packet size will be. For that reason, UDP is generally used for REALLY small packet situations.

One possibility for larger packets would be to chop each message into very small pieces, number each piece, and send them. The header would include the number of pieces. There fore, the receiveing end can determine which piece is missing (by the number), the number of total packets, and the order of the packets.