man pages section 3: Extended Library Functions, Volume 1

Exit Print View

Updated: July 2014
 
 

FCOE_GetPortHandle (3FCOE)

Name

FCOE_GetPortHandle - open FCoE port handle

Synopsis

cc [ flag... ] file... -lfcoe [ 
library... ]
#include <libfcoe.h>


FCOE_STATUS FCOE_GetPortHandle(
FCOE_UINT32 *linkName, FCOE_UINT8
 portResType FCOE_PORT_HANDLE *
phandle);

Parameters

linkName

The name of the data link on which the FCoE port has been created.

portResType

Resource type should be FCOE_RT_PORT_PROPERTY.

phandle

An opaque pointer to an FCOE_PORT_HANDLE that on successful return, contains a valid port handle, or NULL on failed return.

Description

The FCOE_GetPortHandle() function opens the FCoE port handle specified by macLinkName, retrieves the port information only related to portResType. When the caller is finished using the phandle, it must free the memory allocated for port information by calling FCOE_ClosePortHandle(3FCOE) .

Return Values

The following values are returned:

FCOE_STATUS_ERROR_BUSY

The fcoe driver is busy and cannot complete the operation.

FCOE_STATUS_ERROR_MAC_LEN

MAC link name exceeds the maximum length.

FCOE_STATUS_ERROR_INVAL_ARG

The value specified for macLinkName or portResType was not valid.

FCOE_STATUS_ERROR_GET_LINKINFO

Failed to get link information by macLinkName.

FCOE_STATUS_ERROR_PERM

Not enough permission to open the fcoe device.

FCOE_STATUS_ERROR_OPEN_DEV

Failed to open fcoe device.

FCOE_STATUS_ERROR_MAC_NOT_FOUND

The FCoE port was not found on the specified MAC link.

FCOE_STATUS_OK

The API call was successful.

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe

See Also

libfcoe(3LIB) , attributes (5)