static int vhost_user_migration_done(struct vhost_dev *dev, char* mac_addr)

{

    VhostUserMsg msg = { 0 };

    int err;



    assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);



    /* If guest supports GUEST_ANNOUNCE do nothing */

    if (virtio_has_feature(dev->acked_features, VIRTIO_NET_F_GUEST_ANNOUNCE)) {

        return 0;

    }



    /* if backend supports VHOST_USER_PROTOCOL_F_RARP ask it to send the RARP */

    if (virtio_has_feature(dev->protocol_features,

                           VHOST_USER_PROTOCOL_F_RARP)) {

        msg.request = VHOST_USER_SEND_RARP;

        msg.flags = VHOST_USER_VERSION;

        memcpy((char *)&msg.u64, mac_addr, 6);

        msg.size = sizeof(m.u64);



        err = vhost_user_write(dev, &msg, NULL, 0);

        return err;

    }

    return -1;

}

static int vhost_user_migration_done(struct vhost_dev *dev, char* mac_addr)

{

    VhostUserMsg msg = { 0 };

    int err;



    assert(dev->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);



    

    if (virtio_has_feature(dev->acked_features, VIRTIO_NET_F_GUEST_ANNOUNCE)) {

        return 0;

    }



    

    if (virtio_has_feature(dev->protocol_features,

                           VHOST_USER_PROTOCOL_F_RARP)) {

        msg.request = VHOST_USER_SEND_RARP;

        msg.flags = VHOST_USER_VERSION;

        memcpy((char *)&msg.u64, mac_addr, 6);

        msg.size = sizeof(m.u64);



        err = vhost_user_write(dev, &msg, NULL, 0);

        return err;

    }

    return -1;

}

        memcpy((char *)&msg.u64, mac_addr, 6);         msg.size = sizeof(m.u64);
static int FUNC_0(struct vhost_dev *VAR_0, char* VAR_1)

{

    VhostUserMsg msg = { 0 };

    int VAR_2;



    assert(VAR_0->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER);



    

    if (virtio_has_feature(VAR_0->acked_features, VIRTIO_NET_F_GUEST_ANNOUNCE)) {

        return 0;

    }



    

    if (virtio_has_feature(VAR_0->protocol_features,

                           VHOST_USER_PROTOCOL_F_RARP)) {

        msg.request = VHOST_USER_SEND_RARP;

        msg.flags = VHOST_USER_VERSION;

        memcpy((char *)&msg.u64, VAR_1, 6);

        msg.size = sizeof(m.u64);



        VAR_2 = vhost_user_write(VAR_0, &msg, NULL, 0);

        return VAR_2;

    }

    return -1;

}

static int FUNC_0(struct vhost_dev *VAR_0, char* VAR_1)
{ VhostUserMsg msg = { 0 }; int VAR_2; assert(VAR_0->vhost_ops->backend_type == VHOST_BACKEND_TYPE_USER); if (virtio_has_feature(VAR_0->acked_features, VIRTIO_NET_F_GUEST_ANNOUNCE)) { return 0; } if (virtio_has_feature(VAR_0->protocol_features,
VHOST_USER_PROTOCOL_F_RARP)) { msg.request = VHOST_USER_SEND_RARP; msg.flags = VHOST_USER_VERSION; memcpy((char *)&msg.u64, VAR_1, 6); msg.size = sizeof(m.u64); VAR_2 = vhost_user_write(VAR_0, &msg, NULL, 0); return VAR_2; } return -1; }