Packet header construction