wlan_sme/ap/
authenticator.rs
1use fidl_fuchsia_wlan_mlme::EapolResultCode;
6use wlan_rsn::rsna::UpdateSink;
7use wlan_rsn::{Error, NegotiatedProtection};
8
9pub trait Authenticator: std::fmt::Debug + std::marker::Send {
11 fn get_negotiated_protection(&self) -> &NegotiatedProtection;
12 fn reset(&mut self);
13 #[allow(clippy::result_large_err)] fn initiate(&mut self, update_sink: &mut UpdateSink) -> Result<(), Error>;
15 #[allow(clippy::result_large_err)] fn on_eapol_frame(
17 &mut self,
18 update_sink: &mut UpdateSink,
19 frame: eapol::Frame<&[u8]>,
20 ) -> Result<(), Error>;
21 #[allow(clippy::result_large_err)] fn on_eapol_conf(
23 &mut self,
24 update_sink: &mut UpdateSink,
25 result: EapolResultCode,
26 ) -> Result<(), Error>;
27}
28
29impl Authenticator for wlan_rsn::Authenticator {
30 fn get_negotiated_protection(&self) -> &NegotiatedProtection {
31 wlan_rsn::Authenticator::get_negotiated_protection(self)
32 }
33
34 fn reset(&mut self) {
35 wlan_rsn::Authenticator::reset(self)
36 }
37
38 fn initiate(&mut self, update_sink: &mut UpdateSink) -> Result<(), Error> {
39 wlan_rsn::Authenticator::initiate(self, update_sink)
40 }
41
42 fn on_eapol_frame(
43 &mut self,
44 update_sink: &mut UpdateSink,
45 frame: eapol::Frame<&[u8]>,
46 ) -> Result<(), Error> {
47 wlan_rsn::Authenticator::on_eapol_frame(self, update_sink, frame)
48 }
49
50 fn on_eapol_conf(
51 &mut self,
52 update_sink: &mut UpdateSink,
53 result: EapolResultCode,
54 ) -> Result<(), Error> {
55 wlan_rsn::Authenticator::on_eapol_conf(self, update_sink, result)
56 }
57}