UDP header serialization