Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

BackDoorAnalyzer Class Reference

#include <BackDoor.h>

Inheritance diagram for BackDoorAnalyzer:

Inheritance graph
[legend]
Collaboration diagram for BackDoorAnalyzer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BackDoorAnalyzer (TCP_Connection *c)
 ~BackDoorAnalyzer ()
void Done ()
void StatTimer (double t, int is_expire)

Protected Member Functions

void StatEvent ()
void RemoveEvent ()

Protected Attributes

BackDoorEndpointorig_endp
BackDoorEndpointresp_endp
double timeout
double backoff

Constructor & Destructor Documentation

BackDoorAnalyzer::BackDoorAnalyzer TCP_Connection c  ) 
 

Definition at line 699 of file BackDoor.cc.

References TimerMgr::Add(), backdoor_stat_backoff, backdoor_stat_period, backoff, network_time, TCP_Connection::Orig(), orig_endp, TCP_Connection::Resp(), resp_endp, timeout, and timer_mgr.

00700 : TCP_Analyzer(c)
00701         {
00702         orig_endp = new BackDoorEndpoint(conn->Orig());
00703         resp_endp = new BackDoorEndpoint(conn->Resp());
00704 
00705         timeout = backdoor_stat_period;
00706         backoff = backdoor_stat_backoff;
00707 
00708         timer_mgr->Add(new BackDoorTimer(network_time + timeout, this));
00709         }

BackDoorAnalyzer::~BackDoorAnalyzer  ) 
 

Definition at line 711 of file BackDoor.cc.

References Done(), orig_endp, resp_endp, and BroObj::Unref.

00712         {
00713         Done();
00714 
00715         Unref(orig_endp);
00716         Unref(resp_endp);
00717         }


Member Function Documentation

void BackDoorAnalyzer::Done  )  [virtual]
 

Reimplemented from TCP_Analyzer.

Definition at line 719 of file BackDoor.cc.

References TCP_Analyzer::Conn(), BackDoorEndpoint::FinalCheckForRlogin(), orig_endp, RemoveEvent(), resp_endp, Connection::Skipping(), and StatEvent().

Referenced by ~BackDoorAnalyzer().

00720         {
00721         if ( ! done )
00722                 {
00723                 orig_endp->FinalCheckForRlogin();
00724                 resp_endp->FinalCheckForRlogin();
00725 
00726                 if ( ! Conn()->Skipping() )
00727                         StatEvent();
00728 
00729                 RemoveEvent();
00730                 done = 1;
00731                 }
00732         }

void BackDoorAnalyzer::RemoveEvent  )  [protected]
 

Definition at line 758 of file BackDoor.cc.

References TCP_Analyzer::Conn(), and Connection::ConnectionEvent().

Referenced by Done().

00759         {
00760         val_list* vl = new val_list;
00761         vl->append(Conn()->BuildConnVal());
00762 
00763         Conn()->ConnectionEvent(backdoor_remove_conn, vl);
00764         }

void BackDoorAnalyzer::StatEvent  )  [protected]
 

Definition at line 748 of file BackDoor.cc.

References BackDoorEndpoint::BuildStats(), TCP_Analyzer::Conn(), Connection::ConnectionEvent(), orig_endp, and resp_endp.

Referenced by Done(), and StatTimer().

00749         {
00750         val_list* vl = new val_list;
00751         vl->append(Conn()->BuildConnVal());
00752         vl->append(orig_endp->BuildStats());
00753         vl->append(resp_endp->BuildStats());
00754 
00755         Conn()->ConnectionEvent(backdoor_stats, vl);
00756         }

void BackDoorAnalyzer::StatTimer double  t,
int  is_expire
 

Definition at line 734 of file BackDoor.cc.

References TimerMgr::Add(), backoff, TCP_Analyzer::Conn(), Connection::Skipping(), StatEvent(), timeout, and timer_mgr.

Referenced by BackDoorTimer::Dispatch().

00735         {
00736         if ( done || Conn()->Skipping() )
00737                 return;
00738 
00739         StatEvent();
00740 
00741         if ( ! is_expire )
00742                 {
00743                 timeout *= backoff;
00744                 timer_mgr->Add(new BackDoorTimer(t + timeout, this));
00745                 }
00746         }


Member Data Documentation

double BackDoorAnalyzer::backoff [protected]
 

Definition at line 97 of file BackDoor.h.

Referenced by BackDoorAnalyzer(), and StatTimer().

BackDoorEndpoint* BackDoorAnalyzer::orig_endp [protected]
 

Definition at line 94 of file BackDoor.h.

Referenced by BackDoorAnalyzer(), Done(), StatEvent(), and ~BackDoorAnalyzer().

BackDoorEndpoint* BackDoorAnalyzer::resp_endp [protected]
 

Definition at line 95 of file BackDoor.h.

Referenced by BackDoorAnalyzer(), Done(), StatEvent(), and ~BackDoorAnalyzer().

double BackDoorAnalyzer::timeout [protected]
 

Definition at line 96 of file BackDoor.h.

Referenced by BackDoorAnalyzer(), and StatTimer().


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 03:07:48 2005 for bro_docs by doxygen 1.3.5