def __init__(self, options=[]):
        """Initialize the tcpdump terminal output parsing module"""
        self.name = 'tcpdump'
        self.desc = 'tcpdump terminal output parsing module'
        self.format_regex = \
                "^(\d{2}:\d{2}:\d{2}\.?\d*)\s+(\w+)\s+([\w\-\.]+)\s+>\s+([\w\-\.]+): (.*)"
        self.fields = ['date_stamp', 'protocol', 'source_host', 'dest_host',
                'message']
        self.backup_format_regex = \
                "^(\d{2}:\d{2}:\d{2}\.?\d*)\s+(\w+),\s+(.*)"
        self.backup_fields = ['date_stamp', 'protocol', 'message']
        self.tzone = None
        self.datestamp_type = 'nodate'
        self.ip_port_regex = re.compile('^(\d+\.\d+\.\d+\.\d+\.\w+)$')
def __init__ ( self , options = [ ] ) : self . name = 'tcpdump' self . desc = 'tcpdump terminal output parsing module' self . format_regex = "^(\d{2}:\d{2}:\d{2}\.?\d*)\s+(\w+)\s+([\w\-\.]+)\s+>\s+([\w\-\.]+): (.*)" self . fields = [ 'date_stamp' , 'protocol' , 'source_host' , 'dest_host' , 'message' ] self . backup_format_regex = "^(\d{2}:\d{2}:\d{2}\.?\d*)\s+(\w+),\s+(.*)" self . backup_fields = [ 'date_stamp' , 'protocol' , 'message' ] self . tzone = None self . datestamp_type = 'nodate' self . ip_port_regex = re . compile ( '^(\d+\.\d+\.\d+\.\d+\.\w+)$' )
Initialize the tcpdump terminal output parsing module