Michael Tritz | 29f2fd6 | 2017-05-22 15:27:26 -0500 | [diff] [blame] | 1 | #include "network_config.hpp" |
| 2 | #include <fstream> |
| 3 | #include <string> |
| 4 | |
| 5 | namespace phosphor |
| 6 | { |
| 7 | namespace network |
| 8 | { |
| 9 | |
| 10 | namespace 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 |