1*e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ 2607ca46eSDavid Howells /* 3607ca46eSDavid Howells * INET An implementation of the TCP/IP protocol suite for the LINUX 4607ca46eSDavid Howells * operating system. INET is implemented using the BSD Socket 5607ca46eSDavid Howells * interface as the means of communication with the user level. 6607ca46eSDavid Howells * 7607ca46eSDavid Howells * Global definitions for Fibre Channel. 8607ca46eSDavid Howells * 9607ca46eSDavid Howells * Version: @(#)if_fc.h 0.0 11/20/98 10607ca46eSDavid Howells * 11607ca46eSDavid Howells * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 12607ca46eSDavid Howells * Donald Becker, <becker@super.org> 13607ca46eSDavid Howells * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be> 14607ca46eSDavid Howells * Vineet Abraham, <vma@iol.unh.edu> 15607ca46eSDavid Howells * 16607ca46eSDavid Howells * This program is free software; you can redistribute it and/or 17607ca46eSDavid Howells * modify it under the terms of the GNU General Public License 18607ca46eSDavid Howells * as published by the Free Software Foundation; either version 19607ca46eSDavid Howells * 2 of the License, or (at your option) any later version. 20607ca46eSDavid Howells */ 21607ca46eSDavid Howells #ifndef _LINUX_IF_FC_H 22607ca46eSDavid Howells #define _LINUX_IF_FC_H 23607ca46eSDavid Howells 24607ca46eSDavid Howells #include <linux/types.h> 25607ca46eSDavid Howells 26607ca46eSDavid Howells #define FC_ALEN 6 /* Octets in one ethernet addr */ 27607ca46eSDavid Howells #define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc)) 28607ca46eSDavid Howells #define FC_ID_LEN 3 /* Octets in a Fibre Channel Address */ 29607ca46eSDavid Howells 30607ca46eSDavid Howells /* LLC and SNAP constants */ 31607ca46eSDavid Howells #define EXTENDED_SAP 0xAA 32607ca46eSDavid Howells #define UI_CMD 0x03 33607ca46eSDavid Howells 34607ca46eSDavid Howells /* This is NOT the Fibre Channel frame header. The FC frame header is 35607ca46eSDavid Howells * constructed in the driver as the Tachyon needs certain fields in 36607ca46eSDavid Howells * certains positions. So, it can't be generalized here.*/ 37607ca46eSDavid Howells 38607ca46eSDavid Howells struct fch_hdr { 39607ca46eSDavid Howells __u8 daddr[FC_ALEN]; /* destination address */ 40607ca46eSDavid Howells __u8 saddr[FC_ALEN]; /* source address */ 41607ca46eSDavid Howells }; 42607ca46eSDavid Howells 43607ca46eSDavid Howells /* This is a Fibre Channel LLC structure */ 44607ca46eSDavid Howells struct fcllc { 45607ca46eSDavid Howells __u8 dsap; /* destination SAP */ 46607ca46eSDavid Howells __u8 ssap; /* source SAP */ 47607ca46eSDavid Howells __u8 llc; /* LLC control field */ 48607ca46eSDavid Howells __u8 protid[3]; /* protocol id */ 49607ca46eSDavid Howells __be16 ethertype; /* ether type field */ 50607ca46eSDavid Howells }; 51607ca46eSDavid Howells 52607ca46eSDavid Howells #endif /* _LINUX_IF_FC_H */ 53