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 */ 7 #ifndef SCSI_NETLINK_H 8 #define SCSI_NETLINK_H 9 #include <linux/netlink.h> 10 #include <linux/types.h> 11 #define SCSI_TRANSPORT_MSG NLMSG_MIN_TYPE + 1 12 #define SCSI_NL_GRP_FC_EVENTS (1 << 2) 13 #define SCSI_NL_GRP_CNT 3 14 struct scsi_nl_hdr { 15 __u8 version; 16 __u8 transport; 17 __u16 magic; 18 __u16 msgtype; 19 __u16 msglen; 20 } __attribute__((aligned(sizeof(__u64)))); 21 #define SCSI_NL_VERSION 1 22 #define SCSI_NL_MAGIC 0xA1B2 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 27 #define SCSI_NL_MSGALIGN(len) (((len) + 7) & ~7) 28 struct scsi_nl_host_vendor_msg { 29 struct scsi_nl_hdr snlh; 30 __u64 vendor_id; 31 __u16 host_no; 32 __u16 vmsg_datalen; 33 } __attribute__((aligned(sizeof(__u64)))); 34 #define SCSI_NL_VID_TYPE_SHIFT 56 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; } 39 #endif 40