Commit 3ba0299a authored by Stephen Morris's avatar Stephen Morris

[2475] Put #include directives in correct order

Also fix some issues from the review.
parent d2551c3b
......@@ -14,21 +14,20 @@
#include <config.h>
#include <cassert>
#include <iostream>
#include <asiolink/asiolink.h>
#include <cc/data.h>
#include <cc/session.h>
#include <cc/session.h>
#include <config/ccsession.h>
#include <dhcp/iface_mgr.h>
#include <dhcp4/ctrl_dhcp4_srv.h>
#include <dhcp4/dhcp4_log.h>
#include <dhcp4/spec_config.h>
#include <dhcp/iface_mgr.h>
#include <exceptions/exceptions.h>
#include <util/buffer.h>
#include <cassert>
#include <iostream>
using namespace isc::asiolink;
using namespace isc::cc;
using namespace isc::config;
......
......@@ -15,11 +15,11 @@
#ifndef CTRL_DHCPV4_SRV_H
#define CTRL_DHCPV4_SRV_H
#include <dhcp4/dhcp4_srv.h>
#include <asiolink/asiolink.h>
#include <cc/data.h>
#include <cc/session.h>
#include <config/ccsession.h>
#include <cc/data.h>
#include <dhcp4/dhcp4_srv.h>
namespace isc {
namespace dhcp {
......
......@@ -14,7 +14,7 @@
/// Defines the logger used by the top-level component of b10-dhcp4.
#include "dhcp4_log.h"
#include <dhcp4/dhcp4_log.h>
namespace isc {
namespace dhcp {
......
......@@ -15,8 +15,8 @@
#ifndef DHCP4_LOG_H
#define DHCP4_LOG_H
#include <log/macros.h>
#include <log/logger_support.h>
#include <log/macros.h>
#include <dhcp4/dhcp4_messages.h>
namespace isc {
......
......@@ -12,13 +12,13 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <asiolink/io_address.h>
#include <dhcp/dhcp4.h>
#include <dhcp/pkt4.h>
#include <dhcp/iface_mgr.h>
#include <dhcp4/dhcp4_srv.h>
#include <dhcp4/dhcp4_log.h>
#include <asiolink/io_address.h>
#include <dhcp/option4_addrlst.h>
#include <dhcp/pkt4.h>
#include <dhcp4/dhcp4_log.h>
#include <dhcp4/dhcp4_srv.h>
using namespace isc;
using namespace isc::asiolink;
......
......@@ -15,10 +15,12 @@
#ifndef DHCPV4_SRV_H
#define DHCPV4_SRV_H
#include <boost/noncopyable.hpp>
#include <dhcp/dhcp4.h>
#include <dhcp/pkt4.h>
#include <dhcp/option.h>
#include <boost/noncopyable.hpp>
#include <iostream>
namespace isc {
......
......@@ -13,14 +13,15 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <dhcp4/ctrl_dhcp4_srv.h>
#include <dhcp4/dhcp4_log.h>
#include <log/logger_support.h>
#include <boost/lexical_cast.hpp>
#include <iostream>
using namespace isc::dhcp;
using namespace std;
......
......@@ -13,16 +13,18 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <iostream>
#include <config/ccsession.h>
#include <dhcp/dhcp4.h>
#include <dhcp4/ctrl_dhcp4_srv.h>
#include <gtest/gtest.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <arpa/inet.h>
#include <gtest/gtest.h>
#include <dhcp/dhcp4.h>
#include <dhcp4/ctrl_dhcp4_srv.h>
#include <config/ccsession.h>
using namespace std;
using namespace isc;
......
......@@ -13,17 +13,19 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <arpa/inet.h>
#include <gtest/gtest.h>
#include <asiolink/io_address.h>
#include <dhcp/dhcp4.h>
#include <dhcp4/dhcp4_srv.h>
#include <dhcp/option.h>
#include <asiolink/io_address.h>
#include <dhcp4/dhcp4_srv.h>
#include <gtest/gtest.h>
#include <fstream>
#include <iostream>
#include <arpa/inet.h>
using namespace std;
using namespace isc;
......
......@@ -12,10 +12,10 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <stdio.h>
#include <gtest/gtest.h>
#include <log/logger_support.h>
#include <gtest/gtest.h>
int
main(int argc, char* argv[]) {
......
......@@ -12,13 +12,14 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <string>
#include <exceptions/exceptions.h>
#include <cc/data.h>
#ifndef DHCP6_CONFIG_PARSER_H
#define DHCP6_CONFIG_PARSER_H
#include <cc/data.h>
#include <exceptions/exceptions.h>
#include <string>
namespace isc {
namespace dhcp {
......
......@@ -14,22 +14,22 @@
#include <config.h>
#include <cassert>
#include <iostream>
#include <asiolink/asiolink.h>
#include <cc/data.h>
#include <cc/session.h>
#include <cc/session.h>
#include <config/ccsession.h>
#include <dhcp/iface_mgr.h>
#include <dhcp6/config_parser.h>
#include <dhcp6/ctrl_dhcp6_srv.h>
#include <dhcp6/dhcp6_log.h>
#include <dhcp6/spec_config.h>
#include <dhcp6/config_parser.h>
#include <dhcp/iface_mgr.h>
#include <exceptions/exceptions.h>
#include <util/buffer.h>
#include <cassert>
#include <iostream>
using namespace isc::asiolink;
using namespace isc::cc;
using namespace isc::config;
......
......@@ -15,11 +15,11 @@
#ifndef CTRL_DHCPV6_SRV_H
#define CTRL_DHCPV6_SRV_H
#include <dhcp6/dhcp6_srv.h>
#include <asiolink/asiolink.h>
#include <cc/data.h>
#include <cc/session.h>
#include <config/ccsession.h>
#include <cc/data.h>
#include <dhcp6/dhcp6_srv.h>
namespace isc {
namespace dhcp {
......
......@@ -14,7 +14,7 @@
/// Defines the logger used by the top-level component of b10-dhcp6.
#include "dhcp6_log.h"
#include <dhcp6/dhcp6_log.h>
namespace isc {
namespace dhcp {
......
......@@ -15,9 +15,9 @@
#ifndef DHCP6_LOG_H
#define DHCP6_LOG_H
#include <log/macros.h>
#include <log/logger_support.h>
#include <dhcp6/dhcp6_messages.h>
#include <log/logger_support.h>
#include <log/macros.h>
namespace isc {
namespace dhcp {
......
......@@ -15,8 +15,6 @@
#ifndef DHCPV6_SRV_H
#define DHCPV6_SRV_H
#include <iostream>
#include <dhcp/dhcp6.h>
#include <dhcp/duid.h>
#include <dhcp/option.h>
......@@ -28,8 +26,9 @@
#include <boost/noncopyable.hpp>
namespace isc {
#include <iostream>
namespace isc {
namespace dhcp {
/// @brief DHCPv6 server service.
///
......
......@@ -13,14 +13,15 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <dhcp6/ctrl_dhcp6_srv.h>
#include <dhcp6/dhcp6_log.h>
#include <log/logger_support.h>
#include <boost/lexical_cast.hpp>
#include <iostream>
using namespace isc::dhcp;
using namespace std;
......
......@@ -23,13 +23,13 @@
#include <dhcpsrv/subnet.h>
#include <boost/foreach.hpp>
#include <gtest/gtest.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <arpa/inet.h>
#include <gtest/gtest.h>
using namespace std;
using namespace isc;
......
......@@ -15,7 +15,6 @@
#include <config.h>
#include <asiolink/io_address.h>
#include <boost/scoped_ptr.hpp>
#include <config/ccsession.h>
#include <dhcp/dhcp6.h>
#include <dhcp/duid.h>
......@@ -32,6 +31,7 @@
#include <util/buffer.h>
#include <util/range_utilities.h>
#include <boost/scoped_ptr.hpp>
#include <gtest/gtest.h>
#include <fstream>
......
......@@ -12,13 +12,15 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <dhcp/duid.h>
#include <exceptions/exceptions.h>
#include <stdint.h>
#include <util/io_utilities.h>
#include <dhcp/duid.h>
#include <vector>
#include <sstream>
#include <iomanip>
#include <sstream>
#include <vector>
#include <stdint.h>
namespace isc {
namespace dhcp {
......
......@@ -16,7 +16,9 @@
#define DUID_H
#include <asiolink/io_address.h>
#include <vector>
#include <stdint.h>
#include <unistd.h>
......
......@@ -13,22 +13,27 @@
// PERFORMANCE OF THIS SOFTWARE.
#include <config.h>
#include <sstream>
#include <fstream>
#include <string.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/select.h>
// This must be included before udp_endpoint.h
#include <asio.hpp>
#include <asiolink/io_error.h>
#include <asiolink/udp_endpoint.h>
#include <dhcp/dhcp4.h>
#include <dhcp/dhcp6.h>
#include <dhcp/iface_mgr.h>
#include <exceptions/exceptions.h>
#include <asiolink/udp_endpoint.h>
#include <asiolink/io_error.h>
#include <util/io/pktinfo_utilities.h>
#include <fstream>
#include <sstream>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <string.h>
#include <sys/select.h>
using namespace std;
using namespace isc::asiolink;
using namespace isc::util::io::internal;
......
......@@ -15,16 +15,18 @@
#ifndef IFACE_MGR_H
#define IFACE_MGR_H
#include <list>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_array.hpp>
#include <boost/noncopyable.hpp>
#include <asiolink/io_address.h>
#include <dhcp/dhcp6.h>
#include <dhcp/dhcp4.h>
#include <dhcp/dhcp6.h>
#include <dhcp/pkt4.h>
#include <dhcp/pkt6.h>
#include <boost/noncopyable.hpp>
#include <boost/scoped_array.hpp>
#include <boost/shared_ptr.hpp>
#include <list>
namespace isc {
namespace dhcp {
......
......@@ -31,18 +31,17 @@
#if defined(OS_LINUX)
#include <asiolink/io_address.h>
#include <dhcp/iface_mgr.h>
#include <exceptions/exceptions.h>
#include <util/io/sockaddr_util.h>
#include <boost/array.hpp>
#include <boost/static_assert.hpp>
#include <stdint.h>
#include <net/if.h>
#include <linux/rtnetlink.h>
#include <boost/array.hpp>
#include <boost/static_assert.hpp>
#include <dhcp/iface_mgr.h>
#include <exceptions/exceptions.h>
#include <asiolink/io_address.h>
#include <util/io/sockaddr_util.h>
using namespace std;
using namespace isc;
......
......@@ -12,19 +12,21 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
#include <util/buffer.h>
#include <exceptions/exceptions.h>
#include <dhcp/libdhcp++.h>
#include "config.h"
#include <config.h>
#include <dhcp/dhcp4.h>
#include <dhcp/dhcp6.h>
#include <dhcp/libdhcp++.h>
#include <dhcp/option.h>
#include <dhcp/option6_ia.h>
#include <dhcp/option6_iaaddr.h>
#include <dhcp/option_definition.h>
#include <dhcp/option6_int_array.h>
#include <dhcp/option_definition.h>
#include <exceptions/exceptions.h>
#include <util/buffer.h>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
using namespace std;
using namespace isc::dhcp;
......
......@@ -12,12 +12,13 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef LIBDHCP_H_
#define LIBDHCP_H_
#ifndef LIBDHCP_H
#define LIBDHCP_H
#include <dhcp/option_definition.h>
#include <dhcp/pkt6.h>
#include <util/buffer.h>
#include <iostream>
namespace isc {
......@@ -164,4 +165,4 @@ private:
}
}
#endif
#endif // LIBDHCP_H
......@@ -12,16 +12,17 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <string.h>
#include <stdint.h>
#include <arpa/inet.h>
#include <sstream>
#include <dhcp/libdhcp++.h>
#include <dhcp/option.h>
#include <exceptions/exceptions.h>
#include <util/io_utilities.h>
#include <iomanip>
#include "exceptions/exceptions.h"
#include "util/io_utilities.h"
#include <sstream>
#include "dhcp/option.h"
#include "dhcp/libdhcp++.h"
#include <arpa/inet.h>
#include <stdint.h>
#include <string.h>
using namespace std;
using namespace isc::util;
......
......@@ -12,14 +12,16 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef OPTION_H_
#define OPTION_H_
#ifndef OPTION_H
#define OPTION_H
#include <util/buffer.h>
#include <boost/shared_ptr.hpp>
#include <string>
#include <map>
#include <string>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <util/buffer.h>
namespace isc {
namespace dhcp {
......@@ -329,4 +331,4 @@ protected:
} // namespace isc::dhcp
} // namespace isc
#endif
#endif // OPTION_H
......@@ -12,15 +12,17 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <string.h>
#include <stdint.h>
#include <arpa/inet.h>
#include <sstream>
#include <iomanip>
#include <exceptions/exceptions.h>
#include <asiolink/io_address.h>
#include <util/io_utilities.h>
#include <dhcp/option4_addrlst.h>
#include <exceptions/exceptions.h>
#include <util/io_utilities.h>
#include <iomanip>
#include <sstream>
#include <arpa/inet.h>
#include <stdint.h>
#include <string.h>
using namespace std;
using namespace isc::util;
......
......@@ -12,17 +12,19 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#ifndef OPTION4_ADDRLST_H_
#define OPTION4_ADDRLST_H_
#ifndef OPTION4_ADDRLST_H
#define OPTION4_ADDRLST_H
#include <string>
#include <map>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/shared_array.hpp>
#include <asiolink/io_address.h>
#include <util/buffer.h>
#include <dhcp/option.h>
#include <util/buffer.h>
#include <boost/shared_array.hpp>
#include <boost/shared_ptr.hpp>
#include <map>
#include <string>
#include <vector>
namespace isc {
namespace dhcp {
......@@ -162,4 +164,4 @@ protected:
} // namespace isc::dhcp
} // namespace isc
#endif