blob: d0aa2b4ac76f0399d4307a0ac34dd9d02a25a8b4 [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 Guptac35481d2017-08-18 06:12:26 +053020 "[DHCP]\nClientIdentifier=mac\n";
Michael Tritz29f2fd62017-05-22 15:27:26 -050021 filestream.close();
22 }
23}
24
25}//namespace network
26}//namespace phosphor