Reorder top section of net_util.h to batch includes together

This commit is contained in:
Tim Wojtulewicz 2025-04-07 16:45:04 -07:00
parent 648f0f0623
commit 661b230f23

View file

@ -5,18 +5,9 @@
#include "zeek/zeek-config.h"
#include <cstdint>
// 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 <memory>
#include <string>
#include <utility>
// 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 <netinet/tcp.h>
#include <netinet/udp.h>
#include "zeek/util.h"
#ifdef HAVE_NETINET_IP6_H
#include <netinet/ip6.h>
@ -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;