objects.logic.network.pcapyImplementation.pcapyWorkerThread Class Reference

The pcapyWorkerThread is a very simple long living worker thread which will periodically call pcapy's "dispatch" Reader method. More...

Inherits objects::logic::common::threads::appThreadBase::appThreadBase.

List of all members.

Public Member Functions

def run

Public Attributes

 killSwitch


Detailed Description

The pcapyWorkerThread is a very simple long living worker thread which will periodically call pcapy's "dispatch" Reader method.

This class essentially is the main collector of raw network data.

Definition at line 32 of file pcapyImplementation.py.


Member Function Documentation

def objects.logic.network.pcapyImplementation.pcapyWorkerThread.run (   self  ) 

Definition at line 34 of file pcapyImplementation.py.

00034                  :
00035         logger.log("Starting Network Capture worker thread.")
00036         while(self.killSwitch == False):
00037            
00038            try:
00039                self.parent.deviceObject.dispatch(100, self.parent.handleReceivePacet)
00040            except Exception, ex:
00041                logger.log(__name__ + ": There was an unknown Error while listening to network packet stream")
00042                logger.log(ex)
00043                
00044                self.killSwitch = True
00045                if self.parent.errorCallBackFunc is not None:
00046                    self.parent.errorCallBackFunc(ex)
00047                    
00048            except pcapy.PcapError, pce:
00049                logger.log(__name__ + ": There was an Pcapy Error while listening to network packet stream")
00050                logger.log(pce)
00051                
00052                self.killSwitch = True
00053                if self.parent.errorCallBackFunc is not None:
00054                    self.parent.errorCallBackFunc(pce)
00055                    
00056            finally:
00057                self.threadEvent.set()
00058                self.threadEvent.clear()            
00059         
00060         logger.log(__name__ + "Network Capture worker thread is done")
00061         
00062         
## the pcapyImplementation is the implementation of the captureInterface interface using


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Mon Mar 30 00:26:44 2009 for EyeSpy by  doxygen 1.5.8