pub fn resolve_output_route_to_destination<I: Ip + IpDeviceStateIpExt + IpDeviceIpExt + IpLayerIpExt, BC: IpDeviceBindingsContext<I, CC::DeviceId> + IpLayerBindingsContext<I, CC::DeviceId>, CC: IpStateContext<I> + IpDeviceContext<I> + IpDeviceConfigurationContext<I, BC>>(
core_ctx: &mut CC,
device: Option<&CC::DeviceId>,
src_ip_and_policy: Option<(IpDeviceAddr<I::Addr>, NonLocalSrcAddrPolicy)>,
dst_ip: Option<RoutableIpAddr<I::Addr>>,
marks: &Marks,
) -> Result<ResolvedRoute<I, CC::DeviceId>, ResolveRouteError>
Expand description
Returns the outgoing routing instructions for reaching the given destination.
If a device
is specified, the resolved route is limited to those that
egress over the device.
If src_ip
is specified the resolved route is limited to those that egress
over a device with the address assigned.
This function should only be used for calculating a route for an outgoing packet that is generated by us.