/*1* Copyright(c) 2007 Intel Corporation. All rights reserved.2*3* This program is free software; you can redistribute it and/or modify it4* under the terms and conditions of the GNU General Public License,5* version 2, as published by the Free Software Foundation.6*7* This program is distributed in the hope it will be useful, but WITHOUT8* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or9* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for10* more details.11*12* You should have received a copy of the GNU General Public License along with13* this program; if not, write to the Free Software Foundation, Inc.,14* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.15*16* Maintained at www.Open-FCoE.org17*/1819#ifndef _FC_GS_H_20#define _FC_GS_H_2122#include <linux/types.h>2324/*25* Fibre Channel Services - Common Transport.26* From T11.org FC-GS-2 Rev 5.3 November 1998.27*/2829struct fc_ct_hdr {30__u8 ct_rev; /* revision */31__u8 ct_in_id[3]; /* N_Port ID of original requestor */32__u8 ct_fs_type; /* type of fibre channel service */33__u8 ct_fs_subtype; /* subtype */34__u8 ct_options;35__u8 _ct_resvd1;36__be16 ct_cmd; /* command / response code */37__be16 ct_mr_size; /* maximum / residual size */38__u8 _ct_resvd2;39__u8 ct_reason; /* reject reason */40__u8 ct_explan; /* reason code explanation */41__u8 ct_vendor; /* vendor unique data */42};4344#define FC_CT_HDR_LEN 16 /* expected sizeof (struct fc_ct_hdr) */4546enum fc_ct_rev {47FC_CT_REV = 1 /* common transport revision */48};4950/*51* ct_fs_type values.52*/53enum fc_ct_fs_type {54FC_FST_ALIAS = 0xf8, /* alias service */55FC_FST_MGMT = 0xfa, /* management service */56FC_FST_TIME = 0xfb, /* time service */57FC_FST_DIR = 0xfc, /* directory service */58};5960/*61* ct_cmd: Command / response codes62*/63enum fc_ct_cmd {64FC_FS_RJT = 0x8001, /* reject */65FC_FS_ACC = 0x8002, /* accept */66};6768/*69* FS_RJT reason codes.70*/71enum fc_ct_reason {72FC_FS_RJT_CMD = 0x01, /* invalid command code */73FC_FS_RJT_VER = 0x02, /* invalid version level */74FC_FS_RJT_LOG = 0x03, /* logical error */75FC_FS_RJT_IUSIZ = 0x04, /* invalid IU size */76FC_FS_RJT_BSY = 0x05, /* logical busy */77FC_FS_RJT_PROTO = 0x07, /* protocol error */78FC_FS_RJT_UNABL = 0x09, /* unable to perform command request */79FC_FS_RJT_UNSUP = 0x0b, /* command not supported */80};8182/*83* FS_RJT reason code explanations.84*/85enum fc_ct_explan {86FC_FS_EXP_NONE = 0x00, /* no additional explanation */87FC_FS_EXP_PID = 0x01, /* port ID not registered */88FC_FS_EXP_PNAM = 0x02, /* port name not registered */89FC_FS_EXP_NNAM = 0x03, /* node name not registered */90FC_FS_EXP_COS = 0x04, /* class of service not registered */91FC_FS_EXP_FTNR = 0x07, /* FC-4 types not registered */92/* definitions not complete */93};9495#endif /* _FC_GS_H_ */969798