File: fc_types.h

package info (click to toggle)
libhbalinux 1.0.16-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 308 kB
  • sloc: ansic: 2,742; makefile: 40; sh: 22
file content (55 lines) | stat: -rw-r--r-- 2,021 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
 * Copyright (c) 2008, Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 2.1, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
 * for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

#ifndef _LIBFC_TYPES_H_
#define _LIBFC_TYPES_H_

#include "net_types.h"

/*
 * Host-order type definitions for Fibre Channel.
 */

/*
 * Note, in order for fc_wwn_t to be acceptable for %qx format strings,
 * it cannot be declared as u_int64_t.
 */
typedef unsigned long long fc_wwn_t;	/* world-wide name */
typedef u_int32_t           fc_fid_t;	/* fabric address */
typedef u_int16_t           fc_xid_t;	/* exchange ID */

/*
 * Encapsulation / port option flags.
 */
#define	FC_OPT_DEBUG_RX     0x01	/* log debug messages */
#define	FC_OPT_DEBUG_TX     0x02	/* log debug messages */
#define	FC_OPT_DEBUG        (FC_OPT_DEBUG_RX | FC_OPT_DEBUG_TX)
#define	FC_OPT_NO_TX_CRC    0x04	/* don't generate sending CRC */
#define	FC_OPT_NO_RX_CRC    0x08	/* don't check received CRC */
#define	FC_OPT_FCIP_NO_SFS  0x10	/* No special frame (FCIP only) */
#define	FC_OPT_PASSIVE      0x20	/* Responding to connect */
#define	FC_OPT_SET_MAC      0x40	/* use non-standard MAC addr (FCOE) */
#define	FC_OPT_FCOE_OLD     0x80	/* use old prototype FCoE encaps */

/*
 * Convert 48-bit IEEE MAC address to 64-bit FC WWN.
 */
fc_wwn_t fc_wwn_from_mac(u_int64_t, u_int32_t scheme, u_int32_t port);
fc_wwn_t fc_wwn_from_wwn(fc_wwn_t, u_int32_t scheme, u_int32_t port);

#endif /* _LIBFC_TYPES_H_ */