xref: /illumos-gate/usr/src/man/man3fcoe/FCOE_GetPortList.3fcoe (revision ed093b41a93e8563e6e1e5dae0768dda2a7bcc27)
te
Copyright (c) 2009, Sun Microsystems Inc. All Rights Reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions and limitations under the License. When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with
the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
FCOE_GETPORTLIST 3FCOE "Apr 1, 2009"
NAME
FCOE_GetPortList - get a list of FCoE ports
SYNOPSIS

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

int FCOE_GetPortList(unsigned int *port_num,
 struct fcoe_port_attr **portlist);
PARAMETERS
port_num

A pointer to an integer that, on successful return, contains the number of FCoE ports in the system.

portlist

A pointer to a pointer to an fcoe_port_attr structure that, on successful return, contains a list of the FCoE ports in the system.

DESCRIPTION

The FCOE_GetPortList() function retrieves a list of FCoE ports. When the caller is finished using the list, it must free the memory used by the list by calling free(3C).

RETURN VALUES

The following values are returned: FCOE_STATUS_ERROR_BUSY

The fcoe driver is busy and cannot complete the operation.

FCOE_STATUS_ERROR_INVAL_ARG

The value specified for port_num or portlist was not valid.

FCOE_STATUS_ERROR_OPEN_DEV

Failed to open fcoe device.

FCOE_STATUS_OK

The API call was successful.

ATTRIBUTES

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

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Committed
MT-Level Safe
SEE ALSO

free (3C), libfcoe (3LIB), attributes (7)