fcinfo.h revision a79493184c9332129c9c91500069322f6f3fafdd
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * CDDL HEADER END
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Use is subject to license terms.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define htonll(x) (x)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ntohll(x) (x)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define htonll(x) ((((unsigned long long)htonl(x)) << 32) + htonl(x >> 32))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define ntohll(x) ((((unsigned long long)ntohl(x)) << 32) + ntohl(x >> 32))
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* DEFINES */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* SCSI TARGET TYPES */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* flags that are needed to be passed into processHBA */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRINT_LINKSTAT 0x00000001 /* print link statistics information */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRINT_SCSI_TARGET 0x00000010 /* print Scsi target information */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRINT_INITIATOR 0x00000100 /* print intiator port information */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#define PRINT_TARGET 0x00001000 /* print target port information */
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wang#define PRINT_FCOE 0x00010000 /* print fcoe port information */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* flags for Adpater/port mode */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _tgtPortWWNList {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _portWWNList {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* Discovered ports structure */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortetypedef struct _discoveredDevice {
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* globals */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/* print helper functions */
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid printDiscoPortInfo(HBA_PORTATTRIBUTES *discoPort, int scsiTargetType);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid printLUNInfo(struct scsi_inquiry *inq, HBA_UINT32 scsiLUN, char *devpath);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Fortevoid printOSDeviceNameInfo(discoveredDevice *devListWalk, boolean_t verbose);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint fc_util_list_hbaport(int wwnCount, char **wwn_argv, cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint fc_util_list_remoteport(int wwnCount, char **argv, cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint fc_util_list_logicalunit(int pathCount, char **argv, cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint fc_util_delete_npivport(int wwnCount, char **argv, cmdOptions_t *options);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteint fc_util_create_npivport(int wwnCount, char **argv, cmdOptions_t *options);
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wangint fcoe_adm_create_port(int objects, char *argv[],
2a8164df8a5f42c8a00f10c67d7bc84f80ae9c41Zhong Wangint fcoe_adm_delete_port(int objects, char *argv[]);
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#endif /* _FCINFO_H */