code: def rx_filter(header, data):
      
  
      rsp_header = IpmbHeaderRsp()
      rsp_header.decode(data)
  
      data = array('B', data)
  
      checks = [
          (checksum(data[0:3]), 0, 'Header checksum failed'),
          (checksum(data[3:]), 0, 'payload checksum failed'),
          # rsp_header.rq_sa, header.rq_sa, 'slave address mismatch'),
          (rsp_header.netfn, header.netfn | 1, 'NetFn mismatch'),
          # rsp_header.rs_sa, header.rs_sa, 'target address mismatch'),
          # rsp_header.rq_lun, header.rq_lun, 'request LUN mismatch'),
          (rsp_header.rs_lun, header.rs_lun, 'responder LUN mismatch'),
          (rsp_header.rq_seq, header.rq_seq, 'sequence number mismatch'),
          (rsp_header.cmd_id, header.cmd_id, 'command id mismatch'),
      ]
  
      match = True
  
      for left, right, msg in checks:
          if left != right:
              log().debug('{:s}: {:d} {:d}'.format(msg, left, right))
              match = False
  
      return match
docs: Check if the message in rx_data matches to the information in header.
  
      The following checks are done:
        - Header checksum
        - Payload checksum
        - NetFn matching
        - LUN matching
        - Command Id matching
  
      header: the header to compare with
      data: the received message as bytestring