TianoCore EDK2 master
|
#include "Ip4Impl.h"
Go to the source code of this file.
Functions | |
INTN | Ip4GetNetCast (IN IP4_ADDR IpAddr, IN IP4_INTERFACE *IpIf) |
INTN | Ip4GetHostCast (IN IP4_SERVICE *IpSb, IN IP4_ADDR Dst, IN IP4_ADDR Src) |
IP4_INTERFACE * | Ip4FindInterface (IN IP4_SERVICE *IpSb, IN IP4_ADDR Ip) |
IP4_INTERFACE * | Ip4FindNet (IN IP4_SERVICE *IpSb, IN IP4_ADDR Ip) |
IP4_INTERFACE * | Ip4FindStationAddress (IN IP4_SERVICE *IpSb, IN IP4_ADDR Ip, IN IP4_ADDR Netmask) |
EFI_STATUS | Ip4GetMulticastMac (IN EFI_MANAGED_NETWORK_PROTOCOL *Mnp, IN IP4_ADDR Multicast, OUT EFI_MAC_ADDRESS *Mac) |
IP4_HEAD * | Ip4NtohHead (IN IP4_HEAD *Head) |
BOOLEAN | Ip4StationAddressValid (IN IP4_ADDR Ip, IN IP4_ADDR Netmask) |
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ip4Common.c.
IP4_INTERFACE * Ip4FindInterface | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_ADDR | Ip | ||
) |
Find an interface whose configured IP address is Ip.
[in] | IpSb | The IP4 service binding instance |
[in] | Ip | The Ip address (host byte order) to find |
Definition at line 124 of file Ip4Common.c.
IP4_INTERFACE * Ip4FindNet | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_ADDR | Ip | ||
) |
Find an interface that Ip is on that connected network.
[in] | IpSb | The IP4 service binding instance |
[in] | Ip | The Ip address (host byte order) to find |
Definition at line 153 of file Ip4Common.c.
IP4_INTERFACE * Ip4FindStationAddress | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_ADDR | Ip, | ||
IN IP4_ADDR | Netmask | ||
) |
Find an interface of the service with the same Ip/Netmask pair.
[in] | IpSb | Ip4 service binding instance |
[in] | Ip | The Ip address to find (host byte order) |
[in] | Netmask | The network to find (host byte order) |
Definition at line 183 of file Ip4Common.c.
INTN Ip4GetHostCast | ( | IN IP4_SERVICE * | IpSb, |
IN IP4_ADDR | Dst, | ||
IN IP4_ADDR | Src | ||
) |
Find the cast type of the packet related to the local host. This isn't the same as link layer cast type. For example, DHCP server may send local broadcast to the local unicast MAC.
[in] | IpSb | The IP4 service binding instance that received the packet |
[in] | Dst | The destination address in the packet (host byte order) |
[in] | Src | The source address in the packet (host byte order) |
Definition at line 59 of file Ip4Common.c.
EFI_STATUS Ip4GetMulticastMac | ( | IN EFI_MANAGED_NETWORK_PROTOCOL * | Mnp, |
IN IP4_ADDR | Multicast, | ||
OUT EFI_MAC_ADDRESS * | Mac | ||
) |
Get the MAC address for a multicast IP address. Call Mnp's McastIpToMac to find the MAC address in stead of hard code the NIC to be Ethernet.
[in] | Mnp | The Mnp instance to get the MAC address. |
[in] | Multicast | The multicast IP address to translate. |
[out] | Mac | The buffer to hold the translated address. |
EFI_SUCCESS | if the multicast IP is successfully translated to a multicast MAC address. |
other | Otherwise some error. |
Definition at line 218 of file Ip4Common.c.
INTN Ip4GetNetCast | ( | IN IP4_ADDR | IpAddr, |
IN IP4_INTERFACE * | IpIf | ||
) |
Return the cast type (Unicast/Broadcast) specific to an interface. All the addresses are host byte ordered.
[in] | IpAddr | The IP address to classify in host byte order |
[in] | IpIf | The interface that IpAddr received from |
IP4_LOCAL_HOST | The IpAddr equals to the interface's address |
IP4_SUBNET_BROADCAST | The IpAddr is a directed subnet broadcast to the interface |
IP4_NET_BROADCAST | The IpAddr is a network broadcast to the interface |
0 | Otherwise. |
Definition at line 26 of file Ip4Common.c.
Convert the multibyte field in IP header's byter order. In spite of its name, it can also be used to convert from host to network byte order.
[in] | Head | The IP head to convert |
Definition at line 241 of file Ip4Common.c.
Validate that Ip/Netmask pair is OK to be used as station address. Only continuous netmasks are supported. and check that StationAddress is a unicast address on the network.
[in] | Ip | The IP address to validate. |
[in] | Netmask | The netmask of the IP. |
TRUE | The Ip/Netmask pair is valid. |
FALSE | The Ip/Netmask pair is invalid. |
Definition at line 267 of file Ip4Common.c.