VirtualBox

Changeset 17940 in vbox for trunk/src/VBox/Devices/Network


Ignore:
Timestamp:
Mar 16, 2009 2:47:42 PM (16 years ago)
Author:
vboxsync
Message:

dhcp runner fixes + disabled launching code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DrvIntNet.cpp

    r16967 r17940  
    4545#endif
    4646
     47#include "DhcpServerRunner.h"
    4748
    4849/*******************************************************************************
     
    10671068    Log(("IntNet%d: hIf=%RX32 '%s'\n", pDrvIns->iInstance, pThis->hIf, pThis->szNetwork));
    10681069
     1070#if 0
     1071    DhcpServerRunner dhcp;
     1072    dhcp.setOption(DHCPCFG_NETNAME, OpenReq.szNetwork);
     1073    dhcp.setOption(DHCPCFG_TRUNKNAME, OpenReq.szTrunk);
     1074    switch(OpenReq.enmTrunkType)
     1075    {
     1076    case kIntNetTrunkType_WhateverNone:
     1077        dhcp.setOption(DHCPCFG_TRUNKTYPE, TRUNKTYPE_WHATEVER);
     1078        break;
     1079    case kIntNetTrunkType_NetFlt:
     1080        dhcp.setOption(DHCPCFG_TRUNKTYPE, TRUNKTYPE_NETFLT);
     1081        break;
     1082    case kIntNetTrunkType_NetAdp:
     1083        dhcp.setOption(DHCPCFG_TRUNKTYPE, TRUNKTYPE_NETADP);
     1084        break;
     1085    case kIntNetTrunkType_SrvNat:
     1086        dhcp.setOption(DHCPCFG_TRUNKTYPE, TRUNKTYPE_SRVNAT);
     1087        break;
     1088    }
     1089//temporary hack for testing
     1090    //    DHCPCFG_NAME
     1091    dhcp.setOption(DHCPCFG_MACADDRESS, "080027A03128");
     1092    dhcp.setOption(DHCPCFG_IPADDRESS,  "192.168.55.1");
     1093//        DHCPCFG_LEASEDB,
     1094//        DHCPCFG_VERBOSE,
     1095//        DHCPCFG_BEGINCONFIG,
     1096//        DHCPCFG_GATEWAY,
     1097    dhcp.setOption(DHCPCFG_LOWERIP,  "192.168.55.10");
     1098    dhcp.setOption(DHCPCFG_UPPERIP,  "192.168.55.100");
     1099    dhcp.setOption(DHCPCFG_NETMASK,  "255.255.255.0");
     1100//        DHCPCFG_HELP,
     1101//        DHCPCFG_VERSION,
     1102//        DHCPCFG_NOTOPT_MAXVAL
     1103    dhcp.start();
     1104
     1105    dhcp.detachFromServer(); /* need to do this to avoid server shutdown on runner destruction */
     1106#endif
    10691107    /*
    10701108     * Get default buffer.
     
    11161154    }
    11171155
    1118     return rc;
     1156   return rc;
    11191157}
    11201158
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette