summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2016-12-05 09:28:12 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2016-12-05 09:28:12 +0000
commit8f45a15cc758f1c64d932e77ab04aafb8d7b0375 (patch)
tree92b91b51e95fdc32290f08e51cf418e061e6969e /usr.sbin
parent7f3fcabe6fbc8cde8dcd4409bb6875fefd1d0798 (diff)
Add debug message to print VM's mac addresses (lladdr).
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vmd/virtio.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.sbin/vmd/virtio.c b/usr.sbin/vmd/virtio.c
index 70a2de02b6b..47451d459cf 100644
--- a/usr.sbin/vmd/virtio.c
+++ b/usr.sbin/vmd/virtio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: virtio.c,v 1.25 2016/11/26 16:05:11 sf Exp $ */
+/* $OpenBSD: virtio.c,v 1.26 2016/12/05 09:28:11 reyk Exp $ */
/*
* Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org>
@@ -17,6 +17,7 @@
*/
#include <sys/param.h> /* PAGE_SIZE */
+#include <sys/socket.h>
#include <machine/vmmvar.h>
#include <dev/pci/pcireg.h>
@@ -24,6 +25,10 @@
#include <dev/pci/virtioreg.h>
#include <dev/pci/vioblkreg.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+
#include <errno.h>
#include <event.h>
#include <poll.h>
@@ -1336,6 +1341,10 @@ virtio_init(struct vm_create_params *vcp, int *child_disks, int *child_taps)
vionet[i].mac[4] = rng;
vionet[i].mac[5] = rng >> 8;
}
+
+ log_debug("%s: vm \"%s\" vio%u lladdr %s",
+ __func__, vcp->vcp_name, i,
+ ether_ntoa((void *)vionet[i].mac));
}
}
}