Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion network_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import signal
from sulley import pedrpc

MAX_PACKET_LENGTH = 65535 # Max packet length for IP capture


def log_error(message=None):
try:
Expand Down Expand Up @@ -174,7 +176,7 @@ def pre_send (self, test_number):
self.log("initializing capture for test case #%d" % test_number)

# open the capture device and set the BPF filter.
self.pcap = pcapy.open_live(self.device, -1, 1, 100)
self.pcap = pcapy.open_live(self.device, MAX_PACKET_LENGTH, 1, 100)
self.pcap.setfilter(self.filter)

# instantiate the capture thread.
Expand Down