Like I said you just open a connection to a UDP socket and send the data you want to in the packet in a single function call (that will mean putting all the data into a single buffer) to send (assuming you are using Berkley sockets or an implementation thereof).
The network layer will handle the nitty gritty of creating the UDP packet headers.
Comment