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 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
148 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
149 }
150
151 pub fn into_channel(self) -> fidl::Channel {
152 self.client.into_channel()
153 }
154
155 pub fn wait_for_event(
158 &self,
159 deadline: zx::MonotonicInstant,
160 ) -> Result<ControllerEvent, fidl::Error> {
161 ControllerEvent::decode(self.client.wait_for_event(deadline)?)
162 }
163
164 pub fn r#start_hermetic_network_realm(
180 &self,
181 mut netstack: Netstack,
182 ___deadline: zx::MonotonicInstant,
183 ) -> Result<ControllerStartHermeticNetworkRealmResult, fidl::Error> {
184 let _response = self.client.send_query::<
185 ControllerStartHermeticNetworkRealmRequest,
186 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
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(
209 &self,
210 ___deadline: zx::MonotonicInstant,
211 ) -> Result<ControllerStopHermeticNetworkRealmResult, fidl::Error> {
212 let _response = self.client.send_query::<
213 fidl::encoding::EmptyPayload,
214 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
215 >(
216 (),
217 0x49d3c2501cd2f635,
218 fidl::encoding::DynamicFlags::empty(),
219 ___deadline,
220 )?;
221 Ok(_response.map(|x| x))
222 }
223
224 pub fn r#add_interface(
245 &self,
246 mut mac_address: &fidl_fuchsia_net::MacAddress,
247 mut name: &str,
248 mut wait_any_ip_address: bool,
249 ___deadline: zx::MonotonicInstant,
250 ) -> Result<ControllerAddInterfaceResult, fidl::Error> {
251 let _response = self.client.send_query::<
252 ControllerAddInterfaceRequest,
253 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
254 >(
255 (mac_address, name, wait_any_ip_address,),
256 0x668ded2d2b619c15,
257 fidl::encoding::DynamicFlags::empty(),
258 ___deadline,
259 )?;
260 Ok(_response.map(|x| x))
261 }
262
263 pub fn r#start_stub(
277 &self,
278 mut component_url: &str,
279 ___deadline: zx::MonotonicInstant,
280 ) -> Result<ControllerStartStubResult, fidl::Error> {
281 let _response = self.client.send_query::<
282 ControllerStartStubRequest,
283 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
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 >(
311 (),
312 0x582c32b564ff4bb4,
313 fidl::encoding::DynamicFlags::empty(),
314 ___deadline,
315 )?;
316 Ok(_response.map(|x| x))
317 }
318
319 pub fn r#ping(
344 &self,
345 mut target: &fidl_fuchsia_net::IpAddress,
346 mut payload_length: u16,
347 mut interface_name: Option<&str>,
348 mut timeout: i64,
349 ___deadline: zx::MonotonicInstant,
350 ) -> Result<ControllerPingResult, fidl::Error> {
351 let _response = self.client.send_query::<
352 ControllerPingRequest,
353 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
354 >(
355 (target, payload_length, interface_name, timeout,),
356 0x60c9b6cf952fa4d1,
357 fidl::encoding::DynamicFlags::empty(),
358 ___deadline,
359 )?;
360 Ok(_response.map(|x| x))
361 }
362
363 pub fn r#poll_udp(
382 &self,
383 mut target: &fidl_fuchsia_net::SocketAddress,
384 mut payload: &[u8],
385 mut timeout: i64,
386 mut num_retries: u16,
387 ___deadline: zx::MonotonicInstant,
388 ) -> Result<ControllerPollUdpResult, fidl::Error> {
389 let _response = self.client.send_query::<
390 ControllerPollUdpRequest,
391 fidl::encoding::ResultType<ControllerPollUdpResponse, Error>,
392 >(
393 (target, payload, timeout, num_retries,),
394 0x333fb354db30f664,
395 fidl::encoding::DynamicFlags::empty(),
396 ___deadline,
397 )?;
398 Ok(_response.map(|x| x.payload))
399 }
400
401 pub fn r#join_multicast_group(
418 &self,
419 mut address: &fidl_fuchsia_net::IpAddress,
420 mut interface_id: u64,
421 ___deadline: zx::MonotonicInstant,
422 ) -> Result<ControllerJoinMulticastGroupResult, fidl::Error> {
423 let _response = self.client.send_query::<
424 ControllerJoinMulticastGroupRequest,
425 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
426 >(
427 (address, interface_id,),
428 0xbdbb4095640a3f4,
429 fidl::encoding::DynamicFlags::empty(),
430 ___deadline,
431 )?;
432 Ok(_response.map(|x| x))
433 }
434
435 pub fn r#leave_multicast_group(
451 &self,
452 mut address: &fidl_fuchsia_net::IpAddress,
453 mut interface_id: u64,
454 ___deadline: zx::MonotonicInstant,
455 ) -> Result<ControllerLeaveMulticastGroupResult, fidl::Error> {
456 let _response = self.client.send_query::<
457 ControllerLeaveMulticastGroupRequest,
458 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
459 >(
460 (address, interface_id,),
461 0x32ecf4e40124a29a,
462 fidl::encoding::DynamicFlags::empty(),
463 ___deadline,
464 )?;
465 Ok(_response.map(|x| x))
466 }
467
468 pub fn r#start_dhcpv6_client(
480 &self,
481 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
482 ___deadline: zx::MonotonicInstant,
483 ) -> Result<ControllerStartDhcpv6ClientResult, fidl::Error> {
484 let _response = self.client.send_query::<
485 ControllerStartDhcpv6ClientRequest,
486 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
487 >(
488 (params,),
489 0x756c9b70864b7744,
490 fidl::encoding::DynamicFlags::empty(),
491 ___deadline,
492 )?;
493 Ok(_response.map(|x| x))
494 }
495
496 pub fn r#stop_dhcpv6_client(
500 &self,
501 ___deadline: zx::MonotonicInstant,
502 ) -> Result<ControllerStopDhcpv6ClientResult, fidl::Error> {
503 let _response = self.client.send_query::<
504 fidl::encoding::EmptyPayload,
505 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
506 >(
507 (),
508 0x16e93478e663d523,
509 fidl::encoding::DynamicFlags::empty(),
510 ___deadline,
511 )?;
512 Ok(_response.map(|x| x))
513 }
514
515 pub fn r#start_out_of_stack_dhcpv4_client(
520 &self,
521 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
522 ___deadline: zx::MonotonicInstant,
523 ) -> Result<ControllerStartOutOfStackDhcpv4ClientResult, fidl::Error> {
524 let _response = self.client.send_query::<
525 ControllerStartOutOfStackDhcpv4ClientRequest,
526 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
527 >(
528 payload,
529 0x37eeec41c0077625,
530 fidl::encoding::DynamicFlags::empty(),
531 ___deadline,
532 )?;
533 Ok(_response.map(|x| x))
534 }
535
536 pub fn r#stop_out_of_stack_dhcpv4_client(
544 &self,
545 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
546 ___deadline: zx::MonotonicInstant,
547 ) -> Result<ControllerStopOutOfStackDhcpv4ClientResult, fidl::Error> {
548 let _response = self.client.send_query::<
549 ControllerStopOutOfStackDhcpv4ClientRequest,
550 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
551 >(
552 payload,
553 0x5d47aa5213164364,
554 fidl::encoding::DynamicFlags::empty(),
555 ___deadline,
556 )?;
557 Ok(_response.map(|x| x))
558 }
559}
560
561#[derive(Debug, Clone)]
562pub struct ControllerProxy {
563 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
564}
565
566impl fidl::endpoints::Proxy for ControllerProxy {
567 type Protocol = ControllerMarker;
568
569 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
570 Self::new(inner)
571 }
572
573 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
574 self.client.into_channel().map_err(|client| Self { client })
575 }
576
577 fn as_channel(&self) -> &::fidl::AsyncChannel {
578 self.client.as_channel()
579 }
580}
581
582impl ControllerProxy {
583 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
585 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
586 Self { client: fidl::client::Client::new(channel, protocol_name) }
587 }
588
589 pub fn take_event_stream(&self) -> ControllerEventStream {
595 ControllerEventStream { event_receiver: self.client.take_event_receiver() }
596 }
597
598 pub fn r#start_hermetic_network_realm(
614 &self,
615 mut netstack: Netstack,
616 ) -> fidl::client::QueryResponseFut<
617 ControllerStartHermeticNetworkRealmResult,
618 fidl::encoding::DefaultFuchsiaResourceDialect,
619 > {
620 ControllerProxyInterface::r#start_hermetic_network_realm(self, netstack)
621 }
622
623 pub fn r#stop_hermetic_network_realm(
636 &self,
637 ) -> fidl::client::QueryResponseFut<
638 ControllerStopHermeticNetworkRealmResult,
639 fidl::encoding::DefaultFuchsiaResourceDialect,
640 > {
641 ControllerProxyInterface::r#stop_hermetic_network_realm(self)
642 }
643
644 pub fn r#add_interface(
665 &self,
666 mut mac_address: &fidl_fuchsia_net::MacAddress,
667 mut name: &str,
668 mut wait_any_ip_address: bool,
669 ) -> fidl::client::QueryResponseFut<
670 ControllerAddInterfaceResult,
671 fidl::encoding::DefaultFuchsiaResourceDialect,
672 > {
673 ControllerProxyInterface::r#add_interface(self, mac_address, name, wait_any_ip_address)
674 }
675
676 pub fn r#start_stub(
690 &self,
691 mut component_url: &str,
692 ) -> fidl::client::QueryResponseFut<
693 ControllerStartStubResult,
694 fidl::encoding::DefaultFuchsiaResourceDialect,
695 > {
696 ControllerProxyInterface::r#start_stub(self, component_url)
697 }
698
699 pub fn r#stop_stub(
710 &self,
711 ) -> fidl::client::QueryResponseFut<
712 ControllerStopStubResult,
713 fidl::encoding::DefaultFuchsiaResourceDialect,
714 > {
715 ControllerProxyInterface::r#stop_stub(self)
716 }
717
718 pub fn r#ping(
743 &self,
744 mut target: &fidl_fuchsia_net::IpAddress,
745 mut payload_length: u16,
746 mut interface_name: Option<&str>,
747 mut timeout: i64,
748 ) -> fidl::client::QueryResponseFut<
749 ControllerPingResult,
750 fidl::encoding::DefaultFuchsiaResourceDialect,
751 > {
752 ControllerProxyInterface::r#ping(self, target, payload_length, interface_name, timeout)
753 }
754
755 pub fn r#poll_udp(
774 &self,
775 mut target: &fidl_fuchsia_net::SocketAddress,
776 mut payload: &[u8],
777 mut timeout: i64,
778 mut num_retries: u16,
779 ) -> fidl::client::QueryResponseFut<
780 ControllerPollUdpResult,
781 fidl::encoding::DefaultFuchsiaResourceDialect,
782 > {
783 ControllerProxyInterface::r#poll_udp(self, target, payload, timeout, num_retries)
784 }
785
786 pub fn r#join_multicast_group(
803 &self,
804 mut address: &fidl_fuchsia_net::IpAddress,
805 mut interface_id: u64,
806 ) -> fidl::client::QueryResponseFut<
807 ControllerJoinMulticastGroupResult,
808 fidl::encoding::DefaultFuchsiaResourceDialect,
809 > {
810 ControllerProxyInterface::r#join_multicast_group(self, address, interface_id)
811 }
812
813 pub fn r#leave_multicast_group(
829 &self,
830 mut address: &fidl_fuchsia_net::IpAddress,
831 mut interface_id: u64,
832 ) -> fidl::client::QueryResponseFut<
833 ControllerLeaveMulticastGroupResult,
834 fidl::encoding::DefaultFuchsiaResourceDialect,
835 > {
836 ControllerProxyInterface::r#leave_multicast_group(self, address, interface_id)
837 }
838
839 pub fn r#start_dhcpv6_client(
851 &self,
852 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
853 ) -> fidl::client::QueryResponseFut<
854 ControllerStartDhcpv6ClientResult,
855 fidl::encoding::DefaultFuchsiaResourceDialect,
856 > {
857 ControllerProxyInterface::r#start_dhcpv6_client(self, params)
858 }
859
860 pub fn r#stop_dhcpv6_client(
864 &self,
865 ) -> fidl::client::QueryResponseFut<
866 ControllerStopDhcpv6ClientResult,
867 fidl::encoding::DefaultFuchsiaResourceDialect,
868 > {
869 ControllerProxyInterface::r#stop_dhcpv6_client(self)
870 }
871
872 pub fn r#start_out_of_stack_dhcpv4_client(
877 &self,
878 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
879 ) -> fidl::client::QueryResponseFut<
880 ControllerStartOutOfStackDhcpv4ClientResult,
881 fidl::encoding::DefaultFuchsiaResourceDialect,
882 > {
883 ControllerProxyInterface::r#start_out_of_stack_dhcpv4_client(self, payload)
884 }
885
886 pub fn r#stop_out_of_stack_dhcpv4_client(
894 &self,
895 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
896 ) -> fidl::client::QueryResponseFut<
897 ControllerStopOutOfStackDhcpv4ClientResult,
898 fidl::encoding::DefaultFuchsiaResourceDialect,
899 > {
900 ControllerProxyInterface::r#stop_out_of_stack_dhcpv4_client(self, payload)
901 }
902}
903
904impl ControllerProxyInterface for ControllerProxy {
905 type StartHermeticNetworkRealmResponseFut = fidl::client::QueryResponseFut<
906 ControllerStartHermeticNetworkRealmResult,
907 fidl::encoding::DefaultFuchsiaResourceDialect,
908 >;
909 fn r#start_hermetic_network_realm(
910 &self,
911 mut netstack: Netstack,
912 ) -> Self::StartHermeticNetworkRealmResponseFut {
913 fn _decode(
914 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
915 ) -> Result<ControllerStartHermeticNetworkRealmResult, fidl::Error> {
916 let _response = fidl::client::decode_transaction_body::<
917 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
918 fidl::encoding::DefaultFuchsiaResourceDialect,
919 0x58c1fa7335d4c5c2,
920 >(_buf?)?;
921 Ok(_response.map(|x| x))
922 }
923 self.client.send_query_and_decode::<
924 ControllerStartHermeticNetworkRealmRequest,
925 ControllerStartHermeticNetworkRealmResult,
926 >(
927 (netstack,),
928 0x58c1fa7335d4c5c2,
929 fidl::encoding::DynamicFlags::empty(),
930 _decode,
931 )
932 }
933
934 type StopHermeticNetworkRealmResponseFut = fidl::client::QueryResponseFut<
935 ControllerStopHermeticNetworkRealmResult,
936 fidl::encoding::DefaultFuchsiaResourceDialect,
937 >;
938 fn r#stop_hermetic_network_realm(&self) -> Self::StopHermeticNetworkRealmResponseFut {
939 fn _decode(
940 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
941 ) -> Result<ControllerStopHermeticNetworkRealmResult, fidl::Error> {
942 let _response = fidl::client::decode_transaction_body::<
943 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
944 fidl::encoding::DefaultFuchsiaResourceDialect,
945 0x49d3c2501cd2f635,
946 >(_buf?)?;
947 Ok(_response.map(|x| x))
948 }
949 self.client.send_query_and_decode::<
950 fidl::encoding::EmptyPayload,
951 ControllerStopHermeticNetworkRealmResult,
952 >(
953 (),
954 0x49d3c2501cd2f635,
955 fidl::encoding::DynamicFlags::empty(),
956 _decode,
957 )
958 }
959
960 type AddInterfaceResponseFut = fidl::client::QueryResponseFut<
961 ControllerAddInterfaceResult,
962 fidl::encoding::DefaultFuchsiaResourceDialect,
963 >;
964 fn r#add_interface(
965 &self,
966 mut mac_address: &fidl_fuchsia_net::MacAddress,
967 mut name: &str,
968 mut wait_any_ip_address: bool,
969 ) -> Self::AddInterfaceResponseFut {
970 fn _decode(
971 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
972 ) -> Result<ControllerAddInterfaceResult, fidl::Error> {
973 let _response = fidl::client::decode_transaction_body::<
974 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
975 fidl::encoding::DefaultFuchsiaResourceDialect,
976 0x668ded2d2b619c15,
977 >(_buf?)?;
978 Ok(_response.map(|x| x))
979 }
980 self.client
981 .send_query_and_decode::<ControllerAddInterfaceRequest, ControllerAddInterfaceResult>(
982 (mac_address, name, wait_any_ip_address),
983 0x668ded2d2b619c15,
984 fidl::encoding::DynamicFlags::empty(),
985 _decode,
986 )
987 }
988
989 type StartStubResponseFut = fidl::client::QueryResponseFut<
990 ControllerStartStubResult,
991 fidl::encoding::DefaultFuchsiaResourceDialect,
992 >;
993 fn r#start_stub(&self, mut component_url: &str) -> Self::StartStubResponseFut {
994 fn _decode(
995 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
996 ) -> Result<ControllerStartStubResult, fidl::Error> {
997 let _response = fidl::client::decode_transaction_body::<
998 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
999 fidl::encoding::DefaultFuchsiaResourceDialect,
1000 0x6523a401f22bf664,
1001 >(_buf?)?;
1002 Ok(_response.map(|x| x))
1003 }
1004 self.client.send_query_and_decode::<ControllerStartStubRequest, ControllerStartStubResult>(
1005 (component_url,),
1006 0x6523a401f22bf664,
1007 fidl::encoding::DynamicFlags::empty(),
1008 _decode,
1009 )
1010 }
1011
1012 type StopStubResponseFut = fidl::client::QueryResponseFut<
1013 ControllerStopStubResult,
1014 fidl::encoding::DefaultFuchsiaResourceDialect,
1015 >;
1016 fn r#stop_stub(&self) -> Self::StopStubResponseFut {
1017 fn _decode(
1018 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1019 ) -> Result<ControllerStopStubResult, fidl::Error> {
1020 let _response = fidl::client::decode_transaction_body::<
1021 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1022 fidl::encoding::DefaultFuchsiaResourceDialect,
1023 0x582c32b564ff4bb4,
1024 >(_buf?)?;
1025 Ok(_response.map(|x| x))
1026 }
1027 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerStopStubResult>(
1028 (),
1029 0x582c32b564ff4bb4,
1030 fidl::encoding::DynamicFlags::empty(),
1031 _decode,
1032 )
1033 }
1034
1035 type PingResponseFut = fidl::client::QueryResponseFut<
1036 ControllerPingResult,
1037 fidl::encoding::DefaultFuchsiaResourceDialect,
1038 >;
1039 fn r#ping(
1040 &self,
1041 mut target: &fidl_fuchsia_net::IpAddress,
1042 mut payload_length: u16,
1043 mut interface_name: Option<&str>,
1044 mut timeout: i64,
1045 ) -> Self::PingResponseFut {
1046 fn _decode(
1047 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1048 ) -> Result<ControllerPingResult, fidl::Error> {
1049 let _response = fidl::client::decode_transaction_body::<
1050 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1051 fidl::encoding::DefaultFuchsiaResourceDialect,
1052 0x60c9b6cf952fa4d1,
1053 >(_buf?)?;
1054 Ok(_response.map(|x| x))
1055 }
1056 self.client.send_query_and_decode::<ControllerPingRequest, ControllerPingResult>(
1057 (target, payload_length, interface_name, timeout),
1058 0x60c9b6cf952fa4d1,
1059 fidl::encoding::DynamicFlags::empty(),
1060 _decode,
1061 )
1062 }
1063
1064 type PollUdpResponseFut = fidl::client::QueryResponseFut<
1065 ControllerPollUdpResult,
1066 fidl::encoding::DefaultFuchsiaResourceDialect,
1067 >;
1068 fn r#poll_udp(
1069 &self,
1070 mut target: &fidl_fuchsia_net::SocketAddress,
1071 mut payload: &[u8],
1072 mut timeout: i64,
1073 mut num_retries: u16,
1074 ) -> Self::PollUdpResponseFut {
1075 fn _decode(
1076 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1077 ) -> Result<ControllerPollUdpResult, fidl::Error> {
1078 let _response = fidl::client::decode_transaction_body::<
1079 fidl::encoding::ResultType<ControllerPollUdpResponse, Error>,
1080 fidl::encoding::DefaultFuchsiaResourceDialect,
1081 0x333fb354db30f664,
1082 >(_buf?)?;
1083 Ok(_response.map(|x| x.payload))
1084 }
1085 self.client.send_query_and_decode::<ControllerPollUdpRequest, ControllerPollUdpResult>(
1086 (target, payload, timeout, num_retries),
1087 0x333fb354db30f664,
1088 fidl::encoding::DynamicFlags::empty(),
1089 _decode,
1090 )
1091 }
1092
1093 type JoinMulticastGroupResponseFut = fidl::client::QueryResponseFut<
1094 ControllerJoinMulticastGroupResult,
1095 fidl::encoding::DefaultFuchsiaResourceDialect,
1096 >;
1097 fn r#join_multicast_group(
1098 &self,
1099 mut address: &fidl_fuchsia_net::IpAddress,
1100 mut interface_id: u64,
1101 ) -> Self::JoinMulticastGroupResponseFut {
1102 fn _decode(
1103 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1104 ) -> Result<ControllerJoinMulticastGroupResult, fidl::Error> {
1105 let _response = fidl::client::decode_transaction_body::<
1106 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1107 fidl::encoding::DefaultFuchsiaResourceDialect,
1108 0xbdbb4095640a3f4,
1109 >(_buf?)?;
1110 Ok(_response.map(|x| x))
1111 }
1112 self.client.send_query_and_decode::<
1113 ControllerJoinMulticastGroupRequest,
1114 ControllerJoinMulticastGroupResult,
1115 >(
1116 (address, interface_id,),
1117 0xbdbb4095640a3f4,
1118 fidl::encoding::DynamicFlags::empty(),
1119 _decode,
1120 )
1121 }
1122
1123 type LeaveMulticastGroupResponseFut = fidl::client::QueryResponseFut<
1124 ControllerLeaveMulticastGroupResult,
1125 fidl::encoding::DefaultFuchsiaResourceDialect,
1126 >;
1127 fn r#leave_multicast_group(
1128 &self,
1129 mut address: &fidl_fuchsia_net::IpAddress,
1130 mut interface_id: u64,
1131 ) -> Self::LeaveMulticastGroupResponseFut {
1132 fn _decode(
1133 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1134 ) -> Result<ControllerLeaveMulticastGroupResult, fidl::Error> {
1135 let _response = fidl::client::decode_transaction_body::<
1136 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1137 fidl::encoding::DefaultFuchsiaResourceDialect,
1138 0x32ecf4e40124a29a,
1139 >(_buf?)?;
1140 Ok(_response.map(|x| x))
1141 }
1142 self.client.send_query_and_decode::<
1143 ControllerLeaveMulticastGroupRequest,
1144 ControllerLeaveMulticastGroupResult,
1145 >(
1146 (address, interface_id,),
1147 0x32ecf4e40124a29a,
1148 fidl::encoding::DynamicFlags::empty(),
1149 _decode,
1150 )
1151 }
1152
1153 type StartDhcpv6ClientResponseFut = fidl::client::QueryResponseFut<
1154 ControllerStartDhcpv6ClientResult,
1155 fidl::encoding::DefaultFuchsiaResourceDialect,
1156 >;
1157 fn r#start_dhcpv6_client(
1158 &self,
1159 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
1160 ) -> Self::StartDhcpv6ClientResponseFut {
1161 fn _decode(
1162 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1163 ) -> Result<ControllerStartDhcpv6ClientResult, fidl::Error> {
1164 let _response = fidl::client::decode_transaction_body::<
1165 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1166 fidl::encoding::DefaultFuchsiaResourceDialect,
1167 0x756c9b70864b7744,
1168 >(_buf?)?;
1169 Ok(_response.map(|x| x))
1170 }
1171 self.client.send_query_and_decode::<
1172 ControllerStartDhcpv6ClientRequest,
1173 ControllerStartDhcpv6ClientResult,
1174 >(
1175 (params,),
1176 0x756c9b70864b7744,
1177 fidl::encoding::DynamicFlags::empty(),
1178 _decode,
1179 )
1180 }
1181
1182 type StopDhcpv6ClientResponseFut = fidl::client::QueryResponseFut<
1183 ControllerStopDhcpv6ClientResult,
1184 fidl::encoding::DefaultFuchsiaResourceDialect,
1185 >;
1186 fn r#stop_dhcpv6_client(&self) -> Self::StopDhcpv6ClientResponseFut {
1187 fn _decode(
1188 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1189 ) -> Result<ControllerStopDhcpv6ClientResult, fidl::Error> {
1190 let _response = fidl::client::decode_transaction_body::<
1191 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1192 fidl::encoding::DefaultFuchsiaResourceDialect,
1193 0x16e93478e663d523,
1194 >(_buf?)?;
1195 Ok(_response.map(|x| x))
1196 }
1197 self.client.send_query_and_decode::<
1198 fidl::encoding::EmptyPayload,
1199 ControllerStopDhcpv6ClientResult,
1200 >(
1201 (),
1202 0x16e93478e663d523,
1203 fidl::encoding::DynamicFlags::empty(),
1204 _decode,
1205 )
1206 }
1207
1208 type StartOutOfStackDhcpv4ClientResponseFut = fidl::client::QueryResponseFut<
1209 ControllerStartOutOfStackDhcpv4ClientResult,
1210 fidl::encoding::DefaultFuchsiaResourceDialect,
1211 >;
1212 fn r#start_out_of_stack_dhcpv4_client(
1213 &self,
1214 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
1215 ) -> Self::StartOutOfStackDhcpv4ClientResponseFut {
1216 fn _decode(
1217 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1218 ) -> Result<ControllerStartOutOfStackDhcpv4ClientResult, fidl::Error> {
1219 let _response = fidl::client::decode_transaction_body::<
1220 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1221 fidl::encoding::DefaultFuchsiaResourceDialect,
1222 0x37eeec41c0077625,
1223 >(_buf?)?;
1224 Ok(_response.map(|x| x))
1225 }
1226 self.client.send_query_and_decode::<
1227 ControllerStartOutOfStackDhcpv4ClientRequest,
1228 ControllerStartOutOfStackDhcpv4ClientResult,
1229 >(
1230 payload,
1231 0x37eeec41c0077625,
1232 fidl::encoding::DynamicFlags::empty(),
1233 _decode,
1234 )
1235 }
1236
1237 type StopOutOfStackDhcpv4ClientResponseFut = fidl::client::QueryResponseFut<
1238 ControllerStopOutOfStackDhcpv4ClientResult,
1239 fidl::encoding::DefaultFuchsiaResourceDialect,
1240 >;
1241 fn r#stop_out_of_stack_dhcpv4_client(
1242 &self,
1243 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
1244 ) -> Self::StopOutOfStackDhcpv4ClientResponseFut {
1245 fn _decode(
1246 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1247 ) -> Result<ControllerStopOutOfStackDhcpv4ClientResult, fidl::Error> {
1248 let _response = fidl::client::decode_transaction_body::<
1249 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1250 fidl::encoding::DefaultFuchsiaResourceDialect,
1251 0x5d47aa5213164364,
1252 >(_buf?)?;
1253 Ok(_response.map(|x| x))
1254 }
1255 self.client.send_query_and_decode::<
1256 ControllerStopOutOfStackDhcpv4ClientRequest,
1257 ControllerStopOutOfStackDhcpv4ClientResult,
1258 >(
1259 payload,
1260 0x5d47aa5213164364,
1261 fidl::encoding::DynamicFlags::empty(),
1262 _decode,
1263 )
1264 }
1265}
1266
1267pub struct ControllerEventStream {
1268 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1269}
1270
1271impl std::marker::Unpin for ControllerEventStream {}
1272
1273impl futures::stream::FusedStream for ControllerEventStream {
1274 fn is_terminated(&self) -> bool {
1275 self.event_receiver.is_terminated()
1276 }
1277}
1278
1279impl futures::Stream for ControllerEventStream {
1280 type Item = Result<ControllerEvent, fidl::Error>;
1281
1282 fn poll_next(
1283 mut self: std::pin::Pin<&mut Self>,
1284 cx: &mut std::task::Context<'_>,
1285 ) -> std::task::Poll<Option<Self::Item>> {
1286 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1287 &mut self.event_receiver,
1288 cx
1289 )?) {
1290 Some(buf) => std::task::Poll::Ready(Some(ControllerEvent::decode(buf))),
1291 None => std::task::Poll::Ready(None),
1292 }
1293 }
1294}
1295
1296#[derive(Debug)]
1297pub enum ControllerEvent {}
1298
1299impl ControllerEvent {
1300 fn decode(
1302 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1303 ) -> Result<ControllerEvent, fidl::Error> {
1304 let (bytes, _handles) = buf.split_mut();
1305 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1306 debug_assert_eq!(tx_header.tx_id, 0);
1307 match tx_header.ordinal {
1308 _ => Err(fidl::Error::UnknownOrdinal {
1309 ordinal: tx_header.ordinal,
1310 protocol_name: <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1311 }),
1312 }
1313 }
1314}
1315
1316pub struct ControllerRequestStream {
1318 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1319 is_terminated: bool,
1320}
1321
1322impl std::marker::Unpin for ControllerRequestStream {}
1323
1324impl futures::stream::FusedStream for ControllerRequestStream {
1325 fn is_terminated(&self) -> bool {
1326 self.is_terminated
1327 }
1328}
1329
1330impl fidl::endpoints::RequestStream for ControllerRequestStream {
1331 type Protocol = ControllerMarker;
1332 type ControlHandle = ControllerControlHandle;
1333
1334 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1335 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1336 }
1337
1338 fn control_handle(&self) -> Self::ControlHandle {
1339 ControllerControlHandle { inner: self.inner.clone() }
1340 }
1341
1342 fn into_inner(
1343 self,
1344 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1345 {
1346 (self.inner, self.is_terminated)
1347 }
1348
1349 fn from_inner(
1350 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1351 is_terminated: bool,
1352 ) -> Self {
1353 Self { inner, is_terminated }
1354 }
1355}
1356
1357impl futures::Stream for ControllerRequestStream {
1358 type Item = Result<ControllerRequest, fidl::Error>;
1359
1360 fn poll_next(
1361 mut self: std::pin::Pin<&mut Self>,
1362 cx: &mut std::task::Context<'_>,
1363 ) -> std::task::Poll<Option<Self::Item>> {
1364 let this = &mut *self;
1365 if this.inner.check_shutdown(cx) {
1366 this.is_terminated = true;
1367 return std::task::Poll::Ready(None);
1368 }
1369 if this.is_terminated {
1370 panic!("polled ControllerRequestStream after completion");
1371 }
1372 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1373 |bytes, handles| {
1374 match this.inner.channel().read_etc(cx, bytes, handles) {
1375 std::task::Poll::Ready(Ok(())) => {}
1376 std::task::Poll::Pending => return std::task::Poll::Pending,
1377 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1378 this.is_terminated = true;
1379 return std::task::Poll::Ready(None);
1380 }
1381 std::task::Poll::Ready(Err(e)) => {
1382 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1383 e.into(),
1384 ))))
1385 }
1386 }
1387
1388 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1390
1391 std::task::Poll::Ready(Some(match header.ordinal {
1392 0x58c1fa7335d4c5c2 => {
1393 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1394 let mut req = fidl::new_empty!(
1395 ControllerStartHermeticNetworkRealmRequest,
1396 fidl::encoding::DefaultFuchsiaResourceDialect
1397 );
1398 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartHermeticNetworkRealmRequest>(&header, _body_bytes, handles, &mut req)?;
1399 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1400 Ok(ControllerRequest::StartHermeticNetworkRealm {
1401 netstack: req.netstack,
1402
1403 responder: ControllerStartHermeticNetworkRealmResponder {
1404 control_handle: std::mem::ManuallyDrop::new(control_handle),
1405 tx_id: header.tx_id,
1406 },
1407 })
1408 }
1409 0x49d3c2501cd2f635 => {
1410 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1411 let mut req = fidl::new_empty!(
1412 fidl::encoding::EmptyPayload,
1413 fidl::encoding::DefaultFuchsiaResourceDialect
1414 );
1415 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1416 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1417 Ok(ControllerRequest::StopHermeticNetworkRealm {
1418 responder: ControllerStopHermeticNetworkRealmResponder {
1419 control_handle: std::mem::ManuallyDrop::new(control_handle),
1420 tx_id: header.tx_id,
1421 },
1422 })
1423 }
1424 0x668ded2d2b619c15 => {
1425 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1426 let mut req = fidl::new_empty!(
1427 ControllerAddInterfaceRequest,
1428 fidl::encoding::DefaultFuchsiaResourceDialect
1429 );
1430 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerAddInterfaceRequest>(&header, _body_bytes, handles, &mut req)?;
1431 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1432 Ok(ControllerRequest::AddInterface {
1433 mac_address: req.mac_address,
1434 name: req.name,
1435 wait_any_ip_address: req.wait_any_ip_address,
1436
1437 responder: ControllerAddInterfaceResponder {
1438 control_handle: std::mem::ManuallyDrop::new(control_handle),
1439 tx_id: header.tx_id,
1440 },
1441 })
1442 }
1443 0x6523a401f22bf664 => {
1444 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1445 let mut req = fidl::new_empty!(
1446 ControllerStartStubRequest,
1447 fidl::encoding::DefaultFuchsiaResourceDialect
1448 );
1449 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartStubRequest>(&header, _body_bytes, handles, &mut req)?;
1450 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1451 Ok(ControllerRequest::StartStub {
1452 component_url: req.component_url,
1453
1454 responder: ControllerStartStubResponder {
1455 control_handle: std::mem::ManuallyDrop::new(control_handle),
1456 tx_id: header.tx_id,
1457 },
1458 })
1459 }
1460 0x582c32b564ff4bb4 => {
1461 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1462 let mut req = fidl::new_empty!(
1463 fidl::encoding::EmptyPayload,
1464 fidl::encoding::DefaultFuchsiaResourceDialect
1465 );
1466 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1467 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1468 Ok(ControllerRequest::StopStub {
1469 responder: ControllerStopStubResponder {
1470 control_handle: std::mem::ManuallyDrop::new(control_handle),
1471 tx_id: header.tx_id,
1472 },
1473 })
1474 }
1475 0x60c9b6cf952fa4d1 => {
1476 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1477 let mut req = fidl::new_empty!(
1478 ControllerPingRequest,
1479 fidl::encoding::DefaultFuchsiaResourceDialect
1480 );
1481 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerPingRequest>(&header, _body_bytes, handles, &mut req)?;
1482 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1483 Ok(ControllerRequest::Ping {
1484 target: req.target,
1485 payload_length: req.payload_length,
1486 interface_name: req.interface_name,
1487 timeout: req.timeout,
1488
1489 responder: ControllerPingResponder {
1490 control_handle: std::mem::ManuallyDrop::new(control_handle),
1491 tx_id: header.tx_id,
1492 },
1493 })
1494 }
1495 0x333fb354db30f664 => {
1496 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1497 let mut req = fidl::new_empty!(
1498 ControllerPollUdpRequest,
1499 fidl::encoding::DefaultFuchsiaResourceDialect
1500 );
1501 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerPollUdpRequest>(&header, _body_bytes, handles, &mut req)?;
1502 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1503 Ok(ControllerRequest::PollUdp {
1504 target: req.target,
1505 payload: req.payload,
1506 timeout: req.timeout,
1507 num_retries: req.num_retries,
1508
1509 responder: ControllerPollUdpResponder {
1510 control_handle: std::mem::ManuallyDrop::new(control_handle),
1511 tx_id: header.tx_id,
1512 },
1513 })
1514 }
1515 0xbdbb4095640a3f4 => {
1516 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1517 let mut req = fidl::new_empty!(
1518 ControllerJoinMulticastGroupRequest,
1519 fidl::encoding::DefaultFuchsiaResourceDialect
1520 );
1521 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerJoinMulticastGroupRequest>(&header, _body_bytes, handles, &mut req)?;
1522 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1523 Ok(ControllerRequest::JoinMulticastGroup {
1524 address: req.address,
1525 interface_id: req.interface_id,
1526
1527 responder: ControllerJoinMulticastGroupResponder {
1528 control_handle: std::mem::ManuallyDrop::new(control_handle),
1529 tx_id: header.tx_id,
1530 },
1531 })
1532 }
1533 0x32ecf4e40124a29a => {
1534 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1535 let mut req = fidl::new_empty!(
1536 ControllerLeaveMulticastGroupRequest,
1537 fidl::encoding::DefaultFuchsiaResourceDialect
1538 );
1539 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerLeaveMulticastGroupRequest>(&header, _body_bytes, handles, &mut req)?;
1540 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1541 Ok(ControllerRequest::LeaveMulticastGroup {
1542 address: req.address,
1543 interface_id: req.interface_id,
1544
1545 responder: ControllerLeaveMulticastGroupResponder {
1546 control_handle: std::mem::ManuallyDrop::new(control_handle),
1547 tx_id: header.tx_id,
1548 },
1549 })
1550 }
1551 0x756c9b70864b7744 => {
1552 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1553 let mut req = fidl::new_empty!(
1554 ControllerStartDhcpv6ClientRequest,
1555 fidl::encoding::DefaultFuchsiaResourceDialect
1556 );
1557 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartDhcpv6ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1558 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1559 Ok(ControllerRequest::StartDhcpv6Client {
1560 params: req.params,
1561
1562 responder: ControllerStartDhcpv6ClientResponder {
1563 control_handle: std::mem::ManuallyDrop::new(control_handle),
1564 tx_id: header.tx_id,
1565 },
1566 })
1567 }
1568 0x16e93478e663d523 => {
1569 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1570 let mut req = fidl::new_empty!(
1571 fidl::encoding::EmptyPayload,
1572 fidl::encoding::DefaultFuchsiaResourceDialect
1573 );
1574 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1575 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1576 Ok(ControllerRequest::StopDhcpv6Client {
1577 responder: ControllerStopDhcpv6ClientResponder {
1578 control_handle: std::mem::ManuallyDrop::new(control_handle),
1579 tx_id: header.tx_id,
1580 },
1581 })
1582 }
1583 0x37eeec41c0077625 => {
1584 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1585 let mut req = fidl::new_empty!(
1586 ControllerStartOutOfStackDhcpv4ClientRequest,
1587 fidl::encoding::DefaultFuchsiaResourceDialect
1588 );
1589 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartOutOfStackDhcpv4ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1590 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1591 Ok(ControllerRequest::StartOutOfStackDhcpv4Client {
1592 payload: req,
1593 responder: ControllerStartOutOfStackDhcpv4ClientResponder {
1594 control_handle: std::mem::ManuallyDrop::new(control_handle),
1595 tx_id: header.tx_id,
1596 },
1597 })
1598 }
1599 0x5d47aa5213164364 => {
1600 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1601 let mut req = fidl::new_empty!(
1602 ControllerStopOutOfStackDhcpv4ClientRequest,
1603 fidl::encoding::DefaultFuchsiaResourceDialect
1604 );
1605 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStopOutOfStackDhcpv4ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1606 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1607 Ok(ControllerRequest::StopOutOfStackDhcpv4Client {
1608 payload: req,
1609 responder: ControllerStopOutOfStackDhcpv4ClientResponder {
1610 control_handle: std::mem::ManuallyDrop::new(control_handle),
1611 tx_id: header.tx_id,
1612 },
1613 })
1614 }
1615 _ => Err(fidl::Error::UnknownOrdinal {
1616 ordinal: header.ordinal,
1617 protocol_name:
1618 <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1619 }),
1620 }))
1621 },
1622 )
1623 }
1624}
1625
1626#[derive(Debug)]
1637pub enum ControllerRequest {
1638 StartHermeticNetworkRealm {
1654 netstack: Netstack,
1655 responder: ControllerStartHermeticNetworkRealmResponder,
1656 },
1657 StopHermeticNetworkRealm { responder: ControllerStopHermeticNetworkRealmResponder },
1670 AddInterface {
1691 mac_address: fidl_fuchsia_net::MacAddress,
1692 name: String,
1693 wait_any_ip_address: bool,
1694 responder: ControllerAddInterfaceResponder,
1695 },
1696 StartStub { component_url: String, responder: ControllerStartStubResponder },
1710 StopStub { responder: ControllerStopStubResponder },
1721 Ping {
1746 target: fidl_fuchsia_net::IpAddress,
1747 payload_length: u16,
1748 interface_name: Option<String>,
1749 timeout: i64,
1750 responder: ControllerPingResponder,
1751 },
1752 PollUdp {
1771 target: fidl_fuchsia_net::SocketAddress,
1772 payload: Vec<u8>,
1773 timeout: i64,
1774 num_retries: u16,
1775 responder: ControllerPollUdpResponder,
1776 },
1777 JoinMulticastGroup {
1794 address: fidl_fuchsia_net::IpAddress,
1795 interface_id: u64,
1796 responder: ControllerJoinMulticastGroupResponder,
1797 },
1798 LeaveMulticastGroup {
1814 address: fidl_fuchsia_net::IpAddress,
1815 interface_id: u64,
1816 responder: ControllerLeaveMulticastGroupResponder,
1817 },
1818 StartDhcpv6Client {
1830 params: fidl_fuchsia_net_dhcpv6::NewClientParams,
1831 responder: ControllerStartDhcpv6ClientResponder,
1832 },
1833 StopDhcpv6Client { responder: ControllerStopDhcpv6ClientResponder },
1837 StartOutOfStackDhcpv4Client {
1842 payload: ControllerStartOutOfStackDhcpv4ClientRequest,
1843 responder: ControllerStartOutOfStackDhcpv4ClientResponder,
1844 },
1845 StopOutOfStackDhcpv4Client {
1853 payload: ControllerStopOutOfStackDhcpv4ClientRequest,
1854 responder: ControllerStopOutOfStackDhcpv4ClientResponder,
1855 },
1856}
1857
1858impl ControllerRequest {
1859 #[allow(irrefutable_let_patterns)]
1860 pub fn into_start_hermetic_network_realm(
1861 self,
1862 ) -> Option<(Netstack, ControllerStartHermeticNetworkRealmResponder)> {
1863 if let ControllerRequest::StartHermeticNetworkRealm { netstack, responder } = self {
1864 Some((netstack, responder))
1865 } else {
1866 None
1867 }
1868 }
1869
1870 #[allow(irrefutable_let_patterns)]
1871 pub fn into_stop_hermetic_network_realm(
1872 self,
1873 ) -> Option<(ControllerStopHermeticNetworkRealmResponder)> {
1874 if let ControllerRequest::StopHermeticNetworkRealm { responder } = self {
1875 Some((responder))
1876 } else {
1877 None
1878 }
1879 }
1880
1881 #[allow(irrefutable_let_patterns)]
1882 pub fn into_add_interface(
1883 self,
1884 ) -> Option<(fidl_fuchsia_net::MacAddress, String, bool, ControllerAddInterfaceResponder)> {
1885 if let ControllerRequest::AddInterface {
1886 mac_address,
1887 name,
1888 wait_any_ip_address,
1889 responder,
1890 } = self
1891 {
1892 Some((mac_address, name, wait_any_ip_address, responder))
1893 } else {
1894 None
1895 }
1896 }
1897
1898 #[allow(irrefutable_let_patterns)]
1899 pub fn into_start_stub(self) -> Option<(String, ControllerStartStubResponder)> {
1900 if let ControllerRequest::StartStub { component_url, responder } = self {
1901 Some((component_url, responder))
1902 } else {
1903 None
1904 }
1905 }
1906
1907 #[allow(irrefutable_let_patterns)]
1908 pub fn into_stop_stub(self) -> Option<(ControllerStopStubResponder)> {
1909 if let ControllerRequest::StopStub { responder } = self {
1910 Some((responder))
1911 } else {
1912 None
1913 }
1914 }
1915
1916 #[allow(irrefutable_let_patterns)]
1917 pub fn into_ping(
1918 self,
1919 ) -> Option<(fidl_fuchsia_net::IpAddress, u16, Option<String>, i64, ControllerPingResponder)>
1920 {
1921 if let ControllerRequest::Ping {
1922 target,
1923 payload_length,
1924 interface_name,
1925 timeout,
1926 responder,
1927 } = self
1928 {
1929 Some((target, payload_length, interface_name, timeout, responder))
1930 } else {
1931 None
1932 }
1933 }
1934
1935 #[allow(irrefutable_let_patterns)]
1936 pub fn into_poll_udp(
1937 self,
1938 ) -> Option<(fidl_fuchsia_net::SocketAddress, Vec<u8>, i64, u16, ControllerPollUdpResponder)>
1939 {
1940 if let ControllerRequest::PollUdp { target, payload, timeout, num_retries, responder } =
1941 self
1942 {
1943 Some((target, payload, timeout, num_retries, responder))
1944 } else {
1945 None
1946 }
1947 }
1948
1949 #[allow(irrefutable_let_patterns)]
1950 pub fn into_join_multicast_group(
1951 self,
1952 ) -> Option<(fidl_fuchsia_net::IpAddress, u64, ControllerJoinMulticastGroupResponder)> {
1953 if let ControllerRequest::JoinMulticastGroup { address, interface_id, responder } = self {
1954 Some((address, interface_id, responder))
1955 } else {
1956 None
1957 }
1958 }
1959
1960 #[allow(irrefutable_let_patterns)]
1961 pub fn into_leave_multicast_group(
1962 self,
1963 ) -> Option<(fidl_fuchsia_net::IpAddress, u64, ControllerLeaveMulticastGroupResponder)> {
1964 if let ControllerRequest::LeaveMulticastGroup { address, interface_id, responder } = self {
1965 Some((address, interface_id, responder))
1966 } else {
1967 None
1968 }
1969 }
1970
1971 #[allow(irrefutable_let_patterns)]
1972 pub fn into_start_dhcpv6_client(
1973 self,
1974 ) -> Option<(fidl_fuchsia_net_dhcpv6::NewClientParams, ControllerStartDhcpv6ClientResponder)>
1975 {
1976 if let ControllerRequest::StartDhcpv6Client { params, responder } = self {
1977 Some((params, responder))
1978 } else {
1979 None
1980 }
1981 }
1982
1983 #[allow(irrefutable_let_patterns)]
1984 pub fn into_stop_dhcpv6_client(self) -> Option<(ControllerStopDhcpv6ClientResponder)> {
1985 if let ControllerRequest::StopDhcpv6Client { responder } = self {
1986 Some((responder))
1987 } else {
1988 None
1989 }
1990 }
1991
1992 #[allow(irrefutable_let_patterns)]
1993 pub fn into_start_out_of_stack_dhcpv4_client(
1994 self,
1995 ) -> Option<(
1996 ControllerStartOutOfStackDhcpv4ClientRequest,
1997 ControllerStartOutOfStackDhcpv4ClientResponder,
1998 )> {
1999 if let ControllerRequest::StartOutOfStackDhcpv4Client { payload, responder } = self {
2000 Some((payload, responder))
2001 } else {
2002 None
2003 }
2004 }
2005
2006 #[allow(irrefutable_let_patterns)]
2007 pub fn into_stop_out_of_stack_dhcpv4_client(
2008 self,
2009 ) -> Option<(
2010 ControllerStopOutOfStackDhcpv4ClientRequest,
2011 ControllerStopOutOfStackDhcpv4ClientResponder,
2012 )> {
2013 if let ControllerRequest::StopOutOfStackDhcpv4Client { payload, responder } = self {
2014 Some((payload, responder))
2015 } else {
2016 None
2017 }
2018 }
2019
2020 pub fn method_name(&self) -> &'static str {
2022 match *self {
2023 ControllerRequest::StartHermeticNetworkRealm { .. } => "start_hermetic_network_realm",
2024 ControllerRequest::StopHermeticNetworkRealm { .. } => "stop_hermetic_network_realm",
2025 ControllerRequest::AddInterface { .. } => "add_interface",
2026 ControllerRequest::StartStub { .. } => "start_stub",
2027 ControllerRequest::StopStub { .. } => "stop_stub",
2028 ControllerRequest::Ping { .. } => "ping",
2029 ControllerRequest::PollUdp { .. } => "poll_udp",
2030 ControllerRequest::JoinMulticastGroup { .. } => "join_multicast_group",
2031 ControllerRequest::LeaveMulticastGroup { .. } => "leave_multicast_group",
2032 ControllerRequest::StartDhcpv6Client { .. } => "start_dhcpv6_client",
2033 ControllerRequest::StopDhcpv6Client { .. } => "stop_dhcpv6_client",
2034 ControllerRequest::StartOutOfStackDhcpv4Client { .. } => {
2035 "start_out_of_stack_dhcpv4_client"
2036 }
2037 ControllerRequest::StopOutOfStackDhcpv4Client { .. } => {
2038 "stop_out_of_stack_dhcpv4_client"
2039 }
2040 }
2041 }
2042}
2043
2044#[derive(Debug, Clone)]
2045pub struct ControllerControlHandle {
2046 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2047}
2048
2049impl fidl::endpoints::ControlHandle for ControllerControlHandle {
2050 fn shutdown(&self) {
2051 self.inner.shutdown()
2052 }
2053 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2054 self.inner.shutdown_with_epitaph(status)
2055 }
2056
2057 fn is_closed(&self) -> bool {
2058 self.inner.channel().is_closed()
2059 }
2060 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2061 self.inner.channel().on_closed()
2062 }
2063
2064 #[cfg(target_os = "fuchsia")]
2065 fn signal_peer(
2066 &self,
2067 clear_mask: zx::Signals,
2068 set_mask: zx::Signals,
2069 ) -> Result<(), zx_status::Status> {
2070 use fidl::Peered;
2071 self.inner.channel().signal_peer(clear_mask, set_mask)
2072 }
2073}
2074
2075impl ControllerControlHandle {}
2076
2077#[must_use = "FIDL methods require a response to be sent"]
2078#[derive(Debug)]
2079pub struct ControllerStartHermeticNetworkRealmResponder {
2080 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2081 tx_id: u32,
2082}
2083
2084impl std::ops::Drop for ControllerStartHermeticNetworkRealmResponder {
2088 fn drop(&mut self) {
2089 self.control_handle.shutdown();
2090 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2092 }
2093}
2094
2095impl fidl::endpoints::Responder for ControllerStartHermeticNetworkRealmResponder {
2096 type ControlHandle = ControllerControlHandle;
2097
2098 fn control_handle(&self) -> &ControllerControlHandle {
2099 &self.control_handle
2100 }
2101
2102 fn drop_without_shutdown(mut self) {
2103 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2105 std::mem::forget(self);
2107 }
2108}
2109
2110impl ControllerStartHermeticNetworkRealmResponder {
2111 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2115 let _result = self.send_raw(result);
2116 if _result.is_err() {
2117 self.control_handle.shutdown();
2118 }
2119 self.drop_without_shutdown();
2120 _result
2121 }
2122
2123 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2125 let _result = self.send_raw(result);
2126 self.drop_without_shutdown();
2127 _result
2128 }
2129
2130 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2131 self.control_handle
2132 .inner
2133 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2134 result,
2135 self.tx_id,
2136 0x58c1fa7335d4c5c2,
2137 fidl::encoding::DynamicFlags::empty(),
2138 )
2139 }
2140}
2141
2142#[must_use = "FIDL methods require a response to be sent"]
2143#[derive(Debug)]
2144pub struct ControllerStopHermeticNetworkRealmResponder {
2145 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2146 tx_id: u32,
2147}
2148
2149impl std::ops::Drop for ControllerStopHermeticNetworkRealmResponder {
2153 fn drop(&mut self) {
2154 self.control_handle.shutdown();
2155 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2157 }
2158}
2159
2160impl fidl::endpoints::Responder for ControllerStopHermeticNetworkRealmResponder {
2161 type ControlHandle = ControllerControlHandle;
2162
2163 fn control_handle(&self) -> &ControllerControlHandle {
2164 &self.control_handle
2165 }
2166
2167 fn drop_without_shutdown(mut self) {
2168 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2170 std::mem::forget(self);
2172 }
2173}
2174
2175impl ControllerStopHermeticNetworkRealmResponder {
2176 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2180 let _result = self.send_raw(result);
2181 if _result.is_err() {
2182 self.control_handle.shutdown();
2183 }
2184 self.drop_without_shutdown();
2185 _result
2186 }
2187
2188 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2190 let _result = self.send_raw(result);
2191 self.drop_without_shutdown();
2192 _result
2193 }
2194
2195 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2196 self.control_handle
2197 .inner
2198 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2199 result,
2200 self.tx_id,
2201 0x49d3c2501cd2f635,
2202 fidl::encoding::DynamicFlags::empty(),
2203 )
2204 }
2205}
2206
2207#[must_use = "FIDL methods require a response to be sent"]
2208#[derive(Debug)]
2209pub struct ControllerAddInterfaceResponder {
2210 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2211 tx_id: u32,
2212}
2213
2214impl std::ops::Drop for ControllerAddInterfaceResponder {
2218 fn drop(&mut self) {
2219 self.control_handle.shutdown();
2220 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2222 }
2223}
2224
2225impl fidl::endpoints::Responder for ControllerAddInterfaceResponder {
2226 type ControlHandle = ControllerControlHandle;
2227
2228 fn control_handle(&self) -> &ControllerControlHandle {
2229 &self.control_handle
2230 }
2231
2232 fn drop_without_shutdown(mut self) {
2233 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2235 std::mem::forget(self);
2237 }
2238}
2239
2240impl ControllerAddInterfaceResponder {
2241 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2245 let _result = self.send_raw(result);
2246 if _result.is_err() {
2247 self.control_handle.shutdown();
2248 }
2249 self.drop_without_shutdown();
2250 _result
2251 }
2252
2253 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2255 let _result = self.send_raw(result);
2256 self.drop_without_shutdown();
2257 _result
2258 }
2259
2260 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2261 self.control_handle
2262 .inner
2263 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2264 result,
2265 self.tx_id,
2266 0x668ded2d2b619c15,
2267 fidl::encoding::DynamicFlags::empty(),
2268 )
2269 }
2270}
2271
2272#[must_use = "FIDL methods require a response to be sent"]
2273#[derive(Debug)]
2274pub struct ControllerStartStubResponder {
2275 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2276 tx_id: u32,
2277}
2278
2279impl std::ops::Drop for ControllerStartStubResponder {
2283 fn drop(&mut self) {
2284 self.control_handle.shutdown();
2285 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2287 }
2288}
2289
2290impl fidl::endpoints::Responder for ControllerStartStubResponder {
2291 type ControlHandle = ControllerControlHandle;
2292
2293 fn control_handle(&self) -> &ControllerControlHandle {
2294 &self.control_handle
2295 }
2296
2297 fn drop_without_shutdown(mut self) {
2298 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2300 std::mem::forget(self);
2302 }
2303}
2304
2305impl ControllerStartStubResponder {
2306 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2310 let _result = self.send_raw(result);
2311 if _result.is_err() {
2312 self.control_handle.shutdown();
2313 }
2314 self.drop_without_shutdown();
2315 _result
2316 }
2317
2318 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2320 let _result = self.send_raw(result);
2321 self.drop_without_shutdown();
2322 _result
2323 }
2324
2325 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2326 self.control_handle
2327 .inner
2328 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2329 result,
2330 self.tx_id,
2331 0x6523a401f22bf664,
2332 fidl::encoding::DynamicFlags::empty(),
2333 )
2334 }
2335}
2336
2337#[must_use = "FIDL methods require a response to be sent"]
2338#[derive(Debug)]
2339pub struct ControllerStopStubResponder {
2340 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2341 tx_id: u32,
2342}
2343
2344impl std::ops::Drop for ControllerStopStubResponder {
2348 fn drop(&mut self) {
2349 self.control_handle.shutdown();
2350 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2352 }
2353}
2354
2355impl fidl::endpoints::Responder for ControllerStopStubResponder {
2356 type ControlHandle = ControllerControlHandle;
2357
2358 fn control_handle(&self) -> &ControllerControlHandle {
2359 &self.control_handle
2360 }
2361
2362 fn drop_without_shutdown(mut self) {
2363 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2365 std::mem::forget(self);
2367 }
2368}
2369
2370impl ControllerStopStubResponder {
2371 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2375 let _result = self.send_raw(result);
2376 if _result.is_err() {
2377 self.control_handle.shutdown();
2378 }
2379 self.drop_without_shutdown();
2380 _result
2381 }
2382
2383 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2385 let _result = self.send_raw(result);
2386 self.drop_without_shutdown();
2387 _result
2388 }
2389
2390 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2391 self.control_handle
2392 .inner
2393 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2394 result,
2395 self.tx_id,
2396 0x582c32b564ff4bb4,
2397 fidl::encoding::DynamicFlags::empty(),
2398 )
2399 }
2400}
2401
2402#[must_use = "FIDL methods require a response to be sent"]
2403#[derive(Debug)]
2404pub struct ControllerPingResponder {
2405 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2406 tx_id: u32,
2407}
2408
2409impl std::ops::Drop for ControllerPingResponder {
2413 fn drop(&mut self) {
2414 self.control_handle.shutdown();
2415 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2417 }
2418}
2419
2420impl fidl::endpoints::Responder for ControllerPingResponder {
2421 type ControlHandle = ControllerControlHandle;
2422
2423 fn control_handle(&self) -> &ControllerControlHandle {
2424 &self.control_handle
2425 }
2426
2427 fn drop_without_shutdown(mut self) {
2428 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2430 std::mem::forget(self);
2432 }
2433}
2434
2435impl ControllerPingResponder {
2436 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2440 let _result = self.send_raw(result);
2441 if _result.is_err() {
2442 self.control_handle.shutdown();
2443 }
2444 self.drop_without_shutdown();
2445 _result
2446 }
2447
2448 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2450 let _result = self.send_raw(result);
2451 self.drop_without_shutdown();
2452 _result
2453 }
2454
2455 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2456 self.control_handle
2457 .inner
2458 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2459 result,
2460 self.tx_id,
2461 0x60c9b6cf952fa4d1,
2462 fidl::encoding::DynamicFlags::empty(),
2463 )
2464 }
2465}
2466
2467#[must_use = "FIDL methods require a response to be sent"]
2468#[derive(Debug)]
2469pub struct ControllerPollUdpResponder {
2470 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2471 tx_id: u32,
2472}
2473
2474impl std::ops::Drop for ControllerPollUdpResponder {
2478 fn drop(&mut self) {
2479 self.control_handle.shutdown();
2480 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2482 }
2483}
2484
2485impl fidl::endpoints::Responder for ControllerPollUdpResponder {
2486 type ControlHandle = ControllerControlHandle;
2487
2488 fn control_handle(&self) -> &ControllerControlHandle {
2489 &self.control_handle
2490 }
2491
2492 fn drop_without_shutdown(mut self) {
2493 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2495 std::mem::forget(self);
2497 }
2498}
2499
2500impl ControllerPollUdpResponder {
2501 pub fn send(self, mut result: Result<&[u8], Error>) -> Result<(), fidl::Error> {
2505 let _result = self.send_raw(result);
2506 if _result.is_err() {
2507 self.control_handle.shutdown();
2508 }
2509 self.drop_without_shutdown();
2510 _result
2511 }
2512
2513 pub fn send_no_shutdown_on_err(
2515 self,
2516 mut result: Result<&[u8], Error>,
2517 ) -> Result<(), fidl::Error> {
2518 let _result = self.send_raw(result);
2519 self.drop_without_shutdown();
2520 _result
2521 }
2522
2523 fn send_raw(&self, mut result: Result<&[u8], Error>) -> Result<(), fidl::Error> {
2524 self.control_handle
2525 .inner
2526 .send::<fidl::encoding::ResultType<ControllerPollUdpResponse, Error>>(
2527 result.map(|payload| (payload,)),
2528 self.tx_id,
2529 0x333fb354db30f664,
2530 fidl::encoding::DynamicFlags::empty(),
2531 )
2532 }
2533}
2534
2535#[must_use = "FIDL methods require a response to be sent"]
2536#[derive(Debug)]
2537pub struct ControllerJoinMulticastGroupResponder {
2538 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2539 tx_id: u32,
2540}
2541
2542impl std::ops::Drop for ControllerJoinMulticastGroupResponder {
2546 fn drop(&mut self) {
2547 self.control_handle.shutdown();
2548 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2550 }
2551}
2552
2553impl fidl::endpoints::Responder for ControllerJoinMulticastGroupResponder {
2554 type ControlHandle = ControllerControlHandle;
2555
2556 fn control_handle(&self) -> &ControllerControlHandle {
2557 &self.control_handle
2558 }
2559
2560 fn drop_without_shutdown(mut self) {
2561 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2563 std::mem::forget(self);
2565 }
2566}
2567
2568impl ControllerJoinMulticastGroupResponder {
2569 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2573 let _result = self.send_raw(result);
2574 if _result.is_err() {
2575 self.control_handle.shutdown();
2576 }
2577 self.drop_without_shutdown();
2578 _result
2579 }
2580
2581 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2583 let _result = self.send_raw(result);
2584 self.drop_without_shutdown();
2585 _result
2586 }
2587
2588 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2589 self.control_handle
2590 .inner
2591 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2592 result,
2593 self.tx_id,
2594 0xbdbb4095640a3f4,
2595 fidl::encoding::DynamicFlags::empty(),
2596 )
2597 }
2598}
2599
2600#[must_use = "FIDL methods require a response to be sent"]
2601#[derive(Debug)]
2602pub struct ControllerLeaveMulticastGroupResponder {
2603 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2604 tx_id: u32,
2605}
2606
2607impl std::ops::Drop for ControllerLeaveMulticastGroupResponder {
2611 fn drop(&mut self) {
2612 self.control_handle.shutdown();
2613 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2615 }
2616}
2617
2618impl fidl::endpoints::Responder for ControllerLeaveMulticastGroupResponder {
2619 type ControlHandle = ControllerControlHandle;
2620
2621 fn control_handle(&self) -> &ControllerControlHandle {
2622 &self.control_handle
2623 }
2624
2625 fn drop_without_shutdown(mut self) {
2626 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2628 std::mem::forget(self);
2630 }
2631}
2632
2633impl ControllerLeaveMulticastGroupResponder {
2634 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2638 let _result = self.send_raw(result);
2639 if _result.is_err() {
2640 self.control_handle.shutdown();
2641 }
2642 self.drop_without_shutdown();
2643 _result
2644 }
2645
2646 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2648 let _result = self.send_raw(result);
2649 self.drop_without_shutdown();
2650 _result
2651 }
2652
2653 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2654 self.control_handle
2655 .inner
2656 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2657 result,
2658 self.tx_id,
2659 0x32ecf4e40124a29a,
2660 fidl::encoding::DynamicFlags::empty(),
2661 )
2662 }
2663}
2664
2665#[must_use = "FIDL methods require a response to be sent"]
2666#[derive(Debug)]
2667pub struct ControllerStartDhcpv6ClientResponder {
2668 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2669 tx_id: u32,
2670}
2671
2672impl std::ops::Drop for ControllerStartDhcpv6ClientResponder {
2676 fn drop(&mut self) {
2677 self.control_handle.shutdown();
2678 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2680 }
2681}
2682
2683impl fidl::endpoints::Responder for ControllerStartDhcpv6ClientResponder {
2684 type ControlHandle = ControllerControlHandle;
2685
2686 fn control_handle(&self) -> &ControllerControlHandle {
2687 &self.control_handle
2688 }
2689
2690 fn drop_without_shutdown(mut self) {
2691 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2693 std::mem::forget(self);
2695 }
2696}
2697
2698impl ControllerStartDhcpv6ClientResponder {
2699 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2703 let _result = self.send_raw(result);
2704 if _result.is_err() {
2705 self.control_handle.shutdown();
2706 }
2707 self.drop_without_shutdown();
2708 _result
2709 }
2710
2711 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2713 let _result = self.send_raw(result);
2714 self.drop_without_shutdown();
2715 _result
2716 }
2717
2718 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2719 self.control_handle
2720 .inner
2721 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2722 result,
2723 self.tx_id,
2724 0x756c9b70864b7744,
2725 fidl::encoding::DynamicFlags::empty(),
2726 )
2727 }
2728}
2729
2730#[must_use = "FIDL methods require a response to be sent"]
2731#[derive(Debug)]
2732pub struct ControllerStopDhcpv6ClientResponder {
2733 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2734 tx_id: u32,
2735}
2736
2737impl std::ops::Drop for ControllerStopDhcpv6ClientResponder {
2741 fn drop(&mut self) {
2742 self.control_handle.shutdown();
2743 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2745 }
2746}
2747
2748impl fidl::endpoints::Responder for ControllerStopDhcpv6ClientResponder {
2749 type ControlHandle = ControllerControlHandle;
2750
2751 fn control_handle(&self) -> &ControllerControlHandle {
2752 &self.control_handle
2753 }
2754
2755 fn drop_without_shutdown(mut self) {
2756 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2758 std::mem::forget(self);
2760 }
2761}
2762
2763impl ControllerStopDhcpv6ClientResponder {
2764 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2768 let _result = self.send_raw(result);
2769 if _result.is_err() {
2770 self.control_handle.shutdown();
2771 }
2772 self.drop_without_shutdown();
2773 _result
2774 }
2775
2776 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2778 let _result = self.send_raw(result);
2779 self.drop_without_shutdown();
2780 _result
2781 }
2782
2783 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2784 self.control_handle
2785 .inner
2786 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2787 result,
2788 self.tx_id,
2789 0x16e93478e663d523,
2790 fidl::encoding::DynamicFlags::empty(),
2791 )
2792 }
2793}
2794
2795#[must_use = "FIDL methods require a response to be sent"]
2796#[derive(Debug)]
2797pub struct ControllerStartOutOfStackDhcpv4ClientResponder {
2798 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2799 tx_id: u32,
2800}
2801
2802impl std::ops::Drop for ControllerStartOutOfStackDhcpv4ClientResponder {
2806 fn drop(&mut self) {
2807 self.control_handle.shutdown();
2808 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2810 }
2811}
2812
2813impl fidl::endpoints::Responder for ControllerStartOutOfStackDhcpv4ClientResponder {
2814 type ControlHandle = ControllerControlHandle;
2815
2816 fn control_handle(&self) -> &ControllerControlHandle {
2817 &self.control_handle
2818 }
2819
2820 fn drop_without_shutdown(mut self) {
2821 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2823 std::mem::forget(self);
2825 }
2826}
2827
2828impl ControllerStartOutOfStackDhcpv4ClientResponder {
2829 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2833 let _result = self.send_raw(result);
2834 if _result.is_err() {
2835 self.control_handle.shutdown();
2836 }
2837 self.drop_without_shutdown();
2838 _result
2839 }
2840
2841 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2843 let _result = self.send_raw(result);
2844 self.drop_without_shutdown();
2845 _result
2846 }
2847
2848 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2849 self.control_handle
2850 .inner
2851 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2852 result,
2853 self.tx_id,
2854 0x37eeec41c0077625,
2855 fidl::encoding::DynamicFlags::empty(),
2856 )
2857 }
2858}
2859
2860#[must_use = "FIDL methods require a response to be sent"]
2861#[derive(Debug)]
2862pub struct ControllerStopOutOfStackDhcpv4ClientResponder {
2863 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2864 tx_id: u32,
2865}
2866
2867impl std::ops::Drop for ControllerStopOutOfStackDhcpv4ClientResponder {
2871 fn drop(&mut self) {
2872 self.control_handle.shutdown();
2873 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2875 }
2876}
2877
2878impl fidl::endpoints::Responder for ControllerStopOutOfStackDhcpv4ClientResponder {
2879 type ControlHandle = ControllerControlHandle;
2880
2881 fn control_handle(&self) -> &ControllerControlHandle {
2882 &self.control_handle
2883 }
2884
2885 fn drop_without_shutdown(mut self) {
2886 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2888 std::mem::forget(self);
2890 }
2891}
2892
2893impl ControllerStopOutOfStackDhcpv4ClientResponder {
2894 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2898 let _result = self.send_raw(result);
2899 if _result.is_err() {
2900 self.control_handle.shutdown();
2901 }
2902 self.drop_without_shutdown();
2903 _result
2904 }
2905
2906 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2908 let _result = self.send_raw(result);
2909 self.drop_without_shutdown();
2910 _result
2911 }
2912
2913 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2914 self.control_handle
2915 .inner
2916 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2917 result,
2918 self.tx_id,
2919 0x5d47aa5213164364,
2920 fidl::encoding::DynamicFlags::empty(),
2921 )
2922 }
2923}
2924
2925mod internal {
2926 use super::*;
2927}