Move analyzer-to-port mapping out of analyzer::Manager into packet analyzers

This commit is contained in:
Tim Wojtulewicz 2021-05-17 18:09:38 -07:00
parent d6c74373c7
commit 9e1f6f95aa
11 changed files with 154 additions and 89 deletions

View file

@ -12,6 +12,18 @@
#include "zeek/IPAddr.h"
#include "zeek/IP.h"
const char* transport_proto_string(TransportProto proto)
{
switch (proto)
{
case TRANSPORT_TCP: return "tcp";
case TRANSPORT_UDP: return "udp";
case TRANSPORT_ICMP: return "icmp";
case TRANSPORT_UNKNOWN:
default: return "unknown";
}
}
namespace zeek {
uint16_t detail::ip4_in_cksum(const IPAddr& src, const IPAddr& dst,