]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/uapi/scsi/scsi_netlink_fc.h
License cleanup: add SPDX license identifier to uapi header files with a license
[mirror_ubuntu-bionic-kernel.git] / include / uapi / scsi / scsi_netlink_fc.h
CommitLineData
e2be04c7 1/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
84314fd4
JS
2/*
3 * FC Transport Netlink Interface
4 *
5 * Copyright (C) 2006 James Smart, Emulex Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22#ifndef SCSI_NETLINK_FC_H
23#define SCSI_NETLINK_FC_H
24
25#include <scsi/scsi_netlink.h>
26
27/*
28 * This file intended to be included by both kernel and user space
29 */
30
31/*
32 * FC Transport Message Types
33 */
34 /* kernel -> user */
35#define FC_NL_ASYNC_EVENT 0x0100
36 /* user -> kernel */
37/* none */
38
39
40/*
41 * Message Structures :
42 */
43
44/* macro to round up message lengths to 8byte boundary */
45#define FC_NL_MSGALIGN(len) (((len) + 7) & ~7)
46
47
48/*
49 * FC Transport Broadcast Event Message :
50 * FC_NL_ASYNC_EVENT
51 *
52 * Note: if Vendor Unique message, &event_data will be start of
53 * vendor unique payload, and the length of the payload is
54 * per event_datalen
55 *
56 * Note: When specifying vendor_id, be sure to read the Vendor Type and ID
57 * formatting requirements specified in scsi_netlink.h
58 */
59struct fc_nl_event {
60 struct scsi_nl_hdr snlh; /* must be 1st element ! */
61 uint64_t seconds;
f14e2e29 62 uint64_t vendor_id;
84314fd4
JS
63 uint16_t host_no;
64 uint16_t event_datalen;
65 uint32_t event_num;
66 uint32_t event_code;
67 uint32_t event_data;
68} __attribute__((aligned(sizeof(uint64_t))));
69
70
71#endif /* SCSI_NETLINK_FC_H */
72