def METHOD_NAME(self):
    while True:
        valid_monit_file = True
        with open(self.monitor_file) as fd:
            full_strings = fd.readlines()
        try:
            ports_to_monitor = full_strings[0].strip()
            all_monitored_addresses = full_strings[1].strip()
        except IndexError:
            valid_monit_file = False
        if ports_to_monitor == "" or all_monitored_addresses == "":
            valid_monit_file = False
        if not valid_monit_file:
            time.sleep(1)
            continue
        ports_to_monitor = [int(x) for x in ports_to_monitor.split(',')]
        all_monitored_addresses = all_monitored_addresses.split(',')
        result = self.dataplane.poll(device_number=0, timeout=0.1)
        if not isinstance(result, self.dataplane.PollSuccess) or \
                result.port not in ports_to_monitor or \
                "UDP" not in scapy.Ether(result.packet):
            continue
        if scapy.Ether(result.packet)['UDP'].dport != 4784:
            continue
        received_pkt = result.packet
        port_number = result.port
        mac_src, mac_dst, ip_src, ip_dst,  bfd_remote_disc, bfd_state = \
            self.extract_bfd_info(received_pkt)
        if ip_dst not in all_monitored_addresses:
            continue
        try:
            session = self.sessions[ip_dst]
        except KeyError:
            self.sessions[ip_dst] = {}
        if bfd_state == 3:
            count = send_packet(self, result.port, str(session["pkt"]))
            if count == 0:
                raise RuntimeError(
                    "send_packet failed args:port_number{}, "
                    "dp_tuple:{}".format(port_number, str(session['pkt'])))
        if bfd_state == 2:
            continue
        session = {}
        session['addr'] = ip_dst
        session['remote_addr'] = ip_src
        session['intf'] = result.port
        session['multihop'] = True
        session['mac'] = mac_dst
        session['pkt'] = ''
        session["src_port"] = self.local_src_port
        self.local_disc_base += 1
        self.local_src_port += 1
        session['my_disc'] = self.local_disc_base
        session["other_disc"] = bfd_remote_disc
        bfd_pkt_init = self.craft_bfd_packet(
            session['my_disc'],
            received_pkt,
            mac_src,
            mac_dst,
            ip_src,
            ip_dst,
            bfd_remote_disc,
            2)
        count = send_packet(self, session['intf'], str(bfd_pkt_init))
        if count == 0:
            raise RuntimeError(
                "send_packet failed args:port_number{}, "
                "dp_tuple:{}".format(port_number, str(bfd_pkt_init)))
        bfd_pkt_init.payload.payload.payload.load.sta = 3
        session["pkt"] = bfd_pkt_init
        self.sessions[ip_dst] = session