blob: 4540ad85d33aeb8cf02849f37cafd42ee920d142 [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 <<
19 "\n[Network]\nDHCP=true\n[DHCP]\nClientIdentifier=mac\n";
20 filestream.close();
21 }
22}
23
24}//namespace network
25}//namespace phosphor