TCP header serialization