1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * INET An implementation of the TCP/IP protocol suite for the LINUX 4*4882a593Smuzhiyun * operating system. INET is implemented using the BSD Socket 5*4882a593Smuzhiyun * interface as the means of communication with the user level. 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * Global definitions for Fibre Channel. 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * Version: @(#)if_fc.h 0.0 11/20/98 10*4882a593Smuzhiyun * 11*4882a593Smuzhiyun * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 12*4882a593Smuzhiyun * Donald Becker, <becker@super.org> 13*4882a593Smuzhiyun * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be> 14*4882a593Smuzhiyun * Vineet Abraham, <vma@iol.unh.edu> 15*4882a593Smuzhiyun * 16*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or 17*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License 18*4882a593Smuzhiyun * as published by the Free Software Foundation; either version 19*4882a593Smuzhiyun * 2 of the License, or (at your option) any later version. 20*4882a593Smuzhiyun */ 21*4882a593Smuzhiyun #ifndef _LINUX_IF_FC_H 22*4882a593Smuzhiyun #define _LINUX_IF_FC_H 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun #include <linux/types.h> 25*4882a593Smuzhiyun 26*4882a593Smuzhiyun #define FC_ALEN 6 /* Octets in one ethernet addr */ 27*4882a593Smuzhiyun #define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc)) 28*4882a593Smuzhiyun #define FC_ID_LEN 3 /* Octets in a Fibre Channel Address */ 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun /* LLC and SNAP constants */ 31*4882a593Smuzhiyun #define EXTENDED_SAP 0xAA 32*4882a593Smuzhiyun #define UI_CMD 0x03 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun /* This is NOT the Fibre Channel frame header. The FC frame header is 35*4882a593Smuzhiyun * constructed in the driver as the Tachyon needs certain fields in 36*4882a593Smuzhiyun * certains positions. So, it can't be generalized here.*/ 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun struct fch_hdr { 39*4882a593Smuzhiyun __u8 daddr[FC_ALEN]; /* destination address */ 40*4882a593Smuzhiyun __u8 saddr[FC_ALEN]; /* source address */ 41*4882a593Smuzhiyun }; 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun /* This is a Fibre Channel LLC structure */ 44*4882a593Smuzhiyun struct fcllc { 45*4882a593Smuzhiyun __u8 dsap; /* destination SAP */ 46*4882a593Smuzhiyun __u8 ssap; /* source SAP */ 47*4882a593Smuzhiyun __u8 llc; /* LLC control field */ 48*4882a593Smuzhiyun __u8 protid[3]; /* protocol id */ 49*4882a593Smuzhiyun __be16 ethertype; /* ether type field */ 50*4882a593Smuzhiyun }; 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun #endif /* _LINUX_IF_FC_H */ 53