def _is_matching_configuration_response( packet, result=ConfigurationResponseResult.SUCCESS): frame = L2capMatchers.control_frame_with_code( packet, CommandCode.CONFIGURATION_RESPONSE) if frame is None: return False response = l2cap_packets.ConfigurationResponseView(frame) return response.GetResult() == result
def _on_configuration_response_default(self, l2cap_control_view): response = l2cap_packets.ConfigurationResponseView(l2cap_control_view) scid = response.GetSourceCid() if scid not in self.scid_to_channel: logging.warning("Received config request with unknown dcid") return result = response.GetResult() if result == ConfigurationResponseResult.SUCCESS: self.scid_to_channel[scid]._config_rsp_received = True