/packages/modules/Bluetooth/tools/rootcanal/rust/src/lmp/procedure/ |
D | secure_simple_pairing.rs | 20 use crate::lmp::ec::{DhKey, PrivateKey, PublicKey}; 21 use crate::lmp::procedure::{authentication, features, Context}; 22 use crate::packets::{hci, lmp}; 98 lmp::EncapsulatedHeaderBuilder { in send_public_key() 112 lmp::EncapsulatedPayloadBuilder { transaction_id, data: chunk.try_into().unwrap() } in send_public_key() 121 ctx.receive_lmp_packet::<lmp::EncapsulatedHeader>().await.get_payload_length().into(); in receive_public_key() 125 lmp::AcceptedBuilder { transaction_id, accepted_opcode: lmp::Opcode::EncapsulatedHeader } in receive_public_key() 129 let payload = ctx.receive_lmp_packet::<lmp::EncapsulatedPayload>().await; in receive_public_key() 132 lmp::AcceptedBuilder { in receive_public_key() 134 accepted_opcode: lmp::Opcode::EncapsulatedPayload, in receive_public_key() [all …]
|
D | encryption.rs | 18 use crate::lmp::procedure::Context; 20 use crate::packets::{hci, lmp}; 39 lmp::EncryptionModeReqBuilder { transaction_id: 0, encryption_mode: 0x1 }.build(), in initiate() 46 lmp::EncryptionKeySizeReqBuilder { transaction_id: 0, key_size: 16 }.build(), in initiate() 53 lmp::StartEncryptionReqBuilder { transaction_id: 0, random_number: [0; 16] }.build(), in initiate() 76 let _ = ctx.receive_lmp_packet::<lmp::EncryptionModeReq>().await; in respond() 78 lmp::AcceptedBuilder { transaction_id: 0, accepted_opcode: lmp::Opcode::EncryptionModeReq } in respond() 82 let _ = ctx.receive_lmp_packet::<lmp::EncryptionKeySizeReq>().await; in respond() 84 lmp::AcceptedBuilder { in respond() 86 accepted_opcode: lmp::Opcode::EncryptionKeySizeReq, in respond() [all …]
|
D | authentication.rs | 18 use crate::lmp::procedure::features; 19 use crate::lmp::procedure::legacy_pairing; 20 use crate::lmp::procedure::secure_simple_pairing; 21 use crate::lmp::procedure::Context; 23 use crate::packets::{hci, lmp}; 31 ctx.send_lmp_packet(lmp::AuRandBuilder { transaction_id, random_number }.build()); 33 match ctx.receive_lmp_packet::<Either<lmp::Sres, lmp::NotAccepted>>().await { 40 let _random_number = *ctx.receive_lmp_packet::<lmp::AuRand>().await.get_random_number(); 41 ctx.send_lmp_packet(lmp::SresBuilder { transaction_id: 0, authentication_rsp: [0; 4] }.build()); 106 .receive_lmp_packet::<Either<lmp::AuRand, Either<lmp::IoCapabilityReq, lmp::InRand>>>() in respond() [all …]
|
D | legacy_pairing.rs | 17 use crate::lmp::procedure::{authentication, Context}; 18 use crate::packets::{hci, lmp}; 39 lmp::InRandBuilder { transaction_id: 0, random_number: [0; 16] }.build(), in initiate() 43 ctx.send_lmp_packet(lmp::CombKeyBuilder { transaction_id: 0, random_number: [0; 16] }.build()); in initiate() 45 let _ = ctx.receive_lmp_packet::<lmp::CombKey>().await; in initiate() 67 pub async fn respond(ctx: &impl Context, _request: lmp::InRand) -> Result<(), ()> { in respond() 82 lmp::AcceptedBuilder { transaction_id: 0, accepted_opcode: lmp::Opcode::InRand }.build(), in respond() 85 let _ = ctx.receive_lmp_packet::<lmp::CombKey>().await; in respond() 87 ctx.send_lmp_packet(lmp::CombKeyBuilder { transaction_id: 0, random_number: [0; 16] }.build()); in respond()
|
D | features.rs | 17 use crate::lmp::procedure::Context; 18 use crate::packets::lmp; 22 lmp::FeaturesReqExtBuilder { in initiate() 32 *ctx.receive_lmp_packet::<lmp::FeaturesResExt>().await.get_extended_features(), in initiate() 37 let req = ctx.receive_lmp_packet::<lmp::FeaturesReqExt>().await; in respond() 41 lmp::FeaturesResExtBuilder { in respond() 58 crate::lmp::procedure::features::initiate(ctx, page_number).await in supported_on_both_page()
|
D | mod.rs | 20 use crate::lmp::ec::PrivateKey; 21 use crate::packets::{hci, lmp}; 25 fn poll_lmp_packet<P: TryFrom<lmp::LmpPacket>>(&self) -> Poll<P>; in poll_lmp_packet() 28 fn send_lmp_packet<P: Into<lmp::LmpPacket>>(&self, packet: P); in send_lmp_packet() 43 fn receive_lmp_packet<P: TryFrom<lmp::LmpPacket>>(&self) -> ReceiveFuture<'_, Self, P> { in receive_lmp_packet() 47 fn send_accepted_lmp_packet<P: Into<lmp::LmpPacket>>( in send_accepted_lmp_packet() 81 pub struct SendAcceptedLmpPacketFuture<'a, C: ?Sized>(&'a C, lmp::Opcode); 90 let accepted = self.0.poll_lmp_packet::<lmp::Accepted>(); in poll() 97 let not_accepted = self.0.poll_lmp_packet::<lmp::NotAccepted>(); in poll()
|
/packages/modules/Bluetooth/tools/rootcanal/rust/src/lmp/ |
D | manager.rs | 28 use crate::lmp::procedure; 30 use crate::packets::{hci, lmp}; 37 lmp: RefCell<VecDeque<lmp::LmpPacket>>, field 45 lmp: Default::default(), in default() 51 fn ingest_lmp(&self, packet: lmp::LmpPacket) { in ingest_lmp() 52 self.lmp.borrow_mut().push_back(packet); in ingest_lmp() 70 fn poll_lmp_packet<P: TryFrom<lmp::LmpPacket>>(&self) -> Poll<P> { in poll_lmp_packet() 71 let mut queue = self.lmp.borrow_mut(); in poll_lmp_packet() 85 self.lmp.borrow_mut().clear(); in reset() 120 packet: lmp::LmpPacket, in ingest_lmp() [all …]
|
D | ec.rs | 418 use crate::lmp::ec::*;
|
/packages/modules/Bluetooth/tools/rootcanal/rust/src/lmp/test/ |
D | context.rs | 22 use crate::lmp::ec::PrivateKey; 23 use crate::packets::{hci, lmp}; 25 use crate::lmp::procedure::Context; 29 pub in_lmp_packets: RefCell<VecDeque<lmp::LmpPacket>>, 30 pub out_lmp_packets: RefCell<VecDeque<lmp::LmpPacket>>, 79 fn poll_lmp_packet<P: TryFrom<lmp::LmpPacket>>(&self) -> Poll<P> { in poll_lmp_packet() 95 fn send_lmp_packet<P: Into<lmp::LmpPacket>>(&self, packet: P) { in send_lmp_packet()
|
D | sequence.rs | 20 use crate::packets::lmp::*; 29 let poll = crate::lmp::test::poll($ctx.1.as_mut()); 49 let poll = crate::lmp::test::poll($ctx.1.as_mut()); 78 use crate::packets::lmp::*; 128 use crate::lmp::test::sequence_body;
|
/packages/modules/Bluetooth/tools/rootcanal/rust/src/ |
D | either.rs | 17 use crate::packets::{hci, lmp}; 48 impl_try_from!(lmp::LmpPacket);
|
D | ffi.rs | 24 use crate::lmp::manager::LinkManager; 25 use crate::packets::{hci, llcp, lmp}; 193 if let Ok(packet) = lmp::LmpPacket::parse(data) {
|
D | lib.rs | 21 mod lmp; module
|
D | packets.rs | 94 pub mod lmp { module
|
/packages/modules/Bluetooth/tools/rootcanal/rust/ |
D | CMakeLists.txt | 39 # Enable lmp in rootcanal.
|