const GREPacket &packet = it->second;
uint16_t proto_be = htons(packet.proto);
memcpy(&p[0], &proto_be, sizeof(uint16_t));
uint16_t len_be = htons(packet.data.size());
memcpy(&p[2], &len_be, sizeof(uint16_t));
memcpy(&p[4], packet.data.data(), packet.data.size());
const GREPacket &packet = it->second;
uint16_t proto_be = htons(packet.proto);
memcpy(&p[0], &proto_be, sizeof(uint16_t));
uint16_t len_be = htons(packet.data.size());
memcpy(&p[2], &len_be, sizeof(uint16_t));
memcpy(&p[4], packet.data.data(), packet.data.size());