work around bluetooth linger bug
[trinity.git] / include / compat.h
blobdfd87143e939d37c31becc26334688fbb442de95
1 #ifndef _TRINITY_COMPAT_H
2 #define _TRINITY_COMPAT_H 1
4 /* fcntl.h */
5 #ifndef AT_EMPTY_PATH
6 #define AT_EMPTY_PATH 0x1000
7 #endif
9 #ifndef O_PATH
10 #define O_PATH 010000000 /* Resolve pathname but do not open file. */
11 #endif
13 #ifndef O_CLOEXEC
14 #define O_CLOEXEC 02000000
15 #endif
17 #ifndef O_TMPFILE
18 #define O_TMPFILE 020000000
19 #endif
21 #ifndef AT_NO_AUTOMOUNT
22 #define AT_NO_AUTOMOUNT 0x800
23 #endif
25 #ifndef F_LINUX_SPECIFIC_BASE
26 #define F_LINUX_SPECIFIC_BASE 1024
27 #endif
29 #ifndef F_SETPIPE_SZ
30 #define F_SETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 7)
31 #endif
33 #ifndef F_GETPIPE_SZ
34 #define F_GETPIPE_SZ (F_LINUX_SPECIFIC_BASE + 8)
35 #endif
37 #ifndef F_DUPFD_CLOEXEC
38 #define F_DUPFD_CLOEXEC (F_LINUX_SPECIFIC_BASE + 6)
39 #endif
41 #ifndef F_SETOWN_EX
42 #define F_SETOWN_EX 15
43 #endif
45 #ifndef F_GETOWN_EX
46 #define F_GETOWN_EX 16
47 #endif
49 /* linux/hw_breakpoint.h */
50 enum {
51 HW_BREAKPOINT_LEN_1 = 1,
52 HW_BREAKPOINT_LEN_2 = 2,
53 HW_BREAKPOINT_LEN_4 = 4,
54 HW_BREAKPOINT_LEN_8 = 8,
57 enum {
58 HW_BREAKPOINT_EMPTY = 0,
59 HW_BREAKPOINT_R = 1,
60 HW_BREAKPOINT_W = 2,
61 HW_BREAKPOINT_RW = HW_BREAKPOINT_R | HW_BREAKPOINT_W,
62 HW_BREAKPOINT_X = 4,
63 HW_BREAKPOINT_INVALID = HW_BREAKPOINT_RW | HW_BREAKPOINT_X,
66 /* asm-generic/mman-common.h */
68 #ifndef MAP_UNINITIALIZED
69 #define MAP_UNINITIALIZED 0x4000000
70 #endif
71 #ifndef PROT_SEM
72 #define PROT_SEM 0x8
73 #endif
74 #ifndef MAP_HUGETLB
75 #define MAP_HUGETLB 0x40000
76 #endif
77 #ifndef MAP_STACK
78 #define MAP_STACK 0x20000
79 #endif
81 #ifndef MADV_MERGEABLE
82 #define MADV_MERGEABLE 12
83 #endif
84 #ifndef MADV_UNMERGEABLE
85 #define MADV_UNMERGEABLE 13
86 #endif
87 #ifndef MADV_HUGEPAGE
88 #define MADV_HUGEPAGE 14
89 #endif
90 #ifndef MADV_NOHUGEPAGE
91 #define MADV_NOHUGEPAGE 15
92 #endif
95 /* bits/socket.h */
96 #ifndef SOCK_CLOEXEC
97 #define SOCK_CLOEXEC 02000000
98 #endif
100 #ifndef SOCK_NONBLOCK
101 #define SOCK_NONBLOCK 04000
102 #endif
104 #ifndef PF_RDS
105 #define PF_RDS 21
106 #endif
107 #ifndef AF_RDS
108 #define AF_RDS PF_RDS
109 #endif
111 #ifndef PF_LLC
112 #define PF_LLC 26
113 #endif
114 #ifndef AF_LLC
115 #define AF_LLC PF_LLC
116 #endif
118 #ifndef AF_IB
119 #define AF_IB 27
120 #endif
121 #ifndef PF_IB
122 #define PF_IB AF_IB
123 #endif
125 #ifndef PF_CAN
126 #define PF_CAN 29
127 #endif
128 #ifndef AF_CAN
129 #define AF_CAN PF_CAN
130 #endif
132 #ifndef PF_TIPC
133 #define PF_TIPC 30
134 #endif
135 #ifndef AF_TIPC
136 #define AF_TIPC PF_TIPC
137 #endif
139 #ifndef PF_PHONET
140 #define PF_PHONET 35
141 #endif
142 #ifndef AF_PHONET
143 #define AF_PHONET PF_PHONET
144 #endif
146 #ifndef PF_CAIF
147 #define PF_CAIF 37
148 #endif
149 #ifndef AF_CAIF
150 #define AF_CAIF PF_CAIF
151 #endif
153 #ifndef PF_ALG
154 #define PF_ALG 38
155 #endif
156 #ifndef AF_ALG
157 #define AF_ALG PF_ALG
158 #endif
160 #ifndef PF_NFC
161 #define PF_NFC 39
162 #endif
163 #ifndef AF_NFC
164 #define AF_NFC PF_NFC
165 #endif
167 #ifndef PF_VSOCK
168 #define PF_VSOCK 40
169 #endif
170 #ifndef AF_VSOCK
171 #define AF_VSOCK PF_VSOCK
172 #endif
174 #ifndef NFC_SOCKPROTO_RAW
175 #define NFC_SOCKPROTO_RAW 0
176 #endif
177 #ifndef NFC_SOCKPROTO_LLCP
178 #define NFC_SOCKPROTO_LLCP 1
179 #endif
181 #ifndef MSG_WAITFORONE
182 #define MSG_WAITFORONE 0x10000
183 #endif
185 #ifndef MSG_CMSG_CLOEXEC
186 #define MSG_CMSG_CLOEXEC 0x40000000
187 #endif
189 /* linux/socket.h */
190 #ifndef MSG_PROBE
191 #define MSG_PROBE 0x10
192 #endif
193 #ifndef MSG_FASTOPEN
194 #define MSG_FASTOPEN 0x20000000
195 #endif
196 #ifndef MSG_CMSG_COMPAT
197 #define MSG_CMSG_COMPAT 0x80000000
198 #endif
200 /* linux/net.h */
201 #ifndef SYS_RECVMMSG
202 #define SYS_RECVMMSG 19
203 #endif
204 #ifndef SYS_SENDMMSG
205 #define SYS_SENDMMSG 20
206 #endif
208 /* linux/netlink.h */
209 #ifndef NETLINK_CRYPTO
210 #define NETLINK_CRYPTO 21
211 #endif
212 #ifndef NETLINK_RX_RING
213 #define NETLINK_RX_RING 6
214 #define NETLINK_TX_RING 7
215 #endif
217 /* linux/prctl.h */
218 #ifndef PR_MCE_KILL_GET
219 #define PR_MCE_KILL_GET 34
220 #endif
222 /* linux/rds.h */
223 #ifndef RDS_CANCEL_SENT_TO
224 #define RDS_CANCEL_SENT_TO 1
225 #define RDS_GET_MR 2
226 #define RDS_FREE_MR 3
227 /* deprecated: RDS_BARRIER 4 */
228 #define RDS_RECVERR 5
229 #define RDS_CONG_MONITOR 6
230 #define RDS_GET_MR_FOR_DEST 7
231 #endif
233 /* asm/ptrace-abi.h */
234 #ifndef PTRACE_SYSEMU
235 #define PTRACE_SYSEMU 31
236 #endif
237 #ifndef PTRACE_SYSEMU_SINGLESTEP
238 #define PTRACE_SYSEMU_SINGLESTEP 32
239 #endif
240 #ifndef PTRACE_GETSIGMASK
241 #define PTRACE_GETSIGMASK 0x420a
242 #define PTRACE_SETSIGMASK 0x420b
243 #endif
245 /* sys/timerfd.h */
246 #ifndef TFD_CLOEXEC
247 #define TFD_CLOEXEC 02000000
248 #endif
249 #ifndef TFD_NONBLOCK
250 #define TFD_NONBLOCK 04000
251 #endif
253 /* linux/keyctl.h */
254 #ifndef KEYCTL_GET_KEYRING_ID
255 #define KEYCTL_GET_KEYRING_ID 0 /* ask for a keyring's ID */
256 #define KEYCTL_JOIN_SESSION_KEYRING 1 /* join or start named session keyring */
257 #define KEYCTL_UPDATE 2 /* update a key */
258 #define KEYCTL_REVOKE 3 /* revoke a key */
259 #define KEYCTL_CHOWN 4 /* set ownership of a key */
260 #define KEYCTL_SETPERM 5 /* set perms on a key */
261 #define KEYCTL_DESCRIBE 6 /* describe a key */
262 #define KEYCTL_CLEAR 7 /* clear contents of a keyring */
263 #define KEYCTL_LINK 8 /* link a key into a keyring */
264 #define KEYCTL_UNLINK 9 /* unlink a key from a keyring */
265 #define KEYCTL_SEARCH 10 /* search for a key in a keyring */
266 #define KEYCTL_READ 11 /* read a key or keyring's contents */
267 #define KEYCTL_INSTANTIATE 12 /* instantiate a partially constructed key */
268 #define KEYCTL_NEGATE 13 /* negate a partially constructed key */
269 #define KEYCTL_SET_REQKEY_KEYRING 14 /* set default request-key keyring */
270 #define KEYCTL_SET_TIMEOUT 15 /* set key timeout */
271 #define KEYCTL_ASSUME_AUTHORITY 16 /* assume request_key() authorisation */
272 #define KEYCTL_GET_SECURITY 17 /* get key security label */
273 #define KEYCTL_SESSION_TO_PARENT 18 /* apply session keyring to parent process */
274 #endif
276 #ifndef KEYCTL_REJECT
277 #define KEYCTL_REJECT 19 /* reject a partially constructed key */
278 #endif
280 #ifndef KEYCTL_INSTANTIATE_IOV
281 #define KEYCTL_INSTANTIATE_IOV 20 /* instantiate a partially constructed key */
282 #endif
284 #ifndef KCMP_TYPES
285 enum kcmp_type {
286 KCMP_FILE,
287 KCMP_VM,
288 KCMP_FILES,
289 KCMP_FS,
290 KCMP_SIGHAND,
291 KCMP_IO,
292 KCMP_SYSVSEM,
294 KCMP_TYPES,
296 #endif
298 /* asm/socket.h */
299 #ifndef SO_BSDCOMPAT
300 #define SO_BSDCOMPAT 14
301 #endif
303 #ifndef SO_REUSEPORT
304 #define SO_REUSEPORT 15
305 #endif
307 #ifndef SO_RXQ_OVFL
308 #define SO_RXQ_OVFL 40
309 #endif
311 #ifndef SO_WIFI_STATUS
312 #define SO_WIFI_STATUS 41
313 #endif
315 #ifndef SO_PEEK_OFF
316 #define SO_PEEK_OFF 42
317 #endif
319 #ifndef SO_NOFCS
320 #define SO_NOFCS 43
321 #endif
323 #ifndef SO_LOCK_FILTER
324 #define SO_LOCK_FILTER 44
325 #endif
327 #ifndef SO_SELECT_ERR_QUEUE
328 #define SO_SELECT_ERR_QUEUE 45
329 #endif
331 #ifndef SO_BUSY_POLL
332 #define SO_BUSY_POLL 46
333 #endif
335 #ifndef SO_MAX_PACING_RATE
336 #define SO_MAX_PACING_RATE 47
337 #endif
339 /* linux/tcp.h */
340 #ifndef TCP_COOKIE_TRANSACTIONS
341 #define TCP_COOKIE_TRANSACTIONS 15
342 #endif
344 #ifndef TCP_THIN_LINEAR_TIMEOUTS
345 #define TCP_THIN_LINEAR_TIMEOUTS 16
346 #endif
348 #ifndef TCP_THIN_DUPACK
349 #define TCP_THIN_DUPACK 17
350 #endif
352 #ifndef TCP_USER_TIMEOUT
353 #define TCP_USER_TIMEOUT 18
354 #endif
356 #ifndef TCP_REPAIR
357 #define TCP_REPAIR 19
358 #endif
360 #ifndef TCP_REPAIR_QUEUE
361 #define TCP_REPAIR_QUEUE 20
362 #endif
364 #ifndef TCP_QUEUE_SEQ
365 #define TCP_QUEUE_SEQ 21
366 #endif
368 #ifndef TCP_REPAIR_OPTIONS
369 #define TCP_REPAIR_OPTIONS 22
370 #endif
372 #ifndef TCP_FASTOPEN
373 #define TCP_FASTOPEN 23
374 #endif
376 /* linux/if_packet.h */
377 #ifndef PACKET_VNET_HDR
378 #define PACKET_VNET_HDR 15
379 #endif
381 #ifndef PACKET_TX_TIMESTAMP
382 #define PACKET_TX_TIMESTAMP 16
383 #endif
385 #ifndef PACKET_TIMESTAMP
386 #define PACKET_TIMESTAMP 17
387 #endif
389 #ifndef PACKET_FANOUT
390 #define PACKET_FANOUT 18
391 #endif
393 /* linux/dccp.h */
394 #ifndef DCCP_SOCKOPT_QPOLICY_ID
395 #define DCCP_SOCKOPT_QPOLICY_ID 16
396 #endif
398 #ifndef DCCP_SOCKOPT_QPOLICY_TXQLEN
399 #define DCCP_SOCKOPT_QPOLICY_TXQLEN 17
400 #endif
402 /* net/udplite.h */
403 #ifndef UDPLITE_SEND_CSCOV
404 #define UDPLITE_SEND_CSCOV 10 /* sender partial coverage (as sent) */
405 #endif
406 #ifndef UDPLITE_RECV_CSCOV
407 #define UDPLITE_RECV_CSCOV 11 /* receiver partial coverage (threshold ) */
408 #endif
410 /* linux/in.h */
411 #ifndef IP_MTU
412 #define IP_MTU 14
413 #endif
414 #ifndef IP_FREEBIND
415 #define IP_FREEBIND 15
416 #endif
417 #ifndef IP_IPSEC_POLICY
418 #define IP_IPSEC_POLICY 16
419 #endif
420 #ifndef IP_XFRM_POLICY
421 #define IP_XFRM_POLICY 17
422 #endif
423 #ifndef IP_PASSSEC
424 #define IP_PASSSEC 18
425 #endif
426 #ifndef IP_TRANSPARENT
427 #define IP_TRANSPARENT 19
428 #endif
429 #ifndef IP_MINTTL
430 #define IP_MINTTL 21
431 #endif
432 #ifndef IP_ORIGDSTADDR
433 #define IP_ORIGDSTADDR 20
434 #endif
435 #ifndef IP_RECVORIGDSTADDR
436 #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
437 #endif
438 #ifndef IP_NODEFRAG
439 #define IP_NODEFRAG 22
440 #endif
441 #ifndef IP_MULTICAST_ALL
442 #define IP_MULTICAST_ALL 49
443 #endif
444 #ifndef IP_UNICAST_IF
445 #define IP_UNICAST_IF 50
446 #endif
448 /* linux/in6.h */
449 #ifndef IPV6_FLOWINFO
450 #define IPV6_FLOWINFO 11
451 #endif
453 /* asm/resource.h */
454 #ifndef RLIMIT_RTTIME
455 #define RLIMIT_RTTIME 15
456 #endif
458 /* sctp/user.h */
459 #ifndef SCTP_RTOINFO
460 #define SCTP_RTOINFO 0
461 #define SCTP_ASSOCINFO 1
462 #define SCTP_INITMSG 2
463 #define SCTP_NODELAY 3 /* Get/set nodelay option. */
464 #define SCTP_AUTOCLOSE 4
465 #define SCTP_SET_PEER_PRIMARY_ADDR 5
466 #define SCTP_PRIMARY_ADDR 6
467 #define SCTP_ADAPTATION_LAYER 7
468 #define SCTP_DISABLE_FRAGMENTS 8
469 #define SCTP_PEER_ADDR_PARAMS 9
470 #define SCTP_DEFAULT_SEND_PARAM 10
471 #define SCTP_EVENTS 11
472 #define SCTP_I_WANT_MAPPED_V4_ADDR 12 /* Turn on/off mapped v4 addresses */
473 #define SCTP_MAXSEG 13 /* Get/set maximum fragment. */
474 #define SCTP_STATUS 14
475 #define SCTP_GET_PEER_ADDR_INFO 15
476 #define SCTP_DELAYED_ACK_TIME 16
477 #define SCTP_CONTEXT 17
478 #define SCTP_FRAGMENT_INTERLEAVE 18
479 #define SCTP_PARTIAL_DELIVERY_POINT 19 /* Set/Get partial delivery point */
480 #define SCTP_MAX_BURST 20 /* Set/Get max burst */
481 #define SCTP_AUTH_CHUNK 21 /* Set only: add a chunk type to authenticate */
482 #define SCTP_HMAC_IDENT 22
483 #define SCTP_AUTH_KEY 23
484 #define SCTP_AUTH_ACTIVE_KEY 24
485 #define SCTP_AUTH_DELETE_KEY 25
486 #define SCTP_PEER_AUTH_CHUNKS 26 /* Read only */
487 #define SCTP_LOCAL_AUTH_CHUNKS 27 /* Read only */
488 #define SCTP_GET_ASSOC_NUMBER 28 /* Read only */
489 #define SCTP_GET_ASSOC_ID_LIST 29 /* Read only */
490 #define SCTP_AUTO_ASCONF 30
491 #define SCTP_PEER_ADDR_THLDS 31
492 #endif
494 #ifndef SCTP_SOCKOPT_BINDX_ADD
495 #define SCTP_SOCKOPT_BINDX_ADD 100 /* BINDX requests for adding addrs */
496 #define SCTP_SOCKOPT_BINDX_REM 101 /* BINDX requests for removing addrs. */
497 #define SCTP_SOCKOPT_PEELOFF 102 /* peel off association. */
498 #define SCTP_SOCKOPT_CONNECTX_OLD 107 /* CONNECTX old requests. */
499 #define SCTP_GET_PEER_ADDRS 108 /* Get all peer address. */
500 #define SCTP_GET_LOCAL_ADDRS 109 /* Get all local address. */
501 #define SCTP_SOCKOPT_CONNECTX 110 /* CONNECTX requests. */
502 #define SCTP_SOCKOPT_CONNECTX3 111 /* CONNECTX requests (updated) */
503 #define SCTP_GET_ASSOC_STATS 112 /* Read only */
504 #endif
506 /* linux/rxrpc.h */
507 #ifndef RXRPC_USER_CALL_ID
508 #define RXRPC_USER_CALL_ID 1 /* user call ID specifier */
509 #define RXRPC_ABORT 2 /* abort request / notification [terminal] */
510 #define RXRPC_ACK 3 /* [Server] RPC op final ACK received [terminal] */
511 #define RXRPC_NET_ERROR 5 /* network error received [terminal] */
512 #define RXRPC_BUSY 6 /* server busy received [terminal] */
513 #define RXRPC_LOCAL_ERROR 7 /* local error generated [terminal] */
514 #define RXRPC_NEW_CALL 8 /* [Server] new incoming call notification */
515 #define RXRPC_ACCEPT 9 /* [Server] accept request */
516 #endif
518 /* net/bluetooth/bluetooth.h */
519 #ifndef BT_SECURITY
520 #define BT_SECURITY 4
521 #define BT_DEFER_SETUP 7
522 #define BT_FLUSHABLE 8
523 #define BT_POWER 9
524 #define BT_CHANNEL_POLICY 10
526 #define SOL_HCI 0
527 #define SOL_L2CAP 6
528 #define SOL_SCO 17
529 #define SOL_RFCOMM 18
530 #endif
532 /* net/bluetooth/hci.h */
533 #ifndef HCI_DATA_DIR
534 #define HCI_DATA_DIR 1
535 #define HCI_FILTER 2
536 #define HCI_TIME_STAMP 3
537 #endif
539 /* net/bluetooth/l2cap.h */
540 #ifndef L2CAP_OPTIONS
541 #define L2CAP_OPTIONS 0x01
542 #define L2CAP_LM 0x03
543 #endif
545 /* net/bluetooth/rfcomm.h */
546 #ifndef RFCOMM_LM
547 #define RFCOMM_LM 0x03
548 #endif
550 /* net/iucv/af_iucv.h */
551 #ifndef SO_IPRMDATA_MSG
552 #define SO_IPRMDATA_MSG 0x0080 /* send/recv IPRM_DATA msgs */
553 #define SO_MSGLIMIT 0x1000 /* get/set IUCV MSGLIMIT */
554 #define SO_MSGSIZE 0x0800 /* get maximum msgsize */
555 #endif
557 /* linux/nfc.h */
558 #ifndef sockaddr_nfc
559 #include <bits/sockaddr.h>
560 #include <linux/types.h>
562 struct sockaddr_nfc {
563 sa_family_t sa_family;
564 __u32 dev_idx;
565 __u32 target_idx;
566 __u32 nfc_protocol;
568 #endif
570 /* linux/inotify.h */
571 #ifndef IN_EXCL_UNLINK
572 #define IN_EXCL_UNLINK 0x04000000 /* exclude events on unlinked objects */
573 #endif
575 #ifndef MSG_COPY
576 #define MSG_COPY 040000
577 #endif
579 #ifndef MS_SNAP_STABLE
580 #define MS_SNAP_STABLE (1<<27)
581 #endif
583 #ifndef MS_NOSEC
584 #define MS_NOSEC (1<<28)
585 #endif
587 #ifndef MS_BORN
588 #define MS_BORN (1<<29)
589 #endif
591 /* linux/kvm.h */
592 #ifndef KVM_GET_REG_LIST
593 struct kvm_reg_list {
594 __u64 n; /* number of regs */
595 __u64 reg[0];
597 #define KVM_GET_REG_LIST _IOWR(KVMIO, 0xb0, struct kvm_reg_list)
598 #endif
600 #ifndef KVM_S390_UCAS_MAP
601 struct kvm_s390_ucas_mapping {
602 __u64 user_addr;
603 __u64 vcpu_addr;
604 __u64 length;
606 #define KVM_S390_UCAS_MAP _IOW(KVMIO, 0x50, struct kvm_s390_ucas_mapping)
607 #endif
609 #ifndef KVM_S390_UCAS_UNMAP
610 #define KVM_S390_UCAS_UNMAP _IOW(KVMIO, 0x51, struct kvm_s390_ucas_mapping)
611 #endif
613 #ifndef KVM_S390_VCPU_FAULT
614 #define KVM_S390_VCPU_FAULT _IOW(KVMIO, 0x52, unsigned long)
615 #endif
617 #ifndef KVM_XEN_HVM_CONFIG
618 struct kvm_xen_hvm_config {
619 __u32 flags;
620 __u32 msr;
621 __u64 blob_addr_32;
622 __u64 blob_addr_64;
623 __u8 blob_size_32;
624 __u8 blob_size_64;
625 __u8 pad2[30];
627 #define KVM_XEN_HVM_CONFIG _IOW(KVMIO, 0x7a, struct kvm_xen_hvm_config)
628 #endif
630 #ifndef KVM_PPC_GET_PVINFO
631 struct kvm_ppc_pvinfo {
632 /* out */
633 __u32 flags;
634 __u32 hcall[4];
635 __u8 pad[108];
637 #define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo)
638 #endif
640 #ifndef KVM_SET_TSC_KHZ
641 #define KVM_SET_TSC_KHZ _IO(KVMIO, 0xa2)
642 #endif
644 #ifndef KVM_GET_TSC_KHZ
645 #define KVM_GET_TSC_KHZ _IO(KVMIO, 0xa3)
646 #endif
648 #ifndef KVM_ASSIGN_SET_INTX_MASK
649 #define KVM_ASSIGN_SET_INTX_MASK _IOW(KVMIO, 0xa4, struct kvm_assigned_pci_dev)
650 #endif
652 #ifndef KVM_GET_DEBUGREGS
653 struct kvm_debugregs {
654 __u64 db[4];
655 __u64 dr6;
656 __u64 dr7;
657 __u64 flags;
658 __u64 reserved[9];
660 #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs)
661 #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs)
662 #endif
664 #ifndef KVM_ENABLE_CAP
665 struct kvm_enable_cap {
666 /* in */
667 __u32 cap;
668 __u32 flags;
669 __u64 args[4];
670 __u8 pad[64];
672 #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap)
673 #endif
675 #ifndef KVM_GET_XSAVE
676 struct kvm_xsave {
677 __u32 region[1024];
679 #define KVM_GET_XSAVE _IOR(KVMIO, 0xa4, struct kvm_xsave)
680 #define KVM_SET_XSAVE _IOW(KVMIO, 0xa5, struct kvm_xsave)
681 #endif
683 #ifndef KVM_GET_XCRS
684 #define KVM_MAX_XCRS 16
685 struct kvm_xcr {
686 __u32 xcr;
687 __u32 reserved;
688 __u64 value;
691 struct kvm_xcrs {
692 __u32 nr_xcrs;
693 __u32 flags;
694 struct kvm_xcr xcrs[KVM_MAX_XCRS];
695 __u64 padding[16];
697 #define KVM_GET_XCRS _IOR(KVMIO, 0xa6, struct kvm_xcrs)
698 #define KVM_SET_XCRS _IOW(KVMIO, 0xa7, struct kvm_xcrs)
699 #endif
701 #ifndef KVM_SIGNAL_MSI
702 struct kvm_msi {
703 __u32 address_lo;
704 __u32 address_hi;
705 __u32 data;
706 __u32 flags;
707 __u8 pad[16];
709 #define KVM_SIGNAL_MSI _IOW(KVMIO, 0xa5, struct kvm_msi)
710 #endif
712 #ifndef KVM_DIRTY_TLB
713 struct kvm_dirty_tlb {
714 __u64 bitmap;
715 __u32 num_dirty;
717 #define KVM_DIRTY_TLB _IOW(KVMIO, 0xaa, struct kvm_dirty_tlb)
718 #endif
720 #ifndef KVM_GET_ONE_REG
721 struct kvm_one_reg {
722 __u64 id;
723 __u64 addr;
725 #define KVM_GET_ONE_REG _IOW(KVMIO, 0xab, struct kvm_one_reg)
726 #endif
728 #ifndef KVM_SET_ONE_REG
729 #define KVM_SET_ONE_REG _IOW(KVMIO, 0xac, struct kvm_one_reg)
730 #endif
732 #ifndef KVM_KVMCLOCK_CTRL
733 #define KVM_KVMCLOCK_CTRL _IO(KVMIO, 0xad)
734 #endif
736 #ifndef KVM_PPC_GET_SMMU_INFO
737 #define KVM_PPC_PAGE_SIZES_MAX_SZ 8
739 struct kvm_ppc_one_page_size {
740 __u32 page_shift; /* Page shift (or 0) */
741 __u32 pte_enc; /* Encoding in the HPTE (>>12) */
744 struct kvm_ppc_one_seg_page_size {
745 __u32 page_shift; /* Base page shift of segment (or 0) */
746 __u32 slb_enc; /* SLB encoding for BookS */
747 struct kvm_ppc_one_page_size enc[KVM_PPC_PAGE_SIZES_MAX_SZ];
750 struct kvm_ppc_smmu_info {
751 __u64 flags;
752 __u32 slb_size;
753 __u32 pad;
754 struct kvm_ppc_one_seg_page_size sps[KVM_PPC_PAGE_SIZES_MAX_SZ];
756 #define KVM_PPC_GET_SMMU_INFO _IOR(KVMIO, 0xa6, struct kvm_ppc_smmu_info)
757 #endif
759 #ifndef KVM_PPC_ALLOCATE_HTAB
760 #define KVM_PPC_ALLOCATE_HTAB _IOWR(KVMIO, 0xa7, __u32)
761 #endif
763 #ifndef KVM_PPC_GET_HTAB_FD
764 struct kvm_get_htab_fd {
765 __u64 flags;
766 __u64 start_index;
767 __u64 reserved[2];
769 #define KVM_PPC_GET_HTAB_FD _IOW(KVMIO, 0xaa, struct kvm_get_htab_fd)
770 #endif
772 #ifndef EM_ARM
773 #define EM_ARM 40
774 #endif
776 /* linux/mroute.h */
777 #ifndef MRT_TABLE
778 #define MRT_TABLE (MRT_BASE+9)
779 #endif
780 #ifndef MRT_ADD_MFC_PROXY
781 #define MRT_ADD_MFC_PROXY (MRT_BASE+10)
782 #endif
783 #ifndef MRT_DEL_MFC_PROXY
784 #define MRT_DEL_MFC_PROXY (MRT_BASE+11)
785 #endif
787 /* sys/mount.h */
788 #ifndef MNT_DETACH
789 #define MNT_DETACH 2
790 #endif
792 #ifndef MNT_EXPIRE
793 #define MNT_EXPIRE 4
794 #endif
796 #ifndef UMOUNT_NOFOLLOW
797 #define UMOUNT_NOFOLLOW 8
798 #endif
800 /* if_ether.h */
801 #ifndef ETH_P_CANFD
802 #define ETH_P_CANFD 0x000D
803 #endif
804 #ifndef ETH_P_CAIF
805 #define ETH_P_CAIF 0x00F7
806 #endif
807 #ifndef ETH_P_802_3_MIN
808 #define ETH_P_802_3_MIN 0x0600
809 #endif
810 #ifndef ETH_P_BATMAN
811 #define ETH_P_BATMAN 0x4305
812 #endif
813 #ifndef ETH_P_LINK_CTL
814 #define ETH_P_LINK_CTL 0x886c
815 #endif
816 #ifndef ETH_P_8021AD
817 #define ETH_P_8021AD 0x88A8
818 #endif
819 #ifndef ETH_P_802_EX1
820 #define ETH_P_802_EX1 0x88B5
821 #endif
822 #ifndef ETH_P_8021AH
823 #define ETH_P_8021AH 0x88E7
824 #endif
825 #ifndef ETH_P_MVRP
826 #define ETH_P_MVRP 0x88F5
827 #endif
828 #ifndef ETH_P_PRP
829 #define ETH_P_PRP 0x88FB
830 #endif
831 #ifndef ETH_P_QINQ1
832 #define ETH_P_QINQ1 0x9100
833 #endif
834 #ifndef ETH_P_QINQ2
835 #define ETH_P_QINQ2 0x9200
836 #endif
837 #ifndef ETH_P_QINQ3
838 #define ETH_P_QINQ3 0x9300
839 #endif
841 #endif /* _TRINITY_COMPAT_H */