VirtualBox

Ignore:
Timestamp:
Jul 14, 2019 3:59:56 AM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
132128
Message:

Main/DHCPServer,Dhcpd,VBoxManage: Added --log option to the DHCP server so we can start logging early. Added log rotation and limits. Put the config file next to the log and leases file. Validate DHCP options by reusing the parser code from the server, adding a bunch more DHCP options to the parser. Removed legacy and hardcoded configuration options from the dhcp server, it's all config file now. Fixed a bug in the option parsing of the VBoxManage dhcpserver add/modify commands. [build fix] bugref:9288

Location:
trunk/src/VBox/NetworkServices/Dhcpd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/Dhcpd/DhcpOptions.cpp

    r79762 r79763  
    2222#include "DhcpdInternal.h"
    2323#include "DhcpOptions.h"
    24 #include "DhcpMessage.h"
     24#ifndef IN_VBOXSVC
     25# include "DhcpMessage.h"
     26#endif
    2527
    2628#include <iprt/cidr.h>
    2729
     30
     31#ifndef IN_VBOXSVC
    2832
    2933optmap_t &operator<<(optmap_t &optmap, DhcpOption *option)
     
    5458}
    5559
     60#endif /* !IN_VBOXSVC */
     61
    5662
    5763int DhcpOption::encode(octets_t &dst) const
     
    102108
    103109
     110#ifndef IN_VBOXSVC
    104111int DhcpOption::decode(const DhcpClientMessage &req)
    105112{
    106113    return decode(req.rawopts());
    107114}
     115#endif
    108116
    109117
  • trunk/src/VBox/NetworkServices/Dhcpd/DhcpOptions.h

    r79761 r79763  
    211211
    212212
     213#ifndef IN_VBOXSVC
    213214optmap_t &operator<<(optmap_t &optmap, DhcpOption *option);
    214215optmap_t &operator<<(optmap_t &optmap, const std::shared_ptr<DhcpOption> &option);
     216#endif
    215217
    216218
  • trunk/src/VBox/NetworkServices/Dhcpd/DhcpdInternal.h

    r79761 r79763  
    4949typedef std::map<uint8_t, octets_t> rawopts_t;
    5050
     51#ifndef IN_VBOXSVC
    5152class DhcpOption;
    5253/** DHCP option map (keyed by option number, DhcpOption value). */
    5354typedef std::map<uint8_t, std::shared_ptr<DhcpOption> > optmap_t;
     55#endif
    5456
    5557
Note: See TracChangeset for help on using the changeset viewer.

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