libxl__xen_script_dir_path()) < 0 )
return ERROR_FAIL;
if (!nic->nictype)
- nic->nictype = LIBXL_NIC_TYPE_IOEMU;
+ nic->nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
return 0;
}
nic->script = xs_read(ctx->xsh, XBT_NULL,
libxl__sprintf(gc, "%s/script", be_path), &len);
- /* XXX ioemu nics are not in xenstore at all? */
+ /* vif_ioemu nics use the same xenstore entries as vif interfaces */
nic->nictype = LIBXL_NIC_TYPE_VIF;
nic->model = NULL; /* XXX Only for TYPE_IOEMU */
nic->ifname = NULL; /* XXX Only for TYPE_IOEMU */
switch (type) {
case LIBXL_NIC_TYPE_VIF:
return GCSPRINTF("vif%u.%d", domid, devid);
- case LIBXL_NIC_TYPE_IOEMU:
+ case LIBXL_NIC_TYPE_VIF_IOEMU:
return GCSPRINTF("vif%u.%d" TAP_DEVICE_SUFFIX, domid, devid);
default:
abort();
free(s);
for (i = 0; i < num_nics; i++) {
- if (nics[i].nictype == LIBXL_NIC_TYPE_IOEMU) {
+ if (nics[i].nictype == LIBXL_NIC_TYPE_VIF_IOEMU) {
char *smac = libxl__sprintf(gc,
LIBXL_MAC_FMT, LIBXL_MAC_BYTES(nics[i].mac));
const char *ifname = libxl__device_nic_devname(gc,
domid, nics[i].devid,
- LIBXL_NIC_TYPE_IOEMU);
+ LIBXL_NIC_TYPE_VIF_IOEMU);
flexarray_vappend(dm_args,
"-net",
GCSPRINTF(
b_info->max_vcpus));
}
for (i = 0; i < num_nics; i++) {
- if (nics[i].nictype == LIBXL_NIC_TYPE_IOEMU) {
+ if (nics[i].nictype == LIBXL_NIC_TYPE_VIF_IOEMU) {
char *smac = libxl__sprintf(gc,
LIBXL_MAC_FMT, LIBXL_MAC_BYTES(nics[i].mac));
const char *ifname = libxl__device_nic_devname(gc,
guest_domid, nics[i].devid,
- LIBXL_NIC_TYPE_IOEMU);
+ LIBXL_NIC_TYPE_VIF_IOEMU);
flexarray_append(dm_args, "-device");
flexarray_append(dm_args,
libxl__sprintf(gc, "%s,id=nic%d,netdev=net%d,mac=%s",
])
libxl_nic_type = Enumeration("nic_type", [
- (1, "IOEMU"),
+ (1, "VIF_IOEMU"),
(2, "VIF"),
])
nic->bridge = strdup(p2 + 1);
} else if (!strcmp(p, "type")) {
if (!strcmp(p2 + 1, "ioemu"))
- nic->nictype = LIBXL_NIC_TYPE_IOEMU;
+ nic->nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
else
nic->nictype = LIBXL_NIC_TYPE_VIF;
} else if (!strcmp(p, "ip")) {
if (!strcmp("vif", oparg)) {
nic.nictype = LIBXL_NIC_TYPE_VIF;
} else if (!strcmp("ioemu", oparg)) {
- nic.nictype = LIBXL_NIC_TYPE_IOEMU;
+ nic.nictype = LIBXL_NIC_TYPE_VIF_IOEMU;
} else {
fprintf(stderr, "Invalid parameter `type'.\n");
return 1;