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(
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 ControllerMarker,
216 >(
217 (),
218 0x49d3c2501cd2f635,
219 fidl::encoding::DynamicFlags::empty(),
220 ___deadline,
221 )?;
222 Ok(_response.map(|x| x))
223 }
224
225 pub fn r#add_interface(
246 &self,
247 mut mac_address: &fidl_fuchsia_net::MacAddress,
248 mut name: &str,
249 mut wait_any_ip_address: bool,
250 ___deadline: zx::MonotonicInstant,
251 ) -> Result<ControllerAddInterfaceResult, fidl::Error> {
252 let _response = self.client.send_query::<
253 ControllerAddInterfaceRequest,
254 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
255 ControllerMarker,
256 >(
257 (mac_address, name, wait_any_ip_address,),
258 0x668ded2d2b619c15,
259 fidl::encoding::DynamicFlags::empty(),
260 ___deadline,
261 )?;
262 Ok(_response.map(|x| x))
263 }
264
265 pub fn r#start_stub(
279 &self,
280 mut component_url: &str,
281 ___deadline: zx::MonotonicInstant,
282 ) -> Result<ControllerStartStubResult, fidl::Error> {
283 let _response = self.client.send_query::<
284 ControllerStartStubRequest,
285 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
286 ControllerMarker,
287 >(
288 (component_url,),
289 0x6523a401f22bf664,
290 fidl::encoding::DynamicFlags::empty(),
291 ___deadline,
292 )?;
293 Ok(_response.map(|x| x))
294 }
295
296 pub fn r#stop_stub(
307 &self,
308 ___deadline: zx::MonotonicInstant,
309 ) -> Result<ControllerStopStubResult, fidl::Error> {
310 let _response = self.client.send_query::<
311 fidl::encoding::EmptyPayload,
312 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
313 ControllerMarker,
314 >(
315 (),
316 0x582c32b564ff4bb4,
317 fidl::encoding::DynamicFlags::empty(),
318 ___deadline,
319 )?;
320 Ok(_response.map(|x| x))
321 }
322
323 pub fn r#ping(
348 &self,
349 mut target: &fidl_fuchsia_net::IpAddress,
350 mut payload_length: u16,
351 mut interface_name: Option<&str>,
352 mut timeout: i64,
353 ___deadline: zx::MonotonicInstant,
354 ) -> Result<ControllerPingResult, fidl::Error> {
355 let _response = self.client.send_query::<
356 ControllerPingRequest,
357 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
358 ControllerMarker,
359 >(
360 (target, payload_length, interface_name, timeout,),
361 0x60c9b6cf952fa4d1,
362 fidl::encoding::DynamicFlags::empty(),
363 ___deadline,
364 )?;
365 Ok(_response.map(|x| x))
366 }
367
368 pub fn r#poll_udp(
387 &self,
388 mut target: &fidl_fuchsia_net::SocketAddress,
389 mut payload: &[u8],
390 mut timeout: i64,
391 mut num_retries: u16,
392 ___deadline: zx::MonotonicInstant,
393 ) -> Result<ControllerPollUdpResult, fidl::Error> {
394 let _response = self.client.send_query::<
395 ControllerPollUdpRequest,
396 fidl::encoding::ResultType<ControllerPollUdpResponse, Error>,
397 ControllerMarker,
398 >(
399 (target, payload, timeout, num_retries,),
400 0x333fb354db30f664,
401 fidl::encoding::DynamicFlags::empty(),
402 ___deadline,
403 )?;
404 Ok(_response.map(|x| x.payload))
405 }
406
407 pub fn r#join_multicast_group(
424 &self,
425 mut address: &fidl_fuchsia_net::IpAddress,
426 mut interface_id: u64,
427 ___deadline: zx::MonotonicInstant,
428 ) -> Result<ControllerJoinMulticastGroupResult, fidl::Error> {
429 let _response = self.client.send_query::<
430 ControllerJoinMulticastGroupRequest,
431 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
432 ControllerMarker,
433 >(
434 (address, interface_id,),
435 0xbdbb4095640a3f4,
436 fidl::encoding::DynamicFlags::empty(),
437 ___deadline,
438 )?;
439 Ok(_response.map(|x| x))
440 }
441
442 pub fn r#leave_multicast_group(
458 &self,
459 mut address: &fidl_fuchsia_net::IpAddress,
460 mut interface_id: u64,
461 ___deadline: zx::MonotonicInstant,
462 ) -> Result<ControllerLeaveMulticastGroupResult, fidl::Error> {
463 let _response = self.client.send_query::<
464 ControllerLeaveMulticastGroupRequest,
465 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
466 ControllerMarker,
467 >(
468 (address, interface_id,),
469 0x32ecf4e40124a29a,
470 fidl::encoding::DynamicFlags::empty(),
471 ___deadline,
472 )?;
473 Ok(_response.map(|x| x))
474 }
475
476 pub fn r#start_dhcpv6_client(
488 &self,
489 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
490 ___deadline: zx::MonotonicInstant,
491 ) -> Result<ControllerStartDhcpv6ClientResult, fidl::Error> {
492 let _response = self.client.send_query::<
493 ControllerStartDhcpv6ClientRequest,
494 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
495 ControllerMarker,
496 >(
497 (params,),
498 0x756c9b70864b7744,
499 fidl::encoding::DynamicFlags::empty(),
500 ___deadline,
501 )?;
502 Ok(_response.map(|x| x))
503 }
504
505 pub fn r#stop_dhcpv6_client(
509 &self,
510 ___deadline: zx::MonotonicInstant,
511 ) -> Result<ControllerStopDhcpv6ClientResult, fidl::Error> {
512 let _response = self.client.send_query::<
513 fidl::encoding::EmptyPayload,
514 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
515 ControllerMarker,
516 >(
517 (),
518 0x16e93478e663d523,
519 fidl::encoding::DynamicFlags::empty(),
520 ___deadline,
521 )?;
522 Ok(_response.map(|x| x))
523 }
524
525 pub fn r#start_out_of_stack_dhcpv4_client(
530 &self,
531 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
532 ___deadline: zx::MonotonicInstant,
533 ) -> Result<ControllerStartOutOfStackDhcpv4ClientResult, fidl::Error> {
534 let _response = self.client.send_query::<
535 ControllerStartOutOfStackDhcpv4ClientRequest,
536 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
537 ControllerMarker,
538 >(
539 payload,
540 0x37eeec41c0077625,
541 fidl::encoding::DynamicFlags::empty(),
542 ___deadline,
543 )?;
544 Ok(_response.map(|x| x))
545 }
546
547 pub fn r#stop_out_of_stack_dhcpv4_client(
555 &self,
556 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
557 ___deadline: zx::MonotonicInstant,
558 ) -> Result<ControllerStopOutOfStackDhcpv4ClientResult, fidl::Error> {
559 let _response = self.client.send_query::<
560 ControllerStopOutOfStackDhcpv4ClientRequest,
561 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
562 ControllerMarker,
563 >(
564 payload,
565 0x5d47aa5213164364,
566 fidl::encoding::DynamicFlags::empty(),
567 ___deadline,
568 )?;
569 Ok(_response.map(|x| x))
570 }
571}
572
573#[cfg(target_os = "fuchsia")]
574impl From<ControllerSynchronousProxy> for zx::NullableHandle {
575 fn from(value: ControllerSynchronousProxy) -> Self {
576 value.into_channel().into()
577 }
578}
579
580#[cfg(target_os = "fuchsia")]
581impl From<fidl::Channel> for ControllerSynchronousProxy {
582 fn from(value: fidl::Channel) -> Self {
583 Self::new(value)
584 }
585}
586
587#[cfg(target_os = "fuchsia")]
588impl fidl::endpoints::FromClient for ControllerSynchronousProxy {
589 type Protocol = ControllerMarker;
590
591 fn from_client(value: fidl::endpoints::ClientEnd<ControllerMarker>) -> Self {
592 Self::new(value.into_channel())
593 }
594}
595
596#[derive(Debug, Clone)]
597pub struct ControllerProxy {
598 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
599}
600
601impl fidl::endpoints::Proxy for ControllerProxy {
602 type Protocol = ControllerMarker;
603
604 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
605 Self::new(inner)
606 }
607
608 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
609 self.client.into_channel().map_err(|client| Self { client })
610 }
611
612 fn as_channel(&self) -> &::fidl::AsyncChannel {
613 self.client.as_channel()
614 }
615}
616
617impl ControllerProxy {
618 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
620 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
621 Self { client: fidl::client::Client::new(channel, protocol_name) }
622 }
623
624 pub fn take_event_stream(&self) -> ControllerEventStream {
630 ControllerEventStream { event_receiver: self.client.take_event_receiver() }
631 }
632
633 pub fn r#start_hermetic_network_realm(
649 &self,
650 mut netstack: Netstack,
651 ) -> fidl::client::QueryResponseFut<
652 ControllerStartHermeticNetworkRealmResult,
653 fidl::encoding::DefaultFuchsiaResourceDialect,
654 > {
655 ControllerProxyInterface::r#start_hermetic_network_realm(self, netstack)
656 }
657
658 pub fn r#stop_hermetic_network_realm(
671 &self,
672 ) -> fidl::client::QueryResponseFut<
673 ControllerStopHermeticNetworkRealmResult,
674 fidl::encoding::DefaultFuchsiaResourceDialect,
675 > {
676 ControllerProxyInterface::r#stop_hermetic_network_realm(self)
677 }
678
679 pub fn r#add_interface(
700 &self,
701 mut mac_address: &fidl_fuchsia_net::MacAddress,
702 mut name: &str,
703 mut wait_any_ip_address: bool,
704 ) -> fidl::client::QueryResponseFut<
705 ControllerAddInterfaceResult,
706 fidl::encoding::DefaultFuchsiaResourceDialect,
707 > {
708 ControllerProxyInterface::r#add_interface(self, mac_address, name, wait_any_ip_address)
709 }
710
711 pub fn r#start_stub(
725 &self,
726 mut component_url: &str,
727 ) -> fidl::client::QueryResponseFut<
728 ControllerStartStubResult,
729 fidl::encoding::DefaultFuchsiaResourceDialect,
730 > {
731 ControllerProxyInterface::r#start_stub(self, component_url)
732 }
733
734 pub fn r#stop_stub(
745 &self,
746 ) -> fidl::client::QueryResponseFut<
747 ControllerStopStubResult,
748 fidl::encoding::DefaultFuchsiaResourceDialect,
749 > {
750 ControllerProxyInterface::r#stop_stub(self)
751 }
752
753 pub fn r#ping(
778 &self,
779 mut target: &fidl_fuchsia_net::IpAddress,
780 mut payload_length: u16,
781 mut interface_name: Option<&str>,
782 mut timeout: i64,
783 ) -> fidl::client::QueryResponseFut<
784 ControllerPingResult,
785 fidl::encoding::DefaultFuchsiaResourceDialect,
786 > {
787 ControllerProxyInterface::r#ping(self, target, payload_length, interface_name, timeout)
788 }
789
790 pub fn r#poll_udp(
809 &self,
810 mut target: &fidl_fuchsia_net::SocketAddress,
811 mut payload: &[u8],
812 mut timeout: i64,
813 mut num_retries: u16,
814 ) -> fidl::client::QueryResponseFut<
815 ControllerPollUdpResult,
816 fidl::encoding::DefaultFuchsiaResourceDialect,
817 > {
818 ControllerProxyInterface::r#poll_udp(self, target, payload, timeout, num_retries)
819 }
820
821 pub fn r#join_multicast_group(
838 &self,
839 mut address: &fidl_fuchsia_net::IpAddress,
840 mut interface_id: u64,
841 ) -> fidl::client::QueryResponseFut<
842 ControllerJoinMulticastGroupResult,
843 fidl::encoding::DefaultFuchsiaResourceDialect,
844 > {
845 ControllerProxyInterface::r#join_multicast_group(self, address, interface_id)
846 }
847
848 pub fn r#leave_multicast_group(
864 &self,
865 mut address: &fidl_fuchsia_net::IpAddress,
866 mut interface_id: u64,
867 ) -> fidl::client::QueryResponseFut<
868 ControllerLeaveMulticastGroupResult,
869 fidl::encoding::DefaultFuchsiaResourceDialect,
870 > {
871 ControllerProxyInterface::r#leave_multicast_group(self, address, interface_id)
872 }
873
874 pub fn r#start_dhcpv6_client(
886 &self,
887 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
888 ) -> fidl::client::QueryResponseFut<
889 ControllerStartDhcpv6ClientResult,
890 fidl::encoding::DefaultFuchsiaResourceDialect,
891 > {
892 ControllerProxyInterface::r#start_dhcpv6_client(self, params)
893 }
894
895 pub fn r#stop_dhcpv6_client(
899 &self,
900 ) -> fidl::client::QueryResponseFut<
901 ControllerStopDhcpv6ClientResult,
902 fidl::encoding::DefaultFuchsiaResourceDialect,
903 > {
904 ControllerProxyInterface::r#stop_dhcpv6_client(self)
905 }
906
907 pub fn r#start_out_of_stack_dhcpv4_client(
912 &self,
913 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
914 ) -> fidl::client::QueryResponseFut<
915 ControllerStartOutOfStackDhcpv4ClientResult,
916 fidl::encoding::DefaultFuchsiaResourceDialect,
917 > {
918 ControllerProxyInterface::r#start_out_of_stack_dhcpv4_client(self, payload)
919 }
920
921 pub fn r#stop_out_of_stack_dhcpv4_client(
929 &self,
930 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
931 ) -> fidl::client::QueryResponseFut<
932 ControllerStopOutOfStackDhcpv4ClientResult,
933 fidl::encoding::DefaultFuchsiaResourceDialect,
934 > {
935 ControllerProxyInterface::r#stop_out_of_stack_dhcpv4_client(self, payload)
936 }
937}
938
939impl ControllerProxyInterface for ControllerProxy {
940 type StartHermeticNetworkRealmResponseFut = fidl::client::QueryResponseFut<
941 ControllerStartHermeticNetworkRealmResult,
942 fidl::encoding::DefaultFuchsiaResourceDialect,
943 >;
944 fn r#start_hermetic_network_realm(
945 &self,
946 mut netstack: Netstack,
947 ) -> Self::StartHermeticNetworkRealmResponseFut {
948 fn _decode(
949 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
950 ) -> Result<ControllerStartHermeticNetworkRealmResult, fidl::Error> {
951 let _response = fidl::client::decode_transaction_body::<
952 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
953 fidl::encoding::DefaultFuchsiaResourceDialect,
954 0x58c1fa7335d4c5c2,
955 >(_buf?)?;
956 Ok(_response.map(|x| x))
957 }
958 self.client.send_query_and_decode::<
959 ControllerStartHermeticNetworkRealmRequest,
960 ControllerStartHermeticNetworkRealmResult,
961 >(
962 (netstack,),
963 0x58c1fa7335d4c5c2,
964 fidl::encoding::DynamicFlags::empty(),
965 _decode,
966 )
967 }
968
969 type StopHermeticNetworkRealmResponseFut = fidl::client::QueryResponseFut<
970 ControllerStopHermeticNetworkRealmResult,
971 fidl::encoding::DefaultFuchsiaResourceDialect,
972 >;
973 fn r#stop_hermetic_network_realm(&self) -> Self::StopHermeticNetworkRealmResponseFut {
974 fn _decode(
975 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
976 ) -> Result<ControllerStopHermeticNetworkRealmResult, fidl::Error> {
977 let _response = fidl::client::decode_transaction_body::<
978 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
979 fidl::encoding::DefaultFuchsiaResourceDialect,
980 0x49d3c2501cd2f635,
981 >(_buf?)?;
982 Ok(_response.map(|x| x))
983 }
984 self.client.send_query_and_decode::<
985 fidl::encoding::EmptyPayload,
986 ControllerStopHermeticNetworkRealmResult,
987 >(
988 (),
989 0x49d3c2501cd2f635,
990 fidl::encoding::DynamicFlags::empty(),
991 _decode,
992 )
993 }
994
995 type AddInterfaceResponseFut = fidl::client::QueryResponseFut<
996 ControllerAddInterfaceResult,
997 fidl::encoding::DefaultFuchsiaResourceDialect,
998 >;
999 fn r#add_interface(
1000 &self,
1001 mut mac_address: &fidl_fuchsia_net::MacAddress,
1002 mut name: &str,
1003 mut wait_any_ip_address: bool,
1004 ) -> Self::AddInterfaceResponseFut {
1005 fn _decode(
1006 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1007 ) -> Result<ControllerAddInterfaceResult, fidl::Error> {
1008 let _response = fidl::client::decode_transaction_body::<
1009 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1010 fidl::encoding::DefaultFuchsiaResourceDialect,
1011 0x668ded2d2b619c15,
1012 >(_buf?)?;
1013 Ok(_response.map(|x| x))
1014 }
1015 self.client
1016 .send_query_and_decode::<ControllerAddInterfaceRequest, ControllerAddInterfaceResult>(
1017 (mac_address, name, wait_any_ip_address),
1018 0x668ded2d2b619c15,
1019 fidl::encoding::DynamicFlags::empty(),
1020 _decode,
1021 )
1022 }
1023
1024 type StartStubResponseFut = fidl::client::QueryResponseFut<
1025 ControllerStartStubResult,
1026 fidl::encoding::DefaultFuchsiaResourceDialect,
1027 >;
1028 fn r#start_stub(&self, mut component_url: &str) -> Self::StartStubResponseFut {
1029 fn _decode(
1030 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1031 ) -> Result<ControllerStartStubResult, fidl::Error> {
1032 let _response = fidl::client::decode_transaction_body::<
1033 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1034 fidl::encoding::DefaultFuchsiaResourceDialect,
1035 0x6523a401f22bf664,
1036 >(_buf?)?;
1037 Ok(_response.map(|x| x))
1038 }
1039 self.client.send_query_and_decode::<ControllerStartStubRequest, ControllerStartStubResult>(
1040 (component_url,),
1041 0x6523a401f22bf664,
1042 fidl::encoding::DynamicFlags::empty(),
1043 _decode,
1044 )
1045 }
1046
1047 type StopStubResponseFut = fidl::client::QueryResponseFut<
1048 ControllerStopStubResult,
1049 fidl::encoding::DefaultFuchsiaResourceDialect,
1050 >;
1051 fn r#stop_stub(&self) -> Self::StopStubResponseFut {
1052 fn _decode(
1053 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1054 ) -> Result<ControllerStopStubResult, fidl::Error> {
1055 let _response = fidl::client::decode_transaction_body::<
1056 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1057 fidl::encoding::DefaultFuchsiaResourceDialect,
1058 0x582c32b564ff4bb4,
1059 >(_buf?)?;
1060 Ok(_response.map(|x| x))
1061 }
1062 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerStopStubResult>(
1063 (),
1064 0x582c32b564ff4bb4,
1065 fidl::encoding::DynamicFlags::empty(),
1066 _decode,
1067 )
1068 }
1069
1070 type PingResponseFut = fidl::client::QueryResponseFut<
1071 ControllerPingResult,
1072 fidl::encoding::DefaultFuchsiaResourceDialect,
1073 >;
1074 fn r#ping(
1075 &self,
1076 mut target: &fidl_fuchsia_net::IpAddress,
1077 mut payload_length: u16,
1078 mut interface_name: Option<&str>,
1079 mut timeout: i64,
1080 ) -> Self::PingResponseFut {
1081 fn _decode(
1082 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1083 ) -> Result<ControllerPingResult, fidl::Error> {
1084 let _response = fidl::client::decode_transaction_body::<
1085 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1086 fidl::encoding::DefaultFuchsiaResourceDialect,
1087 0x60c9b6cf952fa4d1,
1088 >(_buf?)?;
1089 Ok(_response.map(|x| x))
1090 }
1091 self.client.send_query_and_decode::<ControllerPingRequest, ControllerPingResult>(
1092 (target, payload_length, interface_name, timeout),
1093 0x60c9b6cf952fa4d1,
1094 fidl::encoding::DynamicFlags::empty(),
1095 _decode,
1096 )
1097 }
1098
1099 type PollUdpResponseFut = fidl::client::QueryResponseFut<
1100 ControllerPollUdpResult,
1101 fidl::encoding::DefaultFuchsiaResourceDialect,
1102 >;
1103 fn r#poll_udp(
1104 &self,
1105 mut target: &fidl_fuchsia_net::SocketAddress,
1106 mut payload: &[u8],
1107 mut timeout: i64,
1108 mut num_retries: u16,
1109 ) -> Self::PollUdpResponseFut {
1110 fn _decode(
1111 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1112 ) -> Result<ControllerPollUdpResult, fidl::Error> {
1113 let _response = fidl::client::decode_transaction_body::<
1114 fidl::encoding::ResultType<ControllerPollUdpResponse, Error>,
1115 fidl::encoding::DefaultFuchsiaResourceDialect,
1116 0x333fb354db30f664,
1117 >(_buf?)?;
1118 Ok(_response.map(|x| x.payload))
1119 }
1120 self.client.send_query_and_decode::<ControllerPollUdpRequest, ControllerPollUdpResult>(
1121 (target, payload, timeout, num_retries),
1122 0x333fb354db30f664,
1123 fidl::encoding::DynamicFlags::empty(),
1124 _decode,
1125 )
1126 }
1127
1128 type JoinMulticastGroupResponseFut = fidl::client::QueryResponseFut<
1129 ControllerJoinMulticastGroupResult,
1130 fidl::encoding::DefaultFuchsiaResourceDialect,
1131 >;
1132 fn r#join_multicast_group(
1133 &self,
1134 mut address: &fidl_fuchsia_net::IpAddress,
1135 mut interface_id: u64,
1136 ) -> Self::JoinMulticastGroupResponseFut {
1137 fn _decode(
1138 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1139 ) -> Result<ControllerJoinMulticastGroupResult, fidl::Error> {
1140 let _response = fidl::client::decode_transaction_body::<
1141 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1142 fidl::encoding::DefaultFuchsiaResourceDialect,
1143 0xbdbb4095640a3f4,
1144 >(_buf?)?;
1145 Ok(_response.map(|x| x))
1146 }
1147 self.client.send_query_and_decode::<
1148 ControllerJoinMulticastGroupRequest,
1149 ControllerJoinMulticastGroupResult,
1150 >(
1151 (address, interface_id,),
1152 0xbdbb4095640a3f4,
1153 fidl::encoding::DynamicFlags::empty(),
1154 _decode,
1155 )
1156 }
1157
1158 type LeaveMulticastGroupResponseFut = fidl::client::QueryResponseFut<
1159 ControllerLeaveMulticastGroupResult,
1160 fidl::encoding::DefaultFuchsiaResourceDialect,
1161 >;
1162 fn r#leave_multicast_group(
1163 &self,
1164 mut address: &fidl_fuchsia_net::IpAddress,
1165 mut interface_id: u64,
1166 ) -> Self::LeaveMulticastGroupResponseFut {
1167 fn _decode(
1168 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1169 ) -> Result<ControllerLeaveMulticastGroupResult, fidl::Error> {
1170 let _response = fidl::client::decode_transaction_body::<
1171 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1172 fidl::encoding::DefaultFuchsiaResourceDialect,
1173 0x32ecf4e40124a29a,
1174 >(_buf?)?;
1175 Ok(_response.map(|x| x))
1176 }
1177 self.client.send_query_and_decode::<
1178 ControllerLeaveMulticastGroupRequest,
1179 ControllerLeaveMulticastGroupResult,
1180 >(
1181 (address, interface_id,),
1182 0x32ecf4e40124a29a,
1183 fidl::encoding::DynamicFlags::empty(),
1184 _decode,
1185 )
1186 }
1187
1188 type StartDhcpv6ClientResponseFut = fidl::client::QueryResponseFut<
1189 ControllerStartDhcpv6ClientResult,
1190 fidl::encoding::DefaultFuchsiaResourceDialect,
1191 >;
1192 fn r#start_dhcpv6_client(
1193 &self,
1194 mut params: &fidl_fuchsia_net_dhcpv6::NewClientParams,
1195 ) -> Self::StartDhcpv6ClientResponseFut {
1196 fn _decode(
1197 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1198 ) -> Result<ControllerStartDhcpv6ClientResult, fidl::Error> {
1199 let _response = fidl::client::decode_transaction_body::<
1200 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1201 fidl::encoding::DefaultFuchsiaResourceDialect,
1202 0x756c9b70864b7744,
1203 >(_buf?)?;
1204 Ok(_response.map(|x| x))
1205 }
1206 self.client.send_query_and_decode::<
1207 ControllerStartDhcpv6ClientRequest,
1208 ControllerStartDhcpv6ClientResult,
1209 >(
1210 (params,),
1211 0x756c9b70864b7744,
1212 fidl::encoding::DynamicFlags::empty(),
1213 _decode,
1214 )
1215 }
1216
1217 type StopDhcpv6ClientResponseFut = fidl::client::QueryResponseFut<
1218 ControllerStopDhcpv6ClientResult,
1219 fidl::encoding::DefaultFuchsiaResourceDialect,
1220 >;
1221 fn r#stop_dhcpv6_client(&self) -> Self::StopDhcpv6ClientResponseFut {
1222 fn _decode(
1223 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1224 ) -> Result<ControllerStopDhcpv6ClientResult, fidl::Error> {
1225 let _response = fidl::client::decode_transaction_body::<
1226 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1227 fidl::encoding::DefaultFuchsiaResourceDialect,
1228 0x16e93478e663d523,
1229 >(_buf?)?;
1230 Ok(_response.map(|x| x))
1231 }
1232 self.client.send_query_and_decode::<
1233 fidl::encoding::EmptyPayload,
1234 ControllerStopDhcpv6ClientResult,
1235 >(
1236 (),
1237 0x16e93478e663d523,
1238 fidl::encoding::DynamicFlags::empty(),
1239 _decode,
1240 )
1241 }
1242
1243 type StartOutOfStackDhcpv4ClientResponseFut = fidl::client::QueryResponseFut<
1244 ControllerStartOutOfStackDhcpv4ClientResult,
1245 fidl::encoding::DefaultFuchsiaResourceDialect,
1246 >;
1247 fn r#start_out_of_stack_dhcpv4_client(
1248 &self,
1249 mut payload: &ControllerStartOutOfStackDhcpv4ClientRequest,
1250 ) -> Self::StartOutOfStackDhcpv4ClientResponseFut {
1251 fn _decode(
1252 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1253 ) -> Result<ControllerStartOutOfStackDhcpv4ClientResult, fidl::Error> {
1254 let _response = fidl::client::decode_transaction_body::<
1255 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1256 fidl::encoding::DefaultFuchsiaResourceDialect,
1257 0x37eeec41c0077625,
1258 >(_buf?)?;
1259 Ok(_response.map(|x| x))
1260 }
1261 self.client.send_query_and_decode::<
1262 ControllerStartOutOfStackDhcpv4ClientRequest,
1263 ControllerStartOutOfStackDhcpv4ClientResult,
1264 >(
1265 payload,
1266 0x37eeec41c0077625,
1267 fidl::encoding::DynamicFlags::empty(),
1268 _decode,
1269 )
1270 }
1271
1272 type StopOutOfStackDhcpv4ClientResponseFut = fidl::client::QueryResponseFut<
1273 ControllerStopOutOfStackDhcpv4ClientResult,
1274 fidl::encoding::DefaultFuchsiaResourceDialect,
1275 >;
1276 fn r#stop_out_of_stack_dhcpv4_client(
1277 &self,
1278 mut payload: &ControllerStopOutOfStackDhcpv4ClientRequest,
1279 ) -> Self::StopOutOfStackDhcpv4ClientResponseFut {
1280 fn _decode(
1281 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1282 ) -> Result<ControllerStopOutOfStackDhcpv4ClientResult, fidl::Error> {
1283 let _response = fidl::client::decode_transaction_body::<
1284 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>,
1285 fidl::encoding::DefaultFuchsiaResourceDialect,
1286 0x5d47aa5213164364,
1287 >(_buf?)?;
1288 Ok(_response.map(|x| x))
1289 }
1290 self.client.send_query_and_decode::<
1291 ControllerStopOutOfStackDhcpv4ClientRequest,
1292 ControllerStopOutOfStackDhcpv4ClientResult,
1293 >(
1294 payload,
1295 0x5d47aa5213164364,
1296 fidl::encoding::DynamicFlags::empty(),
1297 _decode,
1298 )
1299 }
1300}
1301
1302pub struct ControllerEventStream {
1303 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1304}
1305
1306impl std::marker::Unpin for ControllerEventStream {}
1307
1308impl futures::stream::FusedStream for ControllerEventStream {
1309 fn is_terminated(&self) -> bool {
1310 self.event_receiver.is_terminated()
1311 }
1312}
1313
1314impl futures::Stream for ControllerEventStream {
1315 type Item = Result<ControllerEvent, fidl::Error>;
1316
1317 fn poll_next(
1318 mut self: std::pin::Pin<&mut Self>,
1319 cx: &mut std::task::Context<'_>,
1320 ) -> std::task::Poll<Option<Self::Item>> {
1321 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1322 &mut self.event_receiver,
1323 cx
1324 )?) {
1325 Some(buf) => std::task::Poll::Ready(Some(ControllerEvent::decode(buf))),
1326 None => std::task::Poll::Ready(None),
1327 }
1328 }
1329}
1330
1331#[derive(Debug)]
1332pub enum ControllerEvent {}
1333
1334impl ControllerEvent {
1335 fn decode(
1337 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1338 ) -> Result<ControllerEvent, fidl::Error> {
1339 let (bytes, _handles) = buf.split_mut();
1340 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1341 debug_assert_eq!(tx_header.tx_id, 0);
1342 match tx_header.ordinal {
1343 _ => Err(fidl::Error::UnknownOrdinal {
1344 ordinal: tx_header.ordinal,
1345 protocol_name: <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1346 }),
1347 }
1348 }
1349}
1350
1351pub struct ControllerRequestStream {
1353 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1354 is_terminated: bool,
1355}
1356
1357impl std::marker::Unpin for ControllerRequestStream {}
1358
1359impl futures::stream::FusedStream for ControllerRequestStream {
1360 fn is_terminated(&self) -> bool {
1361 self.is_terminated
1362 }
1363}
1364
1365impl fidl::endpoints::RequestStream for ControllerRequestStream {
1366 type Protocol = ControllerMarker;
1367 type ControlHandle = ControllerControlHandle;
1368
1369 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1370 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1371 }
1372
1373 fn control_handle(&self) -> Self::ControlHandle {
1374 ControllerControlHandle { inner: self.inner.clone() }
1375 }
1376
1377 fn into_inner(
1378 self,
1379 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1380 {
1381 (self.inner, self.is_terminated)
1382 }
1383
1384 fn from_inner(
1385 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1386 is_terminated: bool,
1387 ) -> Self {
1388 Self { inner, is_terminated }
1389 }
1390}
1391
1392impl futures::Stream for ControllerRequestStream {
1393 type Item = Result<ControllerRequest, fidl::Error>;
1394
1395 fn poll_next(
1396 mut self: std::pin::Pin<&mut Self>,
1397 cx: &mut std::task::Context<'_>,
1398 ) -> std::task::Poll<Option<Self::Item>> {
1399 let this = &mut *self;
1400 if this.inner.check_shutdown(cx) {
1401 this.is_terminated = true;
1402 return std::task::Poll::Ready(None);
1403 }
1404 if this.is_terminated {
1405 panic!("polled ControllerRequestStream after completion");
1406 }
1407 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1408 |bytes, handles| {
1409 match this.inner.channel().read_etc(cx, bytes, handles) {
1410 std::task::Poll::Ready(Ok(())) => {}
1411 std::task::Poll::Pending => return std::task::Poll::Pending,
1412 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1413 this.is_terminated = true;
1414 return std::task::Poll::Ready(None);
1415 }
1416 std::task::Poll::Ready(Err(e)) => {
1417 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1418 e.into(),
1419 ))));
1420 }
1421 }
1422
1423 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1425
1426 std::task::Poll::Ready(Some(match header.ordinal {
1427 0x58c1fa7335d4c5c2 => {
1428 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1429 let mut req = fidl::new_empty!(
1430 ControllerStartHermeticNetworkRealmRequest,
1431 fidl::encoding::DefaultFuchsiaResourceDialect
1432 );
1433 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartHermeticNetworkRealmRequest>(&header, _body_bytes, handles, &mut req)?;
1434 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1435 Ok(ControllerRequest::StartHermeticNetworkRealm {
1436 netstack: req.netstack,
1437
1438 responder: ControllerStartHermeticNetworkRealmResponder {
1439 control_handle: std::mem::ManuallyDrop::new(control_handle),
1440 tx_id: header.tx_id,
1441 },
1442 })
1443 }
1444 0x49d3c2501cd2f635 => {
1445 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1446 let mut req = fidl::new_empty!(
1447 fidl::encoding::EmptyPayload,
1448 fidl::encoding::DefaultFuchsiaResourceDialect
1449 );
1450 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1451 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1452 Ok(ControllerRequest::StopHermeticNetworkRealm {
1453 responder: ControllerStopHermeticNetworkRealmResponder {
1454 control_handle: std::mem::ManuallyDrop::new(control_handle),
1455 tx_id: header.tx_id,
1456 },
1457 })
1458 }
1459 0x668ded2d2b619c15 => {
1460 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1461 let mut req = fidl::new_empty!(
1462 ControllerAddInterfaceRequest,
1463 fidl::encoding::DefaultFuchsiaResourceDialect
1464 );
1465 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerAddInterfaceRequest>(&header, _body_bytes, handles, &mut req)?;
1466 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1467 Ok(ControllerRequest::AddInterface {
1468 mac_address: req.mac_address,
1469 name: req.name,
1470 wait_any_ip_address: req.wait_any_ip_address,
1471
1472 responder: ControllerAddInterfaceResponder {
1473 control_handle: std::mem::ManuallyDrop::new(control_handle),
1474 tx_id: header.tx_id,
1475 },
1476 })
1477 }
1478 0x6523a401f22bf664 => {
1479 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1480 let mut req = fidl::new_empty!(
1481 ControllerStartStubRequest,
1482 fidl::encoding::DefaultFuchsiaResourceDialect
1483 );
1484 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartStubRequest>(&header, _body_bytes, handles, &mut req)?;
1485 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1486 Ok(ControllerRequest::StartStub {
1487 component_url: req.component_url,
1488
1489 responder: ControllerStartStubResponder {
1490 control_handle: std::mem::ManuallyDrop::new(control_handle),
1491 tx_id: header.tx_id,
1492 },
1493 })
1494 }
1495 0x582c32b564ff4bb4 => {
1496 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1497 let mut req = fidl::new_empty!(
1498 fidl::encoding::EmptyPayload,
1499 fidl::encoding::DefaultFuchsiaResourceDialect
1500 );
1501 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1502 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1503 Ok(ControllerRequest::StopStub {
1504 responder: ControllerStopStubResponder {
1505 control_handle: std::mem::ManuallyDrop::new(control_handle),
1506 tx_id: header.tx_id,
1507 },
1508 })
1509 }
1510 0x60c9b6cf952fa4d1 => {
1511 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1512 let mut req = fidl::new_empty!(
1513 ControllerPingRequest,
1514 fidl::encoding::DefaultFuchsiaResourceDialect
1515 );
1516 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerPingRequest>(&header, _body_bytes, handles, &mut req)?;
1517 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1518 Ok(ControllerRequest::Ping {
1519 target: req.target,
1520 payload_length: req.payload_length,
1521 interface_name: req.interface_name,
1522 timeout: req.timeout,
1523
1524 responder: ControllerPingResponder {
1525 control_handle: std::mem::ManuallyDrop::new(control_handle),
1526 tx_id: header.tx_id,
1527 },
1528 })
1529 }
1530 0x333fb354db30f664 => {
1531 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1532 let mut req = fidl::new_empty!(
1533 ControllerPollUdpRequest,
1534 fidl::encoding::DefaultFuchsiaResourceDialect
1535 );
1536 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerPollUdpRequest>(&header, _body_bytes, handles, &mut req)?;
1537 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1538 Ok(ControllerRequest::PollUdp {
1539 target: req.target,
1540 payload: req.payload,
1541 timeout: req.timeout,
1542 num_retries: req.num_retries,
1543
1544 responder: ControllerPollUdpResponder {
1545 control_handle: std::mem::ManuallyDrop::new(control_handle),
1546 tx_id: header.tx_id,
1547 },
1548 })
1549 }
1550 0xbdbb4095640a3f4 => {
1551 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1552 let mut req = fidl::new_empty!(
1553 ControllerJoinMulticastGroupRequest,
1554 fidl::encoding::DefaultFuchsiaResourceDialect
1555 );
1556 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerJoinMulticastGroupRequest>(&header, _body_bytes, handles, &mut req)?;
1557 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1558 Ok(ControllerRequest::JoinMulticastGroup {
1559 address: req.address,
1560 interface_id: req.interface_id,
1561
1562 responder: ControllerJoinMulticastGroupResponder {
1563 control_handle: std::mem::ManuallyDrop::new(control_handle),
1564 tx_id: header.tx_id,
1565 },
1566 })
1567 }
1568 0x32ecf4e40124a29a => {
1569 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1570 let mut req = fidl::new_empty!(
1571 ControllerLeaveMulticastGroupRequest,
1572 fidl::encoding::DefaultFuchsiaResourceDialect
1573 );
1574 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerLeaveMulticastGroupRequest>(&header, _body_bytes, handles, &mut req)?;
1575 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1576 Ok(ControllerRequest::LeaveMulticastGroup {
1577 address: req.address,
1578 interface_id: req.interface_id,
1579
1580 responder: ControllerLeaveMulticastGroupResponder {
1581 control_handle: std::mem::ManuallyDrop::new(control_handle),
1582 tx_id: header.tx_id,
1583 },
1584 })
1585 }
1586 0x756c9b70864b7744 => {
1587 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1588 let mut req = fidl::new_empty!(
1589 ControllerStartDhcpv6ClientRequest,
1590 fidl::encoding::DefaultFuchsiaResourceDialect
1591 );
1592 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartDhcpv6ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1593 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1594 Ok(ControllerRequest::StartDhcpv6Client {
1595 params: req.params,
1596
1597 responder: ControllerStartDhcpv6ClientResponder {
1598 control_handle: std::mem::ManuallyDrop::new(control_handle),
1599 tx_id: header.tx_id,
1600 },
1601 })
1602 }
1603 0x16e93478e663d523 => {
1604 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1605 let mut req = fidl::new_empty!(
1606 fidl::encoding::EmptyPayload,
1607 fidl::encoding::DefaultFuchsiaResourceDialect
1608 );
1609 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1610 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1611 Ok(ControllerRequest::StopDhcpv6Client {
1612 responder: ControllerStopDhcpv6ClientResponder {
1613 control_handle: std::mem::ManuallyDrop::new(control_handle),
1614 tx_id: header.tx_id,
1615 },
1616 })
1617 }
1618 0x37eeec41c0077625 => {
1619 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1620 let mut req = fidl::new_empty!(
1621 ControllerStartOutOfStackDhcpv4ClientRequest,
1622 fidl::encoding::DefaultFuchsiaResourceDialect
1623 );
1624 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStartOutOfStackDhcpv4ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1625 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1626 Ok(ControllerRequest::StartOutOfStackDhcpv4Client {
1627 payload: req,
1628 responder: ControllerStartOutOfStackDhcpv4ClientResponder {
1629 control_handle: std::mem::ManuallyDrop::new(control_handle),
1630 tx_id: header.tx_id,
1631 },
1632 })
1633 }
1634 0x5d47aa5213164364 => {
1635 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1636 let mut req = fidl::new_empty!(
1637 ControllerStopOutOfStackDhcpv4ClientRequest,
1638 fidl::encoding::DefaultFuchsiaResourceDialect
1639 );
1640 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerStopOutOfStackDhcpv4ClientRequest>(&header, _body_bytes, handles, &mut req)?;
1641 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1642 Ok(ControllerRequest::StopOutOfStackDhcpv4Client {
1643 payload: req,
1644 responder: ControllerStopOutOfStackDhcpv4ClientResponder {
1645 control_handle: std::mem::ManuallyDrop::new(control_handle),
1646 tx_id: header.tx_id,
1647 },
1648 })
1649 }
1650 _ => Err(fidl::Error::UnknownOrdinal {
1651 ordinal: header.ordinal,
1652 protocol_name:
1653 <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1654 }),
1655 }))
1656 },
1657 )
1658 }
1659}
1660
1661#[derive(Debug)]
1672pub enum ControllerRequest {
1673 StartHermeticNetworkRealm {
1689 netstack: Netstack,
1690 responder: ControllerStartHermeticNetworkRealmResponder,
1691 },
1692 StopHermeticNetworkRealm { responder: ControllerStopHermeticNetworkRealmResponder },
1705 AddInterface {
1726 mac_address: fidl_fuchsia_net::MacAddress,
1727 name: String,
1728 wait_any_ip_address: bool,
1729 responder: ControllerAddInterfaceResponder,
1730 },
1731 StartStub { component_url: String, responder: ControllerStartStubResponder },
1745 StopStub { responder: ControllerStopStubResponder },
1756 Ping {
1781 target: fidl_fuchsia_net::IpAddress,
1782 payload_length: u16,
1783 interface_name: Option<String>,
1784 timeout: i64,
1785 responder: ControllerPingResponder,
1786 },
1787 PollUdp {
1806 target: fidl_fuchsia_net::SocketAddress,
1807 payload: Vec<u8>,
1808 timeout: i64,
1809 num_retries: u16,
1810 responder: ControllerPollUdpResponder,
1811 },
1812 JoinMulticastGroup {
1829 address: fidl_fuchsia_net::IpAddress,
1830 interface_id: u64,
1831 responder: ControllerJoinMulticastGroupResponder,
1832 },
1833 LeaveMulticastGroup {
1849 address: fidl_fuchsia_net::IpAddress,
1850 interface_id: u64,
1851 responder: ControllerLeaveMulticastGroupResponder,
1852 },
1853 StartDhcpv6Client {
1865 params: fidl_fuchsia_net_dhcpv6::NewClientParams,
1866 responder: ControllerStartDhcpv6ClientResponder,
1867 },
1868 StopDhcpv6Client { responder: ControllerStopDhcpv6ClientResponder },
1872 StartOutOfStackDhcpv4Client {
1877 payload: ControllerStartOutOfStackDhcpv4ClientRequest,
1878 responder: ControllerStartOutOfStackDhcpv4ClientResponder,
1879 },
1880 StopOutOfStackDhcpv4Client {
1888 payload: ControllerStopOutOfStackDhcpv4ClientRequest,
1889 responder: ControllerStopOutOfStackDhcpv4ClientResponder,
1890 },
1891}
1892
1893impl ControllerRequest {
1894 #[allow(irrefutable_let_patterns)]
1895 pub fn into_start_hermetic_network_realm(
1896 self,
1897 ) -> Option<(Netstack, ControllerStartHermeticNetworkRealmResponder)> {
1898 if let ControllerRequest::StartHermeticNetworkRealm { netstack, responder } = self {
1899 Some((netstack, responder))
1900 } else {
1901 None
1902 }
1903 }
1904
1905 #[allow(irrefutable_let_patterns)]
1906 pub fn into_stop_hermetic_network_realm(
1907 self,
1908 ) -> Option<(ControllerStopHermeticNetworkRealmResponder)> {
1909 if let ControllerRequest::StopHermeticNetworkRealm { responder } = self {
1910 Some((responder))
1911 } else {
1912 None
1913 }
1914 }
1915
1916 #[allow(irrefutable_let_patterns)]
1917 pub fn into_add_interface(
1918 self,
1919 ) -> Option<(fidl_fuchsia_net::MacAddress, String, bool, ControllerAddInterfaceResponder)> {
1920 if let ControllerRequest::AddInterface {
1921 mac_address,
1922 name,
1923 wait_any_ip_address,
1924 responder,
1925 } = self
1926 {
1927 Some((mac_address, name, wait_any_ip_address, responder))
1928 } else {
1929 None
1930 }
1931 }
1932
1933 #[allow(irrefutable_let_patterns)]
1934 pub fn into_start_stub(self) -> Option<(String, ControllerStartStubResponder)> {
1935 if let ControllerRequest::StartStub { component_url, responder } = self {
1936 Some((component_url, responder))
1937 } else {
1938 None
1939 }
1940 }
1941
1942 #[allow(irrefutable_let_patterns)]
1943 pub fn into_stop_stub(self) -> Option<(ControllerStopStubResponder)> {
1944 if let ControllerRequest::StopStub { responder } = self { Some((responder)) } else { None }
1945 }
1946
1947 #[allow(irrefutable_let_patterns)]
1948 pub fn into_ping(
1949 self,
1950 ) -> Option<(fidl_fuchsia_net::IpAddress, u16, Option<String>, i64, ControllerPingResponder)>
1951 {
1952 if let ControllerRequest::Ping {
1953 target,
1954 payload_length,
1955 interface_name,
1956 timeout,
1957 responder,
1958 } = self
1959 {
1960 Some((target, payload_length, interface_name, timeout, responder))
1961 } else {
1962 None
1963 }
1964 }
1965
1966 #[allow(irrefutable_let_patterns)]
1967 pub fn into_poll_udp(
1968 self,
1969 ) -> Option<(fidl_fuchsia_net::SocketAddress, Vec<u8>, i64, u16, ControllerPollUdpResponder)>
1970 {
1971 if let ControllerRequest::PollUdp { target, payload, timeout, num_retries, responder } =
1972 self
1973 {
1974 Some((target, payload, timeout, num_retries, responder))
1975 } else {
1976 None
1977 }
1978 }
1979
1980 #[allow(irrefutable_let_patterns)]
1981 pub fn into_join_multicast_group(
1982 self,
1983 ) -> Option<(fidl_fuchsia_net::IpAddress, u64, ControllerJoinMulticastGroupResponder)> {
1984 if let ControllerRequest::JoinMulticastGroup { address, interface_id, responder } = self {
1985 Some((address, interface_id, responder))
1986 } else {
1987 None
1988 }
1989 }
1990
1991 #[allow(irrefutable_let_patterns)]
1992 pub fn into_leave_multicast_group(
1993 self,
1994 ) -> Option<(fidl_fuchsia_net::IpAddress, u64, ControllerLeaveMulticastGroupResponder)> {
1995 if let ControllerRequest::LeaveMulticastGroup { address, interface_id, responder } = self {
1996 Some((address, interface_id, responder))
1997 } else {
1998 None
1999 }
2000 }
2001
2002 #[allow(irrefutable_let_patterns)]
2003 pub fn into_start_dhcpv6_client(
2004 self,
2005 ) -> Option<(fidl_fuchsia_net_dhcpv6::NewClientParams, ControllerStartDhcpv6ClientResponder)>
2006 {
2007 if let ControllerRequest::StartDhcpv6Client { params, responder } = self {
2008 Some((params, responder))
2009 } else {
2010 None
2011 }
2012 }
2013
2014 #[allow(irrefutable_let_patterns)]
2015 pub fn into_stop_dhcpv6_client(self) -> Option<(ControllerStopDhcpv6ClientResponder)> {
2016 if let ControllerRequest::StopDhcpv6Client { responder } = self {
2017 Some((responder))
2018 } else {
2019 None
2020 }
2021 }
2022
2023 #[allow(irrefutable_let_patterns)]
2024 pub fn into_start_out_of_stack_dhcpv4_client(
2025 self,
2026 ) -> Option<(
2027 ControllerStartOutOfStackDhcpv4ClientRequest,
2028 ControllerStartOutOfStackDhcpv4ClientResponder,
2029 )> {
2030 if let ControllerRequest::StartOutOfStackDhcpv4Client { payload, responder } = self {
2031 Some((payload, responder))
2032 } else {
2033 None
2034 }
2035 }
2036
2037 #[allow(irrefutable_let_patterns)]
2038 pub fn into_stop_out_of_stack_dhcpv4_client(
2039 self,
2040 ) -> Option<(
2041 ControllerStopOutOfStackDhcpv4ClientRequest,
2042 ControllerStopOutOfStackDhcpv4ClientResponder,
2043 )> {
2044 if let ControllerRequest::StopOutOfStackDhcpv4Client { payload, responder } = self {
2045 Some((payload, responder))
2046 } else {
2047 None
2048 }
2049 }
2050
2051 pub fn method_name(&self) -> &'static str {
2053 match *self {
2054 ControllerRequest::StartHermeticNetworkRealm { .. } => "start_hermetic_network_realm",
2055 ControllerRequest::StopHermeticNetworkRealm { .. } => "stop_hermetic_network_realm",
2056 ControllerRequest::AddInterface { .. } => "add_interface",
2057 ControllerRequest::StartStub { .. } => "start_stub",
2058 ControllerRequest::StopStub { .. } => "stop_stub",
2059 ControllerRequest::Ping { .. } => "ping",
2060 ControllerRequest::PollUdp { .. } => "poll_udp",
2061 ControllerRequest::JoinMulticastGroup { .. } => "join_multicast_group",
2062 ControllerRequest::LeaveMulticastGroup { .. } => "leave_multicast_group",
2063 ControllerRequest::StartDhcpv6Client { .. } => "start_dhcpv6_client",
2064 ControllerRequest::StopDhcpv6Client { .. } => "stop_dhcpv6_client",
2065 ControllerRequest::StartOutOfStackDhcpv4Client { .. } => {
2066 "start_out_of_stack_dhcpv4_client"
2067 }
2068 ControllerRequest::StopOutOfStackDhcpv4Client { .. } => {
2069 "stop_out_of_stack_dhcpv4_client"
2070 }
2071 }
2072 }
2073}
2074
2075#[derive(Debug, Clone)]
2076pub struct ControllerControlHandle {
2077 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2078}
2079
2080impl fidl::endpoints::ControlHandle for ControllerControlHandle {
2081 fn shutdown(&self) {
2082 self.inner.shutdown()
2083 }
2084
2085 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2086 self.inner.shutdown_with_epitaph(status)
2087 }
2088
2089 fn is_closed(&self) -> bool {
2090 self.inner.channel().is_closed()
2091 }
2092 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2093 self.inner.channel().on_closed()
2094 }
2095
2096 #[cfg(target_os = "fuchsia")]
2097 fn signal_peer(
2098 &self,
2099 clear_mask: zx::Signals,
2100 set_mask: zx::Signals,
2101 ) -> Result<(), zx_status::Status> {
2102 use fidl::Peered;
2103 self.inner.channel().signal_peer(clear_mask, set_mask)
2104 }
2105}
2106
2107impl ControllerControlHandle {}
2108
2109#[must_use = "FIDL methods require a response to be sent"]
2110#[derive(Debug)]
2111pub struct ControllerStartHermeticNetworkRealmResponder {
2112 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2113 tx_id: u32,
2114}
2115
2116impl std::ops::Drop for ControllerStartHermeticNetworkRealmResponder {
2120 fn drop(&mut self) {
2121 self.control_handle.shutdown();
2122 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2124 }
2125}
2126
2127impl fidl::endpoints::Responder for ControllerStartHermeticNetworkRealmResponder {
2128 type ControlHandle = ControllerControlHandle;
2129
2130 fn control_handle(&self) -> &ControllerControlHandle {
2131 &self.control_handle
2132 }
2133
2134 fn drop_without_shutdown(mut self) {
2135 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2137 std::mem::forget(self);
2139 }
2140}
2141
2142impl ControllerStartHermeticNetworkRealmResponder {
2143 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2147 let _result = self.send_raw(result);
2148 if _result.is_err() {
2149 self.control_handle.shutdown();
2150 }
2151 self.drop_without_shutdown();
2152 _result
2153 }
2154
2155 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2157 let _result = self.send_raw(result);
2158 self.drop_without_shutdown();
2159 _result
2160 }
2161
2162 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2163 self.control_handle
2164 .inner
2165 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2166 result,
2167 self.tx_id,
2168 0x58c1fa7335d4c5c2,
2169 fidl::encoding::DynamicFlags::empty(),
2170 )
2171 }
2172}
2173
2174#[must_use = "FIDL methods require a response to be sent"]
2175#[derive(Debug)]
2176pub struct ControllerStopHermeticNetworkRealmResponder {
2177 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2178 tx_id: u32,
2179}
2180
2181impl std::ops::Drop for ControllerStopHermeticNetworkRealmResponder {
2185 fn drop(&mut self) {
2186 self.control_handle.shutdown();
2187 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2189 }
2190}
2191
2192impl fidl::endpoints::Responder for ControllerStopHermeticNetworkRealmResponder {
2193 type ControlHandle = ControllerControlHandle;
2194
2195 fn control_handle(&self) -> &ControllerControlHandle {
2196 &self.control_handle
2197 }
2198
2199 fn drop_without_shutdown(mut self) {
2200 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2202 std::mem::forget(self);
2204 }
2205}
2206
2207impl ControllerStopHermeticNetworkRealmResponder {
2208 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2212 let _result = self.send_raw(result);
2213 if _result.is_err() {
2214 self.control_handle.shutdown();
2215 }
2216 self.drop_without_shutdown();
2217 _result
2218 }
2219
2220 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2222 let _result = self.send_raw(result);
2223 self.drop_without_shutdown();
2224 _result
2225 }
2226
2227 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2228 self.control_handle
2229 .inner
2230 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2231 result,
2232 self.tx_id,
2233 0x49d3c2501cd2f635,
2234 fidl::encoding::DynamicFlags::empty(),
2235 )
2236 }
2237}
2238
2239#[must_use = "FIDL methods require a response to be sent"]
2240#[derive(Debug)]
2241pub struct ControllerAddInterfaceResponder {
2242 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2243 tx_id: u32,
2244}
2245
2246impl std::ops::Drop for ControllerAddInterfaceResponder {
2250 fn drop(&mut self) {
2251 self.control_handle.shutdown();
2252 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2254 }
2255}
2256
2257impl fidl::endpoints::Responder for ControllerAddInterfaceResponder {
2258 type ControlHandle = ControllerControlHandle;
2259
2260 fn control_handle(&self) -> &ControllerControlHandle {
2261 &self.control_handle
2262 }
2263
2264 fn drop_without_shutdown(mut self) {
2265 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2267 std::mem::forget(self);
2269 }
2270}
2271
2272impl ControllerAddInterfaceResponder {
2273 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2277 let _result = self.send_raw(result);
2278 if _result.is_err() {
2279 self.control_handle.shutdown();
2280 }
2281 self.drop_without_shutdown();
2282 _result
2283 }
2284
2285 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2287 let _result = self.send_raw(result);
2288 self.drop_without_shutdown();
2289 _result
2290 }
2291
2292 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2293 self.control_handle
2294 .inner
2295 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2296 result,
2297 self.tx_id,
2298 0x668ded2d2b619c15,
2299 fidl::encoding::DynamicFlags::empty(),
2300 )
2301 }
2302}
2303
2304#[must_use = "FIDL methods require a response to be sent"]
2305#[derive(Debug)]
2306pub struct ControllerStartStubResponder {
2307 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2308 tx_id: u32,
2309}
2310
2311impl std::ops::Drop for ControllerStartStubResponder {
2315 fn drop(&mut self) {
2316 self.control_handle.shutdown();
2317 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2319 }
2320}
2321
2322impl fidl::endpoints::Responder for ControllerStartStubResponder {
2323 type ControlHandle = ControllerControlHandle;
2324
2325 fn control_handle(&self) -> &ControllerControlHandle {
2326 &self.control_handle
2327 }
2328
2329 fn drop_without_shutdown(mut self) {
2330 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2332 std::mem::forget(self);
2334 }
2335}
2336
2337impl ControllerStartStubResponder {
2338 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2342 let _result = self.send_raw(result);
2343 if _result.is_err() {
2344 self.control_handle.shutdown();
2345 }
2346 self.drop_without_shutdown();
2347 _result
2348 }
2349
2350 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2352 let _result = self.send_raw(result);
2353 self.drop_without_shutdown();
2354 _result
2355 }
2356
2357 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2358 self.control_handle
2359 .inner
2360 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2361 result,
2362 self.tx_id,
2363 0x6523a401f22bf664,
2364 fidl::encoding::DynamicFlags::empty(),
2365 )
2366 }
2367}
2368
2369#[must_use = "FIDL methods require a response to be sent"]
2370#[derive(Debug)]
2371pub struct ControllerStopStubResponder {
2372 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2373 tx_id: u32,
2374}
2375
2376impl std::ops::Drop for ControllerStopStubResponder {
2380 fn drop(&mut self) {
2381 self.control_handle.shutdown();
2382 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2384 }
2385}
2386
2387impl fidl::endpoints::Responder for ControllerStopStubResponder {
2388 type ControlHandle = ControllerControlHandle;
2389
2390 fn control_handle(&self) -> &ControllerControlHandle {
2391 &self.control_handle
2392 }
2393
2394 fn drop_without_shutdown(mut self) {
2395 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2397 std::mem::forget(self);
2399 }
2400}
2401
2402impl ControllerStopStubResponder {
2403 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2407 let _result = self.send_raw(result);
2408 if _result.is_err() {
2409 self.control_handle.shutdown();
2410 }
2411 self.drop_without_shutdown();
2412 _result
2413 }
2414
2415 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2417 let _result = self.send_raw(result);
2418 self.drop_without_shutdown();
2419 _result
2420 }
2421
2422 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2423 self.control_handle
2424 .inner
2425 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2426 result,
2427 self.tx_id,
2428 0x582c32b564ff4bb4,
2429 fidl::encoding::DynamicFlags::empty(),
2430 )
2431 }
2432}
2433
2434#[must_use = "FIDL methods require a response to be sent"]
2435#[derive(Debug)]
2436pub struct ControllerPingResponder {
2437 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2438 tx_id: u32,
2439}
2440
2441impl std::ops::Drop for ControllerPingResponder {
2445 fn drop(&mut self) {
2446 self.control_handle.shutdown();
2447 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2449 }
2450}
2451
2452impl fidl::endpoints::Responder for ControllerPingResponder {
2453 type ControlHandle = ControllerControlHandle;
2454
2455 fn control_handle(&self) -> &ControllerControlHandle {
2456 &self.control_handle
2457 }
2458
2459 fn drop_without_shutdown(mut self) {
2460 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2462 std::mem::forget(self);
2464 }
2465}
2466
2467impl ControllerPingResponder {
2468 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2472 let _result = self.send_raw(result);
2473 if _result.is_err() {
2474 self.control_handle.shutdown();
2475 }
2476 self.drop_without_shutdown();
2477 _result
2478 }
2479
2480 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2482 let _result = self.send_raw(result);
2483 self.drop_without_shutdown();
2484 _result
2485 }
2486
2487 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2488 self.control_handle
2489 .inner
2490 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2491 result,
2492 self.tx_id,
2493 0x60c9b6cf952fa4d1,
2494 fidl::encoding::DynamicFlags::empty(),
2495 )
2496 }
2497}
2498
2499#[must_use = "FIDL methods require a response to be sent"]
2500#[derive(Debug)]
2501pub struct ControllerPollUdpResponder {
2502 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2503 tx_id: u32,
2504}
2505
2506impl std::ops::Drop for ControllerPollUdpResponder {
2510 fn drop(&mut self) {
2511 self.control_handle.shutdown();
2512 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2514 }
2515}
2516
2517impl fidl::endpoints::Responder for ControllerPollUdpResponder {
2518 type ControlHandle = ControllerControlHandle;
2519
2520 fn control_handle(&self) -> &ControllerControlHandle {
2521 &self.control_handle
2522 }
2523
2524 fn drop_without_shutdown(mut self) {
2525 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2527 std::mem::forget(self);
2529 }
2530}
2531
2532impl ControllerPollUdpResponder {
2533 pub fn send(self, mut result: Result<&[u8], Error>) -> Result<(), fidl::Error> {
2537 let _result = self.send_raw(result);
2538 if _result.is_err() {
2539 self.control_handle.shutdown();
2540 }
2541 self.drop_without_shutdown();
2542 _result
2543 }
2544
2545 pub fn send_no_shutdown_on_err(
2547 self,
2548 mut result: Result<&[u8], Error>,
2549 ) -> Result<(), fidl::Error> {
2550 let _result = self.send_raw(result);
2551 self.drop_without_shutdown();
2552 _result
2553 }
2554
2555 fn send_raw(&self, mut result: Result<&[u8], Error>) -> Result<(), fidl::Error> {
2556 self.control_handle
2557 .inner
2558 .send::<fidl::encoding::ResultType<ControllerPollUdpResponse, Error>>(
2559 result.map(|payload| (payload,)),
2560 self.tx_id,
2561 0x333fb354db30f664,
2562 fidl::encoding::DynamicFlags::empty(),
2563 )
2564 }
2565}
2566
2567#[must_use = "FIDL methods require a response to be sent"]
2568#[derive(Debug)]
2569pub struct ControllerJoinMulticastGroupResponder {
2570 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2571 tx_id: u32,
2572}
2573
2574impl std::ops::Drop for ControllerJoinMulticastGroupResponder {
2578 fn drop(&mut self) {
2579 self.control_handle.shutdown();
2580 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2582 }
2583}
2584
2585impl fidl::endpoints::Responder for ControllerJoinMulticastGroupResponder {
2586 type ControlHandle = ControllerControlHandle;
2587
2588 fn control_handle(&self) -> &ControllerControlHandle {
2589 &self.control_handle
2590 }
2591
2592 fn drop_without_shutdown(mut self) {
2593 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2595 std::mem::forget(self);
2597 }
2598}
2599
2600impl ControllerJoinMulticastGroupResponder {
2601 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2605 let _result = self.send_raw(result);
2606 if _result.is_err() {
2607 self.control_handle.shutdown();
2608 }
2609 self.drop_without_shutdown();
2610 _result
2611 }
2612
2613 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2615 let _result = self.send_raw(result);
2616 self.drop_without_shutdown();
2617 _result
2618 }
2619
2620 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2621 self.control_handle
2622 .inner
2623 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2624 result,
2625 self.tx_id,
2626 0xbdbb4095640a3f4,
2627 fidl::encoding::DynamicFlags::empty(),
2628 )
2629 }
2630}
2631
2632#[must_use = "FIDL methods require a response to be sent"]
2633#[derive(Debug)]
2634pub struct ControllerLeaveMulticastGroupResponder {
2635 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2636 tx_id: u32,
2637}
2638
2639impl std::ops::Drop for ControllerLeaveMulticastGroupResponder {
2643 fn drop(&mut self) {
2644 self.control_handle.shutdown();
2645 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2647 }
2648}
2649
2650impl fidl::endpoints::Responder for ControllerLeaveMulticastGroupResponder {
2651 type ControlHandle = ControllerControlHandle;
2652
2653 fn control_handle(&self) -> &ControllerControlHandle {
2654 &self.control_handle
2655 }
2656
2657 fn drop_without_shutdown(mut self) {
2658 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2660 std::mem::forget(self);
2662 }
2663}
2664
2665impl ControllerLeaveMulticastGroupResponder {
2666 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2670 let _result = self.send_raw(result);
2671 if _result.is_err() {
2672 self.control_handle.shutdown();
2673 }
2674 self.drop_without_shutdown();
2675 _result
2676 }
2677
2678 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2680 let _result = self.send_raw(result);
2681 self.drop_without_shutdown();
2682 _result
2683 }
2684
2685 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2686 self.control_handle
2687 .inner
2688 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2689 result,
2690 self.tx_id,
2691 0x32ecf4e40124a29a,
2692 fidl::encoding::DynamicFlags::empty(),
2693 )
2694 }
2695}
2696
2697#[must_use = "FIDL methods require a response to be sent"]
2698#[derive(Debug)]
2699pub struct ControllerStartDhcpv6ClientResponder {
2700 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2701 tx_id: u32,
2702}
2703
2704impl std::ops::Drop for ControllerStartDhcpv6ClientResponder {
2708 fn drop(&mut self) {
2709 self.control_handle.shutdown();
2710 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2712 }
2713}
2714
2715impl fidl::endpoints::Responder for ControllerStartDhcpv6ClientResponder {
2716 type ControlHandle = ControllerControlHandle;
2717
2718 fn control_handle(&self) -> &ControllerControlHandle {
2719 &self.control_handle
2720 }
2721
2722 fn drop_without_shutdown(mut self) {
2723 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2725 std::mem::forget(self);
2727 }
2728}
2729
2730impl ControllerStartDhcpv6ClientResponder {
2731 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2735 let _result = self.send_raw(result);
2736 if _result.is_err() {
2737 self.control_handle.shutdown();
2738 }
2739 self.drop_without_shutdown();
2740 _result
2741 }
2742
2743 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2745 let _result = self.send_raw(result);
2746 self.drop_without_shutdown();
2747 _result
2748 }
2749
2750 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2751 self.control_handle
2752 .inner
2753 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2754 result,
2755 self.tx_id,
2756 0x756c9b70864b7744,
2757 fidl::encoding::DynamicFlags::empty(),
2758 )
2759 }
2760}
2761
2762#[must_use = "FIDL methods require a response to be sent"]
2763#[derive(Debug)]
2764pub struct ControllerStopDhcpv6ClientResponder {
2765 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2766 tx_id: u32,
2767}
2768
2769impl std::ops::Drop for ControllerStopDhcpv6ClientResponder {
2773 fn drop(&mut self) {
2774 self.control_handle.shutdown();
2775 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2777 }
2778}
2779
2780impl fidl::endpoints::Responder for ControllerStopDhcpv6ClientResponder {
2781 type ControlHandle = ControllerControlHandle;
2782
2783 fn control_handle(&self) -> &ControllerControlHandle {
2784 &self.control_handle
2785 }
2786
2787 fn drop_without_shutdown(mut self) {
2788 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2790 std::mem::forget(self);
2792 }
2793}
2794
2795impl ControllerStopDhcpv6ClientResponder {
2796 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2800 let _result = self.send_raw(result);
2801 if _result.is_err() {
2802 self.control_handle.shutdown();
2803 }
2804 self.drop_without_shutdown();
2805 _result
2806 }
2807
2808 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2810 let _result = self.send_raw(result);
2811 self.drop_without_shutdown();
2812 _result
2813 }
2814
2815 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2816 self.control_handle
2817 .inner
2818 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2819 result,
2820 self.tx_id,
2821 0x16e93478e663d523,
2822 fidl::encoding::DynamicFlags::empty(),
2823 )
2824 }
2825}
2826
2827#[must_use = "FIDL methods require a response to be sent"]
2828#[derive(Debug)]
2829pub struct ControllerStartOutOfStackDhcpv4ClientResponder {
2830 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2831 tx_id: u32,
2832}
2833
2834impl std::ops::Drop for ControllerStartOutOfStackDhcpv4ClientResponder {
2838 fn drop(&mut self) {
2839 self.control_handle.shutdown();
2840 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2842 }
2843}
2844
2845impl fidl::endpoints::Responder for ControllerStartOutOfStackDhcpv4ClientResponder {
2846 type ControlHandle = ControllerControlHandle;
2847
2848 fn control_handle(&self) -> &ControllerControlHandle {
2849 &self.control_handle
2850 }
2851
2852 fn drop_without_shutdown(mut self) {
2853 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2855 std::mem::forget(self);
2857 }
2858}
2859
2860impl ControllerStartOutOfStackDhcpv4ClientResponder {
2861 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2865 let _result = self.send_raw(result);
2866 if _result.is_err() {
2867 self.control_handle.shutdown();
2868 }
2869 self.drop_without_shutdown();
2870 _result
2871 }
2872
2873 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2875 let _result = self.send_raw(result);
2876 self.drop_without_shutdown();
2877 _result
2878 }
2879
2880 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2881 self.control_handle
2882 .inner
2883 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2884 result,
2885 self.tx_id,
2886 0x37eeec41c0077625,
2887 fidl::encoding::DynamicFlags::empty(),
2888 )
2889 }
2890}
2891
2892#[must_use = "FIDL methods require a response to be sent"]
2893#[derive(Debug)]
2894pub struct ControllerStopOutOfStackDhcpv4ClientResponder {
2895 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2896 tx_id: u32,
2897}
2898
2899impl std::ops::Drop for ControllerStopOutOfStackDhcpv4ClientResponder {
2903 fn drop(&mut self) {
2904 self.control_handle.shutdown();
2905 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2907 }
2908}
2909
2910impl fidl::endpoints::Responder for ControllerStopOutOfStackDhcpv4ClientResponder {
2911 type ControlHandle = ControllerControlHandle;
2912
2913 fn control_handle(&self) -> &ControllerControlHandle {
2914 &self.control_handle
2915 }
2916
2917 fn drop_without_shutdown(mut self) {
2918 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2920 std::mem::forget(self);
2922 }
2923}
2924
2925impl ControllerStopOutOfStackDhcpv4ClientResponder {
2926 pub fn send(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2930 let _result = self.send_raw(result);
2931 if _result.is_err() {
2932 self.control_handle.shutdown();
2933 }
2934 self.drop_without_shutdown();
2935 _result
2936 }
2937
2938 pub fn send_no_shutdown_on_err(self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2940 let _result = self.send_raw(result);
2941 self.drop_without_shutdown();
2942 _result
2943 }
2944
2945 fn send_raw(&self, mut result: Result<(), Error>) -> Result<(), fidl::Error> {
2946 self.control_handle
2947 .inner
2948 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, Error>>(
2949 result,
2950 self.tx_id,
2951 0x5d47aa5213164364,
2952 fidl::encoding::DynamicFlags::empty(),
2953 )
2954 }
2955}
2956
2957mod internal {
2958 use super::*;
2959}