Home
last modified time | relevance | path

Searched refs:packet (Results 1 – 25 of 466) sorted by relevance

12345678910>>...19

/packages/modules/Bluetooth/system/tools/scripts/
Ddump_le_audio.py261 def parse_codec_information(connection_handle, ase_id, packet): argument
262 length, packet = unpack_data(packet, 1, False)
263 if len(packet) < length:
265 return packet
268 config_length, packet = unpack_data(packet, 1, False)
269 config_type, packet = unpack_data(packet, 1, False)
270 value, packet = unpack_data(packet, config_length - 1, False)
281 return packet
284 def parse_att_read_by_type_rsp(packet, connection_handle): argument
285 length, packet = unpack_data(packet, 1, False)
[all …]
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/
DIpUtilsTest.java78 ByteBuffer packet = ByteBuffer.wrap(new byte[] { (byte) 0x00, (byte) 0x00, }); in testEmptyAndZeroBufferChecksum() local
80 assertEquals(0, IpUtils.checksum(packet, 0, 0, 0)); in testEmptyAndZeroBufferChecksum()
81 assertEquals(0, IpUtils.checksum(packet, 0, 0, 1)); in testEmptyAndZeroBufferChecksum()
82 assertEquals(0, IpUtils.checksum(packet, 0, 0, 2)); in testEmptyAndZeroBufferChecksum()
83 assertEquals(0, IpUtils.checksum(packet, 0, 1, 2)); in testEmptyAndZeroBufferChecksum()
84 assertEquals(0, IpUtils.checksum(packet, 0xFFFF, 0, 0)); in testEmptyAndZeroBufferChecksum()
85 assertEquals(0, IpUtils.checksum(packet, 0xFFFF, 0, 1)); in testEmptyAndZeroBufferChecksum()
86 assertEquals(0, IpUtils.checksum(packet, 0xFFFF, 0, 2)); in testEmptyAndZeroBufferChecksum()
87 assertEquals(0, IpUtils.checksum(packet, 0xFFFF, 1, 2)); in testEmptyAndZeroBufferChecksum()
97 ByteBuffer packet = ByteBuffer.wrap(new byte[] { in testIpv6TcpChecksum() local
[all …]
/packages/modules/Bluetooth/system/gd/packet/parser/test/
Dbig_endian_test_packets.pdl3 custom_field SixBytes : 48 "packet/parser/test/"
4 custom_field Variable "packet/parser/test/"
6 packet ParentBe {
13 packet ChildBe : ParentBe {
26 packet ParentTwoBe {
32 packet ChildTwoThreeBe : ParentTwoBe (four_bits = THREE) {
38 packet ChildTwoTwoBe : ParentTwoBe (four_bits = TWO) {
43 packet ChildTwoTwoThreeBe :ChildTwoTwoBe (more_bits = THREE) {
53 packet MiddleFourBitsBe {
61 packet ParentWithSixBytesBe {
[all …]
Dtest_packets.pdl3 custom_field SixBytes : 48 "packet/parser/test/"
4 custom_field Variable "packet/parser/test/"
6 packet Parent {
13 packet Child : Parent {
26 packet ParentTwo {
32 packet ChildTwoThree : ParentTwo (four_bits = THREE) {
38 packet ChildTwoTwo : ParentTwo (four_bits = TWO) {
43 packet ChildTwoTwoThree :ChildTwoTwo (more_bits = THREE) {
53 packet MiddleFourBits {
61 packet ParentWithSixBytes {
[all …]
/packages/modules/Bluetooth/system/packet/tests/base/
Diterator_test.cc58 auto packet = TestPacket::Make(test_l2cap_data, 3, test_l2cap_data.size() - 2); in TEST_F() local
63 ASSERT_DEATH(Iterator(packet, 0), "index_ >= packet->packet_start_index_"); in TEST_F()
64 ASSERT_DEATH(Iterator(packet, test_l2cap_data.size()), "index_ <= packet->packet_end_index_"); in TEST_F()
68 auto packet = TestPacket::Make(test_l2cap_data); in TEST_F() local
69 Iterator general_case = packet->begin(); in TEST_F()
78 auto packet = TestPacket::Make(test_l2cap_data); in TEST_F() local
79 Iterator general_case = packet->begin(); in TEST_F()
88 auto packet = GetTestPacket(); in TEST_P() local
89 ASSERT_EQ(static_cast<size_t>(packet->end() - packet->begin()), GetTestPacketLength()); in TEST_P()
91 auto it = packet->begin(); in TEST_P()
[all …]
Dpacket_test.cc31 auto packet = in TEST() local
35 auto new_packet = TestPacket::Make(packet); in TEST()
46 auto packet = TestPacket::Make(test_avctp_data); in TEST() local
47 ASSERT_EQ(packet->size(), test_avctp_data.size()); in TEST()
49 packet = in TEST()
51 ASSERT_EQ(packet->size(), test_avrcp_data.size()); in TEST()
56 auto packet = TestPacket::Make(test_l2cap_data); in TEST() local
58 ASSERT_EQ(test_l2cap_data[i], (*packet)[i]); in TEST()
61 packet = in TEST()
64 ASSERT_EQ(test_avrcp_data[i], (*packet)[i]); in TEST()
[all …]
/packages/modules/Bluetooth/system/hci/src/
Dpacket_fragmenter.cc87 static void fragment_and_dispatch(BT_HDR* packet, uint16_t max_data_size) { in fragment_and_dispatch() argument
88 log::assert_that(packet != NULL, "assert failed: packet != NULL"); in fragment_and_dispatch()
90 uint16_t event = packet->event & MSG_EVT_MASK; in fragment_and_dispatch()
95 uint8_t* stream = packet->data + packet->offset; in fragment_and_dispatch()
97 uint16_t remaining_length = packet->len; in fragment_and_dispatch()
102 if (packet->layer_specific & BT_ISO_HDR_CONTAINS_TS) { in fragment_and_dispatch()
108 stream = packet->data + packet->offset; in fragment_and_dispatch()
113 stream = packet->data + packet->offset; in fragment_and_dispatch()
117 packet->len = max_packet_size; in fragment_and_dispatch()
118 callbacks->fragmented(packet, false); in fragment_and_dispatch()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/packets/
Dhci_packets.pdl23 packet Acl {
40 packet Sco {
753 packet Command {
885 packet Event {
891 packet LeMetaEvent : Event (event_code = LE_META_EVENT) {
955 packet CommandComplete : Event (event_code = COMMAND_COMPLETE) {
961 packet CommandStatus : Event (event_code = COMMAND_STATUS) {
968 packet VendorSpecificEvent : Event (event_code = VENDOR_SPECIFIC) {
974 packet NoCommandComplete : CommandComplete (command_op_code = NONE) {
984 packet Inquiry : Command (op_code = INQUIRY) {
[all …]
Dlink_layer_packets.pdl62 packet LinkLayerPacket {
69 packet Acl : LinkLayerPacket (type = ACL) {
75 packet Sco : LinkLayerPacket (type = SCO) {
79 packet LeConnectedIsochronousPdu : LinkLayerPacket (type = LE_CONNECTED_ISOCHRONOUS_PDU) {
86 packet LeBroadcastIsochronousPdu : LinkLayerPacket (type = LE_BROADCAST_ISOCHRONOUS_PDU) {
89 packet Disconnect : LinkLayerPacket (type = DISCONNECT) {
104 packet Inquiry : LinkLayerPacket (type = INQUIRY) {
109 packet BasicInquiryResponse : LinkLayerPacket(type = INQUIRY_RESPONSE) {
118 packet InquiryResponse : BasicInquiryResponse (inquiry_type = STANDARD) {
121 packet InquiryResponseWithRssi : BasicInquiryResponse (inquiry_type = RSSI) {
[all …]
/packages/modules/Bluetooth/system/pdl/hci/
Dhci_packets.pdl84 packet Acl {
101 packet Sco {
790 packet Command {
798 packet DiscoveryCommand : Command { _payload_, }
799 packet AclCommand : Command { _payload_, }
800 packet ConnectionManagementCommand : AclCommand { _payload_, }
801 packet SecurityCommand : Command { _payload_, }
802 packet ScoConnectionCommand : AclCommand { _payload_, }
803 packet LeAdvertisingCommand : Command { _payload_, }
804 packet LeScanningCommand : Command { _payload_, }
[all …]
/packages/modules/Bluetooth/tools/rootcanal/rust/src/llcp/
Dmanager.rs79 pub fn ingest_hci(&mut self, packet: hci::Command) -> Result<(), LinkLayerError> { in ingest_hci()
81 match packet.specialize() { in ingest_hci()
82 Disconnect(packet) => self.iso.hci_disconnect(packet), in ingest_hci()
83 LeSetCigParameters(packet) => self.iso.hci_le_set_cig_parameters(packet), in ingest_hci()
84 LeSetCigParametersTest(packet) => self.iso.hci_le_set_cig_parameters_test(packet), in ingest_hci()
85 LeCreateCis(packet) => self.iso.hci_le_create_cis(packet), in ingest_hci()
86 LeRemoveCig(packet) => self.iso.hci_le_remove_cig(packet), in ingest_hci()
87 LeAcceptCisRequest(packet) => self.iso.hci_le_accept_cis_request(packet), in ingest_hci()
88 LeRejectCisRequest(packet) => self.iso.hci_le_reject_cis_request(packet), in ingest_hci()
89 LeSetupIsoDataPath(packet) => self.iso.hci_le_setup_iso_data_path(packet), in ingest_hci()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/rust/src/
Dpackets.rs64 LinkKeyRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
65 LinkKeyRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
66 PinCodeRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
67 PinCodeRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
68 IoCapabilityRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
69 IoCapabilityRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
70 UserConfirmationRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
71 UserConfirmationRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
72 UserPasskeyRequestReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
73 UserPasskeyRequestNegativeReply(packet) => Some(packet.get_bd_addr()), in command_remote_device_address()
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp6/
DDhcp6PacketTest.kt45 val packet = Dhcp6Packet.decode(bytes, bytes.size) in testDecodeDhcp6SolicitPacket() constant
46 assertTrue(packet is Dhcp6SolicitPacket) in testDecodeDhcp6SolicitPacket()
122 val packet = Dhcp6Packet.decode(bytes, bytes.size) in testDecodeDhcp6AdvertisePacket() constant
123 assertTrue(packet is Dhcp6AdvertisePacket) in testDecodeDhcp6AdvertisePacket()
145 val packet = Dhcp6Packet.decode(bytes, bytes.size) in testDecodeDhcp6SolicitPacket_unsupportedOption() constant
146 assertTrue(packet is Dhcp6AdvertisePacket) in testDecodeDhcp6SolicitPacket_unsupportedOption()
173 val packet = Dhcp6Packet.decode(bytes, bytes.size) in testDecodeDhcp6ReplyPacket() constant
174 assertTrue(packet is Dhcp6ReplyPacket) in testDecodeDhcp6ReplyPacket()
175 assertEquals(400, packet.prefixDelegation.minimalPreferredLifetime) in testDecodeDhcp6ReplyPacket()
176 assertEquals(1623, packet.prefixDelegation.minimalValidLifetime) in testDecodeDhcp6ReplyPacket()
[all …]
/packages/modules/Bluetooth/tools/rootcanal/rust/
Dllcp_packets.pdl48 packet LlcpPacket {
53 packet ConnectionUpdateInd : LlcpPacket (opcode = LL_CONNECTION_UPDATE_IND) {
62 packet ChannelMapInd : LlcpPacket (opcode = LL_CHANNEL_MAP_IND) {
67 packet TerminateInd : LlcpPacket (opcode = LL_TERMINATE_IND) {
71 packet EncReq : LlcpPacket (opcode = LL_ENC_REQ) {
78 packet EncRsp : LlcpPacket (opcode = LL_ENC_RSP) {
83 packet StartEncReq : LlcpPacket (opcode = LL_START_ENC_REQ) {
86 packet StartEncRsp : LlcpPacket (opcode = LL_START_ENC_RSP) {
89 packet UnknownRsp : LlcpPacket (opcode = LL_UNKNOWN_RSP) {
93 packet FeatureReq : LlcpPacket (opcode = LL_FEATURE_REQ) {
[all …]
Dlmp_packets.pdl98 packet LmpPacket {
104 packet ExtendedPacket : LmpPacket(opcode = ESCAPED) {
109 packet Accepted : LmpPacket(opcode = ACCEPTED) {
114 packet NotAccepted : LmpPacket(opcode = NOT_ACCEPTED) {
120 packet AcceptedExt : ExtendedPacket(extended_opcode = ACCEPTED) {
124 packet NotAcceptedExt : ExtendedPacket(extended_opcode = NOT_ACCEPTED) {
129 packet IoCapabilityReq : ExtendedPacket(extended_opcode = IO_CAPABILITY_REQ) {
135 packet IoCapabilityRes : ExtendedPacket(extended_opcode = IO_CAPABILITY_RES) {
141 packet EncapsulatedHeader : LmpPacket(opcode = ENCAPSULATED_HEADER) {
147 packet EncapsulatedPayload : LmpPacket(opcode = ENCAPSULATED_PAYLOAD) {
[all …]
/packages/modules/Bluetooth/floss/hcidoc/src/groups/
Dconnections.rs148 fn process_classic_connection(&mut self, address: Address, packet: &Packet) { in process_classic_connection()
150 if let Some(p) = self.connection_attempt.insert(address, packet.clone()) { in process_classic_connection()
153 format!("Dangling connection attempt at {:?} replaced with {:?}", p, packet), in process_classic_connection()
165 fn process_sync_connection(&mut self, address: Address, packet: &Packet) { in process_sync_connection()
167 if let Some(p) = self.sco_connection_attempt.insert(address, packet.clone()) { in process_sync_connection()
170 format!("Dangling sco connection attempt at {:?} replaced with {:?}", p, packet), in process_sync_connection()
179 packet: &Packet, in process_le_create_connection()
183 if let Some(p) = self.le_connection_attempt.insert(address, packet.clone()) { in process_le_create_connection()
186 format!("Dangling LE connection attempt at {:?} replaced with {:?}", p, packet), in process_le_create_connection()
218 packet: &Packet, in process_remote_feat_cmd()
[all …]
/packages/modules/Bluetooth/system/pdl/l2cap/
Dl2cap_packets.pdl5 packet BasicFrame {
11 packet BasicFrameWithFcs {
25 packet GroupFrame : BasicFrame (channel_id = 0x02) {
54 packet StandardFrame : BasicFrame {
59 packet StandardFrameWithFcs : BasicFrameWithFcs {
80 packet StandardSupervisoryFrame : StandardFrame (frame_type = S_FRAME) {
84 packet StandardSupervisoryFrameWithFcs : StandardFrameWithFcs (frame_type = S_FRAME) {
88 packet StandardInformationFrame : StandardFrame (frame_type = I_FRAME) {
93 packet StandardInformationFrameWithFcs : StandardFrameWithFcs (frame_type = I_FRAME) {
98 packet StandardInformationStartFrame : StandardInformationFrame (sar = START) {
[all …]
/packages/modules/Bluetooth/system/hci/test/
Dpacket_fragmenter_test.cc82 BT_HDR* packet = (BT_HDR*)osi_malloc(size + sizeof(BT_HDR)); in manufacture_packet_for_fragmentation() local
83 packet->len = size; in manufacture_packet_for_fragmentation()
84 packet->offset = 0; in manufacture_packet_for_fragmentation()
85 packet->event = event; in manufacture_packet_for_fragmentation()
86 packet->layer_specific = 0; in manufacture_packet_for_fragmentation()
87 uint8_t* packet_data = packet->data; in manufacture_packet_for_fragmentation()
91 packet->layer_specific |= BT_ISO_HDR_CONTAINS_TS; in manufacture_packet_for_fragmentation()
104 return packet; in manufacture_packet_for_fragmentation()
107 static void expect_packet_fragmented(uint16_t event, int max_acl_data_size, BT_HDR* packet, in expect_packet_fragmented() argument
109 uint8_t* data = packet->data + packet->offset; in expect_packet_fragmented()
[all …]
/packages/modules/Bluetooth/floss/hcidoc/packets/
Dl2cap_packets.pdl3 packet BasicFrame {
15 packet GroupFrame : BasicFrame (channel_id = 0x02) {
48 packet StandardFrame : BasicFrame {
74 packet StandardSupervisoryFrame : StandardFrame {
78 packet StandardInformationFrame : StandardFrame {
83 packet StandardInformationStartFrame : StandardInformationFrame (sar = START) {
121 packet EnhancedSupervisoryFrame : StandardFrame {
125 packet EnhancedInformationFrame : StandardFrame {
130 packet EnhancedInformationStartFrame : EnhancedInformationFrame (sar = START) {
157 packet ExtendedSupervisoryFrame : StandardFrame {
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/dhcp/
DDhcpPacketTest.java178 ByteBuffer packet = new TestDhcpPacket(DHCP_MESSAGE_TYPE_OFFER) in assertDomainAndVendorInfoParses() local
182 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP, in assertDomainAndVendorInfoParses()
224 ByteBuffer packet = testPacket.build(); in assertLeaseTimeParses() local
229 offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP, in assertLeaseTimeParses()
237 offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP, in assertLeaseTimeParses()
280 ByteBuffer packet = new TestDhcpPacket(type, clientIp, yourIp) in checkIpAddress() local
283 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_BOOTP, in checkIpAddress()
347 final ByteBuffer packet = ByteBuffer.wrap(HexDump.hexStringToByteArray( in testOffer1() local
369 DhcpPacket offerPacket = DhcpPacket.decodeFullPacket(packet, ENCAP_L3, in testOffer1()
380 final ByteBuffer packet = ByteBuffer.wrap(HexDump.hexStringToByteArray( in testOffer2() local
[all …]
/packages/modules/NetworkStack/tests/unit/src/android/net/util/
DConnectivityPacketSummaryTest.java50 final String packet = in testParseICMPv6DADProbe() local
67 assertEquals(expected, getSummary(packet)); in testParseICMPv6DADProbe()
72 final String packet = in testParseICMPv6RS() local
89 assertEquals(expected, getSummary(packet)); in testParseICMPv6RS()
94 final String packet = in testParseICMPv6RA() local
122 assertEquals(expected, getSummary(packet)); in testParseICMPv6RA()
127 final String packet = in testParseICMPv6NS() local
145 assertEquals(expected, getSummary(packet)); in testParseICMPv6NS()
150 final String packet = in testInvalidICMPv6NDLength() local
170 assertEquals(expected, getSummary(packet)); in testInvalidICMPv6NDLength()
[all …]
/packages/modules/Bluetooth/android/pandora/test/a2dp/packets/
Davdtp.pdl163 packet SignalingPacket {
172 packet DiscoverCommand : SignalingPacket (message_type = COMMAND, signal_identifier = AVDTP_DISCOVE…
175 packet DiscoverResponse : SignalingPacket (message_type = RESPONSE_ACCEPT, signal_identifier = AVDT…
179 packet DiscoverReject : SignalingPacket (message_type = RESPONSE_REJECT, signal_identifier = AVDTP_…
183 packet GetCapabilitiesCommand : SignalingPacket (message_type = COMMAND, signal_identifier = AVDTP_…
188 packet GetCapabilitiesResponse : SignalingPacket (message_type = RESPONSE_ACCEPT, signal_identifier…
192 packet GetCapabilitiesReject : SignalingPacket (message_type = RESPONSE_REJECT, signal_identifier =…
196 packet GetAllCapabilitiesCommand : SignalingPacket (message_type = COMMAND, signal_identifier = AVD…
201 packet GetAllCapabilitiesResponse : SignalingPacket (message_type = RESPONSE_ACCEPT, signal_identif…
205 packet GetAllCapabilitiesReject : SignalingPacket (message_type = RESPONSE_REJECT, signal_identifie…
[all …]
/packages/modules/Bluetooth/tools/rootcanal/rust/src/lmp/
Dmanager.rs51 fn ingest_lmp(&self, packet: lmp::LmpPacket) { in ingest_lmp()
52 self.lmp.borrow_mut().push_back(packet); in ingest_lmp()
72 let packet = queue.front().and_then(|packet| packet.clone().try_into().ok()); in poll_lmp_packet() localVariable
74 if let Some(packet) = packet { in poll_lmp_packet()
76 Poll::Ready(packet) in poll_lmp_packet()
120 packet: lmp::LmpPacket, in ingest_lmp()
123 link.ingest_lmp(packet); in ingest_lmp()
140 LinkKeyRequestReply(packet) => hci::LinkKeyRequestReplyCompleteBuilder { in send_command_complete_event()
142 bd_addr: packet.get_bd_addr(), in send_command_complete_event()
146 LinkKeyRequestNegativeReply(packet) => { in send_command_complete_event()
[all …]
/packages/modules/Bluetooth/system/gd/hal/
Dhci_hal_android.cc82 void hciEventReceived(const std::vector<uint8_t>& packet) override { in hciEventReceived() argument
83 common::StopWatch stop_watch(GetTimerText(__func__, packet)); in hciEventReceived()
84 link_clocker_->OnHciEvent(packet); in hciEventReceived()
85 btsnoop_logger_->Capture(packet, SnoopLogger::Direction::INCOMING, in hciEventReceived()
89 callback_->hciEventReceived(packet); in hciEventReceived()
93 void aclDataReceived(const std::vector<uint8_t>& packet) override { in aclDataReceived() argument
94 common::StopWatch stop_watch(GetTimerText(__func__, packet)); in aclDataReceived()
95 btsnoop_logger_->Capture(packet, SnoopLogger::Direction::INCOMING, in aclDataReceived()
99 callback_->aclDataReceived(packet); in aclDataReceived()
103 void scoDataReceived(const std::vector<uint8_t>& packet) override { in scoDataReceived() argument
[all …]
/packages/modules/adb/
Dtransport_benchmark.cpp67 … server->SetReadCallback([&received_bytes](Connection*, std::unique_ptr<apacket> packet) -> bool { in BM_Connection_Unidirectional() argument
68 received_bytes += packet->payload.size(); in BM_Connection_Unidirectional()
82 std::unique_ptr<apacket> packet = std::make_unique<apacket>(); in BM_Connection_Unidirectional() local
83 memset(&packet->msg, 0, sizeof(packet->msg)); in BM_Connection_Unidirectional()
84 packet->msg.command = A_WRTE; in BM_Connection_Unidirectional()
85 packet->msg.data_length = data_size; in BM_Connection_Unidirectional()
86 packet->payload.resize(data_size); in BM_Connection_Unidirectional()
88 memset(&packet->payload[0], 0xff, data_size); in BM_Connection_Unidirectional()
91 client->Write(std::move(packet)); in BM_Connection_Unidirectional()
124 … client->SetReadCallback([&received_bytes](Connection*, std::unique_ptr<apacket> packet) -> bool { in BM_Connection_Echo() argument
[all …]

12345678910>>...19