Ejemplo n.º 1
0
 def _is_matching_credit_based_connection_request(packet, psm):
     frame = L2capMatchers.le_control_frame_with_code(
         packet, LeCommandCode.LE_CREDIT_BASED_CONNECTION_REQUEST)
     if frame is None:
         return False
     request = l2cap_packets.LeCreditBasedConnectionRequestView(frame)
     return request.GetLePsm() == psm
Ejemplo n.º 2
0
 def _extract_credit_based_connection_request(packet):
     frame = L2capMatchers.le_control_frame_with_code(
         packet, LeCommandCode.LE_CREDIT_BASED_CONNECTION_REQUEST)
     return l2cap_packets.LeCreditBasedConnectionRequestView(frame)