Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ip4Output.h.
Transmit an IP4 packet. The packet comes either from the IP4 child's consumer (IpInstance != NULL) or the IP4 driver itself (IpInstance == NULL). It will route the packet, fragment it, then transmit all the fragments through some interface.
- Parameters
-
[in] | IpSb | The IP4 service instance to transmit the packet |
[in] | IpInstance | The IP4 child that issues the transmission. It is NULL if the packet is from the system. |
[in] | Packet | The user data to send, excluding the IP header. |
[in] | Head | The caller supplied header. The caller should set the following header fields: Tos, TotalLen, Id, tl, Fragment, Protocol, Src and Dst. All the fields are in host byte order. This function will fill in the Ver, HeadLen, Fragment, and checksum. The Fragment only need to include the DF flag. Ip4Output will compute the MF and offset for you. |
[in] | Option | The original option to append to the IP headers |
[in] | OptLen | The length of the option |
[in] | GateWay | The next hop address to transmit packet to. 255.255.255.255 means broadcast. |
[in] | Callback | The callback function to issue when transmission completed. |
[in] | Context | The opaque context for the callback |
- Return values
-
EFI_NO_MAPPING | There is no interface to the destination. |
EFI_NOT_FOUND | There is no route to the destination |
EFI_SUCCESS | The packet is successfully transmitted. |
Others | Failed to transmit the packet. |
Transmit an IP4 packet. The packet comes either from the IP4 child's consumer (IpInstance != NULL) or the IP4 driver itself (IpInstance == NULL). It will route the packet, fragment it, then transmit all the fragments through some interface.
- Parameters
-
[in] | IpSb | The IP4 service instance to transmit the packet |
[in] | IpInstance | The IP4 child that issues the transmission. It is NULL if the packet is from the system. |
[in] | Packet | The user data to send, excluding the IP header. |
[in] | Head | The caller supplied header. The caller should set the following header fields: Tos, TotalLen, Id, tl, Fragment, Protocol, Src and Dst. All the fields are in host byte order. This function will fill in the Ver, HeadLen, Fragment, and checksum. The Fragment only need to include the DF flag. Ip4Output will compute the MF and offset for you. |
[in] | Option | The original option to append to the IP headers |
[in] | OptLen | The length of the option |
[in] | GateWay | The next hop address to transmit packet to. 255.255.255.255 means broadcast. |
[in] | Callback | The callback function to issue when transmission completed. |
[in] | Context | The opaque context for the callback |
- Return values
-
EFI_NO_MAPPING | There is no interface to the destination. |
EFI_NOT_FOUND | There is no route to the destination |
EFI_SUCCESS | The packet is successfully transmitted. |
EFI_BAD_BUFFER_SIZE | The length of the IPv4 header + option length + total data length is greater than MTU (or greater than the maximum packet size if Token.Packet.TxData. OverrideData.DoNotFragment is TRUE.) |
Others | Failed to transmit the packet. |
Definition at line 205 of file Ip4Output.c.