Changeset 75512 in vbox for trunk/src/VBox/NetworkServices/Dhcpd
- Timestamp:
- Nov 16, 2018 11:33:38 AM (6 years ago)
- Location:
- trunk/src/VBox/NetworkServices/Dhcpd
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/Dhcpd/Db.cpp
r73076 r75512 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/Defs.h
r70836 r75512 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/DhcpOptions.cpp
r71689 r75512 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
r70836 r75512 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 if1of ($(KBUILD_TARGET),win linux solaris) 44 VBoxNetDhcpd_TEMPLATE := $(if-expr defined(VBOX_WITH_HARDENING),VBoxR3DllDhcpd,VBoxR3ExeDhcpd) 45 else 46 VBoxNetDhcpd_TEMPLATE := $(if-expr defined(VBOX_WITH_HARDENING),VBoxR3Dll,VBOXR3EXE) 47 endif 48 VBoxNetDhcpd_NAME = VBoxNetDHCP 43 49 # VBoxNetDhcpd_DEFS = IPv6 44 # VBoxNet LwipNAT_DEFS.linux = WITH_VALGRIND45 VBoxNetDhcpd_DEFS.win = VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP50 # VBoxNetDhcpd_DEFS.linux = WITH_VALGRIND 51 #VBoxNetDhcpd_DEFS.win = VBOX_COM_OUTOFPROC_MODULE _WIN32_WINNT=0x501 # Windows XP 46 52 47 53 # (current dir is for for lwipopts.h) 48 54 VBoxNetDhcpd_INCS += . $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_INCS)) 49 55 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)) 56 VBoxNetDhcpd_DEFS = KBUILD_TYPE=\"$(KBUILD_TYPE)\" 57 ifneq ($(KBUILD_TARGET),win) 58 VBoxNetDhcpd_DEFS += VBOX_WITH_XPCOM 59 VBoxNetDhcpd_INCS += $(VBOX_XPCOM_INCS) 60 VBoxNetDhcpd_CXXFLAGS += -std=c++11 61 endif 62 VBoxNetDhcpd_SOURCES = ../../Main/glue/VBoxLogRelCreate.cpp \ 63 ../../Main/glue/GetVBoxUserHomeDirectory.cpp \ 64 ClientId.cpp \ 65 Config.cpp \ 66 DHCPD.cpp \ 67 Db.cpp \ 68 DhcpMessage.cpp \ 69 DhcpOptions.cpp \ 70 IPv4Pool.cpp \ 71 TimeStamp.cpp \ 72 VBoxNetDhcpd.cpp \ 73 $(addprefix ../../Devices/Network/lwip-new/,$(LWIP_SOURCES)) 61 74 62 VBoxNet LwipNAT_LIBS = $(LIB_RUNTIME)75 VBoxNetDhcpd_LIBS = $(LIB_RUNTIME) 63 76 64 VBoxNet LwipNAT_LIBS.solaris += socket nsl65 VBoxNet LwipNAT_LDFLAGS.win = /SUBSYSTEM:windows77 VBoxNetDhcpd_LIBS.solaris += socket nsl 78 VBoxNetDhcpd_LDFLAGS.win = /SUBSYSTEM:windows 66 79 67 80 ifeq ($(KBUILD_TARGET),win) -
trunk/src/VBox/NetworkServices/Dhcpd/VBoxNetDhcpd.cpp
r71689 r75512 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;
Note:
See TracChangeset
for help on using the changeset viewer.