Subversion Repositories HomeAutomation

Rev

Blame | Last modification | View Log | SVN | RSS feed

  1. ###########################################################
  2. #
  3. # Template for a packet filter
  4. #
  5. ###########################################################
  6.  
  7. class PktFilter:
  8.    
  9.     DESCRIPTIVE_NAME = 'New Packet Filter'
  10.     ASSOCIATED_SPACES = ['MyStateSpace']
  11.  
  12.     ''' Called when the filter is attached to the packet filter chain '''
  13.     def attach(self):
  14.         pass
  15.    
  16.     ''' Called when the filter is removed to the filter chain '''
  17.     def detach(self):
  18.         pass
  19.    
  20.     ''' Defines the filter behavior '''
  21.     def filter(self, pkt):
  22.         pass
  23.