OpenCore
1.0.4
OpenCore Bootloader
|
#include "NetworkBootInternal.h"
Go to the source code of this file.
Functions | |
BOOLEAN | Ip4StationAddressValid (IN IP4_ADDR Ip, IN IP4_ADDR Netmask) |
UINT8 | GetSubnetMaskPrefixLength (IN EFI_IPv4_ADDRESS *SubnetMask) |
EFI_STATUS | Ip4Config2StrToIp (IN CHAR16 *Str, OUT EFI_IPv4_ADDRESS *Ip) |
EFI_STATUS | Ip4Config2StrToIpList (IN CHAR16 *Str, OUT EFI_IPv4_ADDRESS **PtrIpList, OUT UINTN *IpCount) |
IPv4 utilities.
Methods from:
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ip4Utils.c.
UINT8 GetSubnetMaskPrefixLength | ( | IN EFI_IPv4_ADDRESS * | SubnetMask | ) |
Calculate the prefix length of the IPv4 subnet mask.
[in] | SubnetMask | The IPv4 subnet mask. |
0 | Other errors as indicated. |
Definition at line 66 of file Ip4Utils.c.
EFI_STATUS Ip4Config2StrToIp | ( | IN CHAR16 * | Str, |
OUT EFI_IPv4_ADDRESS * | Ip ) |
Convert the decimal dotted IPv4 address into the binary IPv4 address.
[in] | Str | The UNICODE string. |
[out] | Ip | The storage to return the IPv4 address. |
EFI_SUCCESS | The binary IP address is returned in Ip. |
EFI_INVALID_PARAMETER | The IP string is malformatted. |
Definition at line 108 of file Ip4Utils.c.
EFI_STATUS Ip4Config2StrToIpList | ( | IN CHAR16 * | Str, |
OUT EFI_IPv4_ADDRESS ** | PtrIpList, | ||
OUT UINTN * | IpCount ) |
Convert the decimal dotted IPv4 addresses separated by space into the binary IPv4 address list.
[in] | Str | The UNICODE string contains IPv4 addresses. |
[out] | PtrIpList | The storage to return the IPv4 address list. |
[out] | IpCount | The size of the IPv4 address list. |
EFI_SUCCESS | The binary IP address list is returned in PtrIpList. |
EFI_OUT_OF_RESOURCES | Error occurs in allocating memory. |
EFI_INVALID_PARAMETER | The IP string is malformatted. |
Definition at line 173 of file Ip4Utils.c.
BOOLEAN Ip4StationAddressValid | ( | IN IP4_ADDR | Ip, |
IN IP4_ADDR | Netmask ) |
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 27 of file Ip4Utils.c.