- Timestamp:
- Nov 19, 2018 11:52:10 AM (6 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageDHCPServer.cpp
r75513 r75568 52 52 OP_ADD = 1000, 53 53 OP_REMOVE, 54 OP_MODIFY 54 OP_MODIFY, 55 OP_RESTART 55 56 } OPCODE; 56 57 … … 319 320 320 321 if( enmCode != OP_REMOVE 322 && enmCode != OP_RESTART 321 323 && GlobalDhcpOptions.empty() 322 324 && VmSlot2Options.empty()) … … 374 376 } 375 377 376 if(enmCode != OP_REMOVE) 378 if (enmCode == OP_RESTART) 379 { 380 CHECK_ERROR(svr, Restart()); 381 if(FAILED(rc)) 382 return errorArgument("Failed to restart server"); 383 } 384 else if (enmCode == OP_REMOVE) 385 { 386 CHECK_ERROR(a->virtualBox, RemoveDHCPServer(svr)); 387 if(FAILED(rc)) 388 return errorArgument("Failed to remove server"); 389 } 390 else 377 391 { 378 392 if (pIp || pNetmask || pLowerIp || pUpperIp) … … 425 439 } 426 440 } 427 else428 {429 CHECK_ERROR(a->virtualBox, RemoveDHCPServer(svr));430 if(FAILED(rc))431 return errorArgument("Failed to remove server");432 }433 441 434 442 return RTEXITCODE_SUCCESS; … … 448 456 else if (strcmp(a->argv[0], "remove") == 0) 449 457 rcExit = handleOp(a, OP_REMOVE, 1); 458 else if (strcmp(a->argv[0], "restart") == 0) 459 rcExit = handleOp(a, OP_RESTART, 1); 450 460 else 451 461 rcExit = errorSyntax(USAGE_DHCPSERVER, "Invalid parameter '%s'", Utf8Str(a->argv[0]).c_str()); -
trunk/src/VBox/Main/Makefile.kmk
r75513 r75568 79 79 $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \ 80 80 $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,) \ 81 $(if $(VBOX_WITH_DHCPD),VBOX_WITH_DHCPD,) \ 81 82 $(if $(VBOX_WITH_LIVE_MIGRATION),VBOX_WITH_LIVE_MIGRATION,) \ 82 83 $(if $(VBOX_WITH_MIDL_PROXY_STUB),VBOX_WITH_MIDL_PROXY_STUB,) \ -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r75513 r75568 1791 1791 <interface 1792 1792 name="IDHCPServer" extends="$unknown" 1793 uuid=" 00c8f974-92c5-44a1-8f3f-702469fdd04b"1793 uuid="197717d2-a742-4966-a529-d1467e903feb" 1794 1794 wsmap="managed" 1795 1795 reservedMethods="2" reservedAttributes="6" … … 1953 1953 <result name="E_FAIL"> 1954 1954 Failed to stop the process. 1955 </result> 1956 </desc> 1957 </method> 1958 1959 <method name="restart"> 1960 <desc> 1961 Restart running DHCP server process. 1962 <result name="E_FAIL"> 1963 Failed to restart the process. 1955 1964 </result> 1956 1965 </desc> -
trunk/src/VBox/Main/include/DHCPServerImpl.h
r75513 r75568 50 50 static const std::string kDsrKeyLowerIp; 51 51 static const std::string kDsrKeyUpperIp; 52 static const std::string kDsrKeyConfig; 52 53 }; 53 54 … … 125 126 const com::Utf8Str &aTrunkType); 126 127 HRESULT stop(); 128 HRESULT restart(); 127 129 128 130 struct Data; -
trunk/src/VBox/Main/include/NetworkServiceRunner.h
r75513 r75568 36 36 37 37 int setOption(const std::string& key, const std::string& val); 38 void clearOptions(); 38 39 39 40 int start(bool aKillProcOnStop); -
trunk/src/VBox/Main/src-server/DHCPServerImpl.cpp
r75513 r75568 25 25 26 26 #include <iprt/asm.h> 27 #include <iprt/file.h> 27 28 #include <iprt/net.h> 29 #include <iprt/path.h> 28 30 #include <iprt/cpp/utils.h> 31 #include <iprt/cpp/xml.h> 29 32 30 33 #include <VBox/com/array.h> … … 38 41 const std::string DHCPServerRunner::kDsrKeyLowerIp = "--lower-ip"; 39 42 const std::string DHCPServerRunner::kDsrKeyUpperIp = "--upper-ip"; 43 const std::string DHCPServerRunner::kDsrKeyConfig = "--config"; 40 44 41 45 … … 45 49 : enabled(FALSE) 46 50 , router(false) 47 {} 51 { 52 tempConfigFileName[0] = '\0'; 53 } 48 54 49 55 Utf8Str IPAddress; … … 57 63 settings::DhcpOptionMap GlobalDhcpOptions; 58 64 settings::VmSlot2OptionsMap VmSlot2Options; 65 66 char tempConfigFileName[RTPATH_MAX]; 67 com::Utf8Str networkName; 68 com::Utf8Str trunkName; 69 com::Utf8Str trunkType; 59 70 }; 60 71 … … 98 109 if (autoUninitSpan.uninitDone()) 99 110 return; 111 112 if (m->dhcp.isRunning()) 113 stop(); 100 114 101 115 unconst(mVirtualBox) = NULL; … … 599 613 600 614 615 DECLINLINE(void) addOptionChild(xml::ElementNode *pParent, uint32_t OptCode, const settings::DhcpOptValue &OptValue) 616 { 617 xml::ElementNode *pOption = pParent->createChild("Option"); 618 pOption->setAttribute("name", OptCode); 619 pOption->setAttribute("encoding", OptValue.encoding); 620 pOption->setAttribute("value", OptValue.text.c_str()); 621 } 622 623 624 HRESULT DHCPServer::restart() 625 { 626 if (!m->dhcp.isRunning()) 627 return E_FAIL; 628 /* 629 * Disabled servers will be brought down, but won't be restarted. 630 * (see DHCPServer::start) 631 */ 632 HRESULT hrc = stop(); 633 if (SUCCEEDED(hrc)) 634 hrc = start(m->networkName, m->trunkName, m->trunkType); 635 return hrc; 636 } 637 638 601 639 HRESULT DHCPServer::start(const com::Utf8Str &aNetworkName, 602 640 const com::Utf8Str &aTrunkName, … … 607 645 return S_OK; 608 646 647 /* 648 * @todo: the existing code cannot handle concurrent attempts to start DHCP server. 649 * Note that technically it may receive different parameters from different callers. 650 */ 651 m->networkName = aNetworkName; 652 m->trunkName = aTrunkName; 653 m->trunkType = aTrunkType; 654 655 m->dhcp.clearOptions(); 656 #ifdef VBOX_WITH_DHCPD 657 int rc = RTPathTemp(m->tempConfigFileName, sizeof(m->tempConfigFileName)); 658 if (RT_FAILURE(rc)) 659 return E_FAIL; 660 rc = RTPathAppend(m->tempConfigFileName, sizeof(m->tempConfigFileName), "dhcp-config-XXXXX.xml"); 661 if (RT_FAILURE(rc)) 662 { 663 m->tempConfigFileName[0] = '\0'; 664 return E_FAIL; 665 } 666 rc = RTFileCreateTemp(m->tempConfigFileName, 0600); 667 if (RT_FAILURE(rc)) 668 { 669 m->tempConfigFileName[0] = '\0'; 670 return E_FAIL; 671 } 672 673 xml::Document doc; 674 xml::ElementNode *pElmRoot = doc.createRootElement("DHCPServer"); 675 pElmRoot->setAttribute("networkName", m->networkName.c_str()); 676 if (!m->trunkName.isEmpty()) 677 pElmRoot->setAttribute("trunkName", m->trunkName.c_str()); 678 pElmRoot->setAttribute("trunkType", m->trunkType.c_str()); 679 pElmRoot->setAttribute("IPAddress", Utf8Str(m->IPAddress).c_str()); 680 pElmRoot->setAttribute("networkMask", Utf8Str(m->GlobalDhcpOptions[DhcpOpt_SubnetMask].text).c_str()); 681 pElmRoot->setAttribute("lowerIP", Utf8Str(m->lowerIP).c_str()); 682 pElmRoot->setAttribute("upperIP", Utf8Str(m->upperIP).c_str()); 683 684 /* Process global options */ 685 xml::ElementNode *pOptions = pElmRoot->createChild("Options"); 686 // settings::DhcpOptionMap::const_iterator itGlobal; 687 for (settings::DhcpOptionMap::const_iterator it = m->GlobalDhcpOptions.begin(); 688 it != m->GlobalDhcpOptions.end(); 689 ++it) 690 addOptionChild(pOptions, (*it).first, (*it).second); 691 692 /* Process network-adapter-specific options */ 693 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 694 HRESULT hrc = S_OK; 695 ComPtr<IMachine> machine; 696 ComPtr<INetworkAdapter> nic; 697 settings::VmSlot2OptionsIterator it; 698 for(it = m->VmSlot2Options.begin(); it != m->VmSlot2Options.end(); ++it) 699 { 700 alock.release(); 701 hrc = mVirtualBox->FindMachine(Bstr(it->first.VmName).raw(), machine.asOutParam()); 702 alock.acquire(); 703 704 if (FAILED(hrc)) 705 continue; 706 707 alock.release(); 708 hrc = machine->GetNetworkAdapter(it->first.Slot, nic.asOutParam()); 709 alock.acquire(); 710 711 if (FAILED(hrc)) 712 continue; 713 714 com::Bstr mac; 715 716 alock.release(); 717 hrc = nic->COMGETTER(MACAddress)(mac.asOutParam()); 718 alock.acquire(); 719 720 if (FAILED(hrc)) /* no MAC address ??? */ 721 continue; 722 723 /* Convert MAC address from XXXXXXXXXXXX to XX:XX:XX:XX:XX:XX */ 724 Utf8Str strMacWithoutColons(mac); 725 const char *pszSrc = strMacWithoutColons.c_str(); 726 RTMAC binaryMac; 727 if (RTStrConvertHexBytes(pszSrc, &binaryMac, sizeof(binaryMac), 0) != VINF_SUCCESS) 728 continue; 729 char szMac[18]; /* "XX:XX:XX:XX:XX:XX" */ 730 if (RTStrPrintHexBytes(szMac, sizeof(szMac), &binaryMac, sizeof(binaryMac), RTSTRPRINTHEXBYTES_F_SEP_COLON) != VINF_SUCCESS) 731 continue; 732 733 xml::ElementNode *pMacConfig = pElmRoot->createChild("Config"); 734 pMacConfig->setAttribute("MACAddress", szMac); 735 736 com::Utf8Str encodedOption; 737 settings::DhcpOptionMap &map = i_findOptMapByVmNameSlot(it->first.VmName, it->first.Slot); 738 settings::DhcpOptionMap::const_iterator itAdapterOption; 739 for (itAdapterOption = map.begin(); itAdapterOption != map.end(); ++itAdapterOption) 740 addOptionChild(pMacConfig, (*itAdapterOption).first, (*itAdapterOption).second); 741 } 742 743 xml::XmlFileWriter writer(doc); 744 writer.write(m->tempConfigFileName, true); 745 746 m->dhcp.setOption(DHCPServerRunner::kDsrKeyConfig, m->tempConfigFileName); 747 #else /* !VBOX_WITH_DHCPD */ 609 748 /* Commmon Network Settings */ 610 749 m->dhcp.setOption(NetworkServiceRunner::kNsrKeyNetwork, aNetworkName.c_str()); … … 628 767 m->dhcp.setOption(DHCPServerRunner::kDsrKeyLowerIp, Utf8Str(m->lowerIP).c_str()); 629 768 m->dhcp.setOption(DHCPServerRunner::kDsrKeyUpperIp, Utf8Str(m->upperIP).c_str()); 769 #endif /* !VBOX_WITH_DHCPD */ 630 770 631 771 /* XXX: This parameters Dhcp Server will fetch via API */ … … 637 777 HRESULT DHCPServer::stop (void) 638 778 { 779 #ifdef VBOX_WITH_DHCPD 780 if (m->tempConfigFileName[0]) 781 { 782 RTFileDelete(m->tempConfigFileName); 783 m->tempConfigFileName[0] = 0; 784 } 785 #endif /* VBOX_WITH_DHCPD */ 639 786 return RT_FAILURE(m->dhcp.stop()) ? E_FAIL : S_OK; 640 787 } -
trunk/src/VBox/Main/src-server/NetworkServiceRunner.cpp
r75513 r75568 66 66 m->mOptions.insert(std::map<std::string, std::string>::value_type(key, val)); 67 67 return VINF_SUCCESS; 68 } 69 70 71 void NetworkServiceRunner::clearOptions() 72 { 73 m->mOptions.clear(); 68 74 } 69 75 -
trunk/src/VBox/NetworkServices/Dhcpd/ClientId.h
r70836 r75568 35 35 ClientId() 36 36 : m_mac(), m_id() {} 37 ClientId(const RTMAC &mac , const OptClientId &id)38 : m_mac(mac ), m_id(id) {}37 ClientId(const RTMAC &macParam, const OptClientId &idParam) 38 : m_mac(macParam), m_id(idParam) {} 39 39 40 40 const RTMAC &mac() const { return m_mac; } -
trunk/src/VBox/NetworkServices/Dhcpd/Config.cpp
r71749 r75568 589 589 /** @todo r=bird: Visual C++ 2010 does not grok this use of 'auto'. */ 590 590 // XXX: debug 591 for ( auto it: m_GlobalOptions) {592 std::shared_ptr<DhcpOption> opt(it .second);591 for (optmap_t::iterator it = m_GlobalOptions.begin(); it != m_GlobalOptions.end(); ++it) { 592 std::shared_ptr<DhcpOption> opt(it->second); 593 593 594 594 octets_t data; … … 596 596 597 597 bool space = false; 598 for ( auto c: data) {598 for (octets_t::iterator c = data.begin(); c != data.end(); ++c) { 599 599 if (space) 600 600 std::cout << " "; 601 601 else 602 602 space = true; 603 std::cout << (int) c;603 std::cout << (int)*c; 604 604 } 605 605 std::cout << std::endl; … … 854 854 optmap << new OptSubnetMask(m_IPv4Netmask); 855 855 856 for (auto optreq: reqOpts.value()) 857 { 858 std::cout << ">>> requested option " << (int)optreq << std::endl; 859 860 if (optreq == OptSubnetMask::optcode) 856 const OptParameterRequest::value_t& reqValue = reqOpts.value(); 857 for (octets_t::const_iterator optreq = reqValue.begin(); optreq != reqValue.end(); ++optreq) 858 { 859 std::cout << ">>> requested option " << (int)*optreq << std::endl; 860 861 if (*optreq == OptSubnetMask::optcode) 861 862 { 862 863 std::cout << "... always supplied" << std::endl; … … 866 867 if (vmopts != NULL) 867 868 { 868 optmap_t::const_iterator it( vmopts->find( optreq) );869 optmap_t::const_iterator it( vmopts->find(*optreq) ); 869 870 if (it != vmopts->end()) 870 871 { … … 875 876 } 876 877 877 optmap_t::const_iterator it( m_GlobalOptions.find( optreq) );878 optmap_t::const_iterator it( m_GlobalOptions.find(*optreq) ); 878 879 if (it != m_GlobalOptions.end()) 879 880 { … … 890 891 if (vmopts != NULL) 891 892 { 892 for ( auto it: *vmopts) {893 std::shared_ptr<DhcpOption> opt(it .second);893 for (optmap_t::const_iterator it = vmopts->begin(); it != vmopts->end(); ++it) { 894 std::shared_ptr<DhcpOption> opt(it->second); 894 895 if (optmap.count(opt->optcode()) == 0 && opt->optcode() > 127) 895 896 { … … 900 901 } 901 902 902 for ( auto it: m_GlobalOptions) {903 std::shared_ptr<DhcpOption> opt(it .second);903 for (optmap_t::const_iterator it = m_GlobalOptions.begin(); it != m_GlobalOptions.end(); ++it) { 904 std::shared_ptr<DhcpOption> opt(it->second); 904 905 if (optmap.count(opt->optcode()) == 0 && opt->optcode() > 127) 905 906 { -
trunk/src/VBox/NetworkServices/Dhcpd/Db.cpp
r75513 r75568 291 291 */ 292 292 const xml::ElementNode *ndTime = ndLease->findChildElement("Time"); 293 if ( time == NULL)293 if (ndTime == NULL) 294 294 return NULL; 295 295 -
trunk/src/VBox/NetworkServices/Dhcpd/Db.h
r73076 r75568 51 51 Binding(const Binding &); 52 52 53 explicit Binding(RTNETADDRIPV4 addr )54 : m_addr(addr ), m_state(FREE),53 explicit Binding(RTNETADDRIPV4 addrParam) 54 : m_addr(addrParam), m_state(FREE), 55 55 m_issued(), m_secLease() {} 56 56 57 Binding(RTNETADDRIPV4 addr , const ClientId &id)58 : m_addr(addr ), m_state(FREE), m_id(id),57 Binding(RTNETADDRIPV4 addrParam, const ClientId &idParam) 58 : m_addr(addrParam), m_state(FREE), m_id(idParam), 59 59 m_issued(), m_secLease() {} 60 60 … … 70 70 TimeStamp issued() const { return m_issued; } 71 71 72 Binding &setState(State state )72 Binding &setState(State stateParam) 73 73 { 74 m_state = state ;74 m_state = stateParam; 75 75 return *this; 76 76 } … … 85 85 } 86 86 87 Binding &giveTo(const ClientId &id )87 Binding &giveTo(const ClientId &idParam) 88 88 { 89 m_id = id ;89 m_id = idParam; 90 90 m_state = FREE; 91 91 return *this; -
trunk/src/VBox/NetworkServices/Dhcpd/Defs.h
r75513 r75568 27 27 #include <vector> 28 28 29 #ifdef _MSC_VER 30 # define __func__ __FUNCTION__ 31 #endif 32 29 33 typedef std::vector<uint8_t> octets_t; 30 34 … … 32 36 33 37 class DhcpOption; 34 typedef std::map<uint8_t, std::shared_ptr<DhcpOption> > optmap_t;38 typedef std::map<uint8_t, std::shared_ptr<DhcpOption> > optmap_t; 35 39 36 40 inline bool operator==(const RTMAC &l, const RTMAC &r) -
trunk/src/VBox/NetworkServices/Dhcpd/DhcpMessage.cpp
r70836 r75568 323 323 324 324 DhcpServerMessage::DhcpServerMessage(const DhcpClientMessage &req, 325 uint8_t messageType , RTNETADDRIPV4 serverAddr)325 uint8_t messageTypeParam, RTNETADDRIPV4 serverAddr) 326 326 : DhcpMessage(), 327 327 m_optServerId(serverAddr) … … 329 329 m_dst.u = 0xffffffff; /* broadcast */ 330 330 331 m_optMessageType = OptMessageType(messageType );331 m_optMessageType = OptMessageType(messageTypeParam); 332 332 333 333 /* copy values from the request (cf. RFC2131 Table 3) */ -
trunk/src/VBox/NetworkServices/Dhcpd/DhcpOptions.cpp
r75513 r75568 36 36 optmap_t &operator<<(optmap_t &optmap, const std::shared_ptr<DhcpOption> &option) 37 37 { 38 if (option == NULL)38 if (option == nullptr) 39 39 return optmap; 40 40 -
trunk/src/VBox/NetworkServices/Dhcpd/Makefile.kmk
r75513 r75568 29 29 ifdef VBOX_WITH_HARDENING 30 30 PROGRAMS += VBoxNetDhcpdHardened 31 VBoxNetDhcpdHardened_TEMPLATE = VBOXR3HARDENEDEXE 32 VBoxNetDhcpdHardened_NAME = VBoxNetDhcpd 33 VBoxNetDhcpdHardened_DEFS = SERVICE_NAME=\"VBoxNetDhcpd\" 34 VBoxNetDhcpdHardened_SOURCES = VBoxNetDhcpdHardened.cpp 35 VBoxNetDhcpdHardened_SOURCES.win = $(VBoxNetLwipNAT_0_OUTDIR)/VBoxNetDhcpd-icon.rc 36 VBoxNetDhcpdHardened_LDFLAGS.win = /SUBSYSTEM:windows 31 DLLS += VBoxNetDhcpd 37 32 else 38 33 PROGRAMS += VBoxNetDhcpd 39 34 endif 40 35 41 VBoxNetDhcpd_TEMPLATE := $(if-expr defined(VBOX_WITH_HARDENING),VBOXMAINDLL,VBOXMAINCLIENTEXE) 42 VBoxNetDhcpd_NAME := VBoxNetDhcpd 36 VBoxNetDhcpdHardened_TEMPLATE = VBOXR3HARDENEDEXE 37 VBoxNetDhcpdHardened_NAME = VBoxNetDHCP 38 VBoxNetDhcpdHardened_DEFS = SERVICE_NAME=\"VBoxNetDhcpd\" 39 VBoxNetDhcpdHardened_SOURCES = VBoxNetDhcpdHardened.cpp 40 VBoxNetDhcpdHardened_SOURCES.win = $(VBoxNetDhcpd_0_OUTDIR)/VBoxNetDhcpd-icon.rc 41 VBoxNetDhcpdHardened_LDFLAGS.win = /SUBSYSTEM:windows 42 43 VBoxNetDhcpd_TEMPLATE := $(if-expr defined(VBOX_WITH_HARDENING),VBoxR3Dll,VBOXR3EXE) 44 VBoxNetDhcpd_NAME = VBoxNetDHCP 43 45 # VBoxNetDhcpd_DEFS = IPv6 44 # VBoxNet LwipNAT_DEFS.linux = WITH_VALGRIND45 VBoxNetDhcpd_DEFS.win = VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP46 # VBoxNetDhcpd_DEFS.linux = WITH_VALGRIND 47 #VBoxNetDhcpd_DEFS.win = VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP 46 48 47 49 # (current dir is for for lwipopts.h) 48 50 VBoxNetDhcpd_INCS += . $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_INCS)) 49 51 50 VBoxNetDhcpd_SOURCES = 51 VBoxNetDhcpd_SOURCES += ClientId.cpp 52 VBoxNetDhcpd_SOURCES += Config.cpp 53 VBoxNetDhcpd_SOURCES += DHCPD.cpp 54 VBoxNetDhcpd_SOURCES += Db.cpp 55 VBoxNetDhcpd_SOURCES += DhcpMessage.cpp 56 VBoxNetDhcpd_SOURCES += DhcpOptions.cpp 57 VBoxNetDhcpd_SOURCES += IPv4Pool.cpp 58 VBoxNetDhcpd_SOURCES += TimeStamp.cpp 59 VBoxNetDhcpd_SOURCES += VBoxNetDhcpd.cpp 60 VBoxNetDhcpd_SOURCES += $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_SOURCES)) 52 VBoxNetDhcpd_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\" 53 ifneq ($(KBUILD_TARGET),win) 54 VBoxNetDhcpd_DEFS += VBOX_WITH_XPCOM 55 VBoxNetDhcpd_INCS += $(VBOX_XPCOM_INCS) 56 VBoxNetDhcpd_CXXFLAGS += $(VBOX_GCC_std) 57 endif 58 VBoxNetDhcpd_SOURCES = ../../Main/glue/VBoxLogRelCreate.cpp \ 59 ../../Main/glue/GetVBoxUserHomeDirectory.cpp \ 60 ClientId.cpp \ 61 Config.cpp \ 62 DHCPD.cpp \ 63 Db.cpp \ 64 DhcpMessage.cpp \ 65 DhcpOptions.cpp \ 66 IPv4Pool.cpp \ 67 TimeStamp.cpp \ 68 VBoxNetDhcpd.cpp \ 69 $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_SOURCES)) 61 70 62 VBoxNet LwipNAT_LIBS = $(LIB_RUNTIME)71 VBoxNetDhcpd_LIBS = $(LIB_RUNTIME) 63 72 64 VBoxNet LwipNAT_LIBS.solaris += socket nsl65 VBoxNet LwipNAT_LDFLAGS.win = /SUBSYSTEM:windows73 VBoxNetDhcpd_LIBS.solaris += socket nsl 74 VBoxNetDhcpd_LDFLAGS.win = /SUBSYSTEM:windows 66 75 67 76 ifeq ($(KBUILD_TARGET),win) -
trunk/src/VBox/NetworkServices/Dhcpd/VBoxNetDhcpd.cpp
r75513 r75568 52 52 #include <memory> 53 53 54 #ifdef RT_OS_WINDOWS /* WinMain */ 55 #undef htonl 56 #undef ntohl 57 # include <iprt/win/windows.h> 58 #endif 54 59 55 60 struct delete_pbuf … … 448 453 i, cSegs, 449 454 &cbSegFrame); 450 ifInput(pvSegFrame, cbFrame);455 ifInput(pvSegFrame, (uint32_t)cbFrame); 451 456 } 452 457 } … … 738 743 739 744 unique_ptr_pbuf q ( pbuf_alloc(PBUF_RAW, (u16_t)data.size(), PBUF_RAM) ); 740 if (q == NULL)741 return; 742 743 error = pbuf_take(q.get(), &data.front(), data.size());745 if (q == nullptr) 746 return; 747 748 error = pbuf_take(q.get(), &data.front(), (u16_t)data.size()); 744 749 if (error != ERR_OK) 745 750 return; -
trunk/src/VBox/NetworkServices/Makefile.kmk
r75513 r75568 22 22 ifdef VBOX_WITH_MAIN 23 23 # Include sub-makefiles. 24 include $(PATH_SUB_CURRENT)/DHCP/Makefile.kmk 24 ifndef VBOX_WITH_DHCPD 25 include $(PATH_SUB_CURRENT)/DHCP/Makefile.kmk 26 else 27 include $(PATH_SUB_CURRENT)/Dhcpd/Makefile.kmk 28 endif 25 29 ifdef VBOX_WITH_NAT_SERVICE 26 30 include $(PATH_SUB_CURRENT)/NAT/Makefile.kmk
Note:
See TracChangeset
for help on using the changeset viewer.