Details | Last modification | View Log | SVN | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 736 | olof | 1 | ########################################################### |
| 2 | # |
||
| 3 | # Template for a state space |
||
| 4 | # |
||
| 5 | ########################################################### |
||
| 6 | |||
| 7 | class StateSpace: |
||
| 8 | |||
| 9 | DESCRIPTIVE_NAME = 'New Packet Filter' |
||
| 748 | olof | 10 | RELATED_SPACES = [] |
| 736 | olof | 11 | |
| 12 | ''' Called to restore the default state ''' |
||
| 13 | def reset(self): |
||
| 14 | pass |
||
| 15 | |||
| 16 | ''' Called when state space is loaded, before any calls to run ''' |
||
| 17 | def load(self): |
||
| 18 | pass |
||
| 19 | |||
| 20 | ''' Called just before state space is dumped to disk ''' |
||
| 21 | def unload(self): |
||
| 22 | pass |
||
| 23 | |||
| 748 | olof | 24 | """ Triggered by filters as response to incoming packets |
| 25 | related: array of statespace objects related to this state space |
||
| 26 | args: optional arguments |
||
| 27 | """ |
||
| 28 | def run(self, related, args): |
||
| 736 | olof | 29 | pass |