Index: /trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsNetwork.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsNetwork.h	(revision 17216)
+++ /trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsNetwork.h	(revision 17217)
@@ -71,8 +71,4 @@
     void naTypeChanged (const QString &aString);
     void genMACClicked();
-#if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)
-    void tapSetupClicked();
-    void tapTerminateClicked();
-#endif
 
 private:
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetwork.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetwork.cpp	(revision 17216)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsNetwork.cpp	(revision 17217)
@@ -66,10 +66,4 @@
 #if !defined (Q_WS_X11) || defined (VBOX_WITH_NETFLT)
     setTapVisible (false);
-#else
-    /* Setup iconsets */
-    mTbSetup_x11->setIcon (VBoxGlobal::iconSet (":/select_file_16px.png",
-                                                ":/select_file_dis_16px.png"));
-    mTbTerminate_x11->setIcon (VBoxGlobal::iconSet (":/select_file_16px.png",
-                                                    ":/select_file_dis_16px.png"));
 #endif
 
@@ -116,6 +110,4 @@
 #if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)
     mLeInterface_x11->setText (aAdapter.GetHostInterface());
-    mLeSetup_x11->setText (aAdapter.GetTAPSetupApplication());
-    mLeTerminate_x11->setText (aAdapter.GetTAPTerminateApplication());
 #endif
 }
@@ -168,8 +160,4 @@
         QString iface = mLeInterface_x11->text();
         mAdapter.SetHostInterface (iface.isEmpty() ? QString::null : iface);
-        QString setup = mLeSetup_x11->text();
-        mAdapter.SetTAPSetupApplication (setup.isEmpty() ? QString::null : setup);
-        QString term = mLeTerminate_x11->text();
-        mAdapter.SetTAPTerminateApplication (term.isEmpty() ? QString::null : term);
 #endif
     }
@@ -200,8 +188,4 @@
              mValidator, SLOT (revalidate()));
     connect (mPbMAC, SIGNAL (clicked()), this, SLOT (genMACClicked()));
-#if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)
-    connect (mTbSetup_x11, SIGNAL (clicked()), this, SLOT (tapSetupClicked()));
-    connect (mTbTerminate_x11, SIGNAL (clicked()), this, SLOT (tapTerminateClicked()));
-#endif
 
     mValidator->revalidate();
@@ -218,9 +202,5 @@
     setTabOrder (mPbMAC, mCbCable);
     setTabOrder (mCbCable, mLeInterface_x11);
-    setTabOrder (mLeInterface_x11, mLeSetup_x11);
-    setTabOrder (mLeSetup_x11, mTbSetup_x11);
-    setTabOrder (mTbSetup_x11, mLeTerminate_x11);
-    setTabOrder (mLeTerminate_x11, mTbTerminate_x11);
-    return mTbTerminate_x11;
+    return mLeInterface_x11;
 }
 
@@ -289,24 +269,4 @@
     mLeMAC->setText (mAdapter.GetMACAddress());
 }
-
-#if defined (Q_WS_X11) && !defined (VBOX_WITH_NETFLT)
-void VBoxVMSettingsNetwork::tapSetupClicked()
-{
-    QString selected = QFileDialog::getOpenFileName (
-        this, tr ("Select TAP setup application"), "/");
-
-    if (!selected.isEmpty())
-        mLeSetup_x11->setText (selected);
-}
-
-void VBoxVMSettingsNetwork::tapTerminateClicked()
-{
-    QString selected = QFileDialog::getOpenFileName (
-        this, tr ("Select TAP terminate application"), "/");
-
-    if (!selected.isEmpty())
-        mLeTerminate_x11->setText (selected);
-}
-#endif
 
 void VBoxVMSettingsNetwork::prepareComboboxes()
@@ -374,10 +334,4 @@
     mLbInterface_x11->setEnabled (aEnabled);
     mLeInterface_x11->setEnabled (aEnabled);
-    mLbSetup_x11->setEnabled (aEnabled);
-    mLeSetup_x11->setEnabled (aEnabled);
-    mTbSetup_x11->setEnabled (aEnabled);
-    mLbTerminate_x11->setEnabled (aEnabled);
-    mLeTerminate_x11->setEnabled (aEnabled);
-    mTbTerminate_x11->setEnabled (aEnabled);
 }
 
@@ -387,10 +341,4 @@
     mLbInterface_x11->setVisible (aVisible);
     mLeInterface_x11->setVisible (aVisible);
-    mLbSetup_x11->setVisible (aVisible);
-    mLeSetup_x11->setVisible (aVisible);
-    mTbSetup_x11->setVisible (aVisible);
-    mLbTerminate_x11->setVisible (aVisible);
-    mLeTerminate_x11->setVisible (aVisible);
-    mTbTerminate_x11->setVisible (aVisible);
 #ifdef Q_WS_MAC
     /* Make sure the layout is recalculated (Important on the mac). */
Index: /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsNetwork.ui
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsNetwork.ui	(revision 17216)
+++ /trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsNetwork.ui	(revision 17217)
@@ -217,76 +217,4 @@
        </widget>
       </item>
-      <item row="7" column="0" >
-       <widget class="QLabel" name="mLbSetup_x11" >
-        <property name="text" >
-         <string>&amp;Setup Application:</string>
-        </property>
-        <property name="alignment" >
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buddy" >
-         <cstring>mLeSetup_x11</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="7" column="1" >
-       <widget class="QLineEdit" name="mLeSetup_x11" >
-        <property name="sizePolicy" >
-         <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="whatsThis" >
-         <string>Displays the command executed to set up the TAP interface.</string>
-        </property>
-       </widget>
-      </item>
-      <item row="7" column="2" >
-       <widget class="QToolButton" name="mTbSetup_x11" >
-        <property name="whatsThis" >
-         <string>Selects the setup application.</string>
-        </property>
-        <property name="autoRaise" >
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
-      <item row="8" column="0" >
-       <widget class="QLabel" name="mLbTerminate_x11" >
-        <property name="text" >
-         <string>&amp;Terminate Application:</string>
-        </property>
-        <property name="alignment" >
-         <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
-        </property>
-        <property name="buddy" >
-         <cstring>mLeTerminate_x11</cstring>
-        </property>
-       </widget>
-      </item>
-      <item row="8" column="1" >
-       <widget class="QLineEdit" name="mLeTerminate_x11" >
-        <property name="sizePolicy" >
-         <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
-          <horstretch>0</horstretch>
-          <verstretch>0</verstretch>
-         </sizepolicy>
-        </property>
-        <property name="whatsThis" >
-         <string>Displays the command executed to terminate the TAP interface.</string>
-        </property>
-       </widget>
-      </item>
-      <item row="8" column="2" >
-       <widget class="QToolButton" name="mTbTerminate_x11" >
-        <property name="whatsThis" >
-         <string>Selects the terminate application.</string>
-        </property>
-        <property name="autoRaise" >
-         <bool>true</bool>
-        </property>
-       </widget>
-      </item>
      </layout>
     </widget>
Index: /trunk/src/VBox/Main/ConsoleImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 17216)
+++ /trunk/src/VBox/Main/ConsoleImpl.cpp	(revision 17217)
@@ -5648,92 +5648,4 @@
 #endif /* VBOX_WITH_USB */
 
-/**
-  * Call the initialisation script for a dynamic TAP interface.
-  *
-  * The initialisation script should create a TAP interface, set it up and write its name to
-  * standard output followed by a carriage return.  Anything further written to standard
-  * output will be ignored.  If it returns a non-zero exit code, or does not write an
-  * intelligible interface name to standard output, it will be treated as having failed.
-  * For now, this method only works on Linux.
-  *
-  * @returns COM status code
-  * @param   tapDevice           string to store the name of the tap device created to
-  * @param   tapSetupApplication the name of the setup script
-  */
-HRESULT Console::callTapSetupApplication(bool isStatic, RTFILE tapFD, Bstr &tapDevice,
-                                         Bstr &tapSetupApplication)
-{
-    LogFlowThisFunc(("\n"));
-#ifdef RT_OS_LINUX
-    /* Command line to start the script with. */
-    char szCommand[4096];
-    /* Result code */
-    int rc;
-
-    /* Get the script name. */
-    Utf8Str tapSetupAppUtf8(tapSetupApplication), tapDeviceUtf8(tapDevice);
-    RTStrPrintf(szCommand, sizeof(szCommand), "%s %d %s", tapSetupAppUtf8.raw(),
-                isStatic ? tapFD : 0, isStatic ? tapDeviceUtf8.raw() : "");
-    /*
-     * Create the process and read its output.
-     */
-    Log2(("About to start the TAP setup script with the following command line: %s\n",
-          szCommand));
-    FILE *pfScriptHandle = popen(szCommand, "r");
-    if (pfScriptHandle == 0)
-    {
-        int iErr = errno;
-        LogRel(("Failed to start the TAP interface setup script %s, error text: %s\n",
-              szCommand, strerror(iErr)));
-        LogFlowThisFunc(("rc=E_FAIL\n"));
-        return setError(E_FAIL, tr ("Failed to run the host networking set up command %s: %s"),
-                        szCommand, strerror(iErr));
-    }
-    /* If we are using a dynamic TAP interface, we need to get the interface name. */
-    if (!isStatic)
-    {
-        /* Buffer to read the application output to.  It doesn't have to be long, as we are only
-            interested in the first few (normally 5 or 6) bytes. */
-        char acBuffer[64];
-        /* The length of the string returned by the application.  We only accept strings of 63
-           characters or less. */
-        size_t cBufSize;
-
-        /* Read the name of the device from the application. */
-        fgets(acBuffer, sizeof(acBuffer), pfScriptHandle);
-        cBufSize = strlen(acBuffer);
-        /* The script must return the name of the interface followed by a carriage return as the
-          first line of its output.  We need a null-terminated string. */
-        if ((cBufSize < 2) || (acBuffer[cBufSize - 1] != '\n'))
-        {
-            pclose(pfScriptHandle);
-            LogRel(("The TAP interface setup script did not return the name of a TAP device.\n"));
-            LogFlowThisFunc(("rc=E_FAIL\n"));
-            return setError(E_FAIL, tr ("The host networking set up command did not supply an interface name"));
-        }
-        /* Overwrite the terminating newline character. */
-        acBuffer[cBufSize - 1] = 0;
-        tapDevice = acBuffer;
-    }
-    rc = pclose(pfScriptHandle);
-    if (!WIFEXITED(rc))
-    {
-        LogRel(("The TAP interface setup script terminated abnormally.\n"));
-        LogFlowThisFunc(("rc=E_FAIL\n"));
-        return setError(E_FAIL, tr ("The host networking set up command did not run correctly"));
-    }
-    if (WEXITSTATUS(rc) != 0)
-    {
-        LogRel(("The TAP interface setup script returned a non-zero exit code.\n"));
-        LogFlowThisFunc(("rc=E_FAIL\n"));
-        return setError(E_FAIL, tr ("The host networking set up command returned a non-zero exit code"));
-    }
-    LogFlowThisFunc(("rc=S_OK\n"));
-    return S_OK;
-#else /* RT_OS_LINUX not defined */
-    LogFlowThisFunc(("rc=E_NOTIMPL\n"));
-    ReturnComNotImplemented();  /* not yet supported */
-#endif
-}
 
 /**
@@ -5757,5 +5669,6 @@
     return S_OK;
 
-#else /* RT_OS_LINUX */
+#else /* RT_OS_LINUX && !VBOX_WITH_NETFLT */
+
     LogFlowThisFunc(("\n"));
     /* sanity check */
@@ -5776,146 +5689,89 @@
 
     /*
-     * Try get the FD.
+     * Allocate a host interface device
      */
-    LONG        ltapFD;
-    rc = networkAdapter->COMGETTER(TAPFileDescriptor)(&ltapFD);
-    if (SUCCEEDED(rc))
-        maTapFD[slot] = (RTFILE)ltapFD;
+    int rcVBox = RTFileOpen(&maTapFD[slot], "/dev/net/tun",
+                            RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE | RTFILE_O_INHERIT);
+    if (VBOX_SUCCESS(rcVBox))
+    {
+        /*
+         * Set/obtain the tap interface.
+         */
+        struct ifreq IfReq;
+        memset(&IfReq, 0, sizeof(IfReq));
+        /* The name of the TAP interface we are using */
+        Bstr tapDeviceName;
+        rc = networkAdapter->COMGETTER(HostInterface)(tapDeviceName.asOutParam());
+        if (FAILED(rc))
+            tapDeviceName.setNull();  /* Is this necessary? */
+        if (tapDeviceName.isEmpty())
+        {
+            LogRel(("No TAP device name was supplied.\n"));
+            rc = setError(E_FAIL, tr ("No TAP device name was supplied for the host networking interface"));
+        }
+
+        if (SUCCEEDED(rc))
+        {
+            /* If we are using a static TAP device then try to open it. */
+            Utf8Str str(tapDeviceName);
+            if (str.length() <= sizeof(IfReq.ifr_name))
+                strcpy(IfReq.ifr_name, str.raw());
+            else
+                memcpy(IfReq.ifr_name, str.raw(), sizeof(IfReq.ifr_name) - 1); /** @todo bitch about names which are too long... */
+            IfReq.ifr_flags = IFF_TAP | IFF_NO_PI;
+            rcVBox = ioctl(maTapFD[slot], TUNSETIFF, &IfReq);
+            if (rcVBox != 0)
+            {
+                LogRel(("Failed to open the host network interface %ls\n", tapDeviceName.raw()));
+                rc = setError(E_FAIL, tr ("Failed to open the host network interface %ls"),
+                              tapDeviceName.raw());
+            }
+        }
+        if (SUCCEEDED(rc))
+        {
+            /*
+             * Make it pollable.
+             */
+            if (fcntl(maTapFD[slot], F_SETFL, O_NONBLOCK) != -1)
+            {
+                Log(("attachToHostInterface: %RTfile %ls\n", maTapFD[slot], tapDeviceName.raw()));
+                /*
+                 * Here is the right place to communicate the TAP file descriptor and
+                 * the host interface name to the server if/when it becomes really
+                 * necessary.
+                 */
+                maTAPDeviceName[slot] = tapDeviceName;
+                rcVBox = VINF_SUCCESS;
+            }
+            else
+            {
+                int iErr = errno;
+
+                LogRel(("Configuration error: Failed to configure /dev/net/tun non blocking. Error: %s\n", strerror(iErr)));
+                rcVBox = VERR_HOSTIF_BLOCKING;
+                rc = setError(E_FAIL, tr ("could not set up the host networking device for non blocking access: %s"),
+                                          strerror(errno));
+            }
+        }
+    }
     else
-        maTapFD[slot] = NIL_RTFILE;
-
-    /*
-     * Are we supposed to use an existing TAP interface?
-     */
-    if (maTapFD[slot] != NIL_RTFILE)
-    {
-        /* nothing to do */
-        Assert(ltapFD >= 0);
-        Assert((LONG)maTapFD[slot] == ltapFD);
-        rc = S_OK;
-    }
-    else
-    {
-        /*
-         * Allocate a host interface device
-         */
-        int rcVBox = RTFileOpen(&maTapFD[slot], "/dev/net/tun",
-                                RTFILE_O_READWRITE | RTFILE_O_OPEN | RTFILE_O_DENY_NONE | RTFILE_O_INHERIT);
-        if (VBOX_SUCCESS(rcVBox))
-        {
-            /*
-             * Set/obtain the tap interface.
-             */
-            bool isStatic = false;
-            struct ifreq IfReq;
-            memset(&IfReq, 0, sizeof(IfReq));
-            /* The name of the TAP interface we are using and the TAP setup script resp. */
-            Bstr tapDeviceName, tapSetupApplication;
-            rc = networkAdapter->COMGETTER(HostInterface)(tapDeviceName.asOutParam());
-            if (FAILED(rc))
-            {
-                tapDeviceName.setNull();  /* Is this necessary? */
-            }
-            else if (!tapDeviceName.isEmpty())
-            {
-                isStatic = true;
-                /* If we are using a static TAP device then try to open it. */
-                Utf8Str str(tapDeviceName);
-                if (str.length() <= sizeof(IfReq.ifr_name))
-                    strcpy(IfReq.ifr_name, str.raw());
-                else
-                    memcpy(IfReq.ifr_name, str.raw(), sizeof(IfReq.ifr_name) - 1); /** @todo bitch about names which are too long... */
-                IfReq.ifr_flags = IFF_TAP | IFF_NO_PI;
-                rcVBox = ioctl(maTapFD[slot], TUNSETIFF, &IfReq);
-                if (rcVBox != 0)
-                {
-                    LogRel(("Failed to open the host network interface %ls\n", tapDeviceName.raw()));
-                    rc = setError(E_FAIL, tr ("Failed to open the host network interface %ls"),
-                                          tapDeviceName.raw());
-                }
-            }
-            if (SUCCEEDED(rc))
-            {
-                networkAdapter->COMGETTER(TAPSetupApplication)(tapSetupApplication.asOutParam());
-                if (tapSetupApplication.isEmpty())
-                {
-                    if (tapDeviceName.isEmpty())
-                    {
-                        LogRel(("No setup application was supplied for the TAP interface.\n"));
-                        rc = setError(E_FAIL, tr ("No setup application was supplied for the host networking interface"));
-                    }
-                }
-                else
-                {
-                    rc = callTapSetupApplication(isStatic, maTapFD[slot], tapDeviceName,
-                                                 tapSetupApplication);
-                }
-            }
-            if (SUCCEEDED(rc))
-            {
-                if (!isStatic)
-                {
-                    Utf8Str str(tapDeviceName);
-                    if (str.length() <= sizeof(IfReq.ifr_name))
-                        strcpy(IfReq.ifr_name, str.raw());
-                    else
-                        memcpy(IfReq.ifr_name, str.raw(), sizeof(IfReq.ifr_name) - 1); /** @todo bitch about names which are too long... */
-                    IfReq.ifr_flags = IFF_TAP | IFF_NO_PI;
-                    rcVBox = ioctl(maTapFD[slot], TUNSETIFF, &IfReq);
-                    if (rcVBox != 0)
-                    {
-                        LogRel(("Failed to open the host network interface %ls returned by the setup script", tapDeviceName.raw()));
-                        rc = setError(E_FAIL, tr ("Failed to open the host network interface %ls returned by the setup script"), tapDeviceName.raw());
-                    }
-                }
-                if (SUCCEEDED(rc))
-                {
-                    /*
-                    * Make it pollable.
-                    */
-                    if (fcntl(maTapFD[slot], F_SETFL, O_NONBLOCK) != -1)
-                    {
-                        Log(("attachToHostInterface: %RTfile %ls\n", maTapFD[slot], tapDeviceName.raw()));
-
-                        /*
-                        * Here is the right place to communicate the TAP file descriptor and
-                        * the host interface name to the server if/when it becomes really
-                        * necessary.
-                        */
-                        maTAPDeviceName[slot] = tapDeviceName;
-                        rcVBox = VINF_SUCCESS;
-                    }
-                    else
-                    {
-                        int iErr = errno;
-
-                        LogRel(("Configuration error: Failed to configure /dev/net/tun non blocking. Error: %s\n", strerror(iErr)));
-                        rcVBox = VERR_HOSTIF_BLOCKING;
-                        rc = setError(E_FAIL, tr ("could not set up the host networking device for non blocking access: %s"),
-                                              strerror(errno));
-                    }
-                }
-            }
-        }
-        else
-        {
-            LogRel(("Configuration error: Failed to open /dev/net/tun rc=%Rrc\n", rcVBox));
-            switch (rcVBox)
-            {
-                case VERR_ACCESS_DENIED:
-                    /* will be handled by our caller */
-                    rc = rcVBox;
-                    break;
-                default:
-                    rc = setError(E_FAIL, tr ("Could not set up the host networking device: %Rrc"), rcVBox);
-                    break;
-            }
-        }
-        /* in case of failure, cleanup. */
-        if (VBOX_FAILURE(rcVBox) && SUCCEEDED(rc))
-        {
-            LogRel(("General failure attaching to host interface\n"));
-            rc = setError(E_FAIL, tr ("General failure attaching to host interface"));
-        }
+    {
+        LogRel(("Configuration error: Failed to open /dev/net/tun rc=%Rrc\n", rcVBox));
+        switch (rcVBox)
+        {
+            case VERR_ACCESS_DENIED:
+                /* will be handled by our caller */
+                rc = rcVBox;
+                break;
+            default:
+                rc = setError(E_FAIL, tr ("Could not set up the host networking device: %Rrc"), rcVBox);
+                break;
+        }
+    }
+    /* in case of failure, cleanup. */
+    if (VBOX_FAILURE(rcVBox) && SUCCEEDED(rc))
+    {
+        LogRel(("General failure attaching to host interface\n"));
+        rc = setError(E_FAIL, tr ("General failure attaching to host interface"));
     }
     LogFlowThisFunc(("rc=%d\n", rc));
@@ -5978,41 +5834,4 @@
             maTapFD[slot] = NIL_RTFILE;
         }
-        /*
-         * Execute the termination command.
-         */
-        networkAdapter->COMGETTER(TAPTerminateApplication)(tapTerminateApplication.asOutParam());
-        if (tapTerminateApplication)
-        {
-            /* Get the program name. */
-            Utf8Str tapTermAppUtf8(tapTerminateApplication);
-
-            /* Build the command line. */
-            char szCommand[4096];
-            RTStrPrintf(szCommand, sizeof(szCommand), "%s %d %s", tapTermAppUtf8.raw(),
-                        isStatic ? maTapFD[slot] : 0, maTAPDeviceName[slot].raw());
-            /** @todo check for overflow or use RTStrAPrintf! */
-
-            /*
-             * Create the process and wait for it to complete.
-             */
-            Log(("Calling the termination command: %s\n", szCommand));
-            int rcCommand = system(szCommand);
-            if (rcCommand == -1)
-            {
-                LogRel(("Failed to execute the clean up script for the TAP interface"));
-                rc = setError(E_FAIL, tr ("Failed to execute the clean up script for the TAP interface"));
-            }
-            if (!WIFEXITED(rc))
-            {
-                LogRel(("The TAP interface clean up script terminated abnormally.\n"));
-                rc = setError(E_FAIL, tr ("The TAP interface clean up script terminated abnormally"));
-            }
-            if (WEXITSTATUS(rc) != 0)
-            {
-                LogRel(("The TAP interface clean up script returned a non-zero exit code.\n"));
-                rc = setError(E_FAIL, tr ("The TAP interface clean up script returned a non-zero exit code"));
-            }
-        }
-
         if (isStatic)
         {
Index: /trunk/src/VBox/Main/ConsoleImpl2.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 17216)
+++ /trunk/src/VBox/Main/ConsoleImpl2.cpp	(revision 17217)
@@ -1294,5 +1294,21 @@
                 if (SUCCEEDED(hrc))
                 {
-#if defined(VBOX_WITH_NETFLT)
+#if !defined(VBOX_WITH_NETFLT) && defined(RT_OS_LINUX)
+                    Assert ((int)pConsole->maTapFD[ulInstance] >= 0);
+                    if ((int)pConsole->maTapFD[ulInstance] >= 0)
+                    {
+                        if (fSniffer)
+                        {
+                            rc = CFGMR3InsertNode(pLunL0, "AttachedDriver", &pLunL0); RC_CHECK();
+                        }
+                        else
+                        {
+                            rc = CFGMR3InsertNode(pInst, "LUN#0", &pLunL0);         RC_CHECK();
+                        }
+                        rc = CFGMR3InsertString(pLunL0, "Driver", "HostInterface"); RC_CHECK();
+                        rc = CFGMR3InsertNode(pLunL0, "Config", &pCfg);             RC_CHECK();
+                        rc = CFGMR3InsertInteger(pCfg, "FileHandle", pConsole->maTapFD[ulInstance]); RC_CHECK();
+                    }
+#elif defined(VBOX_WITH_NETFLT)
                     /*
                      * This is the new VBoxNetFlt+IntNet stuff.
Index: /trunk/src/VBox/Main/include/ConsoleImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 17216)
+++ /trunk/src/VBox/Main/include/ConsoleImpl.h	(revision 17217)
@@ -545,4 +545,8 @@
     PPDMLED     mapSharedFolderLed;
     PPDMLED     mapUSBLed[2];
+#if !defined(VBOX_WITH_NETFLT) && defined(RT_OS_LINUX)
+    Utf8Str     maTAPDeviceName[8];
+    RTFILE      maTapFD[8];
+#endif
 
     bool mVMStateChangeCallbackDisabled;
