bro dies (every day)
Ruoming Pang
rpang at CS.Princeton.EDU
Fri Aug 22 11:10:36 PDT 2003
Below is a newer version of Robin's patch.
Ruoming
diff -c bro-pub-0.8a34/ICMP.cc bro/ICMP.cc
*** bro-pub-0.8a34/ICMP.cc Sun Jul 13 12:23:45 2003
--- bro/ICMP.cc Fri Aug 22 11:04:22 2003
***************
*** 30,35 ****
--- 30,36 ----
const ConnID* id, const struct icmp* /* icmpp */)
: Connection(s, k, t, id)
{
+ icmp_conn_val = 0;
}
void ICMP_Connection::Done()
***************
*** 82,91 ****
int /* len */, int /* caplen */,
const u_char*& /* data */)
{
! Event(icmp_sent);
}
! void ICMP_Connection::Event(Func* f)
{
if ( ! f )
return;
--- 83,92 ----
int /* len */, int /* caplen */,
const u_char*& /* data */)
{
! ICMPEvent(icmp_sent);
}
! void ICMP_Connection::ICMPEvent(Func* f)
{
if ( ! f )
return;
***************
*** 98,116 ****
RecordVal* ICMP_Connection::BuildICMPVal()
{
! if ( ! conn_val )
{
! conn_val = new RecordVal(icmp_conn);
! conn_val->Assign(0, new AddrVal(orig_addr));
! conn_val->Assign(1, new AddrVal(resp_addr));
! conn_val->Assign(2, new Val(type, TYPE_COUNT));
! conn_val->Assign(3, new Val(code, TYPE_COUNT));
}
! Ref(conn_val);
! return conn_val;
}
int ICMP_Connection::IsReuse(double /* t */, const u_char* /* pkt */)
--- 99,117 ----
RecordVal* ICMP_Connection::BuildICMPVal()
{
! if ( ! icmp_conn_val )
{
! icmp_conn_val = new RecordVal(icmp_conn);
! icmp_conn_val->Assign(0, new AddrVal(orig_addr));
! icmp_conn_val->Assign(1, new AddrVal(resp_addr));
! icmp_conn_val->Assign(2, new Val(type, TYPE_COUNT));
! icmp_conn_val->Assign(3, new Val(code, TYPE_COUNT));
}
! Ref(icmp_conn_val);
! return icmp_conn_val;
}
int ICMP_Connection::IsReuse(double /* t */, const u_char* /* pkt */)
diff -c bro-pub-0.8a34/ICMP.h bro/ICMP.h
*** bro-pub-0.8a34/ICMP.h Sat Oct 26 10:03:53 2002
--- bro/ICMP.h Fri Aug 22 10:46:46 2003
***************
*** 43,49 ****
ConnectionType ConnType() const { return CONN_ICMP; }
! void Event(Func* f);
void Describe(ODesc* d) const;
--- 43,49 ----
ConnectionType ConnType() const { return CONN_ICMP; }
! void ICMPEvent(Func* f);
void Describe(ODesc* d) const;
***************
*** 54,59 ****
--- 54,60 ----
virtual void NextICMP(double t, const struct icmp* icmpp,
int len, int caplen, const u_char*& data);
+ RecordVal *icmp_conn_val;
int type;
int code;
};
More information about the Bro
mailing list