def control_message_filter(e, pkt_fingerprint):
  of_pkt = e.get_packet()

  # TODO(cs): also handle ofp_flow_mod.buffer_id, which applies the rule to a
  # particular buffered packet.
  if dp_ofp_packets not in type(of_pkt):
    return False

  # TODO(cs): problem: controllers often truncate the packet in
  # ofp_packet_out.data. ofp_packet_in's are fine though, since POX's
  # software_switch always includes the entire dataplane packet in the
  # packet_in. To really solve this issue we would need to replay the
  # flow_mods to cloned topology, and verify that buffer_id's are chosen
  # deterministically.
  return DPFingerprint.from_pkt(ethernet(raw=of_pkt.data)) == pkt_fingerprint
dataset/ETHPy150Open ucb-sts/sts/tools/trace_traffic_injection.py/control_message_filter/swapped operands of `not in`