def _tcpdump_callback(self, line, kill_switch):
    """Callback function to handle tcpdump"""

    line = line.lower()
    if ("listening" in line) or ("reading" in line):
        self.started = True
    if ("no suitable device" in line):
        self.error = True
        self.kill_switch()
    if "by kernel" in line:
        self.stopped = True
Callback function to handle tcpdump