Index: trunk/src/VBox/Installer/solaris/Makefile.kmk
===================================================================
--- trunk/src/VBox/Installer/solaris/Makefile.kmk	(revision 17840)
+++ trunk/src/VBox/Installer/solaris/Makefile.kmk	(revision 17917)
@@ -134,5 +134,6 @@
 	$(if $(VBOX_WITH_VBOXSDL),VBoxSDL,) \
 	$(if $(VBOX_WITH_USB),VBoxUSBHelper,) \
-	VBoxNetDHCP \
+	$(if $(VBOX_WITH_NETADP),VBoxNetAdpCtl,) \
+	$(if $(VBOX_WITH_NETADP),VBoxNetDHCP,) \
 	VBoxSVC \
 	VBoxXPCOMIPCD \
@@ -143,4 +144,5 @@
 	vboxdrv \
 	$(if $(VBOX_WITH_NETFLT),vboxflt,) \
+	$(if $(VBOX_WITH_NETADP),vboxnet,) \
 	$(if $(VBOX_WITH_USB),vboxusbmon,) \
 	VBoxDD.so \
@@ -212,4 +214,5 @@
 	vboxdrv.conf \
 	$(if $(VBOX_WITH_NETFLT),vboxflt.conf,) \
+	$(if $(VBOX_WITH_NETADP),vboxnet.conf,) \
 	$(if $(VBOX_WITH_USB),vboxusbmon.conf,) \
 	vboxdrv.sh \
@@ -390,4 +393,5 @@
 		$(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf \
 		$(if $(VBOX_WITH_NETFLT),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf,) \
+		$(if $(VBOX_WITH_NETADP),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/vboxnet.conf,) \
 		$(if $(VBOX_WITH_USB),$(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusbmon.conf,) \
 		$(if $(not $(VBOX_WITH_NETFLT))$(PATH_ROOT)/src/VBox/Devices/Network/solaris/vnicinit_solaris.sh,) \
@@ -412,4 +416,5 @@
 	$(QUIET)$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/Support/solaris/vboxdrv.conf               $(SOLARIS_INST_DIR)/vboxdrv.conf
 	$(QUIET)$(if $(VBOX_WITH_NETFLT),$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetFlt/solaris/vboxflt.conf         $(SOLARIS_INST_DIR)/vboxflt.conf,)
+	$(QUIET)$(if $(VBOX_WITH_NETADP),$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxNetAdp/solaris/vboxnet.conf         $(SOLARIS_INST_DIR)/vboxnet.conf,)
 	$(QUIET)$(if $(VBOX_WITH_USB),$(INSTALL) -m 0644 $(PATH_ROOT)/src/VBox/HostDrivers/VBoxUSB/solaris/vboxusbmon.conf               $(SOLARIS_INST_DIR)/vboxusbmon.conf,)
 	$(QUIET)$(if $(VBOX_OSE),,$(INSTALL) -m 0644 $(PATH_BIN)/LICENSE                                        $(SOLARIS_INST_DIR)/LICENSE)
Index: trunk/src/VBox/Installer/solaris/makepackage.sh
===================================================================
--- trunk/src/VBox/Installer/solaris/makepackage.sh	(revision 17840)
+++ trunk/src/VBox/Installer/solaris/makepackage.sh	(revision 17917)
@@ -138,4 +138,8 @@
 filelist_fixup prototype '$3 == "opt/VirtualBox/amd64/vboxflt=amd64/vboxflt"'                           '$3 = "platform/i86pc/kernel/drv/amd64/vboxflt=amd64/vboxflt"; $6 = "sys"'
 
+# NetAdapter vboxnet
+filelist_fixup prototype '$3 == "opt/VirtualBox/i386/vboxnet=i386/vboxnet"'                             '$3 = "platform/i86pc/kernel/drv/vboxnet=i386/vboxnet"; $6 = "sys"'
+filelist_fixup prototype '$3 == "opt/VirtualBox/amd64/vboxnet=amd64/vboxnet"'                           '$3 = "platform/i86pc/kernel/drv/amd64/vboxnet=amd64/vboxnet"; $6 = "sys"'
+
 # USB vboxusbmon
 filelist_fixup prototype '$3 == "opt/VirtualBox/i386/vboxusbmon=i386/vboxusbmon"'                       '$3 = "platform/i86pc/kernel/drv/vboxusbmon=i386/vboxusbmon"; $6 = "sys"'
@@ -145,4 +149,5 @@
 filelist_fixup prototype '$3 == "opt/VirtualBox/vboxdrv.conf=vboxdrv.conf"'                             '$3 = "platform/i86pc/kernel/drv/vboxdrv.conf=vboxdrv.conf"'
 filelist_fixup prototype '$3 == "opt/VirtualBox/vboxflt.conf=vboxflt.conf"'                             '$3 = "platform/i86pc/kernel/drv/vboxflt.conf=vboxflt.conf"'
+filelist_fixup prototype '$3 == "opt/VirtualBox/vboxnet.conf=vboxnet.conf"'                             '$3 = "platform/i86pc/kernel/drv/vboxnet.conf=vboxnet.conf"'
 filelist_fixup prototype '$3 == "opt/VirtualBox/vboxusbmon.conf=vboxusbmon.conf"'                       '$3 = "platform/i86pc/kernel/drv/vboxusbmon.conf=vboxusbmon.conf"'
 
@@ -167,5 +172,5 @@
 fi
 
-# VBoxUSBHelper needs to be marked setuid.
+# VBoxUSBHelper needs to be marked setuid root.
 if test -f $VBOX_INSTALLED_DIR/amd64/VBoxUSBHelper || test -f $VBOX_INSTALLED_DIR/i386/VBoxUSBHelper; then
     $VBOX_AWK 'NF == 6 \
@@ -177,4 +182,15 @@
 fi
 
+# VBoxNetAdpCtl needs to be marked setuid root.
+if test -f $VBOX_INSTALLED_DIR/amd64/VBoxNetAdpCtl || test -f $VBOX_INSTALLED_DIR/i386/VBoxNetAdpCtl; then
+    $VBOX_AWK 'NF == 6 \
+        && (    $3 == "opt/VirtualBox/amd64/VBoxNetAdpCtl=amd64/VBoxNetAdpCtl" \
+            ||  $3 == "opt/VirtualBox/i386/VBoxNetAdpCtl=i386/VBoxNetAdpCtl" \
+            ) \
+       { $4 = "4755" } { print }' prototype > prototype2
+    mv -f prototype2 prototype
+fi
+
+
 # desktop links and icons
 filelist_fixup prototype '$3 == "opt/VirtualBox/virtualbox.desktop=virtualbox.desktop"'                 '$3 = "usr/share/applications/virtualbox.desktop=virtualbox.desktop"'
Index: trunk/src/VBox/Installer/solaris/postinstall.sh
===================================================================
--- trunk/src/VBox/Installer/solaris/postinstall.sh	(revision 17840)
+++ trunk/src/VBox/Installer/solaris/postinstall.sh	(revision 17917)
@@ -37,5 +37,14 @@
         /opt/VirtualBox/vboxdrv.sh start
         rc=$?
+
+        # VBoxDrv loaded successfully, proceed with the rest...
         if test "$rc" -eq 0; then
+            # Load VBoxNetAdapter vboxnet
+            if test -f /platform/i86pc/kernel/drv/vboxnet.conf; then
+                /opt/VirtualBox/vboxdrv.sh netstart
+                rc=$?
+            fi
+
+            # Load VBoxNetFilter vboxflt
             if test -f /platform/i86pc/kernel/drv/vboxflt.conf; then
                 /opt/VirtualBox/vboxdrv.sh fltstart
@@ -43,9 +52,10 @@
             fi
 
+            # Load VBoxUSBMon vboxusbmon (do NOT load for Solaris 10)
             if test -f /platform/i86pc/kernel/drv/vboxusbmon.conf && test "$osversion" != "5.10"; then
                 /opt/VirtualBox/vboxdrv.sh usbstart
                 rc=$?
                 if test "$rc" -eq 0; then
-                    # add vboxusbmon to the devlink.tab
+                    # Add vboxusbmon to the devlink.tab
                     sed -e '
                     /name=vboxusbmon/d' /etc/devlink.tab > /etc/devlink.vbox
@@ -102,5 +112,5 @@
     fi
 
-    # add vboxdrv to the devlink.tab
+    # Add vboxdrv to the devlink.tab
     sed -e '
 /name=vboxdrv/d' /etc/devlink.tab > /etc/devlink.vbox
@@ -108,8 +118,8 @@
     mv -f /etc/devlink.vbox /etc/devlink.tab
 
-    # create the device link
+    # Create the device link
     /usr/sbin/devfsadm -i vboxdrv
 
-    # don't create link for Solaris 10
+    # Don't create link for Solaris 10
     if test -f /platform/i86pc/kernel/drv/vboxusbmon.conf && test "$osversion" != "5.10"; then
         /usr/sbin/devfsadm -i vboxusbmon
Index: trunk/src/VBox/Installer/solaris/preremove.sh
===================================================================
--- trunk/src/VBox/Installer/solaris/preremove.sh	(revision 17840)
+++ trunk/src/VBox/Installer/solaris/preremove.sh	(revision 17917)
@@ -39,4 +39,5 @@
     # vboxdrv.sh would've been installed, we just need to call it.
     /opt/VirtualBox/vboxdrv.sh usbstop alwaysremdrv
+    /opt/VirtualBox/vboxdrv.sh netstop alwaysremdrv
     /opt/VirtualBox/vboxdrv.sh fltstop alwaysremdrv
     /opt/VirtualBox/vboxdrv.sh stop alwaysremdrv
Index: trunk/src/VBox/Installer/solaris/vboxdrv.sh
===================================================================
--- trunk/src/VBox/Installer/solaris/vboxdrv.sh	(revision 17840)
+++ trunk/src/VBox/Installer/solaris/vboxdrv.sh	(revision 17917)
@@ -25,4 +25,5 @@
 VBIMODNAME="vbi"
 FLTMODNAME="vboxflt"
+NETMODNAME="vboxnet"
 USBMODNAME="vboxusbmon"
 MODDIR32="/platform/i86pc/kernel/drv"
@@ -120,4 +121,16 @@
 {
     module_added $FLTMODNAME
+    return $?
+}
+
+vboxnet_added()
+{
+    module_added $NETMODNAME
+    return $?
+}
+
+vboxnet_loaded()
+{
+    module_loaded $NETMODNAME
     return $?
 }
@@ -253,4 +266,51 @@
 
 
+start_vboxnet()
+{
+    if vboxnet_loaded; then
+        info "VirtualBox NetAdapter kernel module already loaded."
+    else
+        /usr/sbin/add_drv -m'* 0666 root sys' $NETMODNAME || abort "Failed to add VirtualBox NetAdapter Kernel module."
+        /usr/sbin/modload -p drv/$NETMODNAME
+        if test ! vboxnet_loaded; then
+            abort "Failed to load VirtualBox NetAdapter kernel module."
+        else
+            # Plumb the interface!
+            /sbin/ifconfig vboxnet0 plumb up
+            info "VirtualBox NetAdapter kernel module loaded."
+        fi
+    fi
+}
+
+stop_vboxnet()
+{
+    if vboxnet_loaded; then
+        vboxnet_mod_id=`/usr/sbin/modinfo | grep $NETMODNAME | cut -f 1 -d ' '`
+        if test -n "$vboxnet_mod_id"; then
+            /sbin/ifconfig vboxnet0 unplumb
+            /usr/sbin/modunload -i $vboxnet_mod_id
+
+            # see stop_vboxdrv() for why we have "alwaysremdrv".
+            if test -n "$ALWAYSREMDRV"; then
+                /usr/sbin/rem_drv $NETMODNAME
+            else
+                if test "$?" -eq 0; then
+                    /usr/sbin/rem_drv $NETMODNAME || abort "Unloaded VirtualBox NetAdapter kernel module, but failed to remove it!"
+                else
+                    abort "Failed to unload VirtualBox NetAdapter kernel module. Old one still active!!"
+                fi
+            fi
+
+            info "VirtualBox NetAdapter kernel module unloaded."
+        fi
+    elif vboxnet_added; then
+        /usr/sbin/rem_drv $NETMODNAME || abort "Unloaded VirtualBox NetAdapter kernel module, but failed to remove it!"
+        info "VirtualBox NetAdapter kernel module unloaded."
+    elif test -z "$SILENTUNLOAD"; then
+        info "VirtualBox NetAdapter kernel module not loaded."
+    fi
+}
+
+
 start_vboxusbmon()
 {
@@ -310,4 +370,5 @@
 {
     stop_vboxusbmon
+    stop_vboxnet
     stop_vboxflt
     stop_module
@@ -318,4 +379,5 @@
     start_module
     start_vboxflt
+    start_vboxnet
     start_vboxusbmon
 }
@@ -364,6 +426,12 @@
     stop_vboxusbmon
     ;;
+netstart)
+    start_vboxnet
+    ;;
+netstop)
+    stop_vboxnet
+    ;;
 *)
-    echo "Usage: $0 {start|stop|status|fltstart|fltstop|usbstart|usbstop|stopall|startall}"
+    echo "Usage: $0 {start|stop|status|fltstart|fltstop|usbstart|usbstop|netstart|netstop|stopall|startall}"
     exit 1
 esac
