void qemu_macaddr_default_if_unset(MACAddr *macaddr)

{

    static int index = 0;

    static const MACAddr zero = { .a = { 0,0,0,0,0,0 } };



    if (memcmp(macaddr, &zero, sizeof(zero)) != 0)

        return;

    macaddr->a[0] = 0x52;

    macaddr->a[1] = 0x54;

    macaddr->a[2] = 0x00;

    macaddr->a[3] = 0x12;

    macaddr->a[4] = 0x34;

    macaddr->a[5] = 0x56 + index++;

}
