Returns a MAC address for the board with the given name.
DWORD oamBoardGetMACAddress ( CTAHD ctahd, const char *szName, char *szMACAddress, DWORD dwMACAddressSize, DWORD dwMACAddressIndex )
|
Argument |
Description |
|
ctahd |
[in] Context handle. |
|
szName |
[in] Pointer to the name of board to look up. |
|
szMACAddress |
[out] Pointer to a set to the MAC address. |
|
dwMACAddressSize |
[in] Size of szMACAddress (maximum number of bytes to return, including final null character). |
|
dwMACAddressIndex |
[in] Set to the MAC address index number (between 1 and 4). |
|
Return value |
Description |
|
SUCCESS |
|
|
CTAERR_BAD_ARGUMENT |
An argument is NULL or 0. |
|
CTAERR_SVR_COMM |
Natural Access Server is not running. |
|
OAMERR_NOT_FOUND |
Board not found. |
|
OAMERR_SERVER_NOT_RUNNING |
Supervisor is shut down. |
oamBoardGetMACAddress returns one of the MAC addresses of board szName. MAC addresses are available only with boards with Ethernet interfaces. Each Ethernet interface on a board has a unique address.
Specify the index of the MAC address to return in dwMACAddressIndex. If dwMACAddressIndex is not in the range of present MAC addresses on the board (usually 2), oamBoardGetMACAddress returns an empty string in szMACAddress.
The returned szMACAddress is a string containing a standard MAC address; that is, 6 hexadecimal byte values separated by hyphens. For example:
E3-31-23-4A-2E-3F
For more information, see Retrieving board information.
oamBoardGetBusSlot, oamBoardGetDriverIDs, oamBoardGetNumber, oamBoardGetProduct, oamBoardGetSerialNumber, oamBoardGetShelfSlot, oamBoardGetStatus