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

Go to the source code of this file.

Functions

EFI_STATUS PxeGetStnAddr (SNP_DRIVER *Snp)
 
EFI_STATUS PxeSetStnAddr (SNP_DRIVER *Snp, EFI_MAC_ADDRESS *NewMacAddr)
 
EFI_STATUS EFIAPI SnpUndi32StationAddress (IN EFI_SIMPLE_NETWORK_PROTOCOL *This, IN BOOLEAN Reset, IN EFI_MAC_ADDRESS *New OPTIONAL)
 

Detailed Description

Implementation of reading the MAC address of a network adapter.

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

Definition in file Station_address.c.

Function Documentation

◆ PxeGetStnAddr()

EFI_STATUS PxeGetStnAddr ( SNP_DRIVER Snp)

Call UNDI to read the MAC address of the NIC and update the mode structure with the address.

Parameters
SnpPointer to snp driver structure.
Return values
EFI_SUCCESSThe MAC address of the NIC is read successfully.
EFI_DEVICE_ERRORFailed to read the MAC address of the NIC.

Definition at line 22 of file Station_address.c.

◆ PxeSetStnAddr()

EFI_STATUS PxeSetStnAddr ( SNP_DRIVER Snp,
EFI_MAC_ADDRESS NewMacAddr 
)

Call UNDI to set a new MAC address for the NIC.

Parameters
SnpPointer to Snp driver structure.
NewMacAddrPointer to a MAC address to be set for the NIC, if this is NULL then this routine resets the mac address to the NIC's original address.

Definition at line 96 of file Station_address.c.

◆ SnpUndi32StationAddress()

EFI_STATUS EFIAPI SnpUndi32StationAddress ( IN EFI_SIMPLE_NETWORK_PROTOCOL This,
IN BOOLEAN  Reset,
IN EFI_MAC_ADDRESS *New  OPTIONAL 
)

Modifies or resets the current station address, if supported.

This function modifies or resets the current station address of a network interface, if supported. If Reset is TRUE, then the current station address is set to the network interface's permanent address. If Reset is FALSE, and the network interface allows its station address to be modified, then the current station address is changed to the address specified by New. If the network interface does not allow its station address to be modified, then EFI_INVALID_PARAMETER will be returned. If the station address is successfully updated on the network interface, EFI_SUCCESS will be returned. If the driver has not been initialized, EFI_DEVICE_ERROR will be returned.

Parameters
ThisA pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance.
ResetFlag used to reset the station address to the network interface's permanent address.
NewNew station address to be used for the network interface.
Return values
EFI_SUCCESSThe network interface's station address was updated.
EFI_NOT_STARTEDThe Simple Network Protocol interface has not been started by calling Start().
EFI_INVALID_PARAMETERThe New station address was not accepted by the NIC.
EFI_INVALID_PARAMETERReset is FALSE and New is NULL.
EFI_DEVICE_ERRORThe Simple Network Protocol interface has not been initialized by calling Initialize().
EFI_DEVICE_ERRORAn error occurred attempting to set the new station address.
EFI_UNSUPPORTEDThe NIC does not support changing the network interface's station address.

Definition at line 194 of file Station_address.c.