1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_net_test_realm__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
15pub struct ControllerMarker;
16
17impl fidl::endpoints::ProtocolMarker for ControllerMarker {
18 type Proxy = ControllerProxy;
19 type RequestStream = ControllerRequestStream;
20 #[cfg(target_os = "fuchsia")]
21 type SynchronousProxy = ControllerSynchronousProxy;
22
23 const DEBUG_NAME: &'static str = "fuchsia.net.test.realm.Controller";
24}
25impl fidl::endpoints::DiscoverableProtocolMarker for ControllerMarker {}
26pub type ControllerStartHermeticNetworkRealmResult = Result<(), Error>;
27pub type ControllerStopHermeticNetworkRealmResult = Result<(), Error>;
28pub type ControllerAddInterfaceResult = Result<(), Error>;
29pub type ControllerStartStubResult = Result<(), Error>;
30pub type ControllerStopStubResult = Result<(), Error>;
31pub type ControllerPingResult = Result<(), Error>;
32pub type ControllerPollUdpResult = Result<Vec<u8>, Error>;
33pub type ControllerJoinMulticastGroupResult = Result<(), Error>;
34pub type ControllerLeaveMulticastGroupResult = Result<(), Error>;
35pub type ControllerStartDhcpv6ClientResult = Result<(), Error>;
36pub type ControllerStopDhcpv6ClientResult = Result<(), Error>;
37pub type ControllerStartOutOfStackDhcpv4ClientResult = Result<(), Error>;
38pub type ControllerStopOutOfStackDhcpv4ClientResult = Result<(), Error>;
39
40pub trait ControllerProxyInterface: Send + Sync {
41 type StartHermeticNetworkRealmResponseFut: std::future::Future<Output = Result<ControllerStartHermeticNetworkRealmResult, fidl::Error>>
42 + Send;
43 fn r#start_hermetic_network_realm(
44 &self,
45 netstack: Netstack,
46 ) -> Self::StartHermeticNetworkRealmResponseFut;
47 type StopHermeticNetworkRealmResponseFut: std::future::Future<Output = Result<ControllerStopHermeticNetworkRealmResult, fidl::Error>>
48 + Send;
49 fn r#stop_hermetic_network_realm(&self) -> Self::StopHermeticNetworkRealmResponseFut;
50 type AddInterfaceResponseFut: std::future::Future<Output = Result<ControllerAddInterfaceResult, fidl::Error>>
51 + Send;
52 fn r#add_interface(
53 &self,
54 mac_address: &fidl_fuchsia_net::MacAddress,
55 name: &str,
56 wait_any_ip_address: bool,
57 ) -> Self::AddInterfaceResponseFut;
58 type StartStubResponseFut: std::future::Future<Output = Result<ControllerStartStubResult, fidl::Error>>
59 + Send;
60 fn r#start_stub(&self, component_url: &str) -> Self::StartStubResponseFut;
61 type StopStubResponseFut: std::future::Future<Output = Result<ControllerStopStubResult, fidl::Error>>
62 + Send;
63 fn r#stop_stub(&self) -> Self::StopStubResponseFut;
64 type PingResponseFut: std::future::Future<Output = Result<ControllerPingResult, fidl::Error>>
65 + Send;
66 fn r#ping(
67 &self,
68 target: &fidl_fuchsia_net::IpAddress,
69 payload_length: u16,
70 interface_name: Option<&str>,
71 timeout: i64,
72 ) -> Self::PingResponseFut;
73 type PollUdpResponseFut: std::future::Future<Output = Result<ControllerPollUdpResult, fidl::Error>>
74 + Send;
75 fn r#poll_udp(
76 &self,
77 target: &fidl_fuchsia_net::SocketAddress,
78 payload: &[u8],
79 timeout: i64,
80 num_retries: u16,
81 ) -> Self::PollUdpResponseFut;
82 type JoinMulticastGroupResponseFut: std::future::Future<Output = Result<ControllerJoinMulticastGroupResult, fidl::Error>>
83 + Send;
84 fn r#join_multicast_group(
85 &self,
86 address: &fidl_fuchsia_net::IpAddress,
87 interface_id: u64,
88 ) -> Self::JoinMulticastGroupResponseFut;
89 type LeaveMulticastGroupResponseFut: std::future::Future<Output = Result<ControllerLeaveMulticastGroupResult, fidl::Error>>
90 + Send;
91 fn r#leave_multicast_group(
92 &self,
93 address: &fidl_fuchsia_net::IpAddress,
94 interface_id: u64,
95 ) -> Self::LeaveMulticastGroupResponseFut;
96 type StartDhcpv6ClientResponseFut: std::future::Future<Output = Result<ControllerStartDhcpv6ClientResult, fidl::Error>>
97 + Send;
98 fn r#start_dhcpv6_client(
99 &self,
100 params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
101 ) -> Self::StartDhcpv6ClientResponseFut;
102 type StopDhcpv6ClientResponseFut: std::future::Future<Output = Result<ControllerStopDhcpv6ClientResult, fidl::Error>>
103 + Send;
104 fn r#stop_dhcpv6_client(&self) -> Self::StopDhcpv6ClientResponseFut;
105 type StartOutOfStackDhcpv4ClientResponseFut: std::future::Future<
106 Output = Result<ControllerStartOutOfStackDhcpv4ClientResult, fidl::Error>,
107 > + Send;
108 fn r#start_out_of_stack_dhcpv4_client(
109 &self,
110 payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
111 ) -> Self::StartOutOfStackDhcpv4ClientResponseFut;
112 type StopOutOfStackDhcpv4ClientResponseFut: std::future::Future<
113 Output = Result<ControllerStopOutOfStackDhcpv4ClientResult, fidl::Error>,
114 > + Send;
115 fn r#stop_out_of_stack_dhcpv4_client(
116 &self,
117 payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
118 ) -> Self::StopOutOfStackDhcpv4ClientResponseFut;
119}
120#[derive(Debug)]
121#[cfg(target_os = "fuchsia")]
122pub struct ControllerSynchronousProxy {
123 client: fidl::client::sync::Client,
124}
125
126#[cfg(target_os = "fuchsia")]
127impl fidl::endpoints::SynchronousProxy for ControllerSynchronousProxy {
128 type Proxy = ControllerProxy;
129 type Protocol = ControllerMarker;
130
131 fn from_channel(inner: fidl::Channel) -> Self {
132 Self::new(inner)
133 }
134
135 fn into_channel(self) -> fidl::Channel {
136 self.client.into_channel()
137 }
138
139 fn as_channel(&self) -> &fidl::Channel {
140 self.client.as_channel()
141 }
142}
143
144#[cfg(target_os = "fuchsia")]
145impl ControllerSynchronousProxy {
146 pub fn new(channel: fidl::Channel) -> Self {
147 Self { client: fidl::client::sync::Client::new(channel) }
148 }
149
150 pub fn into_channel(self) -> fidl::Channel {
151 self.client.into_channel()
152 }
153
154 pub fn wait_for_event(
157 &self,
158 deadline: zx::MonotonicInstant,
159 ) -> Result<ControllerEvent, fidl::Error> {
160 ControllerEvent::decode(self.client.wait_for_event::<ControllerMarker>(deadline)?)
161 }
162
163 pub fn r#start_hermetic_network_realm(
179 &self,
180 mut netstack: Netstack,
181 ___deadline: zx::MonotonicInstant,
182 ) -> Result<ControllerStartHermeticNetworkRealmResult, fidl::Error> {
183 let _response = self.client.send_query::<
184 ControllerStartHermeticNetworkRealmRequest,
185 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
186 ControllerMarker,
187 >(
188 (netstack,),
189 0x58c1fa7335d4c5c2,
190 fidl::encoding::DynamicFlags::empty(),
191 ___deadline,
192 )?;
193 Ok(_response.map(|x| x))
194 }
195
196 pub fn r#stop_hermetic_network_realm(
205 &self,
206 ___deadline: zx::MonotonicInstant,
207 ) -> Result<ControllerStopHermeticNetworkRealmResult, fidl::Error> {
208 let _response = self.client.send_query::<
209 fidl::encoding::EmptyPayload,
210 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
211 ControllerMarker,
212 >(
213 (),
214 0x49d3c2501cd2f635,
215 fidl::encoding::DynamicFlags::empty(),
216 ___deadline,
217 )?;
218 Ok(_response.map(|x| x))
219 }
220
221 pub fn r#add_interface(
243 &self,
244 mut mac_address: &fidl_fuchsia_net::MacAddress,
245 mut name: &str,
246 mut wait_any_ip_address: bool,
247 ___deadline: zx::MonotonicInstant,
248 ) -> Result<ControllerAddInterfaceResult, fidl::Error> {
249 let _response = self.client.send_query::<
250 ControllerAddInterfaceRequest,
251 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
252 ControllerMarker,
253 >(
254 (mac_address, name, wait_any_ip_address,),
255 0x668ded2d2b619c15,
256 fidl::encoding::DynamicFlags::empty(),
257 ___deadline,
258 )?;
259 Ok(_response.map(|x| x))
260 }
261
262 pub fn r#start_stub(
276 &self,
277 mut component_url: &str,
278 ___deadline: zx::MonotonicInstant,
279 ) -> Result<ControllerStartStubResult, fidl::Error> {
280 let _response = self.client.send_query::<
281 ControllerStartStubRequest,
282 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
283 ControllerMarker,
284 >(
285 (component_url,),
286 0x6523a401f22bf664,
287 fidl::encoding::DynamicFlags::empty(),
288 ___deadline,
289 )?;
290 Ok(_response.map(|x| x))
291 }
292
293 pub fn r#stop_stub(
304 &self,
305 ___deadline: zx::MonotonicInstant,
306 ) -> Result<ControllerStopStubResult, fidl::Error> {
307 let _response = self.client.send_query::<
308 fidl::encoding::EmptyPayload,
309 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
310 ControllerMarker,
311 >(
312 (),
313 0x582c32b564ff4bb4,
314 fidl::encoding::DynamicFlags::empty(),
315 ___deadline,
316 )?;
317 Ok(_response.map(|x| x))
318 }
319
320 pub fn r#ping(
345 &self,
346 mut target: &fidl_fuchsia_net::IpAddress,
347 mut payload_length: u16,
348 mut interface_name: Option<&str>,
349 mut timeout: i64,
350 ___deadline: zx::MonotonicInstant,
351 ) -> Result<ControllerPingResult, fidl::Error> {
352 let _response = self.client.send_query::<
353 ControllerPingRequest,
354 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
355 ControllerMarker,
356 >(
357 (target, payload_length, interface_name, timeout,),
358 0x60c9b6cf952fa4d1,
359 fidl::encoding::DynamicFlags::empty(),
360 ___deadline,
361 )?;
362 Ok(_response.map(|x| x))
363 }
364
365 pub fn r#poll_udp(
384 &self,
385 mut target: &fidl_fuchsia_net::SocketAddress,
386 mut payload: &[u8],
387 mut timeout: i64,
388 mut num_retries: u16,
389 ___deadline: zx::MonotonicInstant,
390 ) -> Result<ControllerPollUdpResult, fidl::Error> {
391 let _response = self.client.send_query::<
392 ControllerPollUdpRequest,
393 fidl::encoding::ResultType<ControllerPollUdpResponse, Error>,
394 ControllerMarker,
395 >(
396 (target, payload, timeout, num_retries,),
397 0x333fb354db30f664,
398 fidl::encoding::DynamicFlags::empty(),
399 ___deadline,
400 )?;
401 Ok(_response.map(|x| x.payload))
402 }
403
404 pub fn r#join_multicast_group(
421 &self,
422 mut address: &fidl_fuchsia_net::IpAddress,
423 mut interface_id: u64,
424 ___deadline: zx::MonotonicInstant,
425 ) -> Result<ControllerJoinMulticastGroupResult, fidl::Error> {
426 let _response = self.client.send_query::<
427 ControllerJoinMulticastGroupRequest,
428 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
429 ControllerMarker,
430 >(
431 (address, interface_id,),
432 0xbdbb4095640a3f4,
433 fidl::encoding::DynamicFlags::empty(),
434 ___deadline,
435 )?;
436 Ok(_response.map(|x| x))
437 }
438
439 pub fn r#leave_multicast_group(
455 &self,
456 mut address: &fidl_fuchsia_net::IpAddress,
457 mut interface_id: u64,
458 ___deadline: zx::MonotonicInstant,
459 ) -> Result<ControllerLeaveMulticastGroupResult, fidl::Error> {
460 let _response = self.client.send_query::<
461 ControllerLeaveMulticastGroupRequest,
462 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
463 ControllerMarker,
464 >(
465 (address, interface_id,),
466 0x32ecf4e40124a29a,
467 fidl::encoding::DynamicFlags::empty(),
468 ___deadline,
469 )?;
470 Ok(_response.map(|x| x))
471 }
472
473 pub fn r#start_dhcpv6_client(
485 &self,
486 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
487 ___deadline: zx::MonotonicInstant,
488 ) -> Result<ControllerStartDhcpv6ClientResult, fidl::Error> {
489 let _response = self.client.send_query::<
490 ControllerStartDhcpv6ClientRequest,
491 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
492 ControllerMarker,
493 >(
494 (params,),
495 0x756c9b70864b7744,
496 fidl::encoding::DynamicFlags::empty(),
497 ___deadline,
498 )?;
499 Ok(_response.map(|x| x))
500 }
501
502 pub fn r#stop_dhcpv6_client(
506 &self,
507 ___deadline: zx::MonotonicInstant,
508 ) -> Result<ControllerStopDhcpv6ClientResult, fidl::Error> {
509 let _response = self.client.send_query::<
510 fidl::encoding::EmptyPayload,
511 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
512 ControllerMarker,
513 >(
514 (),
515 0x16e93478e663d523,
516 fidl::encoding::DynamicFlags::empty(),
517 ___deadline,
518 )?;
519 Ok(_response.map(|x| x))
520 }
521
522 pub fn r#start_out_of_stack_dhcpv4_client(
527 &self,
528 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
529 ___deadline: zx::MonotonicInstant,
530 ) -> Result<ControllerStartOutOfStackDhcpv4ClientResult, fidl::Error> {
531 let _response = self.client.send_query::<
532 ControllerStartOutOfStackDhcpv4ClientRequest,
533 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
534 ControllerMarker,
535 >(
536 payload,
537 0x37eeec41c0077625,
538 fidl::encoding::DynamicFlags::empty(),
539 ___deadline,
540 )?;
541 Ok(_response.map(|x| x))
542 }
543
544 pub fn r#stop_out_of_stack_dhcpv4_client(
552 &self,
553 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
554 ___deadline: zx::MonotonicInstant,
555 ) -> Result<ControllerStopOutOfStackDhcpv4ClientResult, fidl::Error> {
556 let _response = self.client.send_query::<
557 ControllerStopOutOfStackDhcpv4ClientRequest,
558 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
559 ControllerMarker,
560 >(
561 payload,
562 0x5d47aa5213164364,
563 fidl::encoding::DynamicFlags::empty(),
564 ___deadline,
565 )?;
566 Ok(_response.map(|x| x))
567 }
568}
569
570#[cfg(target_os = "fuchsia")]
571impl From<ControllerSynchronousProxy> for zx::NullableHandle {
572 fn from(value: ControllerSynchronousProxy) -> Self {
573 value.into_channel().into()
574 }
575}
576
577#[cfg(target_os = "fuchsia")]
578impl From<fidl::Channel> for ControllerSynchronousProxy {
579 fn from(value: fidl::Channel) -> Self {
580 Self::new(value)
581 }
582}
583
584#[cfg(target_os = "fuchsia")]
585impl fidl::endpoints::FromClient for ControllerSynchronousProxy {
586 type Protocol = ControllerMarker;
587
588 fn from_client(value: fidl::endpoints::ClientEnd<ControllerMarker>) -> Self {
589 Self::new(value.into_channel())
590 }
591}
592
593#[derive(Debug, Clone)]
594pub struct ControllerProxy {
595 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
596}
597
598impl fidl::endpoints::Proxy for ControllerProxy {
599 type Protocol = ControllerMarker;
600
601 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
602 Self::new(inner)
603 }
604
605 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
606 self.client.into_channel().map_err(|client| Self { client })
607 }
608
609 fn as_channel(&self) -> &::fidl::AsyncChannel {
610 self.client.as_channel()
611 }
612}
613
614impl ControllerProxy {
615 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
617 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
618 Self { client: fidl::client::Client::new(channel, protocol_name) }
619 }
620
621 pub fn take_event_stream(&self) -> ControllerEventStream {
627 ControllerEventStream { event_receiver: self.client.take_event_receiver() }
628 }
629
630 pub fn r#start_hermetic_network_realm(
646 &self,
647 mut netstack: Netstack,
648 ) -> fidl::client::QueryResponseFut<
649 ControllerStartHermeticNetworkRealmResult,
650 fidl::encoding::DefaultFuchsiaResourceDialect,
651 > {
652 ControllerProxyInterface::r#start_hermetic_network_realm(self, netstack)
653 }
654
655 pub fn r#stop_hermetic_network_realm(
664 &self,
665 ) -> fidl::client::QueryResponseFut<
666 ControllerStopHermeticNetworkRealmResult,
667 fidl::encoding::DefaultFuchsiaResourceDialect,
668 > {
669 ControllerProxyInterface::r#stop_hermetic_network_realm(self)
670 }
671
672 pub fn r#add_interface(
694 &self,
695 mut mac_address: &fidl_fuchsia_net::MacAddress,
696 mut name: &str,
697 mut wait_any_ip_address: bool,
698 ) -> fidl::client::QueryResponseFut<
699 ControllerAddInterfaceResult,
700 fidl::encoding::DefaultFuchsiaResourceDialect,
701 > {
702 ControllerProxyInterface::r#add_interface(self, mac_address, name, wait_any_ip_address)
703 }
704
705 pub fn r#start_stub(
719 &self,
720 mut component_url: &str,
721 ) -> fidl::client::QueryResponseFut<
722 ControllerStartStubResult,
723 fidl::encoding::DefaultFuchsiaResourceDialect,
724 > {
725 ControllerProxyInterface::r#start_stub(self, component_url)
726 }
727
728 pub fn r#stop_stub(
739 &self,
740 ) -> fidl::client::QueryResponseFut<
741 ControllerStopStubResult,
742 fidl::encoding::DefaultFuchsiaResourceDialect,
743 > {
744 ControllerProxyInterface::r#stop_stub(self)
745 }
746
747 pub fn r#ping(
772 &self,
773 mut target: &fidl_fuchsia_net::IpAddress,
774 mut payload_length: u16,
775 mut interface_name: Option<&str>,
776 mut timeout: i64,
777 ) -> fidl::client::QueryResponseFut<
778 ControllerPingResult,
779 fidl::encoding::DefaultFuchsiaResourceDialect,
780 > {
781 ControllerProxyInterface::r#ping(self, target, payload_length, interface_name, timeout)
782 }
783
784 pub fn r#poll_udp(
803 &self,
804 mut target: &fidl_fuchsia_net::SocketAddress,
805 mut payload: &[u8],
806 mut timeout: i64,
807 mut num_retries: u16,
808 ) -> fidl::client::QueryResponseFut<
809 ControllerPollUdpResult,
810 fidl::encoding::DefaultFuchsiaResourceDialect,
811 > {
812 ControllerProxyInterface::r#poll_udp(self, target, payload, timeout, num_retries)
813 }
814
815 pub fn r#join_multicast_group(
832 &self,
833 mut address: &fidl_fuchsia_net::IpAddress,
834 mut interface_id: u64,
835 ) -> fidl::client::QueryResponseFut<
836 ControllerJoinMulticastGroupResult,
837 fidl::encoding::DefaultFuchsiaResourceDialect,
838 > {
839 ControllerProxyInterface::r#join_multicast_group(self, address, interface_id)
840 }
841
842 pub fn r#leave_multicast_group(
858 &self,
859 mut address: &fidl_fuchsia_net::IpAddress,
860 mut interface_id: u64,
861 ) -> fidl::client::QueryResponseFut<
862 ControllerLeaveMulticastGroupResult,
863 fidl::encoding::DefaultFuchsiaResourceDialect,
864 > {
865 ControllerProxyInterface::r#leave_multicast_group(self, address, interface_id)
866 }
867
868 pub fn r#start_dhcpv6_client(
880 &self,
881 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
882 ) -> fidl::client::QueryResponseFut<
883 ControllerStartDhcpv6ClientResult,
884 fidl::encoding::DefaultFuchsiaResourceDialect,
885 > {
886 ControllerProxyInterface::r#start_dhcpv6_client(self, params)
887 }
888
889 pub fn r#stop_dhcpv6_client(
893 &self,
894 ) -> fidl::client::QueryResponseFut<
895 ControllerStopDhcpv6ClientResult,
896 fidl::encoding::DefaultFuchsiaResourceDialect,
897 > {
898 ControllerProxyInterface::r#stop_dhcpv6_client(self)
899 }
900
901 pub fn r#start_out_of_stack_dhcpv4_client(
906 &self,
907 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
908 ) -> fidl::client::QueryResponseFut<
909 ControllerStartOutOfStackDhcpv4ClientResult,
910 fidl::encoding::DefaultFuchsiaResourceDialect,
911 > {
912 ControllerProxyInterface::r#start_out_of_stack_dhcpv4_client(self, payload)
913 }
914
915 pub fn r#stop_out_of_stack_dhcpv4_client(
923 &self,
924 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
925 ) -> fidl::client::QueryResponseFut<
926 ControllerStopOutOfStackDhcpv4ClientResult,
927 fidl::encoding::DefaultFuchsiaResourceDialect,
928 > {
929 ControllerProxyInterface::r#stop_out_of_stack_dhcpv4_client(self, payload)
930 }
931}
932
933impl ControllerProxyInterface for ControllerProxy {
934 type StartHermeticNetworkRealmResponseFut = fidl::client::QueryResponseFut<
935 ControllerStartHermeticNetworkRealmResult,
936 fidl::encoding::DefaultFuchsiaResourceDialect,
937 >;
938 fn r#start_hermetic_network_realm(
939 &self,
940 mut netstack: Netstack,
941 ) -> Self::StartHermeticNetworkRealmResponseFut {
942 fn _decode(
943 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
944 ) -> Result<ControllerStartHermeticNetworkRealmResult, fidl::Error> {
945 let _response = fidl::client::decode_transaction_body::<
946 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
947 fidl::encoding::DefaultFuchsiaResourceDialect,
948 0x58c1fa7335d4c5c2,
949 >(_buf?)?;
950 Ok(_response.map(|x| x))
951 }
952 self.client.send_query_and_decode::<
953 ControllerStartHermeticNetworkRealmRequest,
954 ControllerStartHermeticNetworkRealmResult,
955 >(
956 (netstack,),
957 0x58c1fa7335d4c5c2,
958 fidl::encoding::DynamicFlags::empty(),
959 _decode,
960 )
961 }
962
963 type StopHermeticNetworkRealmResponseFut = fidl::client::QueryResponseFut<
964 ControllerStopHermeticNetworkRealmResult,
965 fidl::encoding::DefaultFuchsiaResourceDialect,
966 >;
967 fn r#stop_hermetic_network_realm(&self) -> Self::StopHermeticNetworkRealmResponseFut {
968 fn _decode(
969 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
970 ) -> Result<ControllerStopHermeticNetworkRealmResult, fidl::Error> {
971 let _response = fidl::client::decode_transaction_body::<
972 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
973 fidl::encoding::DefaultFuchsiaResourceDialect,
974 0x49d3c2501cd2f635,
975 >(_buf?)?;
976 Ok(_response.map(|x| x))
977 }
978 self.client.send_query_and_decode::<
979 fidl::encoding::EmptyPayload,
980 ControllerStopHermeticNetworkRealmResult,
981 >(
982 (),
983 0x49d3c2501cd2f635,
984 fidl::encoding::DynamicFlags::empty(),
985 _decode,
986 )
987 }
988
989 type AddInterfaceResponseFut = fidl::client::QueryResponseFut<
990 ControllerAddInterfaceResult,
991 fidl::encoding::DefaultFuchsiaResourceDialect,
992 >;
993 fn r#add_interface(
994 &self,
995 mut mac_address: &fidl_fuchsia_net::MacAddress,
996 mut name: &str,
997 mut wait_any_ip_address: bool,
998 ) -> Self::AddInterfaceResponseFut {
999 fn _decode(
1000 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1001 ) -> Result<ControllerAddInterfaceResult, fidl::Error> {
1002 let _response = fidl::client::decode_transaction_body::<
1003 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1004 fidl::encoding::DefaultFuchsiaResourceDialect,
1005 0x668ded2d2b619c15,
1006 >(_buf?)?;
1007 Ok(_response.map(|x| x))
1008 }
1009 self.client
1010 .send_query_and_decode::<ControllerAddInterfaceRequest, ControllerAddInterfaceResult>(
1011 (mac_address, name, wait_any_ip_address),
1012 0x668ded2d2b619c15,
1013 fidl::encoding::DynamicFlags::empty(),
1014 _decode,
1015 )
1016 }
1017
1018 type StartStubResponseFut = fidl::client::QueryResponseFut<
1019 ControllerStartStubResult,
1020 fidl::encoding::DefaultFuchsiaResourceDialect,
1021 >;
1022 fn r#start_stub(&self, mut component_url: &str) -> Self::StartStubResponseFut {
1023 fn _decode(
1024 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1025 ) -> Result<ControllerStartStubResult, fidl::Error> {
1026 let _response = fidl::client::decode_transaction_body::<
1027 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1028 fidl::encoding::DefaultFuchsiaResourceDialect,
1029 0x6523a401f22bf664,
1030 >(_buf?)?;
1031 Ok(_response.map(|x| x))
1032 }
1033 self.client.send_query_and_decode::<ControllerStartStubRequest, ControllerStartStubResult>(
1034 (component_url,),
1035 0x6523a401f22bf664,
1036 fidl::encoding::DynamicFlags::empty(),
1037 _decode,
1038 )
1039 }
1040
1041 type StopStubResponseFut = fidl::client::QueryResponseFut<
1042 ControllerStopStubResult,
1043 fidl::encoding::DefaultFuchsiaResourceDialect,
1044 >;
1045 fn r#stop_stub(&self) -> Self::StopStubResponseFut {
1046 fn _decode(
1047 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1048 ) -> Result<ControllerStopStubResult, fidl::Error> {
1049 let _response = fidl::client::decode_transaction_body::<
1050 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1051 fidl::encoding::DefaultFuchsiaResourceDialect,
1052 0x582c32b564ff4bb4,
1053 >(_buf?)?;
1054 Ok(_response.map(|x| x))
1055 }
1056 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerStopStubResult>(
1057 (),
1058 0x582c32b564ff4bb4,
1059 fidl::encoding::DynamicFlags::empty(),
1060 _decode,
1061 )
1062 }
1063
1064 type PingResponseFut = fidl::client::QueryResponseFut<
1065 ControllerPingResult,
1066 fidl::encoding::DefaultFuchsiaResourceDialect,
1067 >;
1068 fn r#ping(
1069 &self,
1070 mut target: &fidl_fuchsia_net::IpAddress,
1071 mut payload_length: u16,
1072 mut interface_name: Option<&str>,
1073 mut timeout: i64,
1074 ) -> Self::PingResponseFut {
1075 fn _decode(
1076 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1077 ) -> Result<ControllerPingResult, fidl::Error> {
1078 let _response = fidl::client::decode_transaction_body::<
1079 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1080 fidl::encoding::DefaultFuchsiaResourceDialect,
1081 0x60c9b6cf952fa4d1,
1082 >(_buf?)?;
1083 Ok(_response.map(|x| x))
1084 }
1085 self.client.send_query_and_decode::<ControllerPingRequest, ControllerPingResult>(
1086 (target, payload_length, interface_name, timeout),
1087 0x60c9b6cf952fa4d1,
1088 fidl::encoding::DynamicFlags::empty(),
1089 _decode,
1090 )
1091 }
1092
1093 type PollUdpResponseFut = fidl::client::QueryResponseFut<
1094 ControllerPollUdpResult,
1095 fidl::encoding::DefaultFuchsiaResourceDialect,
1096 >;
1097 fn r#poll_udp(
1098 &self,
1099 mut target: &fidl_fuchsia_net::SocketAddress,
1100 mut payload: &[u8],
1101 mut timeout: i64,
1102 mut num_retries: u16,
1103 ) -> Self::PollUdpResponseFut {
1104 fn _decode(
1105 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1106 ) -> Result<ControllerPollUdpResult, fidl::Error> {
1107 let _response = fidl::client::decode_transaction_body::<
1108 fidl::encoding::ResultType<ControllerPollUdpResponse, Error>,
1109 fidl::encoding::DefaultFuchsiaResourceDialect,
1110 0x333fb354db30f664,
1111 >(_buf?)?;
1112 Ok(_response.map(|x| x.payload))
1113 }
1114 self.client.send_query_and_decode::<ControllerPollUdpRequest, ControllerPollUdpResult>(
1115 (target, payload, timeout, num_retries),
1116 0x333fb354db30f664,
1117 fidl::encoding::DynamicFlags::empty(),
1118 _decode,
1119 )
1120 }
1121
1122 type JoinMulticastGroupResponseFut = fidl::client::QueryResponseFut<
1123 ControllerJoinMulticastGroupResult,
1124 fidl::encoding::DefaultFuchsiaResourceDialect,
1125 >;
1126 fn r#join_multicast_group(
1127 &self,
1128 mut address: &fidl_fuchsia_net::IpAddress,
1129 mut interface_id: u64,
1130 ) -> Self::JoinMulticastGroupResponseFut {
1131 fn _decode(
1132 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1133 ) -> Result<ControllerJoinMulticastGroupResult, fidl::Error> {
1134 let _response = fidl::client::decode_transaction_body::<
1135 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1136 fidl::encoding::DefaultFuchsiaResourceDialect,
1137 0xbdbb4095640a3f4,
1138 >(_buf?)?;
1139 Ok(_response.map(|x| x))
1140 }
1141 self.client.send_query_and_decode::<
1142 ControllerJoinMulticastGroupRequest,
1143 ControllerJoinMulticastGroupResult,
1144 >(
1145 (address, interface_id,),
1146 0xbdbb4095640a3f4,
1147 fidl::encoding::DynamicFlags::empty(),
1148 _decode,
1149 )
1150 }
1151
1152 type LeaveMulticastGroupResponseFut = fidl::client::QueryResponseFut<
1153 ControllerLeaveMulticastGroupResult,
1154 fidl::encoding::DefaultFuchsiaResourceDialect,
1155 >;
1156 fn r#leave_multicast_group(
1157 &self,
1158 mut address: &fidl_fuchsia_net::IpAddress,
1159 mut interface_id: u64,
1160 ) -> Self::LeaveMulticastGroupResponseFut {
1161 fn _decode(
1162 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1163 ) -> Result<ControllerLeaveMulticastGroupResult, fidl::Error> {
1164 let _response = fidl::client::decode_transaction_body::<
1165 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1166 fidl::encoding::DefaultFuchsiaResourceDialect,
1167 0x32ecf4e40124a29a,
1168 >(_buf?)?;
1169 Ok(_response.map(|x| x))
1170 }
1171 self.client.send_query_and_decode::<
1172 ControllerLeaveMulticastGroupRequest,
1173 ControllerLeaveMulticastGroupResult,
1174 >(
1175 (address, interface_id,),
1176 0x32ecf4e40124a29a,
1177 fidl::encoding::DynamicFlags::empty(),
1178 _decode,
1179 )
1180 }
1181
1182 type StartDhcpv6ClientResponseFut = fidl::client::QueryResponseFut<
1183 ControllerStartDhcpv6ClientResult,
1184 fidl::encoding::DefaultFuchsiaResourceDialect,
1185 >;
1186 fn r#start_dhcpv6_client(
1187 &self,
1188 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
1189 ) -> Self::StartDhcpv6ClientResponseFut {
1190 fn _decode(
1191 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1192 ) -> Result<ControllerStartDhcpv6ClientResult, fidl::Error> {
1193 let _response = fidl::client::decode_transaction_body::<
1194 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1195 fidl::encoding::DefaultFuchsiaResourceDialect,
1196 0x756c9b70864b7744,
1197 >(_buf?)?;
1198 Ok(_response.map(|x| x))
1199 }
1200 self.client.send_query_and_decode::<
1201 ControllerStartDhcpv6ClientRequest,
1202 ControllerStartDhcpv6ClientResult,
1203 >(
1204 (params,),
1205 0x756c9b70864b7744,
1206 fidl::encoding::DynamicFlags::empty(),
1207 _decode,
1208 )
1209 }
1210
1211 type StopDhcpv6ClientResponseFut = fidl::client::QueryResponseFut<
1212 ControllerStopDhcpv6ClientResult,
1213 fidl::encoding::DefaultFuchsiaResourceDialect,
1214 >;
1215 fn r#stop_dhcpv6_client(&self) -> Self::StopDhcpv6ClientResponseFut {
1216 fn _decode(
1217 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1218 ) -> Result<ControllerStopDhcpv6ClientResult, fidl::Error> {
1219 let _response = fidl::client::decode_transaction_body::<
1220 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1221 fidl::encoding::DefaultFuchsiaResourceDialect,
1222 0x16e93478e663d523,
1223 >(_buf?)?;
1224 Ok(_response.map(|x| x))
1225 }
1226 self.client.send_query_and_decode::<
1227 fidl::encoding::EmptyPayload,
1228 ControllerStopDhcpv6ClientResult,
1229 >(
1230 (),
1231 0x16e93478e663d523,
1232 fidl::encoding::DynamicFlags::empty(),
1233 _decode,
1234 )
1235 }
1236
1237 type StartOutOfStackDhcpv4ClientResponseFut = fidl::client::QueryResponseFut<
1238 ControllerStartOutOfStackDhcpv4ClientResult,
1239 fidl::encoding::DefaultFuchsiaResourceDialect,
1240 >;
1241 fn r#start_out_of_stack_dhcpv4_client(
1242 &self,
1243 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
1244 ) -> Self::StartOutOfStackDhcpv4ClientResponseFut {
1245 fn _decode(
1246 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1247 ) -> Result<ControllerStartOutOfStackDhcpv4ClientResult, fidl::Error> {
1248 let _response = fidl::client::decode_transaction_body::<
1249 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1250 fidl::encoding::DefaultFuchsiaResourceDialect,
1251 0x37eeec41c0077625,
1252 >(_buf?)?;
1253 Ok(_response.map(|x| x))
1254 }
1255 self.client.send_query_and_decode::<
1256 ControllerStartOutOfStackDhcpv4ClientRequest,
1257 ControllerStartOutOfStackDhcpv4ClientResult,
1258 >(
1259 payload,
1260 0x37eeec41c0077625,
1261 fidl::encoding::DynamicFlags::empty(),
1262 _decode,
1263 )
1264 }
1265
1266 type StopOutOfStackDhcpv4ClientResponseFut = fidl::client::QueryResponseFut<
1267 ControllerStopOutOfStackDhcpv4ClientResult,
1268 fidl::encoding::DefaultFuchsiaResourceDialect,
1269 >;
1270 fn r#stop_out_of_stack_dhcpv4_client(
1271 &self,
1272 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
1273 ) -> Self::StopOutOfStackDhcpv4ClientResponseFut {
1274 fn _decode(
1275 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1276 ) -> Result<ControllerStopOutOfStackDhcpv4ClientResult, fidl::Error> {
1277 let _response = fidl::client::decode_transaction_body::<
1278 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1279 fidl::encoding::DefaultFuchsiaResourceDialect,
1280 0x5d47aa5213164364,
1281 >(_buf?)?;
1282 Ok(_response.map(|x| x))
1283 }
1284 self.client.send_query_and_decode::<
1285 ControllerStopOutOfStackDhcpv4ClientRequest,
1286 ControllerStopOutOfStackDhcpv4ClientResult,
1287 >(
1288 payload,
1289 0x5d47aa5213164364,
1290 fidl::encoding::DynamicFlags::empty(),
1291 _decode,
1292 )
1293 }
1294}
1295
1296pub struct ControllerEventStream {
1297 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1298}
1299
1300impl std::marker::Unpin for ControllerEventStream {}
1301
1302impl futures::stream::FusedStream for ControllerEventStream {
1303 fn is_terminated(&self) -> bool {
1304 self.event_receiver.is_terminated()
1305 }
1306}
1307
1308impl futures::Stream for ControllerEventStream {
1309 type Item = Result<ControllerEvent, fidl::Error>;
1310
1311 fn poll_next(
1312 mut self: std::pin::Pin<&mut Self>,
1313 cx: &mut std::task::Context<'_>,
1314 ) -> std::task::Poll<Option<Self::Item>> {
1315 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1316 &mut self.event_receiver,
1317 cx
1318 )?) {
1319 Some(buf) => std::task::Poll::Ready(Some(ControllerEvent::decode(buf))),
1320 None => std::task::Poll::Ready(None),
1321 }
1322 }
1323}
1324
1325#[derive(Debug)]
1326pub enum ControllerEvent {}
1327
1328impl ControllerEvent {
1329 fn decode(
1331 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1332 ) -> Result<ControllerEvent, fidl::Error> {
1333 let (bytes, _handles) = buf.split_mut();
1334 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1335 debug_assert_eq!(tx_header.tx_id, 0);
1336 match tx_header.ordinal {
1337 _ => Err(fidl::Error::UnknownOrdinal {
1338 ordinal: tx_header.ordinal,
1339 protocol_name: <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1340 }),
1341 }
1342 }
1343}
1344
1345pub struct ControllerRequestStream {
1347 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1348 is_terminated: bool,
1349}
1350
1351impl std::marker::Unpin for ControllerRequestStream {}
1352
1353impl futures::stream::FusedStream for ControllerRequestStream {
1354 fn is_terminated(&self) -> bool {
1355 self.is_terminated
1356 }
1357}
1358
1359impl fidl::endpoints::RequestStream for ControllerRequestStream {
1360 type Protocol = ControllerMarker;
1361 type ControlHandle = ControllerControlHandle;
1362
1363 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1364 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1365 }
1366
1367 fn control_handle(&self) -> Self::ControlHandle {
1368 ControllerControlHandle { inner: self.inner.clone() }
1369 }
1370
1371 fn into_inner(
1372 self,
1373 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1374 {
1375 (self.inner, self.is_terminated)
1376 }
1377
1378 fn from_inner(
1379 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1380 is_terminated: bool,
1381 ) -> Self {
1382 Self { inner, is_terminated }
1383 }
1384}
1385
1386impl futures::Stream for ControllerRequestStream {
1387 type Item = Result<ControllerRequest, fidl::Error>;
1388
1389 fn poll_next(
1390 mut self: std::pin::Pin<&mut Self>,
1391 cx: &mut std::task::Context<'_>,
1392 ) -> std::task::Poll<Option<Self::Item>> {
1393 let this = &mut *self;
1394 if this.inner.check_shutdown(cx) {
1395 this.is_terminated = true;
1396 return std::task::Poll::Ready(None);
1397 }
1398 if this.is_terminated {
1399 panic!("polled ControllerRequestStream after completion");
1400 }
1401 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1402 |bytes, handles| {
1403 match this.inner.channel().read_etc(cx, bytes, handles) {
1404 std::task::Poll::Ready(Ok(())) => {}
1405 std::task::Poll::Pending => return std::task::Poll::Pending,
1406 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1407 this.is_terminated = true;
1408 return std::task::Poll::Ready(None);
1409 }
1410 std::task::Poll::Ready(Err(e)) => {
1411 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1412 e.into(),
1413 ))));
1414 }
1415 }
1416
1417 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1419
1420 std::task::Poll::Ready(Some(match header.ordinal {
1421 0x58c1fa7335d4c5c2 => {
1422 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1423 let mut req = fidl::new_empty!(
1424 ControllerStartHermeticNetworkRealmRequest,
1425 fidl::encoding::DefaultFuchsiaResourceDialect
1426 );
1427 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartHermeticNetworkRealmRequest>(&header, _body_bytes, handles, &mut req)?;
1428 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1429 Ok(ControllerRequest::StartHermeticNetworkRealm {
1430 netstack: req.netstack,
1431
1432 responder: ControllerStartHermeticNetworkRealmResponder {
1433 control_handle: std::mem::ManuallyDrop::new(control_handle),
1434 tx_id: header.tx_id,
1435 },
1436 })
1437 }
1438 0x49d3c2501cd2f635 => {
1439 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1440 let mut req = fidl::new_empty!(
1441 fidl::encoding::EmptyPayload,
1442 fidl::encoding::DefaultFuchsiaResourceDialect
1443 );
1444 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1445 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1446 Ok(ControllerRequest::StopHermeticNetworkRealm {
1447 responder: ControllerStopHermeticNetworkRealmResponder {
1448 control_handle: std::mem::ManuallyDrop::new(control_handle),
1449 tx_id: header.tx_id,
1450 },
1451 })
1452 }
1453 0x668ded2d2b619c15 => {
1454 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1455 let mut req = fidl::new_empty!(
1456 ControllerAddInterfaceRequest,
1457 fidl::encoding::DefaultFuchsiaResourceDialect
1458 );
1459 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerAddInterfaceRequest>(&header, _body_bytes, handles, &mut req)?;
1460 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1461 Ok(ControllerRequest::AddInterface {
1462 mac_address: req.mac_address,
1463 name: req.name,
1464 wait_any_ip_address: req.wait_any_ip_address,
1465
1466 responder: ControllerAddInterfaceResponder {
1467 control_handle: std::mem::ManuallyDrop::new(control_handle),
1468 tx_id: header.tx_id,
1469 },
1470 })
1471 }
1472 0x6523a401f22bf664 => {
1473 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1474 let mut req = fidl::new_empty!(
1475 ControllerStartStubRequest,
1476 fidl::encoding::DefaultFuchsiaResourceDialect
1477 );
1478 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartStubRequest>(&header, _body_bytes, handles, &mut req)?;
1479 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1480 Ok(ControllerRequest::StartStub {
1481 component_url: req.component_url,
1482
1483 responder: ControllerStartStubResponder {
1484 control_handle: std::mem::ManuallyDrop::new(control_handle),
1485 tx_id: header.tx_id,
1486 },
1487 })
1488 }
1489 0x582c32b564ff4bb4 => {
1490 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1491 let mut req = fidl::new_empty!(
1492 fidl::encoding::EmptyPayload,
1493 fidl::encoding::DefaultFuchsiaResourceDialect
1494 );
1495 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1496 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1497 Ok(ControllerRequest::StopStub {
1498 responder: ControllerStopStubResponder {
1499 control_handle: std::mem::ManuallyDrop::new(control_handle),
1500 tx_id: header.tx_id,
1501 },
1502 })
1503 }
1504 0x60c9b6cf952fa4d1 => {
1505 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1506 let mut req = fidl::new_empty!(
1507 ControllerPingRequest,
1508 fidl::encoding::DefaultFuchsiaResourceDialect
1509 );
1510 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerPingRequest>(&header, _body_bytes, handles, &mut req)?;
1511 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1512 Ok(ControllerRequest::Ping {
1513 target: req.target,
1514 payload_length: req.payload_length,
1515 interface_name: req.interface_name,
1516 timeout: req.timeout,
1517
1518 responder: ControllerPingResponder {
1519 control_handle: std::mem::ManuallyDrop::new(control_handle),
1520 tx_id: header.tx_id,
1521 },
1522 })
1523 }
1524 0x333fb354db30f664 => {
1525 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1526 let mut req = fidl::new_empty!(
1527 ControllerPollUdpRequest,
1528 fidl::encoding::DefaultFuchsiaResourceDialect
1529 );
1530 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerPollUdpRequest>(&header, _body_bytes, handles, &mut req)?;
1531 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1532 Ok(ControllerRequest::PollUdp {
1533 target: req.target,
1534 payload: req.payload,
1535 timeout: req.timeout,
1536 num_retries: req.num_retries,
1537
1538 responder: ControllerPollUdpResponder {
1539 control_handle: std::mem::ManuallyDrop::new(control_handle),
1540 tx_id: header.tx_id,
1541 },
1542 })
1543 }
1544 0xbdbb4095640a3f4 => {
1545 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1546 let mut req = fidl::new_empty!(
1547 ControllerJoinMulticastGroupRequest,
1548 fidl::encoding::DefaultFuchsiaResourceDialect
1549 );
1550 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerJoinMulticastGroupRequest>(&header, _body_bytes, handles, &mut req)?;
1551 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1552 Ok(ControllerRequest::JoinMulticastGroup {
1553 address: req.address,
1554 interface_id: req.interface_id,
1555
1556 responder: ControllerJoinMulticastGroupResponder {
1557 control_handle: std::mem::ManuallyDrop::new(control_handle),
1558 tx_id: header.tx_id,
1559 },
1560 })
1561 }
1562 0x32ecf4e40124a29a => {
1563 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1564 let mut req = fidl::new_empty!(
1565 ControllerLeaveMulticastGroupRequest,
1566 fidl::encoding::DefaultFuchsiaResourceDialect
1567 );
1568 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerLeaveMulticastGroupRequest>(&header, _body_bytes, handles, &mut req)?;
1569 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1570 Ok(ControllerRequest::LeaveMulticastGroup {
1571 address: req.address,
1572 interface_id: req.interface_id,
1573
1574 responder: ControllerLeaveMulticastGroupResponder {
1575 control_handle: std::mem::ManuallyDrop::new(control_handle),
1576 tx_id: header.tx_id,
1577 },
1578 })
1579 }
1580 0x756c9b70864b7744 => {
1581 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1582 let mut req = fidl::new_empty!(
1583 ControllerStartDhcpv6ClientRequest,
1584 fidl::encoding::DefaultFuchsiaResourceDialect
1585 );
1586 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartDhcpv6ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1587 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1588 Ok(ControllerRequest::StartDhcpv6Client {
1589 params: req.params,
1590
1591 responder: ControllerStartDhcpv6ClientResponder {
1592 control_handle: std::mem::ManuallyDrop::new(control_handle),
1593 tx_id: header.tx_id,
1594 },
1595 })
1596 }
1597 0x16e93478e663d523 => {
1598 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1599 let mut req = fidl::new_empty!(
1600 fidl::encoding::EmptyPayload,
1601 fidl::encoding::DefaultFuchsiaResourceDialect
1602 );
1603 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1604 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1605 Ok(ControllerRequest::StopDhcpv6Client {
1606 responder: ControllerStopDhcpv6ClientResponder {
1607 control_handle: std::mem::ManuallyDrop::new(control_handle),
1608 tx_id: header.tx_id,
1609 },
1610 })
1611 }
1612 0x37eeec41c0077625 => {
1613 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1614 let mut req = fidl::new_empty!(
1615 ControllerStartOutOfStackDhcpv4ClientRequest,
1616 fidl::encoding::DefaultFuchsiaResourceDialect
1617 );
1618 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartOutOfStackDhcpv4ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1619 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1620 Ok(ControllerRequest::StartOutOfStackDhcpv4Client {
1621 payload: req,
1622 responder: ControllerStartOutOfStackDhcpv4ClientResponder {
1623 control_handle: std::mem::ManuallyDrop::new(control_handle),
1624 tx_id: header.tx_id,
1625 },
1626 })
1627 }
1628 0x5d47aa5213164364 => {
1629 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1630 let mut req = fidl::new_empty!(
1631 ControllerStopOutOfStackDhcpv4ClientRequest,
1632 fidl::encoding::DefaultFuchsiaResourceDialect
1633 );
1634 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStopOutOfStackDhcpv4ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1635 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1636 Ok(ControllerRequest::StopOutOfStackDhcpv4Client {
1637 payload: req,
1638 responder: ControllerStopOutOfStackDhcpv4ClientResponder {
1639 control_handle: std::mem::ManuallyDrop::new(control_handle),
1640 tx_id: header.tx_id,
1641 },
1642 })
1643 }
1644 _ => Err(fidl::Error::UnknownOrdinal {
1645 ordinal: header.ordinal,
1646 protocol_name:
1647 <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1648 }),
1649 }))
1650 },
1651 )
1652 }
1653}
1654
1655#[derive(Debug)]
1666pub enum ControllerRequest {
1667 StartHermeticNetworkRealm {
1683 netstack: Netstack,
1684 responder: ControllerStartHermeticNetworkRealmResponder,
1685 },
1686 StopHermeticNetworkRealm { responder: ControllerStopHermeticNetworkRealmResponder },
1695 AddInterface {
1717 mac_address: fidl_fuchsia_net::MacAddress,
1718 name: String,
1719 wait_any_ip_address: bool,
1720 responder: ControllerAddInterfaceResponder,
1721 },
1722 StartStub { component_url: String, responder: ControllerStartStubResponder },
1736 StopStub { responder: ControllerStopStubResponder },
1747 Ping {
1772 target: fidl_fuchsia_net::IpAddress,
1773 payload_length: u16,
1774 interface_name: Option<String>,
1775 timeout: i64,
1776 responder: ControllerPingResponder,
1777 },
1778 PollUdp {
1797 target: fidl_fuchsia_net::SocketAddress,
1798 payload: Vec<u8>,
1799 timeout: i64,
1800 num_retries: u16,
1801 responder: ControllerPollUdpResponder,
1802 },
1803 JoinMulticastGroup {
1820 address: fidl_fuchsia_net::IpAddress,
1821 interface_id: u64,
1822 responder: ControllerJoinMulticastGroupResponder,
1823 },
1824 LeaveMulticastGroup {
1840 address: fidl_fuchsia_net::IpAddress,
1841 interface_id: u64,
1842 responder: ControllerLeaveMulticastGroupResponder,
1843 },
1844 StartDhcpv6Client {
1856 params: fidl_fuchsia_net_dhcpv6::NewClientParams,
1857 responder: ControllerStartDhcpv6ClientResponder,
1858 },
1859 StopDhcpv6Client { responder: ControllerStopDhcpv6ClientResponder },
1863 StartOutOfStackDhcpv4Client {
1868 payload: ControllerStartOutOfStackDhcpv4ClientRequest,
1869 responder: ControllerStartOutOfStackDhcpv4ClientResponder,
1870 },
1871 StopOutOfStackDhcpv4Client {
1879 payload: ControllerStopOutOfStackDhcpv4ClientRequest,
1880 responder: ControllerStopOutOfStackDhcpv4ClientResponder,
1881 },
1882}
1883
1884impl ControllerRequest {
1885 #[allow(irrefutable_let_patterns)]
1886 pub fn into_start_hermetic_network_realm(
1887 self,
1888 ) -> Option<(Netstack, ControllerStartHermeticNetworkRealmResponder)> {
1889 if let ControllerRequest::StartHermeticNetworkRealm { netstack, responder } = self {
1890 Some((netstack, responder))
1891 } else {
1892 None
1893 }
1894 }
1895
1896 #[allow(irrefutable_let_patterns)]
1897 pub fn into_stop_hermetic_network_realm(
1898 self,
1899 ) -> Option<(ControllerStopHermeticNetworkRealmResponder)> {
1900 if let ControllerRequest::StopHermeticNetworkRealm { responder } = self {
1901 Some((responder))
1902 } else {
1903 None
1904 }
1905 }
1906
1907 #[allow(irrefutable_let_patterns)]
1908 pub fn into_add_interface(
1909 self,
1910 ) -> Option<(fidl_fuchsia_net::MacAddress, String, bool, ControllerAddInterfaceResponder)> {
1911 if let ControllerRequest::AddInterface {
1912 mac_address,
1913 name,
1914 wait_any_ip_address,
1915 responder,
1916 } = self
1917 {
1918 Some((mac_address, name, wait_any_ip_address, responder))
1919 } else {
1920 None
1921 }
1922 }
1923
1924 #[allow(irrefutable_let_patterns)]
1925 pub fn into_start_stub(self) -> Option<(String, ControllerStartStubResponder)> {
1926 if let ControllerRequest::StartStub { component_url, responder } = self {
1927 Some((component_url, responder))
1928 } else {
1929 None
1930 }
1931 }
1932
1933 #[allow(irrefutable_let_patterns)]
1934 pub fn into_stop_stub(self) -> Option<(ControllerStopStubResponder)> {
1935 if let ControllerRequest::StopStub { responder } = self { Some((responder)) } else { None }
1936 }
1937
1938 #[allow(irrefutable_let_patterns)]
1939 pub fn into_ping(
1940 self,
1941 ) -> Option<(fidl_fuchsia_net::IpAddress, u16, Option<String>, i64, ControllerPingResponder)>
1942 {
1943 if let ControllerRequest::Ping {
1944 target,
1945 payload_length,
1946 interface_name,
1947 timeout,
1948 responder,
1949 } = self
1950 {
1951 Some((target, payload_length, interface_name, timeout, responder))
1952 } else {
1953 None
1954 }
1955 }
1956
1957 #[allow(irrefutable_let_patterns)]
1958 pub fn into_poll_udp(
1959 self,
1960 ) -> Option<(fidl_fuchsia_net::SocketAddress, Vec<u8>, i64, u16, ControllerPollUdpResponder)>
1961 {
1962 if let ControllerRequest::PollUdp { target, payload, timeout, num_retries, responder } =
1963 self
1964 {
1965 Some((target, payload, timeout, num_retries, responder))
1966 } else {
1967 None
1968 }
1969 }
1970
1971 #[allow(irrefutable_let_patterns)]
1972 pub fn into_join_multicast_group(
1973 self,
1974 ) -> Option<(fidl_fuchsia_net::IpAddress, u64, ControllerJoinMulticastGroupResponder)> {
1975 if let ControllerRequest::JoinMulticastGroup { address, interface_id, responder } = self {
1976 Some((address, interface_id, responder))
1977 } else {
1978 None
1979 }
1980 }
1981
1982 #[allow(irrefutable_let_patterns)]
1983 pub fn into_leave_multicast_group(
1984 self,
1985 ) -> Option<(fidl_fuchsia_net::IpAddress, u64, ControllerLeaveMulticastGroupResponder)> {
1986 if let ControllerRequest::LeaveMulticastGroup { address, interface_id, responder } = self {
1987 Some((address, interface_id, responder))
1988 } else {
1989 None
1990 }
1991 }
1992
1993 #[allow(irrefutable_let_patterns)]
1994 pub fn into_start_dhcpv6_client(
1995 self,
1996 ) -> Option<(fidl_fuchsia_net_dhcpv6::NewClientParams, ControllerStartDhcpv6ClientResponder)>
1997 {
1998 if let ControllerRequest::StartDhcpv6Client { params, responder } = self {
1999 Some((params, responder))
2000 } else {
2001 None
2002 }
2003 }
2004
2005 #[allow(irrefutable_let_patterns)]
2006 pub fn into_stop_dhcpv6_client(self) -> Option<(ControllerStopDhcpv6ClientResponder)> {
2007 if let ControllerRequest::StopDhcpv6Client { responder } = self {
2008 Some((responder))
2009 } else {
2010 None
2011 }
2012 }
2013
2014 #[allow(irrefutable_let_patterns)]
2015 pub fn into_start_out_of_stack_dhcpv4_client(
2016 self,
2017 ) -> Option<(
2018 ControllerStartOutOfStackDhcpv4ClientRequest,
2019 ControllerStartOutOfStackDhcpv4ClientResponder,
2020 )> {
2021 if let ControllerRequest::StartOutOfStackDhcpv4Client { payload, responder } = self {
2022 Some((payload, responder))
2023 } else {
2024 None
2025 }
2026 }
2027
2028 #[allow(irrefutable_let_patterns)]
2029 pub fn into_stop_out_of_stack_dhcpv4_client(
2030 self,
2031 ) -> Option<(
2032 ControllerStopOutOfStackDhcpv4ClientRequest,
2033 ControllerStopOutOfStackDhcpv4ClientResponder,
2034 )> {
2035 if let ControllerRequest::StopOutOfStackDhcpv4Client { payload, responder } = self {
2036 Some((payload, responder))
2037 } else {
2038 None
2039 }
2040 }
2041
2042 pub fn method_name(&self) -> &'static str {
2044 match *self {
2045 ControllerRequest::StartHermeticNetworkRealm { .. } => "start_hermetic_network_realm",
2046 ControllerRequest::StopHermeticNetworkRealm { .. } => "stop_hermetic_network_realm",
2047 ControllerRequest::AddInterface { .. } => "add_interface",
2048 ControllerRequest::StartStub { .. } => "start_stub",
2049 ControllerRequest::StopStub { .. } => "stop_stub",
2050 ControllerRequest::Ping { .. } => "ping",
2051 ControllerRequest::PollUdp { .. } => "poll_udp",
2052 ControllerRequest::JoinMulticastGroup { .. } => "join_multicast_group",
2053 ControllerRequest::LeaveMulticastGroup { .. } => "leave_multicast_group",
2054 ControllerRequest::StartDhcpv6Client { .. } => "start_dhcpv6_client",
2055 ControllerRequest::StopDhcpv6Client { .. } => "stop_dhcpv6_client",
2056 ControllerRequest::StartOutOfStackDhcpv4Client { .. } => {
2057 "start_out_of_stack_dhcpv4_client"
2058 }
2059 ControllerRequest::StopOutOfStackDhcpv4Client { .. } => {
2060 "stop_out_of_stack_dhcpv4_client"
2061 }
2062 }
2063 }
2064}
2065
2066#[derive(Debug, Clone)]
2067pub struct ControllerControlHandle {
2068 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2069}
2070
2071impl fidl::endpoints::ControlHandle for ControllerControlHandle {
2072 fn shutdown(&self) {
2073 self.inner.shutdown()
2074 }
2075
2076 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2077 self.inner.shutdown_with_epitaph(status)
2078 }
2079
2080 fn is_closed(&self) -> bool {
2081 self.inner.channel().is_closed()
2082 }
2083 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2084 self.inner.channel().on_closed()
2085 }
2086
2087 #[cfg(target_os = "fuchsia")]
2088 fn signal_peer(
2089 &self,
2090 clear_mask: zx::Signals,
2091 set_mask: zx::Signals,
2092 ) -> Result<(), zx_status::Status> {
2093 use fidl::Peered;
2094 self.inner.channel().signal_peer(clear_mask, set_mask)
2095 }
2096}
2097
2098impl ControllerControlHandle {}
2099
2100#[must_use = "FIDL methods require a response to be sent"]
2101#[derive(Debug)]
2102pub struct ControllerStartHermeticNetworkRealmResponder {
2103 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2104 tx_id: u32,
2105}
2106
2107impl std::ops::Drop for ControllerStartHermeticNetworkRealmResponder {
2111 fn drop(&mut self) {
2112 self.control_handle.shutdown();
2113 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2115 }
2116}
2117
2118impl fidl::endpoints::Responder for ControllerStartHermeticNetworkRealmResponder {
2119 type ControlHandle = ControllerControlHandle;
2120
2121 fn control_handle(&self) -> &ControllerControlHandle {
2122 &self.control_handle
2123 }
2124
2125 fn drop_without_shutdown(mut self) {
2126 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2128 std::mem::forget(self);
2130 }
2131}
2132
2133impl ControllerStartHermeticNetworkRealmResponder {
2134 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2138 let _result = self.send_raw(result);
2139 if _result.is_err() {
2140 self.control_handle.shutdown();
2141 }
2142 self.drop_without_shutdown();
2143 _result
2144 }
2145
2146 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2148 let _result = self.send_raw(result);
2149 self.drop_without_shutdown();
2150 _result
2151 }
2152
2153 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2154 self.control_handle
2155 .inner
2156 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2157 result,
2158 self.tx_id,
2159 0x58c1fa7335d4c5c2,
2160 fidl::encoding::DynamicFlags::empty(),
2161 )
2162 }
2163}
2164
2165#[must_use = "FIDL methods require a response to be sent"]
2166#[derive(Debug)]
2167pub struct ControllerStopHermeticNetworkRealmResponder {
2168 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2169 tx_id: u32,
2170}
2171
2172impl std::ops::Drop for ControllerStopHermeticNetworkRealmResponder {
2176 fn drop(&mut self) {
2177 self.control_handle.shutdown();
2178 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2180 }
2181}
2182
2183impl fidl::endpoints::Responder for ControllerStopHermeticNetworkRealmResponder {
2184 type ControlHandle = ControllerControlHandle;
2185
2186 fn control_handle(&self) -> &ControllerControlHandle {
2187 &self.control_handle
2188 }
2189
2190 fn drop_without_shutdown(mut self) {
2191 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2193 std::mem::forget(self);
2195 }
2196}
2197
2198impl ControllerStopHermeticNetworkRealmResponder {
2199 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2203 let _result = self.send_raw(result);
2204 if _result.is_err() {
2205 self.control_handle.shutdown();
2206 }
2207 self.drop_without_shutdown();
2208 _result
2209 }
2210
2211 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2213 let _result = self.send_raw(result);
2214 self.drop_without_shutdown();
2215 _result
2216 }
2217
2218 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2219 self.control_handle
2220 .inner
2221 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2222 result,
2223 self.tx_id,
2224 0x49d3c2501cd2f635,
2225 fidl::encoding::DynamicFlags::empty(),
2226 )
2227 }
2228}
2229
2230#[must_use = "FIDL methods require a response to be sent"]
2231#[derive(Debug)]
2232pub struct ControllerAddInterfaceResponder {
2233 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2234 tx_id: u32,
2235}
2236
2237impl std::ops::Drop for ControllerAddInterfaceResponder {
2241 fn drop(&mut self) {
2242 self.control_handle.shutdown();
2243 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2245 }
2246}
2247
2248impl fidl::endpoints::Responder for ControllerAddInterfaceResponder {
2249 type ControlHandle = ControllerControlHandle;
2250
2251 fn control_handle(&self) -> &ControllerControlHandle {
2252 &self.control_handle
2253 }
2254
2255 fn drop_without_shutdown(mut self) {
2256 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2258 std::mem::forget(self);
2260 }
2261}
2262
2263impl ControllerAddInterfaceResponder {
2264 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2268 let _result = self.send_raw(result);
2269 if _result.is_err() {
2270 self.control_handle.shutdown();
2271 }
2272 self.drop_without_shutdown();
2273 _result
2274 }
2275
2276 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2278 let _result = self.send_raw(result);
2279 self.drop_without_shutdown();
2280 _result
2281 }
2282
2283 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2284 self.control_handle
2285 .inner
2286 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2287 result,
2288 self.tx_id,
2289 0x668ded2d2b619c15,
2290 fidl::encoding::DynamicFlags::empty(),
2291 )
2292 }
2293}
2294
2295#[must_use = "FIDL methods require a response to be sent"]
2296#[derive(Debug)]
2297pub struct ControllerStartStubResponder {
2298 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2299 tx_id: u32,
2300}
2301
2302impl std::ops::Drop for ControllerStartStubResponder {
2306 fn drop(&mut self) {
2307 self.control_handle.shutdown();
2308 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2310 }
2311}
2312
2313impl fidl::endpoints::Responder for ControllerStartStubResponder {
2314 type ControlHandle = ControllerControlHandle;
2315
2316 fn control_handle(&self) -> &ControllerControlHandle {
2317 &self.control_handle
2318 }
2319
2320 fn drop_without_shutdown(mut self) {
2321 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2323 std::mem::forget(self);
2325 }
2326}
2327
2328impl ControllerStartStubResponder {
2329 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2333 let _result = self.send_raw(result);
2334 if _result.is_err() {
2335 self.control_handle.shutdown();
2336 }
2337 self.drop_without_shutdown();
2338 _result
2339 }
2340
2341 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2343 let _result = self.send_raw(result);
2344 self.drop_without_shutdown();
2345 _result
2346 }
2347
2348 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2349 self.control_handle
2350 .inner
2351 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2352 result,
2353 self.tx_id,
2354 0x6523a401f22bf664,
2355 fidl::encoding::DynamicFlags::empty(),
2356 )
2357 }
2358}
2359
2360#[must_use = "FIDL methods require a response to be sent"]
2361#[derive(Debug)]
2362pub struct ControllerStopStubResponder {
2363 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2364 tx_id: u32,
2365}
2366
2367impl std::ops::Drop for ControllerStopStubResponder {
2371 fn drop(&mut self) {
2372 self.control_handle.shutdown();
2373 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2375 }
2376}
2377
2378impl fidl::endpoints::Responder for ControllerStopStubResponder {
2379 type ControlHandle = ControllerControlHandle;
2380
2381 fn control_handle(&self) -> &ControllerControlHandle {
2382 &self.control_handle
2383 }
2384
2385 fn drop_without_shutdown(mut self) {
2386 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2388 std::mem::forget(self);
2390 }
2391}
2392
2393impl ControllerStopStubResponder {
2394 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2398 let _result = self.send_raw(result);
2399 if _result.is_err() {
2400 self.control_handle.shutdown();
2401 }
2402 self.drop_without_shutdown();
2403 _result
2404 }
2405
2406 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2408 let _result = self.send_raw(result);
2409 self.drop_without_shutdown();
2410 _result
2411 }
2412
2413 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2414 self.control_handle
2415 .inner
2416 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2417 result,
2418 self.tx_id,
2419 0x582c32b564ff4bb4,
2420 fidl::encoding::DynamicFlags::empty(),
2421 )
2422 }
2423}
2424
2425#[must_use = "FIDL methods require a response to be sent"]
2426#[derive(Debug)]
2427pub struct ControllerPingResponder {
2428 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2429 tx_id: u32,
2430}
2431
2432impl std::ops::Drop for ControllerPingResponder {
2436 fn drop(&mut self) {
2437 self.control_handle.shutdown();
2438 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2440 }
2441}
2442
2443impl fidl::endpoints::Responder for ControllerPingResponder {
2444 type ControlHandle = ControllerControlHandle;
2445
2446 fn control_handle(&self) -> &ControllerControlHandle {
2447 &self.control_handle
2448 }
2449
2450 fn drop_without_shutdown(mut self) {
2451 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2453 std::mem::forget(self);
2455 }
2456}
2457
2458impl ControllerPingResponder {
2459 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2463 let _result = self.send_raw(result);
2464 if _result.is_err() {
2465 self.control_handle.shutdown();
2466 }
2467 self.drop_without_shutdown();
2468 _result
2469 }
2470
2471 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2473 let _result = self.send_raw(result);
2474 self.drop_without_shutdown();
2475 _result
2476 }
2477
2478 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2479 self.control_handle
2480 .inner
2481 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2482 result,
2483 self.tx_id,
2484 0x60c9b6cf952fa4d1,
2485 fidl::encoding::DynamicFlags::empty(),
2486 )
2487 }
2488}
2489
2490#[must_use = "FIDL methods require a response to be sent"]
2491#[derive(Debug)]
2492pub struct ControllerPollUdpResponder {
2493 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2494 tx_id: u32,
2495}
2496
2497impl std::ops::Drop for ControllerPollUdpResponder {
2501 fn drop(&mut self) {
2502 self.control_handle.shutdown();
2503 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2505 }
2506}
2507
2508impl fidl::endpoints::Responder for ControllerPollUdpResponder {
2509 type ControlHandle = ControllerControlHandle;
2510
2511 fn control_handle(&self) -> &ControllerControlHandle {
2512 &self.control_handle
2513 }
2514
2515 fn drop_without_shutdown(mut self) {
2516 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2518 std::mem::forget(self);
2520 }
2521}
2522
2523impl ControllerPollUdpResponder {
2524 pub fn send(self, mut result: Result<&[u8], Error>) -> Result<(), fidl::Error> {
2528 let _result = self.send_raw(result);
2529 if _result.is_err() {
2530 self.control_handle.shutdown();
2531 }
2532 self.drop_without_shutdown();
2533 _result
2534 }
2535
2536 pub fn send_no_shutdown_on_err(
2538 self,
2539 mut result: Result<&[u8], Error>,
2540 ) -> Result<(), fidl::Error> {
2541 let _result = self.send_raw(result);
2542 self.drop_without_shutdown();
2543 _result
2544 }
2545
2546 fn send_raw(&self, mut result: Result<&[u8], Error>) -> Result<(), fidl::Error> {
2547 self.control_handle
2548 .inner
2549 .send::<fidl::encoding::ResultType<ControllerPollUdpResponse, Error>>(
2550 result.map(|payload| (payload,)),
2551 self.tx_id,
2552 0x333fb354db30f664,
2553 fidl::encoding::DynamicFlags::empty(),
2554 )
2555 }
2556}
2557
2558#[must_use = "FIDL methods require a response to be sent"]
2559#[derive(Debug)]
2560pub struct ControllerJoinMulticastGroupResponder {
2561 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2562 tx_id: u32,
2563}
2564
2565impl std::ops::Drop for ControllerJoinMulticastGroupResponder {
2569 fn drop(&mut self) {
2570 self.control_handle.shutdown();
2571 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2573 }
2574}
2575
2576impl fidl::endpoints::Responder for ControllerJoinMulticastGroupResponder {
2577 type ControlHandle = ControllerControlHandle;
2578
2579 fn control_handle(&self) -> &ControllerControlHandle {
2580 &self.control_handle
2581 }
2582
2583 fn drop_without_shutdown(mut self) {
2584 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2586 std::mem::forget(self);
2588 }
2589}
2590
2591impl ControllerJoinMulticastGroupResponder {
2592 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2596 let _result = self.send_raw(result);
2597 if _result.is_err() {
2598 self.control_handle.shutdown();
2599 }
2600 self.drop_without_shutdown();
2601 _result
2602 }
2603
2604 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2606 let _result = self.send_raw(result);
2607 self.drop_without_shutdown();
2608 _result
2609 }
2610
2611 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2612 self.control_handle
2613 .inner
2614 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2615 result,
2616 self.tx_id,
2617 0xbdbb4095640a3f4,
2618 fidl::encoding::DynamicFlags::empty(),
2619 )
2620 }
2621}
2622
2623#[must_use = "FIDL methods require a response to be sent"]
2624#[derive(Debug)]
2625pub struct ControllerLeaveMulticastGroupResponder {
2626 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2627 tx_id: u32,
2628}
2629
2630impl std::ops::Drop for ControllerLeaveMulticastGroupResponder {
2634 fn drop(&mut self) {
2635 self.control_handle.shutdown();
2636 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2638 }
2639}
2640
2641impl fidl::endpoints::Responder for ControllerLeaveMulticastGroupResponder {
2642 type ControlHandle = ControllerControlHandle;
2643
2644 fn control_handle(&self) -> &ControllerControlHandle {
2645 &self.control_handle
2646 }
2647
2648 fn drop_without_shutdown(mut self) {
2649 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2651 std::mem::forget(self);
2653 }
2654}
2655
2656impl ControllerLeaveMulticastGroupResponder {
2657 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2661 let _result = self.send_raw(result);
2662 if _result.is_err() {
2663 self.control_handle.shutdown();
2664 }
2665 self.drop_without_shutdown();
2666 _result
2667 }
2668
2669 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2671 let _result = self.send_raw(result);
2672 self.drop_without_shutdown();
2673 _result
2674 }
2675
2676 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2677 self.control_handle
2678 .inner
2679 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2680 result,
2681 self.tx_id,
2682 0x32ecf4e40124a29a,
2683 fidl::encoding::DynamicFlags::empty(),
2684 )
2685 }
2686}
2687
2688#[must_use = "FIDL methods require a response to be sent"]
2689#[derive(Debug)]
2690pub struct ControllerStartDhcpv6ClientResponder {
2691 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2692 tx_id: u32,
2693}
2694
2695impl std::ops::Drop for ControllerStartDhcpv6ClientResponder {
2699 fn drop(&mut self) {
2700 self.control_handle.shutdown();
2701 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2703 }
2704}
2705
2706impl fidl::endpoints::Responder for ControllerStartDhcpv6ClientResponder {
2707 type ControlHandle = ControllerControlHandle;
2708
2709 fn control_handle(&self) -> &ControllerControlHandle {
2710 &self.control_handle
2711 }
2712
2713 fn drop_without_shutdown(mut self) {
2714 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2716 std::mem::forget(self);
2718 }
2719}
2720
2721impl ControllerStartDhcpv6ClientResponder {
2722 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2726 let _result = self.send_raw(result);
2727 if _result.is_err() {
2728 self.control_handle.shutdown();
2729 }
2730 self.drop_without_shutdown();
2731 _result
2732 }
2733
2734 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2736 let _result = self.send_raw(result);
2737 self.drop_without_shutdown();
2738 _result
2739 }
2740
2741 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2742 self.control_handle
2743 .inner
2744 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2745 result,
2746 self.tx_id,
2747 0x756c9b70864b7744,
2748 fidl::encoding::DynamicFlags::empty(),
2749 )
2750 }
2751}
2752
2753#[must_use = "FIDL methods require a response to be sent"]
2754#[derive(Debug)]
2755pub struct ControllerStopDhcpv6ClientResponder {
2756 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2757 tx_id: u32,
2758}
2759
2760impl std::ops::Drop for ControllerStopDhcpv6ClientResponder {
2764 fn drop(&mut self) {
2765 self.control_handle.shutdown();
2766 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2768 }
2769}
2770
2771impl fidl::endpoints::Responder for ControllerStopDhcpv6ClientResponder {
2772 type ControlHandle = ControllerControlHandle;
2773
2774 fn control_handle(&self) -> &ControllerControlHandle {
2775 &self.control_handle
2776 }
2777
2778 fn drop_without_shutdown(mut self) {
2779 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2781 std::mem::forget(self);
2783 }
2784}
2785
2786impl ControllerStopDhcpv6ClientResponder {
2787 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2791 let _result = self.send_raw(result);
2792 if _result.is_err() {
2793 self.control_handle.shutdown();
2794 }
2795 self.drop_without_shutdown();
2796 _result
2797 }
2798
2799 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2801 let _result = self.send_raw(result);
2802 self.drop_without_shutdown();
2803 _result
2804 }
2805
2806 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2807 self.control_handle
2808 .inner
2809 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2810 result,
2811 self.tx_id,
2812 0x16e93478e663d523,
2813 fidl::encoding::DynamicFlags::empty(),
2814 )
2815 }
2816}
2817
2818#[must_use = "FIDL methods require a response to be sent"]
2819#[derive(Debug)]
2820pub struct ControllerStartOutOfStackDhcpv4ClientResponder {
2821 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2822 tx_id: u32,
2823}
2824
2825impl std::ops::Drop for ControllerStartOutOfStackDhcpv4ClientResponder {
2829 fn drop(&mut self) {
2830 self.control_handle.shutdown();
2831 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2833 }
2834}
2835
2836impl fidl::endpoints::Responder for ControllerStartOutOfStackDhcpv4ClientResponder {
2837 type ControlHandle = ControllerControlHandle;
2838
2839 fn control_handle(&self) -> &ControllerControlHandle {
2840 &self.control_handle
2841 }
2842
2843 fn drop_without_shutdown(mut self) {
2844 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2846 std::mem::forget(self);
2848 }
2849}
2850
2851impl ControllerStartOutOfStackDhcpv4ClientResponder {
2852 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2856 let _result = self.send_raw(result);
2857 if _result.is_err() {
2858 self.control_handle.shutdown();
2859 }
2860 self.drop_without_shutdown();
2861 _result
2862 }
2863
2864 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2866 let _result = self.send_raw(result);
2867 self.drop_without_shutdown();
2868 _result
2869 }
2870
2871 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2872 self.control_handle
2873 .inner
2874 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2875 result,
2876 self.tx_id,
2877 0x37eeec41c0077625,
2878 fidl::encoding::DynamicFlags::empty(),
2879 )
2880 }
2881}
2882
2883#[must_use = "FIDL methods require a response to be sent"]
2884#[derive(Debug)]
2885pub struct ControllerStopOutOfStackDhcpv4ClientResponder {
2886 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2887 tx_id: u32,
2888}
2889
2890impl std::ops::Drop for ControllerStopOutOfStackDhcpv4ClientResponder {
2894 fn drop(&mut self) {
2895 self.control_handle.shutdown();
2896 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2898 }
2899}
2900
2901impl fidl::endpoints::Responder for ControllerStopOutOfStackDhcpv4ClientResponder {
2902 type ControlHandle = ControllerControlHandle;
2903
2904 fn control_handle(&self) -> &ControllerControlHandle {
2905 &self.control_handle
2906 }
2907
2908 fn drop_without_shutdown(mut self) {
2909 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2911 std::mem::forget(self);
2913 }
2914}
2915
2916impl ControllerStopOutOfStackDhcpv4ClientResponder {
2917 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2921 let _result = self.send_raw(result);
2922 if _result.is_err() {
2923 self.control_handle.shutdown();
2924 }
2925 self.drop_without_shutdown();
2926 _result
2927 }
2928
2929 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2931 let _result = self.send_raw(result);
2932 self.drop_without_shutdown();
2933 _result
2934 }
2935
2936 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2937 self.control_handle
2938 .inner
2939 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2940 result,
2941 self.tx_id,
2942 0x5d47aa5213164364,
2943 fidl::encoding::DynamicFlags::empty(),
2944 )
2945 }
2946}
2947
2948mod internal {
2949 use super::*;
2950}