static void qemu_net_queue_append(NetQueue *queue,

                                  NetClientState *sender,

                                  unsigned flags,

                                  const uint8_t *buf,

                                  size_t size,

                                  NetPacketSent *sent_cb)

{

    NetPacket *packet;



    if (queue->nq_count >= queue->nq_maxlen && !sent_cb) {

        return; /* drop if queue full and no callback */

    }

    packet = g_malloc(sizeof(NetPacket) + size);

    packet->sender = sender;

    packet->flags = flags;

    packet->size = size;

    packet->sent_cb = sent_cb;

    memcpy(packet->data, buf, size);




    QTAILQ_INSERT_TAIL(&queue->packets, packet, entry);

}
static void qemu_net_queue_append(NetQueue *queue,

                                  NetClientState *sender,

                                  unsigned flags,

                                  const uint8_t *buf,

                                  size_t size,

                                  NetPacketSent *sent_cb)

{

    NetPacket *packet;



    if (queue->nq_count >= queue->nq_maxlen && !sent_cb) {

        return; 

    }

    packet = g_malloc(sizeof(NetPacket) + size);

    packet->sender = sender;

    packet->flags = flags;

    packet->size = size;

    packet->sent_cb = sent_cb;

    memcpy(packet->data, buf, size);




    QTAILQ_INSERT_TAIL(&queue->packets, packet, entry);

}
static void FUNC_0(NetQueue *VAR_0,

                                  NetClientState *VAR_1,

                                  unsigned VAR_2,

                                  const uint8_t *VAR_3,

                                  size_t VAR_4,

                                  NetPacketSent *VAR_5)

{

    NetPacket *packet;



    if (VAR_0->nq_count >= VAR_0->nq_maxlen && !VAR_5) {

        return; 

    }

    packet = g_malloc(sizeof(NetPacket) + VAR_4);

    packet->VAR_1 = VAR_1;

    packet->VAR_2 = VAR_2;

    packet->VAR_4 = VAR_4;

    packet->VAR_5 = VAR_5;

    memcpy(packet->data, VAR_3, VAR_4);




    QTAILQ_INSERT_TAIL(&VAR_0->packets, packet, entry);

}
static void FUNC_0(NetQueue *VAR_0,
NetClientState *VAR_1,
unsigned VAR_2,
const uint8_t *VAR_3,
size_t VAR_4,
NetPacketSent *VAR_5)
{ NetPacket *packet; if (VAR_0->nq_count >= VAR_0->nq_maxlen && !VAR_5) { return; } packet = g_malloc(sizeof(NetPacket) + VAR_4); packet->VAR_1 = VAR_1; packet->VAR_2 = VAR_2; packet->VAR_4 = VAR_4; packet->VAR_5 = VAR_5; memcpy(packet->data, VAR_3, VAR_4); QTAILQ_INSERT_TAIL(&VAR_0->packets, packet, entry); }