def receive(self, interface, packet):
    if packet.type == ethernet.ARP_TYPE:
      arp_reply = self._check_arp_reply(packet)
      if arp_reply is not None:
        self.log.info("received valid arp packet on "
                      "interface %s: %s" % (interface.name, str(packet)))
        self.send(interface, arp_reply)
        return arp_reply
      else:
        self.log.info("received invalid arp packet on "
                      "interface %s: %s" % (interface.name, str(packet)))
        return None
    elif (self.send_capabilities and packet.type == ethernet.IP_TYPE and
          packet.next.protocol == ipv4.ICMP_PROTOCOL):
      # Temporary hack: if we receive a ICMP packet, send a TCP RST to signal
      # to POX that we do want to revoke the capability for this flow. See
      # pox/pox/forwarding/capabilities_manager.py
      self.log.info("Sending RST on interface %s: in "
                    "response to: %s" % (interface.name, str(packet)))
      t = tcp()
      tcp.RST = True
      i = ipv4()
      i.protocol = ipv4.TCP_PROTOCOL
      i.srcip = interface.ips[0]
      i.dstip = packet.next.srcip
      i.payload = t
      ether = ethernet()
      ether.type = ethernet.IP_TYPE
      ether.src = interface.hw_addr
      ether.dst = packet.src
      ether.payload = i
      self.send(interface, ether)

    self.log.info("Received packet %s on interface "
                  "%s" % (str(packet), interface.name))
Sets the attributes in the data store and update the cache.
dataset/ETHPy150Open ucb-sts/sts/sts/entities/hosts.py/Host.receive--crossover with--dataset/ETHPy150Open google/grr/grr/lib/aff4.py/Factory.SetAttributes