TianoCore EDK2 master
Loading...
Searching...
No Matches
Mcast_ip_to_mac.c File Reference
#include "Snp.h"

Go to the source code of this file.

Functions

EFI_STATUS PxeIp2Mac (IN SNP_DRIVER *Snp, IN BOOLEAN IPv6, IN EFI_IP_ADDRESS *IP, IN OUT EFI_MAC_ADDRESS *MAC)
 
EFI_STATUS EFIAPI SnpUndi32McastIpToMac (IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN IPv6, IN EFI_IP_ADDRESS *IP, OUT EFI_MAC_ADDRESS *MAC)
 

Detailed Description

Implementation of converting an multicast IP address to multicast HW MAC address.

Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Mcast_ip_to_mac.c.

Function Documentation

◆ PxeIp2Mac()

EFI_STATUS PxeIp2Mac ( IN SNP_DRIVER Snp,
IN BOOLEAN  IPv6,
IN EFI_IP_ADDRESS IP,
IN OUT EFI_MAC_ADDRESS MAC 
)

Call undi to convert an multicast IP address to a MAC address.

Parameters
SnpPointer to snp driver structure.
IPv6Flag to indicate if this is an ipv6 address.
IPMulticast IP address.
MACPointer to hold the return MAC address.
Return values
EFI_SUCCESSThe multicast IP address was mapped to the multicast HW MAC address.
EFI_INVALID_PARAMETERInvalid UNDI command.
EFI_UNSUPPORTEDCommand is not supported by UNDI.
EFI_DEVICE_ERRORFail to execute UNDI command.

Definition at line 28 of file Mcast_ip_to_mac.c.

◆ SnpUndi32McastIpToMac()

EFI_STATUS EFIAPI SnpUndi32McastIpToMac ( IN EFI_SIMPLE_NETWORK_PROTOCOL This,
IN BOOLEAN  IPv6,
IN EFI_IP_ADDRESS IP,
OUT EFI_MAC_ADDRESS MAC 
)

Converts a multicast IP address to a multicast HW MAC address.

This function converts a multicast IP address to a multicast HW MAC address for all packet transactions. If the mapping is accepted, then EFI_SUCCESS will be returned.

Parameters
ThisA pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
IPv6Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. Set to FALSE if the multicast IP address is IPv4 [RFC 791].
IPThe multicast IP address that is to be converted to a multicast HW MAC address.
MACThe multicast HW MAC address that is to be generated from IP.
Return values
EFI_SUCCESSThe multicast IP address was mapped to the multicast HW MAC address.
EFI_NOT_STARTEDThe Simple Network Protocol interface has not been started by calling Start().
EFI_INVALID_PARAMETERIP is NULL.
EFI_INVALID_PARAMETERMAC is NULL.
EFI_INVALID_PARAMETERIP does not point to a valid IPv4 or IPv6 multicast address.
EFI_DEVICE_ERRORThe Simple Network Protocol interface has not been initialized by calling Initialize().
EFI_UNSUPPORTEDIPv6 is TRUE and the implementation does not support IPv6 multicast to MAC address conversion.

Definition at line 127 of file Mcast_ip_to_mac.c.