Permalink
Browse files

[HVM-484] Add support for DHCP responses from Qemu in SmartOS version…

… of Qemu
  • Loading branch information...
rgulewich committed Aug 11, 2011
1 parent 713c32b commit c3b74f8afd4e7fe1cfc0704b148a9e7a48ffaf36
Showing with 821 additions and 2 deletions.
  1. +1 −0 Makefile.objs
  2. +36 −1 net.c
  3. +703 −0 net/vnic-dhcp.c
  4. +53 −0 net/vnic-dhcp.h
  5. +28 −1 net/vnic.c
View
@@ -45,6 +45,7 @@ net-nested-$(CONFIG_HAIKU) += tap-haiku.o
net-nested-$(CONFIG_SLIRP) += slirp.o
net-nested-$(CONFIG_VDE) += vde.o
net-nested-$(CONFIG_SUNOS_VNIC) += vnic.o
+net-nested-$(CONFIG_SUNOS_VNIC) += vnic-dhcp.o
net-obj-y += $(addprefix net/, $(net-nested-y))
ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS),yy)
View
37 net.c
@@ -1102,11 +1102,46 @@ static const struct {
.type = QEMU_OPT_STRING,
.help = "vnic interface name",
},
- {
+ {
.name = "macaddr",
.type = QEMU_OPT_STRING,
.help = "MAC address",
},
+ {
+ .name = "ip",
+ .type = QEMU_OPT_STRING,
+ .help = "DHCP IP address",
+ },
+ {
+ .name = "netmask",
+ .type = QEMU_OPT_STRING,
+ .help = "DHCP netmask",
+ },
+ {
+ .name = "gateway_ip",
+ .type = QEMU_OPT_STRING,
+ .help = "DHCP gateway IP address",
+ },
+ {
+ .name = "server_ip",
+ .type = QEMU_OPT_STRING,
+ .help = "IP address to return as the DHCP server",
+ },
+ {
+ .name = "dns_ip",
+ .type = QEMU_OPT_STRING,
+ .help = "DHCP DNS server IP address",
+ },
+ {
+ .name = "hostname",
+ .type = QEMU_OPT_STRING,
+ .help = "DHCP DNS server IP address",
+ },
+ {
+ .name = "lease_time",
+ .type = QEMU_OPT_NUMBER,
+ .help = "DHCP DNS server lease time",
+ },
{ /* end of list */ }
},
#endif
Oops, something went wrong.

0 comments on commit c3b74f8

Please sign in to comment.