"Fossies" - the Fresh Open Source Software Archive

Member "open-fcoe-3.19/fcoe-utils/include/fc_types.h" (15 Apr 2015, 2021 Bytes) of package /linux/misc/open-fcoe-3.19.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "fc_types.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  * Copyright (c) 2008, Intel Corporation.
    3  *
    4  * This program is free software; you can redistribute it and/or modify it
    5  * under the terms and conditions of the GNU Lesser General Public License,
    6  * version 2.1, as published by the Free Software Foundation.
    7  *
    8  * This program is distributed in the hope it will be useful, but WITHOUT
    9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   10  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
   11  * for more details.
   12  *
   13  * You should have received a copy of the GNU Lesser General Public License
   14  * along with this program; if not, write to the Free Software Foundation, Inc.,
   15  * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
   16  *
   17  */
   18 
   19 #ifndef _LIBFC_TYPES_H_
   20 #define _LIBFC_TYPES_H_
   21 
   22 #include "net_types.h"
   23 
   24 /*
   25  * Host-order type definitions for Fibre Channel.
   26  */
   27 
   28 /*
   29  * Note, in order for fc_wwn_t to be acceptable for %qx format strings,
   30  * it cannot be declared as u_int64_t.
   31  */
   32 typedef unsigned long long fc_wwn_t;    /* world-wide name */
   33 typedef u_int32_t           fc_fid_t;   /* fabric address */
   34 typedef u_int16_t           fc_xid_t;   /* exchange ID */
   35 
   36 /*
   37  * Encapsulation / port option flags.
   38  */
   39 #define FC_OPT_DEBUG_RX     0x01    /* log debug messages */
   40 #define FC_OPT_DEBUG_TX     0x02    /* log debug messages */
   41 #define FC_OPT_DEBUG        (FC_OPT_DEBUG_RX | FC_OPT_DEBUG_TX)
   42 #define FC_OPT_NO_TX_CRC    0x04    /* don't generate sending CRC */
   43 #define FC_OPT_NO_RX_CRC    0x08    /* don't check received CRC */
   44 #define FC_OPT_FCIP_NO_SFS  0x10    /* No special frame (FCIP only) */
   45 #define FC_OPT_PASSIVE      0x20    /* Responding to connect */
   46 #define FC_OPT_SET_MAC      0x40    /* use non-standard MAC addr (FCOE) */
   47 #define FC_OPT_FCOE_OLD     0x80    /* use old prototype FCoE encaps */
   48 
   49 /*
   50  * Convert 48-bit IEEE MAC address to 64-bit FC WWN.
   51  */
   52 fc_wwn_t fc_wwn_from_mac(u_int64_t, u_int32_t scheme, u_int32_t port);
   53 fc_wwn_t fc_wwn_from_wwn(fc_wwn_t, u_int32_t scheme, u_int32_t port);
   54 
   55 #endif /* _LIBFC_TYPES_H_ */