__owur static inline int PACKET_peek_copy_bytes(const PACKET *pkt,
                                                unsigned char *data, size_t len)
{
    if (PACKET_remaining(pkt) < len)
        return 0;

    memcpy(data, pkt->curr, len);

    return 1;
}