Esempio n. 1
0
 def datagram_received(self, data, addr):
     signal.alarm(0)
     logger.info("Received packet from SFF: %s", addr)
     logger.debug("Packet dump: %s", binascii.hexlify(data))
     # Decode all the headers
     decode_vxlan(data, self.server_vxlan_values)
     decode_baseheader(data, self.server_base_values)
     decode_contextheader(data, self.server_ctx_values)
     self.loop.stop()
Esempio n. 2
0
 def datagram_received(self, data, addr):
     signal.alarm(0)
     logger.info("Received packet from SFF: %s", addr)
     logger.debug("Packet dump: %s", binascii.hexlify(data))
     # Decode all the headers
     decode_vxlan(data, self.server_vxlan_values)
     decode_baseheader(data, self.server_base_values)
     decode_contextheader(data, self.server_ctx_values)
     self.loop.stop()
Esempio n. 3
0
    def datagram_received(self, data, addr):
        logger.debug("Received trace response pkt from: %s", addr)
        # Decode all the headers
        decode_vxlan(data, self.server_vxlan_values)
        decode_baseheader(data, self.server_base_values)
        decode_contextheader(data, self.server_ctx_values)
        service_type, service_name = decode_trace_resp(data, self.server_trace_values)
        print(
            "Service-hop: {0}. Service Type: {1}, Service Name: {2}, Address of Reporting SFF: {3}".format(
                self.hop_count, service_type, service_name, addr))
        self.hop_count += 1

        if self.num_trace_hops > self.hop_count:
            self.trace_req_header_values.sil -= 1
            self.send_packet((self.dest_addr, self.dest_port))
        else:
            print("Trace end \n")
            self.loop.stop()
Esempio n. 4
0
    def datagram_received(self, data, addr):
        logger.debug("Received trace response pkt from: %s", addr)
        # Decode all the headers
        decode_vxlan(data, self.server_vxlan_values)
        decode_baseheader(data, self.server_base_values)
        decode_contextheader(data, self.server_ctx_values)
        service_type, service_name = decode_trace_resp(
            data, self.server_trace_values)
        print(
            "Service-hop: {0}. Service Type: {1}, Service Name: {2}, Address of Reporting SFF: {3}"
            .format(self.hop_count, service_type, service_name, addr))
        self.hop_count += 1

        if self.num_trace_hops > self.hop_count:
            self.trace_req_header_values.sil -= 1
            self.send_packet((self.dest_addr, self.dest_port))
        else:
            print("Trace end \n")
            self.loop.stop()