'\" te .\" Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. .TH FCOE_GetPortHandle 3FCOE "19 Mar 2013" "SunOS 5.11" "FCoE Port Management Library Functions" .SH NAME FCOE_GetPortHandle \- open FCoE port handle .SH SYNOPSIS .LP .nf cc [ \fIflag\fR... ] \fIfile\fR... -lfcoe [ \fIlibrary\fR... ] #include .fi .LP .nf \fBFCOE_STATUS\fR \fBFCOE_GetPortHandle\fR(\fBFCOE_UINT32 *\fR\fIlinkName\fR, \fBFCOE_UINT8\fR \fIportResType\fR \fBFCOE_PORT_HANDLE *\fR\fIphandle\fR); .fi .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIlinkName\fR\fR .ad .RS 15n .rt The name of the data link on which the FCoE port has been created. .RE .sp .ne 2 .mk .na \fB\fIportResType\fR\fR .ad .RS 15n .rt Resource type should be \fBFCOE_RT_PORT_PROPERTY\fR. .RE .sp .ne 2 .mk .na \fB\fIphandle\fR\fR .ad .RS 15n .rt An opaque pointer to an \fBFCOE_PORT_HANDLE\fR that on successful return, contains a valid port handle, or \fBNULL\fR on failed return. .RE .SH DESCRIPTION .sp .LP The \fBFCOE_GetPortHandle()\fR function opens the FCoE port handle specified by \fImacLinkName\fR, retrieves the port information only related to \fIportResType\fR. When the caller is finished using the \fIphandle\fR, it must free the memory allocated for port information by calling \fBFCOE_ClosePortHandle\fR(3FCOE). .SH RETURN VALUES .sp .LP The following values are returned: .sp .ne 2 .mk .na \fB\fBFCOE_STATUS_ERROR_BUSY\fR\fR .ad .sp .6 .RS 4n The \fBfcoe\fR driver is busy and cannot complete the operation. .RE .sp .ne 2 .mk .na \fB\fBFCOE_STATUS_ERROR_MAC_LEN\fR\fR .ad .sp .6 .RS 4n MAC link name exceeds the maximum length. .RE .sp .ne 2 .mk .na \fB\fBFCOE_STATUS_ERROR_INVAL_ARG\fR\fR .ad .sp .6 .RS 4n The value specified for \fImacLinkName\fR or \fIportResType\fR was not valid. .RE .sp .ne 2 .mk .na \fB\fBFCOE_STATUS_ERROR_GET_LINKINFO\fR\fR .ad .sp .6 .RS 4n Failed to get link information by \fImacLinkName\fR. .RE .sp .ne 2 .mk .na \fB\fBFCOE_STATUS_ERROR_PERM\fR\fR .ad .sp .6 .RS 4n Not enough permission to open the \fBfcoe\fR device. .RE .sp .ne 2 .mk .na \fB\fBFCOE_STATUS_ERROR_OPEN_DEV\fR\fR .ad .sp .6 .RS 4n Failed to open \fBfcoe\fR device. .RE .sp .ne 2 .mk .na \fB\fBFCOE_STATUS_ERROR_MAC_NOT_FOUND\fR\fR .ad .sp .6 .RS 4n The FCoE port was not found on the specified MAC link. .RE .sp .ne 2 .mk .na \fB\fBFCOE_STATUS_OK\fR\fR .ad .sp .6 .RS 4n The API call was successful. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelSafe .TE .SH SEE ALSO .sp .LP \fBlibfcoe\fR(3LIB), \fBattributes\fR(5)