Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
0002 /*
0003  *  FC Transport Netlink Interface
0004  *
0005  *  Copyright (C) 2006   James Smart, Emulex Corporation
0006  */
0007 #ifndef SCSI_NETLINK_FC_H
0008 #define SCSI_NETLINK_FC_H
0009 
0010 #include <linux/types.h>
0011 #include <scsi/scsi_netlink.h>
0012 
0013 /*
0014  * This file intended to be included by both kernel and user space
0015  */
0016 
0017 /*
0018  * FC Transport Message Types
0019  */
0020     /* kernel -> user */
0021 #define FC_NL_ASYNC_EVENT           0x0100
0022     /* user -> kernel */
0023 /* none */
0024 
0025 
0026 /*
0027  * Message Structures :
0028  */
0029 
0030 /* macro to round up message lengths to 8byte boundary */
0031 #define FC_NL_MSGALIGN(len)     (((len) + 7) & ~7)
0032 
0033 
0034 /*
0035  * FC Transport Broadcast Event Message :
0036  *   FC_NL_ASYNC_EVENT
0037  *
0038  * Note: if Vendor Unique message, &event_data will be  start of
0039  *   vendor unique payload, and the length of the payload is
0040  *       per event_datalen
0041  *
0042  * Note: When specifying vendor_id, be sure to read the Vendor Type and ID
0043  *   formatting requirements specified in scsi_netlink.h
0044  */
0045 struct fc_nl_event {
0046     struct scsi_nl_hdr snlh;        /* must be 1st element ! */
0047     __u64 seconds;
0048     __u64 vendor_id;
0049     __u16 host_no;
0050     __u16 event_datalen;
0051     __u32 event_num;
0052     __u32 event_code;
0053     __u32 event_data;
0054 } __attribute__((aligned(sizeof(__u64))));
0055 
0056 
0057 #endif /* SCSI_NETLINK_FC_H */
0058