Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  * INET     An implementation of the TCP/IP protocol suite for the LINUX
0004  *      operating system.  INET is implemented using the  BSD Socket
0005  *      interface as the means of communication with the user level.
0006  *
0007  *      Global definitions for Fibre Channel.
0008  *
0009  * Version: @(#)if_fc.h 0.0 11/20/98
0010  *
0011  * Author:  Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
0012  *      Donald Becker, <becker@super.org>
0013  *    Peter De Schrijver, <stud11@cc4.kuleuven.ac.be>
0014  *    Vineet Abraham, <vma@iol.unh.edu>
0015  *
0016  *      This program is free software; you can redistribute it and/or
0017  *      modify it under the terms of the GNU General Public License
0018  *      as published by the Free Software Foundation; either version
0019  *      2 of the License, or (at your option) any later version.
0020  */
0021 #ifndef _LINUX_IF_FC_H
0022 #define _LINUX_IF_FC_H
0023 
0024 #include <linux/types.h>
0025 
0026 #define FC_ALEN 6       /* Octets in one ethernet addr   */
0027 #define FC_HLEN   (sizeof(struct fch_hdr)+sizeof(struct fcllc))
0028 #define FC_ID_LEN 3     /* Octets in a Fibre Channel Address */
0029 
0030 /* LLC and SNAP constants */
0031 #define EXTENDED_SAP 0xAA
0032 #define UI_CMD       0x03
0033 
0034 /* This is NOT the Fibre Channel frame header. The FC frame header is
0035  *  constructed in the driver as the Tachyon needs certain fields in
0036  *  certains positions. So, it can't be generalized here.*/
0037 
0038 struct fch_hdr {
0039     __u8  daddr[FC_ALEN];       /* destination address */
0040     __u8  saddr[FC_ALEN];       /* source address */
0041 };
0042 
0043 /* This is a Fibre Channel LLC structure */
0044 struct fcllc {
0045     __u8  dsap;         /* destination SAP */
0046     __u8  ssap;         /* source SAP */
0047     __u8  llc;          /* LLC control field */
0048     __u8  protid[3];        /* protocol id */
0049     __be16 ethertype;       /* ether type field */
0050 };
0051 
0052 #endif  /* _LINUX_IF_FC_H */