aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/libxl_utils.c
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-04-08 16:21:12 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-04-08 16:21:12 +0100
commitbc57ea8ce569116a60f3f66723a20db97d90e23e (patch)
tree64fedcb1dbd3f1d68492f818e40d0900025e9dfe /tools/libxl/libxl_utils.c
parente5407d09856917efc636f6e71d8ade8cf57bf651 (diff)
downloadxen-bc57ea8ce569116a60f3f66723a20db97d90e23e.tar.gz
xen-bc57ea8ce569116a60f3f66723a20db97d90e23e.tar.bz2
xen-bc57ea8ce569116a60f3f66723a20db97d90e23e.zip
libxl/xl: drop support for netchannel2
netchannel2 was never widely deployed and no supported kernel includes either the front- or back-ends. The last known kernel with this support was the xen.git 2.6.31 branch which has been unsupported for ages. xl will warn the user if it spots a "vif2" configration item but otherwise support is completely removed. Work is ongoing to add the interesting features of netchannel2 as protocol extensions to netchannel1. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_utils.c')
-rw-r--r--tools/libxl/libxl_utils.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/tools/libxl/libxl_utils.c b/tools/libxl/libxl_utils.c
index 37c50f2500..678c9eebd2 100644
--- a/tools/libxl/libxl_utils.c
+++ b/tools/libxl/libxl_utils.c
@@ -570,75 +570,6 @@ out:
return rc;
}
-int libxl_devid_to_device_net2(libxl_ctx *ctx, uint32_t domid,
- const char *devid, libxl_device_net2 *net2)
-{
- libxl__gc gc = LIBXL_INIT_GC(ctx);
- char *tok, *endptr, *val;
- char *dompath, *net2path, *be_path;
- unsigned int devid_n, i;
- int rc = ERROR_INVAL;
-
- devid_n = strtoul(devid, &endptr, 10);
- if (devid == endptr) {
- goto out;
- }
- rc = ERROR_FAIL;
- dompath = libxl__xs_get_dompath(&gc, domid);
- net2path = libxl__sprintf(&gc, "%s/device/vif2/%s", dompath, devid);
- if (!net2path) {
- goto out;
- }
- memset(net2, 0, sizeof (libxl_device_net2));
- be_path = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/backend", net2path));
-
- net2->devid = devid_n;
- val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/mac", net2path));
- for (i = 0, tok = strtok(val, ":"); tok && (i < 6);
- ++i, tok = strtok(NULL, ":")) {
- net2->front_mac[i] = strtoul(tok, NULL, 16);
- }
- val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/remote-mac", net2path));
- for (i = 0, tok = strtok(val, ":"); tok && (i < 6);
- ++i, tok = strtok(NULL, ":")) {
- net2->back_mac[i] = strtoul(tok, NULL, 16);
- }
- val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/backend-id", net2path));
- net2->backend_domid = strtoul(val, NULL, 10);
-
- net2->domid = domid;
- val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/remote-trusted", be_path));
- net2->trusted = strtoul(val, NULL, 10);
- val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/local-trusted", be_path));
- net2->back_trusted = strtoul(val, NULL, 10);
- val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/filter-mac", be_path));
- net2->filter_mac = strtoul(val, NULL, 10);
- val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/filter-mac", net2path));
- net2->front_filter_mac = strtoul(val, NULL, 10);
- val = libxl__xs_read(&gc, XBT_NULL, libxl__sprintf(&gc, "%s/max-bypasses", be_path));
- net2->max_bypasses = strtoul(val, NULL, 10);
- rc = 0;
-
-out:
- libxl__free_all(&gc);
- return rc;
-}
-
-int libxl_strtomac(const char *mac_s, uint8_t *mac)
-{
- const char *end = mac_s + 17;
- char val, *endptr;
-
- for (; mac_s < end; mac_s += 3, ++mac) {
- val = strtoul(mac_s, &endptr, 16);
- if (endptr != (mac_s + 2)) {
- return ERROR_INVAL;
- }
- *mac = val;
- }
- return 0;
-}
-
#define QEMU_VERSION_STR "QEMU emulator version "