blob: 84cf3dc90b675835cc5167c1fe7959e9a36d7820 [file] [log] [blame]
Michael Tritz29f2fd62017-05-22 15:27:26 -05001#include "network_config.hpp"
2#include <fstream>
3#include <string>
4
5namespace phosphor
6{
7namespace network
8{
9
10namespace bmc
11{
12 void writeDHCPDefault(const std::string& filename,
13 const std::string& interface)
14 {
15 std::ofstream filestream;
16
17 filestream.open(filename);
18 filestream << "[Match]\nName=" << interface <<
Nagaraju Goruganti24afe362017-09-21 07:40:26 -050019 "\n[Network]\nDHCP=true\nLinkLocalAddressing=yes\n"
Ratan Guptae9629412017-12-21 08:20:25 +053020 "IPv6AcceptRA=false\n"
Ratan Guptac35481d2017-08-18 06:12:26 +053021 "[DHCP]\nClientIdentifier=mac\n";
Michael Tritz29f2fd62017-05-22 15:27:26 -050022 filestream.close();
23 }
24}
25
26}//namespace network
27}//namespace phosphor