Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef SCSI_NETLINK_H |
| 8 | #define SCSI_NETLINK_H |
| 9 | #include <linux/netlink.h> |
| 10 | #include <linux/types.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 11 | #define SCSI_TRANSPORT_MSG NLMSG_MIN_TYPE + 1 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 12 | #define SCSI_NL_GRP_FC_EVENTS (1 << 2) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 13 | #define SCSI_NL_GRP_CNT 3 |
| 14 | struct scsi_nl_hdr { |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 15 | __u8 version; |
| 16 | __u8 transport; |
| 17 | __u16 magic; |
| 18 | __u16 msgtype; |
| 19 | __u16 msglen; |
| 20 | } __attribute__((aligned(sizeof(__u64)))); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 21 | #define SCSI_NL_VERSION 1 |
| 22 | #define SCSI_NL_MAGIC 0xA1B2 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define SCSI_NL_TRANSPORT 0 |
| 24 | #define SCSI_NL_TRANSPORT_FC 1 |
| 25 | #define SCSI_NL_MAX_TRANSPORTS 2 |
| 26 | #define SCSI_NL_SHOST_VENDOR 0x0001 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define SCSI_NL_MSGALIGN(len) (((len) + 7) & ~7) |
| 28 | struct scsi_nl_host_vendor_msg { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 29 | struct scsi_nl_hdr snlh; |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 30 | __u64 vendor_id; |
| 31 | __u16 host_no; |
| 32 | __u16 vmsg_datalen; |
| 33 | } __attribute__((aligned(sizeof(__u64)))); |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 34 | #define SCSI_NL_VID_TYPE_SHIFT 56 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | #define SCSI_NL_VID_TYPE_MASK ((__u64) 0xFF << SCSI_NL_VID_TYPE_SHIFT) |
| 36 | #define SCSI_NL_VID_TYPE_PCI ((__u64) 0x01 << SCSI_NL_VID_TYPE_SHIFT) |
| 37 | #define SCSI_NL_VID_ID_MASK (~SCSI_NL_VID_TYPE_MASK) |
| 38 | #define INIT_SCSI_NL_HDR(hdr,t,mtype,mlen) { (hdr)->version = SCSI_NL_VERSION; (hdr)->transport = t; (hdr)->magic = SCSI_NL_MAGIC; (hdr)->msgtype = mtype; (hdr)->msglen = mlen; } |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 39 | #endif |