reorder headers

Reordering all the headers to the following structure:

header file:
local
c
cpp (including openbmc libraries)

source file:
source.hpp (if applicable)
local
c
cpp

Change-Id: Ia74a5c761a3029819366159de3cfd40c5e4c4a2c
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/argument.cpp b/argument.cpp
index 603a54c..6d4bb1a 100644
--- a/argument.cpp
+++ b/argument.cpp
@@ -13,10 +13,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+#include "argument.hpp"
+
+#include <algorithm>
 #include <iostream>
 #include <iterator>
-#include <algorithm>
-#include "argument.hpp"
 
 namespace phosphor
 {
diff --git a/argument.hpp b/argument.hpp
index ad63cf9..94fdbd6 100644
--- a/argument.hpp
+++ b/argument.hpp
@@ -1,6 +1,7 @@
 #pragma once
 
 #include <getopt.h>
+
 #include <map>
 #include <string>
 
diff --git a/config_parser.cpp b/config_parser.cpp
index 3852b6c..92c344f 100644
--- a/config_parser.cpp
+++ b/config_parser.cpp
@@ -1,12 +1,12 @@
 #include "config_parser.hpp"
-#include <phosphor-logging/log.hpp>
 
-#include <fstream>
-#include <string>
 #include <algorithm>
-#include <unordered_map>
-#include <regex>
+#include <fstream>
 #include <list>
+#include <phosphor-logging/log.hpp>
+#include <regex>
+#include <string>
+#include <unordered_map>
 
 namespace phosphor
 {
diff --git a/config_parser.hpp b/config_parser.hpp
index f3e4a70..34b2a68 100644
--- a/config_parser.hpp
+++ b/config_parser.hpp
@@ -1,11 +1,11 @@
 #pragma once
 
-#include <string>
+#include <experimental/filesystem>
 #include <map>
+#include <string>
 #include <tuple>
 #include <unordered_map>
 #include <vector>
-#include <experimental/filesystem>
 
 namespace phosphor
 {
diff --git a/dhcp_configuration.cpp b/dhcp_configuration.cpp
index e933161..7451ef6 100644
--- a/dhcp_configuration.cpp
+++ b/dhcp_configuration.cpp
@@ -1,9 +1,11 @@
-#include "config.h"
 #include "dhcp_configuration.hpp"
+
+#include "config.h"
 #include "network_manager.hpp"
-#include "xyz/openbmc_project/Common/error.hpp"
-#include <phosphor-logging/log.hpp>
+
 #include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/dhcp_configuration.hpp b/dhcp_configuration.hpp
index 5db88e9..56a9fda 100644
--- a/dhcp_configuration.hpp
+++ b/dhcp_configuration.hpp
@@ -1,11 +1,11 @@
 #pragma once
 
-#include "xyz/openbmc_project/Network/DHCPConfiguration/server.hpp"
-#include <sdbusplus/bus.hpp>
-#include <sdbusplus/server/object.hpp>
 #include "config_parser.hpp"
 
+#include <sdbusplus/bus.hpp>
+#include <sdbusplus/server/object.hpp>
 #include <string>
+#include <xyz/openbmc_project/Network/DHCPConfiguration/server.hpp>
 
 namespace phosphor
 {
diff --git a/dns_updater.cpp b/dns_updater.cpp
index 1b3b8ea..e98cc4a 100644
--- a/dns_updater.cpp
+++ b/dns_updater.cpp
@@ -1,12 +1,12 @@
-#include "config.h"
 #include "dns_updater.hpp"
 
-#include <phosphor-logging/log.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-#include <sdbusplus/bus.hpp>
+#include "config.h"
 
 #include <fstream>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <sdbusplus/bus.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/ethernet_interface.cpp b/ethernet_interface.cpp
index b70db40..af8efc9 100644
--- a/ethernet_interface.cpp
+++ b/ethernet_interface.cpp
@@ -1,14 +1,11 @@
+#include "ethernet_interface.hpp"
+
 #include "config.h"
 #include "config_parser.hpp"
-#include "ethernet_interface.hpp"
 #include "ipaddress.hpp"
 #include "network_manager.hpp"
 #include "routing_table.hpp"
 #include "vlan_interface.hpp"
-#include "xyz/openbmc_project/Common/error.hpp"
-
-#include <phosphor-logging/elog-errors.hpp>
-#include <phosphor-logging/log.hpp>
 
 #include <arpa/inet.h>
 #include <linux/ethtool.h>
@@ -19,12 +16,14 @@
 #include <sys/socket.h>
 #include <unistd.h>
 
-
 #include <algorithm>
 #include <experimental/filesystem>
 #include <fstream>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
 #include <sstream>
 #include <string>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp
index caa042e..7865ab3 100644
--- a/ethernet_interface.hpp
+++ b/ethernet_interface.hpp
@@ -2,16 +2,15 @@
 
 #include "types.hpp"
 #include "util.hpp"
-
-#include "xyz/openbmc_project/Network/EthernetInterface/server.hpp"
-#include "xyz/openbmc_project/Network/MACAddress/server.hpp"
 #include "xyz/openbmc_project/Network/IP/Create/server.hpp"
-#include "xyz/openbmc_project/Collection/DeleteAll/server.hpp"
 
+#include <experimental/filesystem>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <string>
-#include <experimental/filesystem>
+#include <xyz/openbmc_project/Collection/DeleteAll/server.hpp>
+#include <xyz/openbmc_project/Network/EthernetInterface/server.hpp>
+#include <xyz/openbmc_project/Network/MACAddress/server.hpp>
 
 namespace phosphor
 {
diff --git a/ipaddress.cpp b/ipaddress.cpp
index 0d1c9ae..8693123 100644
--- a/ipaddress.cpp
+++ b/ipaddress.cpp
@@ -1,11 +1,12 @@
-#include "config.h"
 #include "ipaddress.hpp"
+
+#include "config.h"
 #include "ethernet_interface.hpp"
 #include "util.hpp"
 
-#include "xyz/openbmc_project/Common/error.hpp"
-#include <phosphor-logging/log.hpp>
 #include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/ipaddress.hpp b/ipaddress.hpp
index 51c17ce..7ffb769 100644
--- a/ipaddress.hpp
+++ b/ipaddress.hpp
@@ -1,12 +1,10 @@
 #pragma once
 
-#include "xyz/openbmc_project/Network/IP/server.hpp"
-#include "xyz/openbmc_project/Object/Delete/server.hpp"
-
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
-
 #include <string>
+#include <xyz/openbmc_project/Network/IP/server.hpp>
+#include <xyz/openbmc_project/Object/Delete/server.hpp>
 
 namespace phosphor
 {
diff --git a/ncsi_netlink_main.cpp b/ncsi_netlink_main.cpp
index 41e4264..aeb26bb 100644
--- a/ncsi_netlink_main.cpp
+++ b/ncsi_netlink_main.cpp
@@ -13,7 +13,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 #include "argument.hpp"
 #include "ncsi_util.hpp"
 
diff --git a/ncsi_util.cpp b/ncsi_util.cpp
index c1deff4..c177bec 100644
--- a/ncsi_util.cpp
+++ b/ncsi_util.cpp
@@ -1,13 +1,13 @@
+#include "ncsi_util.hpp"
+
 #include <linux/ncsi.h>
 #include <netlink/netlink.h>
 #include <netlink/genl/genl.h>
 #include <netlink/genl/ctrl.h>
 
-#include "ncsi_util.hpp"
-#include "xyz/openbmc_project/Common/error.hpp"
-
 #include <phosphor-logging/elog-errors.hpp>
 #include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/network_config.cpp b/network_config.cpp
index d492bf3..d3b560f 100644
--- a/network_config.cpp
+++ b/network_config.cpp
@@ -1,5 +1,7 @@
-#include "config.h"
 #include "network_config.hpp"
+
+#include "config.h"
+
 #include <fstream>
 #include <string>
 
diff --git a/network_manager.cpp b/network_manager.cpp
index 4990ee0..9617ff7 100644
--- a/network_manager.cpp
+++ b/network_manager.cpp
@@ -1,24 +1,23 @@
-#include "config.h"
-#include "util.hpp"
 #include "network_manager.hpp"
-#include "network_config.hpp"
+
+#include "config.h"
 #include "ipaddress.hpp"
+#include "network_config.hpp"
 #include "timer.hpp"
-#include "xyz/openbmc_project/Common/error.hpp"
-
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-
-#include <algorithm>
-#include <bitset>
-#include <map>
-#include <fstream>
+#include "util.hpp"
 
 #include <arpa/inet.h>
 #include <dirent.h>
 #include <net/if.h>
 
+#include <algorithm>
+#include <bitset>
+#include <fstream>
+#include <map>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
 #include <string>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/network_manager.hpp b/network_manager.hpp
index ed6dc5b..ab5fbd1 100644
--- a/network_manager.hpp
+++ b/network_manager.hpp
@@ -1,19 +1,18 @@
 #pragma once
 
+#include "dhcp_configuration.hpp"
 #include "ethernet_interface.hpp"
 #include "system_configuration.hpp"
-#include "dhcp_configuration.hpp"
 #include "vlan_interface.hpp"
+#include "xyz/openbmc_project/Network/VLAN/Create/server.hpp"
 
-#include <xyz/openbmc_project/Network/VLAN/Create/server.hpp>
-#include <xyz/openbmc_project/Common/FactoryReset/server.hpp>
-#include <sdbusplus/bus.hpp>
-
+#include <experimental/filesystem>
 #include <list>
 #include <memory>
+#include <sdbusplus/bus.hpp>
 #include <string>
 #include <vector>
-#include <experimental/filesystem>
+#include <xyz/openbmc_project/Common/FactoryReset/server.hpp>
 
 namespace phosphor
 {
diff --git a/network_manager_main.cpp b/network_manager_main.cpp
index 62d12af..89ba7b3 100644
--- a/network_manager_main.cpp
+++ b/network_manager_main.cpp
@@ -1,9 +1,9 @@
 #include "config.h"
+#include "dns_updater.hpp"
 #include "network_manager.hpp"
 #include "rtnetlink_server.hpp"
 #include "timer.hpp"
 #include "watch.hpp"
-#include "dns_updater.hpp"
 
 #include <linux/netlink.h>
 
diff --git a/routing_table.cpp b/routing_table.cpp
index 6630a58..41e4a6d 100644
--- a/routing_table.cpp
+++ b/routing_table.cpp
@@ -1,23 +1,23 @@
 #include "routing_table.hpp"
+
 #include "util.hpp"
-#include "xyz/openbmc_project/Common/error.hpp"
 
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-
-#include <netinet/in.h>
-#include <net/if.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <linux/rtnetlink.h>
-#include <sys/types.h>
-#include <sys/socket.h>
 #include <arpa/inet.h>
+#include <linux/rtnetlink.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/ioctl.h>
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <unistd.h>
 
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
 #include <stdexcept>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/routing_table.hpp b/routing_table.hpp
index c96013e..0768d8e 100644
--- a/routing_table.hpp
+++ b/routing_table.hpp
@@ -6,8 +6,8 @@
 
 #include <iostream>
 #include <list>
-#include <string>
 #include <map>
+#include <string>
 
 namespace phosphor
 {
diff --git a/rtnetlink_server.cpp b/rtnetlink_server.cpp
index 955706c..eb63f74 100644
--- a/rtnetlink_server.cpp
+++ b/rtnetlink_server.cpp
@@ -1,22 +1,21 @@
 #include "rtnetlink_server.hpp"
+
 #include "timer.hpp"
 #include "types.hpp"
 #include "util.hpp"
 
-
-#include <netinet/in.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
 #include <net/if.h>
+#include <netinet/in.h>
 #include <sys/types.h>
 #include <systemd/sd-daemon.h>
 #include <unistd.h>
 
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-#include <xyz/openbmc_project/Common/error.hpp>
-
 #include <memory>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/system_configuration.cpp b/system_configuration.cpp
index 562c88c..a957ded 100644
--- a/system_configuration.cpp
+++ b/system_configuration.cpp
@@ -1,11 +1,12 @@
-#include "config.h"
 #include "system_configuration.hpp"
+
+#include "config.h"
 #include "network_manager.hpp"
 #include "routing_table.hpp"
-#include "xyz/openbmc_project/Common/error.hpp"
 
-#include <phosphor-logging/log.hpp>
 #include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/system_configuration.hpp b/system_configuration.hpp
index 3ebe647..e28d496 100644
--- a/system_configuration.hpp
+++ b/system_configuration.hpp
@@ -1,11 +1,9 @@
 #pragma once
 
-#include "xyz/openbmc_project/Network/SystemConfiguration/server.hpp"
-
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
-
 #include <string>
+#include <xyz/openbmc_project/Network/SystemConfiguration/server.hpp>
 
 namespace phosphor
 {
diff --git a/test/test_util.cpp b/test/test_util.cpp
index 9596097..bc3ec64 100644
--- a/test/test_util.cpp
+++ b/test/test_util.cpp
@@ -194,7 +194,6 @@
     address = getNetworkID(AF_INET6,"2001:db8:gghh:dd12::0",64);
     EXPECT_EQ("",address);
 
-
     address = getNetworkID(AF_INET6,"fe80::201:6cff:fe80:228",64);
     EXPECT_EQ("fe80::",address);
 }
diff --git a/timer.cpp b/timer.cpp
index 7052775..1dfa5a8 100644
--- a/timer.cpp
+++ b/timer.cpp
@@ -1,9 +1,9 @@
-#include <chrono>
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-
 #include "timer.hpp"
-#include "xyz/openbmc_project/Common/error.hpp"
+
+#include <chrono>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/timer.hpp b/timer.hpp
index 408ded4..500a7ae 100644
--- a/timer.hpp
+++ b/timer.hpp
@@ -1,8 +1,9 @@
 #pragma once
 
+#include <systemd/sd-event.h>
+
 #include <chrono>
 #include <functional>
-#include <systemd/sd-event.h>
 
 namespace phosphor
 {
diff --git a/types.hpp b/types.hpp
index 46ce020..c155e40 100644
--- a/types.hpp
+++ b/types.hpp
@@ -1,16 +1,16 @@
 #pragma once
 
 #include <ifaddrs.h>
+#include <systemd/sd-event.h>
 
+#include <chrono>
 #include <functional>
 #include <list>
-#include <string>
-#include <vector>
 #include <map>
 #include <memory>
 #include <set>
-#include <chrono>
-#include <systemd/sd-event.h>
+#include <string>
+#include <vector>
 
 namespace phosphor
 {
diff --git a/util.cpp b/util.cpp
index 9527426..4297590 100644
--- a/util.cpp
+++ b/util.cpp
@@ -1,21 +1,21 @@
-#include "config_parser.hpp"
 #include "util.hpp"
-#include "types.hpp"
-#include "xyz/openbmc_project/Common/error.hpp"
 
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog-errors.hpp>
+#include "config_parser.hpp"
+#include "types.hpp"
 
 #include <arpa/inet.h>
 #include <dirent.h>
 #include <net/if.h>
 #include <sys/wait.h>
 
-#include <iostream>
-#include <list>
-#include <string>
 #include <algorithm>
 #include <experimental/filesystem>
+#include <iostream>
+#include <list>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <string>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/util.hpp b/util.hpp
index ab7ea51..3df928d 100644
--- a/util.hpp
+++ b/util.hpp
@@ -1,11 +1,12 @@
 #pragma once
 
-#include <unistd.h>
-
 #include "config.h"
 #include "types.hpp"
-#include <sdbusplus/bus.hpp>
+
+#include <unistd.h>
+
 #include <regex>
+#include <sdbusplus/bus.hpp>
 
 namespace phosphor
 {
diff --git a/vlan_interface.cpp b/vlan_interface.cpp
index 8f7c5ce..e7854de 100644
--- a/vlan_interface.cpp
+++ b/vlan_interface.cpp
@@ -1,16 +1,16 @@
+#include "vlan_interface.hpp"
+
 #include "config.h"
 #include "ethernet_interface.hpp"
-#include "vlan_interface.hpp"
 #include "network_manager.hpp"
 
-#include <phosphor-logging/log.hpp>
-#include "xyz/openbmc_project/Common/error.hpp"
-#include <phosphor-logging/elog-errors.hpp>
-
-#include <string>
 #include <algorithm>
-#include <fstream>
 #include <experimental/filesystem>
+#include <fstream>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <string>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/vlan_interface.hpp b/vlan_interface.hpp
index 3f273b7..e1feda7 100644
--- a/vlan_interface.hpp
+++ b/vlan_interface.hpp
@@ -1,15 +1,13 @@
 #pragma once
 
-#include "types.hpp"
-
 #include "ethernet_interface.hpp"
-#include "xyz/openbmc_project/Object/Delete/server.hpp"
+#include "types.hpp"
 #include "xyz/openbmc_project/Network/VLAN/server.hpp"
 
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
-
 #include <string>
+#include <xyz/openbmc_project/Object/Delete/server.hpp>
 
 namespace phosphor
 {
diff --git a/watch.cpp b/watch.cpp
index 3cacefd..ffac972 100644
--- a/watch.cpp
+++ b/watch.cpp
@@ -1,11 +1,11 @@
 #include "watch.hpp"
 
-#include <xyz/openbmc_project/Common/error.hpp>
-#include <phosphor-logging/log.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-
-#include <sys/inotify.h>
 #include <errno.h>
+#include <sys/inotify.h>
+
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/log.hpp>
+#include <xyz/openbmc_project/Common/error.hpp>
 
 namespace phosphor
 {
diff --git a/watch.hpp b/watch.hpp
index 0e20420..6a274aa 100644
--- a/watch.hpp
+++ b/watch.hpp
@@ -1,15 +1,15 @@
 #pragma once
 
+#include "dns_updater.hpp"
 #include "util.hpp"
 #include "types.hpp"
-#include "dns_updater.hpp"
-
-#include <systemd/sd-event.h>
 
 #include <sys/inotify.h>
-#include <map>
-#include <functional>
+#include <systemd/sd-event.h>
+
 #include <experimental/filesystem>
+#include <functional>
+#include <map>
 
 namespace phosphor
 {