diff --git a/src/net_util.h b/src/net_util.h index 9bd6a5bc5a..008a212795 100644 --- a/src/net_util.h +++ b/src/net_util.h @@ -5,18 +5,9 @@ #include "zeek/zeek-config.h" #include - -// Define first. -enum TransportProto : uint8_t { - TRANSPORT_UNKNOWN, - TRANSPORT_TCP, - TRANSPORT_UDP, - TRANSPORT_ICMP, -}; - -extern const char* transport_proto_string(TransportProto proto); - -enum IPFamily { IPv4, IPv6 }; +#include +#include +#include // Force these files to stay in this order. Normally, clang-format // wants to move sys/types.h to the end of this block, but that @@ -36,8 +27,6 @@ enum IPFamily { IPv4, IPv6 }; #include #include -#include "zeek/util.h" - #ifdef HAVE_NETINET_IP6_H #include @@ -126,6 +115,18 @@ struct ip6_rthdr { #define TCPOPT_TIMESTAMP TCPOPT_TSTAMP #endif +// Define first. +enum TransportProto : uint8_t { + TRANSPORT_UNKNOWN, + TRANSPORT_TCP, + TRANSPORT_UDP, + TRANSPORT_ICMP, +}; + +extern const char* transport_proto_string(TransportProto proto); + +enum IPFamily { IPv4, IPv6 }; + namespace zeek { class IPAddr;