From: Tomek Mrugalski Date: Fri, 23 Dec 2011 16:26:24 +0000 (+0100) Subject: [1230] Changes after review: X-Git-Tag: trac2351_base~310^2~13^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a9f48f11eda70e641b4c4624eef4dbada03828ff;p=thirdparty%2Fkea.git [1230] Changes after review: - appendRequestedOptions(), assignLease() added in dhcpv4_srv class. - dhcpv4_srv now uses hardcoded values from 192.0.2.0/24 range. --- diff --git a/src/bin/dhcp4/dhcp4_srv.cc b/src/bin/dhcp4/dhcp4_srv.cc index 268cc9bc9f..693108cc95 100644 --- a/src/bin/dhcp4/dhcp4_srv.cc +++ b/src/bin/dhcp4/dhcp4_srv.cc @@ -28,13 +28,13 @@ using namespace isc::asiolink; // These are hardcoded parameters. Currently this is a skeleton server that only // grants those options and a single, fixed, hardcoded lease. -const std::string HARDCODED_LEASE = "10.3.2.222"; // assigned lease +const std::string HARDCODED_LEASE = "192.0.2.222"; // assigned lease const std::string HARDCODED_NETMASK = "255.255.255.0"; const uint32_t HARDCODED_LEASE_TIME = 60; // in seconds -const std::string HARDCODED_GATEWAY = "10.3.2.2"; -const std::string HARDCODED_DNS_SERVER = "8.8.8.8"; -const std::string HARDCODED_DOMAIN_NAME = "isc.example.org"; -const std::string HARDCODED_SERVER_ID = "10.3.1.1"; +const std::string HARDCODED_GATEWAY = "192.0.2.1"; +const std::string HARDCODED_DNS_SERVER = "192.0.2.2"; +const std::string HARDCODED_DOMAIN_NAME = "isc.example.com"; +const std::string HARDCODED_SERVER_ID = "192.0.2.1"; Dhcpv4Srv::Dhcpv4Srv(uint16_t port) { cout << "Initialization: opening sockets on port " << port << endl; @@ -188,62 +188,72 @@ void Dhcpv4Srv::copyDefaultFields(const boost::shared_ptr& question, } void Dhcpv4Srv::appendDefaultOptions(boost::shared_ptr& msg, uint8_t msg_type) { + boost::shared_ptr