Function netstack3_device::ethernet::send_ip_frame

source ยท
pub fn send_ip_frame<BC, CC, I, S>(
    core_ctx: &mut CC,
    bindings_ctx: &mut BC,
    device_id: &CC::DeviceId,
    destination: IpPacketDestination<I, &DeviceId<BC>>,
    body: S,
) -> Result<(), SendFrameError<S>>
where BC: EthernetIpLinkDeviceBindingsContext + LinkResolutionContext<EthernetLinkDevice>, CC: EthernetIpLinkDeviceDynamicStateContext<BC> + NudHandler<I, EthernetLinkDevice, BC> + TransmitQueueHandler<EthernetLinkDevice, BC, Meta = ()> + ResourceCounterContext<CC::DeviceId, DeviceCounters>, I: EthernetIpExt + BroadcastIpExt, S: Serializer, S::Buffer: BufferMut,
Expand description

Send an IP packet in an Ethernet frame.

send_ip_frame accepts a device ID, a local IP address, and a serializer. It computes the routing information, serializes the serializer, and sends the resulting buffer in a new Ethernet frame.