Package Products :: Package ZenUtils :: Module captureReplay :: Class CaptureReplay |
[hide private]
[frames] | no frames]

# Class CaptureReplay

source code

    object --+
             |
            CaptureReplay

Base class for packet capture and replay capability. Assumes that the other classes provide the following: self.buildOptions() self.sendEvent()

Overrides the self.connected() method if called to replay packets.

Instance Methods | [hide private]
processCaptureReplayOptions(self) Inside of the initializing class, call these functions first. | source code
convertPacketToPython(*packetInfo) Convert arguments into an plain object (no functions) suitable for pickling. | source code
capturePacket(self, hostname, *packetInfo) Store the raw packet for later examination and troubleshooting. | source code
replayAll(self) Replay all captured packets using the files specified in the --replayFilePrefix option and then exit. | source code
replay(self, packet) Replay a captured packet. | source code
replayStop(self) Twisted method that we use to override the default stop() method for when we are replaying packets. | source code
buildCaptureReplayOptions(self) This should be called explicitly in the base class' buildOptions | source code
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__init__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### capturePacket(self, hostname, *packetInfo) | source code
Store the raw packet for later examination and troubleshooting. Parameters: `hostname` (string) - packet-sending host's name or IP address `packetInfo` (args) - raw packet and other necessary arguments

### replayAll(self) | source code
Replay all captured packets using the files specified in the --replayFilePrefix option and then exit. Note that this calls the Twisted stop() method

### replay(self, packet) | source code
Replay a captured packet. This must be overridden. Parameters: `packet` (binary) - raw packet

### replayStop(self) | source code
Twisted method that we use to override the default stop() method for when we are replaying packets. This version waits to make sure that all of our deferreds have exited before pulling the plug.