/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /************************************************************************* * * enables user programs to display messages and control encryption * on s390 tape devices * * Copyright IBM Corp. 2001, 2006 * Author(s): Michael Holzheu <holzheu@de.ibm.com> * *************************************************************************/ #ifndef _TAPE390_H #define _TAPE390_H #define TAPE390_DISPLAY _IOW('d', 1, struct display_struct) /* * The TAPE390_DISPLAY ioctl calls the Load Display command * which transfers 17 bytes of data from the channel to the subsystem: * - 1 format control byte, and * - two 8-byte messages * * Format control byte: * 0-2: New Message Overlay * 3: Alternate Messages * 4: Blink Message * 5: Display Low/High Message * 6: Reserved * 7: Automatic Load Request * */ typedef struct display_struct { char cntrl; char message1[8]; char message2[8]; } display_struct; /* * Tape encryption support */ struct tape390_crypt_info { char capability; char status; char medium_status; } __attribute__ ((packed)); /* Macros for "capable" field */ #define TAPE390_CRYPT_SUPPORTED_MASK 0x01 #define TAPE390_CRYPT_SUPPORTED(x) \ ((x.capability & TAPE390_CRYPT_SUPPORTED_MASK)) /* Macros for "status" field */ #define TAPE390_CRYPT_ON_MASK 0x01 #define TAPE390_CRYPT_ON(x) (((x.status) & TAPE390_CRYPT_ON_MASK)) /* Macros for "medium status" field */ #define TAPE390_MEDIUM_LOADED_MASK 0x01 #define TAPE390_MEDIUM_ENCRYPTED_MASK 0x02 #define TAPE390_MEDIUM_ENCRYPTED(x) \ (((x.medium_status) & TAPE390_MEDIUM_ENCRYPTED_MASK)) #define TAPE390_MEDIUM_LOADED(x) \ (((x.medium_status) & TAPE390_MEDIUM_LOADED_MASK)) /* * The TAPE390_CRYPT_SET ioctl is used to switch on/off encryption. * The "encryption_capable" and "tape_status" fields are ignored for this ioctl! */ #define TAPE390_CRYPT_SET _IOW('d', 2, struct tape390_crypt_info) /* * The TAPE390_CRYPT_QUERY ioctl is used to query the encryption state. */ #define TAPE390_CRYPT_QUERY _IOR('d', 3, struct tape390_crypt_info) /* Values for "kekl1/2_type" and "kekl1/2_type_on_tape" fields */ #define TAPE390_KEKL_TYPE_NONE 0 #define TAPE390_KEKL_TYPE_LABEL 1 #define TAPE390_KEKL_TYPE_HASH 2 struct tape390_kekl { unsigned char type; unsigned char type_on_tape; char label[65]; } __attribute__ ((packed)); struct tape390_kekl_pair { struct tape390_kekl kekl[2]; } __attribute__ ((packed)); /* * The TAPE390_KEKL_SET ioctl is used to set Key Encrypting Key labels. */ #define TAPE390_KEKL_SET _IOW('d', 4, struct tape390_kekl_pair) /* * The TAPE390_KEKL_QUERY ioctl is used to query Key Encrypting Key labels. */ #define TAPE390_KEKL_QUERY _IOR('d', 5, struct tape390_kekl_pair) #endif
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Kbuild | File | 321 B | 0644 |
|
auxvec.h | File | 214 B | 0644 |
|
bitsperlong.h | File | 293 B | 0644 |
|
bpf_perf_event.h | File | 226 B | 0644 |
|
byteorder.h | File | 188 B | 0644 |
|
chpid.h | File | 456 B | 0644 |
|
chsc.h | File | 2.96 KB | 0644 |
|
clp.h | File | 549 B | 0644 |
|
cmb.h | File | 1.87 KB | 0644 |
|
dasd.h | File | 12.4 KB | 0644 |
|
debug.h | File | 857 B | 0644 |
|
guarded_storage.h | File | 1.18 KB | 0644 |
|
hypfs.h | File | 1.35 KB | 0644 |
|
ioctls.h | File | 191 B | 0644 |
|
ipcbuf.h | File | 738 B | 0644 |
|
kvm.h | File | 7.73 KB | 0644 |
|
kvm_para.h | File | 224 B | 0644 |
|
kvm_perf.h | File | 474 B | 0644 |
|
monwriter.h | File | 939 B | 0644 |
|
msgbuf.h | File | 1.14 KB | 0644 |
|
perf_regs.h | File | 887 B | 0644 |
|
pkey.h | File | 4.35 KB | 0644 |
|
posix_types.h | File | 1.4 KB | 0644 |
|
ptrace.h | File | 11.39 KB | 0644 |
|
qeth.h | File | 3.05 KB | 0644 |
|
schid.h | File | 332 B | 0644 |
|
sclp_ctl.h | File | 465 B | 0644 |
|
sembuf.h | File | 864 B | 0644 |
|
setup.h | File | 292 B | 0644 |
|
shmbuf.h | File | 1.34 KB | 0644 |
|
sie.h | File | 9.25 KB | 0644 |
|
sigcontext.h | File | 1.73 KB | 0644 |
|
siginfo.h | File | 302 B | 0644 |
|
signal.h | File | 3.26 KB | 0644 |
|
socket.h | File | 2.24 KB | 0644 |
|
stat.h | File | 2.9 KB | 0644 |
|
statfs.h | File | 1.03 KB | 0644 |
|
sthyi.h | File | 178 B | 0644 |
|
tape390.h | File | 2.76 KB | 0644 |
|
termios.h | File | 1.14 KB | 0644 |
|
types.h | File | 525 B | 0644 |
|
ucontext.h | File | 1.18 KB | 0644 |
|
unistd.h | File | 12.32 KB | 0644 |
|
virtio-ccw.h | File | 444 B | 0644 |
|
vmcp.h | File | 737 B | 0644 |
|
vtoc.h | File | 7.36 KB | 0644 |
|
zcrypt.h | File | 10.94 KB | 0644 |
|