/aosp12/system/bt/hci/src/ |
H A D | packet_fragmenter.cc | 95 uint8_t* stream = packet->data + packet->offset; in fragment_and_dispatch_acl() 103 stream = packet->data + packet->offset; in fragment_and_dispatch_acl() 115 stream = packet->data + packet->offset; in fragment_and_dispatch_acl() 136 uint8_t* stream = packet->data + packet->offset; in fragment_and_dispatch_iso() 150 stream = packet->data + packet->offset; in fragment_and_dispatch_iso() 155 stream = packet->data + packet->offset; in fragment_and_dispatch_iso() 167 stream = packet->data + packet->offset; in fragment_and_dispatch_iso() 277 memcpy(partial_packet->data, packet->data, packet->len); in reassemble_and_dispatch_iso() 439 memcpy(partial_packet->data, packet->data, packet->len); in reassemble_and_dispatch() 463 if ((packet->len - packet->offset) > in reassemble_and_dispatch() [all …]
|
/aosp12/system/bt/gd/cert/ |
H A D | matchers.py | 202 def LoopbackOf(packet): argument 206 def Exactly(packet): argument 357 return lambda packet: packet.GetPayload().GetBytes() == payload 366 return lambda packet: payload in packet.GetPayload().GetBytes() 371 return lambda packet: payload in packet.payload 376 return lambda packet: None if psm != packet.psm else packet 381 return lambda packet: None if cid != packet.fixed_cid else packet 385 return lambda packet: L2capMatchers._basic_frame_for(packet, scid) 405 if packet is None: 725 return lambda packet: packet.payload == payload [all …]
|
H A D | captures.py | 33 …lambda packet: packet.payload[0:5] == b'\x0e\x0a\x01\x09\x10', lambda packet: hci_packets.ReadBdAd… 40 …lambda packet: packet.payload[0:2] == b'\x04\x0a', lambda packet: hci_packets.ConnectionRequestVie… 46 …lambda packet: packet.payload[0:3] == b'\x03\x0b\x00', lambda packet: hci_packets.ConnectionComple… 52 …lambda packet: packet.payload[0:2] == b'\x05\x04', lambda packet: hci_packets.DisconnectionComplet… 58 …lambda packet: packet.payload[0] == 0x3e and (packet.payload[2] == 0x01 or packet.payload[2] == 0x… 70 …lambda packet: HciMatchers.ExtractMatchingCommandComplete(packet.payload, hci_packets.OpCode.READ_… 110 lambda packet: HciMatchers.ExtractLeConnectionComplete(packet.payload)) 126 def _extract_connection_request(packet): argument 135 def _extract_connection_response(packet): argument 173 def _extract_address(packet): argument [all …]
|
/aosp12/system/memory/lmkd/include/ |
H A D | lmkd.h | 85 packet[idx++] = htonl(LMK_TARGET); in lmkd_pack_set_target() 129 packet[0] = htonl(LMK_PROCPRIO); in lmkd_pack_set_procprio() 130 packet[1] = htonl(params->pid); in lmkd_pack_set_procprio() 131 packet[2] = htonl(params->uid); in lmkd_pack_set_procprio() 158 packet[1] = htonl(params->pid); in lmkd_pack_set_procremove() 167 packet[0] = htonl(LMK_PROCPURGE); in lmkd_pack_set_procpurge() 205 packet[1] = htonl(kill_cnt); in lmkd_pack_set_getkillcnt_repl() 245 packet[0] = htonl(LMK_PROCKILL); in lmkd_pack_set_prockills() 246 packet[1] = htonl(pid); in lmkd_pack_set_prockills() 247 packet[2] = htonl(uid); in lmkd_pack_set_prockills() [all …]
|
/aosp12/system/bt/gd/packet/parser/test/ |
H A D | big_endian_test_packets.pdl | 6 packet ParentBe { 13 packet ChildBe : ParentBe { 26 packet ParentTwoBe { 53 packet MiddleFourBitsBe { 73 packet ParentWithSumBe { 110 packet FixedArrayEnumBe { 114 packet SizedArrayEnumBe { 144 packet OneVariableBe { 167 packet OneStructBe { 171 packet TwoStructsBe { [all …]
|
H A D | test_packets.pdl | 6 packet Parent { 13 packet Child : Parent { 26 packet ParentTwo { 53 packet MiddleFourBits { 73 packet ParentWithSum { 117 packet FixedArrayEnum { 151 packet OneVariable { 174 packet OneStruct { 178 packet TwoStructs { 188 packet ArrayOfStruct { [all …]
|
/aosp12/system/bt/packet/tests/fuzzers/ |
H A D | Android.bp | 18 "system/bt/packet/include", 19 "system/bt/packet/tests", 21 "system/bt/packet/base", 48 "system/bt/packet/tests", 50 "system/bt/packet/base", 78 "system/bt/packet/tests", 80 "system/bt/packet/base", 108 "system/bt/packet/tests", 110 "system/bt/packet/base", 140 "system/bt/packet/base", [all …]
|
/aosp12/system/bt/packet/tests/base/ |
H A D | iterator_test.cc | 51 auto packet = in TEST_F() local 79 auto packet = GetTestPacket(); in TEST_P() local 80 ASSERT_EQ(static_cast<size_t>(packet->end() - packet->begin()), in TEST_P() 83 auto it = packet->begin(); in TEST_P() 90 auto packet = GetTestPacket(); in TEST_P() local 103 auto packet = GetTestPacket(); in TEST_P() local 116 auto packet = GetTestPacket(); in TEST_P() local 125 auto packet = GetTestPacket(); in TEST_P() local 138 auto packet = GetTestPacket(); in TEST_P() local 148 auto packet = GetTestPacket(); in TEST_P() local [all …]
|
H A D | packet_test.cc | 29 auto packet = TestPacket::Make( in TEST() local 33 auto new_packet = TestPacket::Make(packet); in TEST() 56 ASSERT_EQ(test_l2cap_data[i], (*packet)[i]); in TEST() 62 ASSERT_EQ(test_avrcp_data[i], (*packet)[i]); in TEST() 68 auto packet = in TEST() local 75 auto packet = TestPacket::Make( in TEST() local 79 auto it = packet->begin(); in TEST() 80 for (size_t i = 0; i < packet->size(); i++) { in TEST() 81 ASSERT_EQ((*packet)[i], *it++); in TEST() 85 ASSERT_EQ(it, packet->end()); in TEST() [all …]
|
/aosp12/system/bt/gd/hci/ |
H A D | hci_packets.pdl | 79 packet Acl { 96 packet Sco { 647 packet Command { 656 packet AclCommand : Command { _payload_, } 664 packet LeIsoCommand : Command { _payload_, } 665 packet VendorCommand : Command { _payload_, } 725 packet Event { 1638 packet Reset : Command (op_code = RESET) { 5705 packet BqrLinkQualityEvent : BqrEvent { 5750 packet BqrLogDumpEvent : BqrEvent { [all …]
|
/aosp12/system/bt/hci/test/ |
H A D | packet_fragmenter_test.cc | 91 packet->len = size; in manufacture_packet_for_fragmentation() 92 packet->offset = 0; in manufacture_packet_for_fragmentation() 93 packet->event = event; in manufacture_packet_for_fragmentation() 115 return packet; in manufacture_packet_for_fragmentation() 121 uint8_t* data = packet->data + packet->offset; in expect_packet_fragmented() 239 packet->offset = 0; in manufacture_acl_packet_and_then_reassemble() 267 BT_HDR* packet; in manufacture_iso_packet_and_then_reassemble() local 283 packet->offset = 0; in manufacture_iso_packet_and_then_reassemble() 353 uint8_t* data = packet->data + packet->offset; in expect_packet_reassembled() 374 osi_free(packet); in expect_packet_reassembled() [all …]
|
H A D | hci_layer_test.cc | 79 BT_HDR* packet = in AllocatePacket() local 81 packet->offset = 0; in AllocatePacket() 82 packet->len = packet_length; in AllocatePacket() 83 packet->layer_specific = 0; in AllocatePacket() 85 return packet; in AllocatePacket() 93 auto p = GetPayloadPointer(packet); in TEST_F() 97 CHECK(filter_incoming_event(packet)); in TEST_F() 103 auto p = GetPayloadPointer(packet); in TEST_F() 108 CHECK(filter_incoming_event(packet)); in TEST_F() 114 auto p = GetPayloadPointer(packet); in TEST_F() [all …]
|
/aosp12/system/bt/vendor_libs/test_vendor_lib/packets/ |
H A D | link_layer_packets.pdl | 55 packet LinkLayerPacket { 62 packet Acl : LinkLayerPacket (type = ACL) { 66 packet Disconnect : LinkLayerPacket (type = DISCONNECT) { 89 packet Inquiry : LinkLayerPacket (type = INQUIRY) { 166 packet LeScan : LinkLayerPacket (type = LE_SCAN) { 175 packet Page : LinkLayerPacket (type = PAGE) { 236 packet ScoPacket : LinkLayerPacket (type = SCO) { 262 packet IsoDataPacket : LinkLayerPacket (type = ISO) { 272 packet IsoStart : IsoDataPacket (sc = START) { 313 packet OobData : LinkLayerPacket (type = OOB_DATA){ [all …]
|
/aosp12/frameworks/libs/net/common/tests/unit/src/com/android/net/module/util/ |
H A D | IpUtilsTest.java | 81 ByteBuffer packet = ByteBuffer.wrap(new byte[] { in testIpv6TcpChecksum() local 108 int sum = getUnsignedByte(packet, sumOffset) * 256 + getUnsignedByte(packet, sumOffset + 1); in testIpv6TcpChecksum() 111 packet.put(sumOffset, (byte) 0); in testIpv6TcpChecksum() 112 packet.put(sumOffset + 1, (byte) 0); in testIpv6TcpChecksum() 116 packet.putShort( in testIpv6TcpChecksum() 148 packet.put(ipSumOffset, (byte) 0); in testIpv4UdpChecksum() 149 packet.put(ipSumOffset + 1, (byte) 0); in testIpv4UdpChecksum() 156 packet.put(udpSumOffset, (byte) 0); in testIpv4UdpChecksum() 157 packet.put(udpSumOffset + 1, (byte) 0); in testIpv4UdpChecksum() 161 packet.putShort(ipSumOffset, IpUtils.ipChecksum(packet, 0)); in testIpv4UdpChecksum() [all …]
|
/aosp12/system/bt/tools/hci/ |
H A D | main.c | 82 if (argv[0][0] == 't') packet[ARRAY_SIZE(packet) - 1] = 0x03; in set_discoverable() 84 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); in set_discoverable() 102 if (!write_hci_command(HCI_PACKET_COMMAND, packet, sizeof(packet))) return 1; in set_name() 104 memset(&packet[0], 0, sizeof(packet)); in set_name() 105 packet[0] = 0x52; in set_name() 106 packet[1] = 0x0C; in set_name() 109 packet[4] = len + 1; in set_name() 127 if (argv[0][0] == 't') packet[ARRAY_SIZE(packet) - 1] = 0x01; in set_pcm_loopback() 129 return !write_hci_command(HCI_PACKET_COMMAND, packet, ARRAY_SIZE(packet)); in set_pcm_loopback() 152 packet[3] = route; in set_sco_route() [all …]
|
/aosp12/packages/modules/NetworkStack/tests/unit/src/android/net/util/ |
H A D | ConnectivityPacketSummaryTest.java | 50 final String packet = in testParseICMPv6DADProbe() local 72 final String packet = in testParseICMPv6RS() local 94 final String packet = in testParseICMPv6RA() local 127 final String packet = in testParseICMPv6NS() local 150 final String packet = in testInvalidICMPv6NDLength() local 175 final String packet = in testParseICMPv6NA() local 196 final String packet = in testParseARPRequest() local 215 final String packet = in testParseARPReply() local 236 final String packet = in testParseDHCPv4Discover() local 282 final String packet = in testParseDHCPv4Offer() local [all …]
|
/aosp12/packages/modules/NetworkStack/tests/unit/src/android/net/apf/ |
H A D | ApfTest.java | 978 Os.write(mWriteSocket, packet, 0, packet.length); in pretendPacketReceived() 1158 return packet; in makeIpv4Packet() 1165 return packet; in makeIpv6Packet() 1548 return packet.array(); in arpReply() 1557 return packet.array(); in arpRequestBroadcast() 1566 return packet.array(); in garpReply() 1887 packet.putInt(valid); in addPioOption() 1930 packet.rewind(); in buildLargeRa() 1942 ApfFilter.Ra ra = apfFilter.new Ra(packet, packet.length); in testRaToString() 2250 apfFilter.new Ra(packet, packet.length); in testRaParsing() [all …]
|
/aosp12/system/bt/gd/l2cap/ |
H A D | l2cap_packets.pdl | 5 packet BasicFrame { 11 packet BasicFrameWithFcs { 25 packet GroupFrame : BasicFrame (channel_id = 0x02) { 54 packet StandardFrame : BasicFrame { 59 packet StandardFrameWithFcs : BasicFrameWithFcs { 207 packet FirstLeInformationFrame : BasicFrame { 237 packet ControlFrame : BasicFrame (channel_id = 0x0001) { 241 packet Control { 420 packet EchoRequest : Control (code = ECHO_REQUEST) { 424 packet EchoResponse : Control (code = ECHO_RESPONSE) { [all …]
|
/aosp12/system/connectivity/wificond/net/ |
H A D | netlink_manager.cpp | 55 vec->push_back(std::move(packet)); in AppendPacket() 114 unique_ptr<NL80211Packet> packet( in ReceivePacketAndRunHandler() local 117 if (!packet->IsValid()) { in ReceivePacketAndRunHandler() 160 bool is_multi = packet->IsMulti(); in ReceivePacketAndRunHandler() 162 itr->second(std::move(packet)); in ReceivePacketAndRunHandler() 264 const NL80211Packet& packet, in RegisterHandlerAndSendMessage() argument 266 if (packet.IsDump()) { in RegisterHandlerAndSendMessage() 278 const NL80211Packet& packet, in SendMessageAndGetResponses() argument 327 const NL80211Packet& packet, in SendMessageAndGetSingleResponse() argument 345 const NL80211Packet& packet, in SendMessageAndGetSingleResponseOrError() argument [all …]
|
H A D | mlme_event.cpp | 35 bool GetCommonFields(const NL80211Packet* packet, in GetCommonFields() argument 52 const NL80211Packet* packet) { in InitFromPacket() argument 58 if (!GetCommonFields(packet, in InitFromPacket() 74 const NL80211Packet* packet) { in InitFromPacket() argument 79 if (!GetCommonFields(packet, in InitFromPacket() 96 const NL80211Packet* packet) { in InitFromPacket() argument 101 if (!GetCommonFields(packet, in InitFromPacket() 111 const NL80211Packet* packet) { in InitFromPacket() argument 116 if (!GetCommonFields(packet, in InitFromPacket() 125 const NL80211Packet* packet) { in InitFromPacket() argument [all …]
|
/aosp12/frameworks/av/media/mtp/ |
H A D | MtpProperty.cpp | 185 packet.putUInt16(mCode); in write() 186 packet.putUInt16(mType); in write() 187 packet.putUInt8(mWriteable ? 1 : 0); in write() 210 packet.putUInt32(mGroupCode); in write() 211 packet.putUInt8(mFormFlag); in write() 217 packet.putUInt16(mEnumLength); in write() 256 readValue(packet, mCurrentValue); in setCurrentValue() 509 packet.putInt8(value.u.i8); in writeValue() 513 packet.putUInt8(value.u.u8); in writeValue() 579 packet.putUInt32(length); in writeArrayValues() [all …]
|
H A D | MtpObjectInfo.cpp | 58 bool MtpObjectInfo::read(MtpDataPacket& packet) { in read() argument 62 if (!packet.getUInt32(mStorageID)) return false; in read() 63 if (!packet.getUInt16(mFormat)) return false; in read() 66 if (!packet.getUInt16(mThumbFormat)) return false; in read() 68 if (!packet.getUInt32(mThumbPixWidth)) return false; in read() 70 if (!packet.getUInt32(mImagePixWidth)) return false; in read() 73 if (!packet.getUInt32(mParent)) return false; in read() 78 if (!packet.getString(string)) return false; in read() 82 if (!packet.getString(string)) return false; in read() 86 if (!packet.getString(string)) return false; in read() [all …]
|
/aosp12/system/bt/gd/security/pairing/ |
H A D | classic_pairing_handler.cc | 167 ASSERT(packet.IsValid()); in OnReceive() 172 ASSERT(packet.IsValid()); in OnReceive() 177 ASSERT(packet.IsValid()); in OnReceive() 185 ASSERT(packet.IsValid()); in OnReceive() 207 ASSERT(packet.IsValid()); in OnReceive() 210 GetRecord()->SetLinkKey(packet.GetLinkKey(), packet.GetKeyType()); in OnReceive() 222 ASSERT(packet.IsValid()); in OnReceive() 238 ASSERT(packet.IsValid()); in OnReceive() 303 ASSERT(packet.IsValid()); in OnReceive() 315 ASSERT(packet.IsValid()); in OnReceive() [all …]
|
/aosp12/system/core/debuggerd/tombstoned/ |
H A D | tombstoned_client.cpp | 52 TombstonedCrashPacket packet = {}; in tombstoned_connect() local 53 packet.packet_type = CrashPacketType::kDumpRequest; in tombstoned_connect() 54 packet.packet.dump_request.pid = pid; in tombstoned_connect() 55 packet.packet.dump_request.dump_type = dump_type; in tombstoned_connect() 56 if (TEMP_FAILURE_RETRY(write(sockfd, &packet, sizeof(packet))) != sizeof(packet)) { in tombstoned_connect() 66 rc = ReceiveFileDescriptors(sockfd, &packet, sizeof(packet), &tmp_output_fd, &tmp_proto_fd); in tombstoned_connect() 68 rc = ReceiveFileDescriptors(sockfd, &packet, sizeof(packet), &tmp_output_fd); in tombstoned_connect() 75 } else if (rc != sizeof(packet)) { in tombstoned_connect() 79 sizeof(packet), rc); in tombstoned_connect() 101 TombstonedCrashPacket packet = {}; in tombstoned_notify_completion() local [all …]
|
/aosp12/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/ |
H A D | DhcpPacketTest.java | 548 DhcpPacket.decodeFullPacket(packet, packet.length, ENCAP_L3, in testBadIpPacket() 568 DhcpPacket.decodeFullPacket(packet, packet.length, ENCAP_L3); in testBadDhcpPacket() 597 DhcpPacket.decodeFullPacket(packet, packet.length, ENCAP_L3); in testBadTruncatedOffer() 628 DhcpPacket.decodeFullPacket(packet, packet.length, ENCAP_L3); in testBadOfferWithoutACookie() 660 DhcpPacket.decodeFullPacket(packet, packet.length, ENCAP_L3); in testOfferWithBadCookie() 714 DhcpPacket.decodeFullPacket(packet, packet.length, ENCAP_L3); in testRandomPackets() 735 packet.position(packet.capacity() - mtuBytes.length); in checkMtu() 857 packet.flip(); in testBadHwaddrLength() 865 packet.flip(); in testBadHwaddrLength() 875 packet.flip(); in testBadHwaddrLength() [all …]
|