mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Renaming the Logger to Reporter.
Also changing output to not include timestamps when we haven't started processing packets yet.
This commit is contained in:
parent
93894eed9b
commit
66e2c3b623
123 changed files with 722 additions and 713 deletions
|
@ -15,7 +15,7 @@
|
|||
#include "Timer.h"
|
||||
#include "NetVar.h"
|
||||
#include "Sessions.h"
|
||||
#include "Logger.h"
|
||||
#include "Reporter.h"
|
||||
#include "OSFinger.h"
|
||||
|
||||
#include "ICMP.h"
|
||||
|
@ -572,7 +572,7 @@ void NetSessions::DoNextPacket(double t, const struct pcap_pkthdr* hdr,
|
|||
|
||||
HashKey* h = id.BuildConnKey();
|
||||
if ( ! h )
|
||||
bro_logger->InternalError("hash computation failed");
|
||||
reporter->InternalError("hash computation failed");
|
||||
|
||||
Connection* conn = 0;
|
||||
|
||||
|
@ -761,7 +761,7 @@ FragReassembler* NetSessions::NextFragment(double t, const IP_Hdr* ip,
|
|||
|
||||
HashKey* h = ch->ComputeHash(key, 1);
|
||||
if ( ! h )
|
||||
bro_logger->InternalError("hash computation failed");
|
||||
reporter->InternalError("hash computation failed");
|
||||
|
||||
FragReassembler* f = fragments.Lookup(h);
|
||||
if ( ! f )
|
||||
|
@ -855,7 +855,7 @@ Connection* NetSessions::FindConnection(Val* v)
|
|||
|
||||
HashKey* h = id.BuildConnKey();
|
||||
if ( ! h )
|
||||
bro_logger->InternalError("hash computation failed");
|
||||
reporter->InternalError("hash computation failed");
|
||||
|
||||
Dictionary* d;
|
||||
|
||||
|
@ -933,21 +933,21 @@ void NetSessions::Remove(Connection* c)
|
|||
;
|
||||
|
||||
else if ( ! tcp_conns.RemoveEntry(k) )
|
||||
bro_logger->InternalError("connection missing");
|
||||
reporter->InternalError("connection missing");
|
||||
break;
|
||||
|
||||
case TRANSPORT_UDP:
|
||||
if ( ! udp_conns.RemoveEntry(k) )
|
||||
bro_logger->InternalError("connection missing");
|
||||
reporter->InternalError("connection missing");
|
||||
break;
|
||||
|
||||
case TRANSPORT_ICMP:
|
||||
if ( ! icmp_conns.RemoveEntry(k) )
|
||||
bro_logger->InternalError("connection missing");
|
||||
reporter->InternalError("connection missing");
|
||||
break;
|
||||
|
||||
case TRANSPORT_UNKNOWN:
|
||||
bro_logger->InternalError("unknown transport when removing connection");
|
||||
reporter->InternalError("unknown transport when removing connection");
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -960,10 +960,10 @@ void NetSessions::Remove(FragReassembler* f)
|
|||
{
|
||||
HashKey* k = f->Key();
|
||||
if ( ! k )
|
||||
bro_logger->InternalError("fragment block not in dictionary");
|
||||
reporter->InternalError("fragment block not in dictionary");
|
||||
|
||||
if ( ! fragments.RemoveEntry(k) )
|
||||
bro_logger->InternalError("fragment block missing");
|
||||
reporter->InternalError("fragment block missing");
|
||||
|
||||
Unref(f);
|
||||
}
|
||||
|
@ -999,7 +999,7 @@ void NetSessions::Insert(Connection* c)
|
|||
break;
|
||||
|
||||
default:
|
||||
bro_logger->InternalError("unknown connection type");
|
||||
reporter->InternalError("unknown connection type");
|
||||
}
|
||||
|
||||
if ( old && old != c )
|
||||
|
@ -1123,7 +1123,7 @@ Connection* NetSessions::NewConn(HashKey* k, double t, const ConnID* id,
|
|||
tproto = TRANSPORT_UDP;
|
||||
break;
|
||||
default:
|
||||
bro_logger->InternalError("unknown transport protocol");
|
||||
reporter->InternalError("unknown transport protocol");
|
||||
break;
|
||||
};
|
||||
|
||||
|
@ -1310,7 +1310,7 @@ void NetSessions::DumpPacket(const struct pcap_pkthdr* hdr,
|
|||
struct pcap_pkthdr h = *hdr;
|
||||
h.caplen = len;
|
||||
if ( h.caplen > hdr->caplen )
|
||||
bro_logger->InternalError("bad modified caplen");
|
||||
reporter->InternalError("bad modified caplen");
|
||||
pkt_dumper->Dump(&h, pkt);
|
||||
}
|
||||
}
|
||||
|
@ -1319,7 +1319,7 @@ void NetSessions::Internal(const char* msg, const struct pcap_pkthdr* hdr,
|
|||
const u_char* pkt)
|
||||
{
|
||||
DumpPacket(hdr, pkt);
|
||||
bro_logger->InternalError("%s", msg);
|
||||
reporter->InternalError("%s", msg);
|
||||
}
|
||||
|
||||
void NetSessions::Weird(const char* name,
|
||||
|
@ -1328,12 +1328,12 @@ void NetSessions::Weird(const char* name,
|
|||
if ( hdr )
|
||||
dump_this_packet = 1;
|
||||
|
||||
bro_logger->Weird(name);
|
||||
reporter->Weird(name);
|
||||
}
|
||||
|
||||
void NetSessions::Weird(const char* name, const IP_Hdr* ip)
|
||||
{
|
||||
bro_logger->Weird(ip->SrcAddr4(), ip->DstAddr4(), name);
|
||||
reporter->Weird(ip->SrcAddr4(), ip->DstAddr4(), name);
|
||||
}
|
||||
|
||||
unsigned int NetSessions::ConnectionMemoryUsage()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue