summaryrefslogtreecommitdiffstats
path: root/network_config.cpp
blob: 050be0a4d8fd709b1c3f075632dd31d1ca1f507c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "network_config.hpp"
#include <fstream>
#include <string>

namespace phosphor
{
namespace network
{

namespace bmc
{
    void writeDHCPDefault(const std::string& filename,
            const std::string& interface)
    {
        std::ofstream filestream;

        filestream.open(filename);
        filestream << "[Match]\nName=" << interface <<
                "\n[Network]\nDHCP=true\n"
                "[DHCP]\nClientIdentifier=mac\n";
        filestream.close();
    }
}

}//namespace network
}//namespace phosphor
OpenPOWER on IntegriCloud