lect device before starting the next transfer. * * This structure is mapped directly to the kernel spi_transfer structure; * the fields have the same meanings, except of course that the pointers * are in a different address space (and may be of different sizes in some * cases, such as 32-bit i386 userspace over a 64-bit x86_64 kernel). * Zero-initialize the structure, including currently unused fields, to * accomodate potential future updates. * * SPI_IOC_MESSAGE gives userspace the equivalent of kernel spi_sync(). * Pass it an array of related transfers, they'll execute together. * Each transfer may be half duplex (either direction) or full duplex. * * struct spi_ioc_transfer mesg[4]; * ... * status = ioctl(fd, SPI_IOC_MESSAGE(4), mesg); * * So for example one transfer might send a nine bit command (right aligned * in a 16-bit word), the next could read a block of 8-bit data before * terminating that command by temporarily deselecting the chip; the next * could send a different nine bit command (re-selecting the chip), and the * last transfer might write some register values. */ struct spi_ioc_transfer { __u64 tx_buf; __u64 rx_buf; __u32 len; __u32 speed_hz; __u16 delay_usecs; __u8 bits_per_word; __u8 cs_change; __u32 pad; /* If the contents of 'struct spi_ioc_transfer' ever change * incompatibly, then the ioctl number (currently 0) must change; * ioctls with constant size fields get a bit more in the way of * error checking than ones (like this) where that field varies. * * NOTE: struct layout is the same in 64bit and 32bit userspace. */ }; /* not all platforms use or _IOC_TYPECHECK() ... */ #define SPI_MSGSIZE(N) \ ((((N)*(sizeof (struct spi_ioc_transfer))) < (1 << _IOC_SIZEBITS)) \ ? ((N)*(sizeof (struct spi_ioc_transfer))) : 0) #define SPI_IOC_MESSAGE(N) _IOW(SPI_IOC_MAGIC, 0, char[SPI_MSGSIZE(N)]) /* Read / Write of SPI mode (SPI_MODE_0..SPI_MODE_3) */ #define SPI_IOC_RD_MODE _IOR(SPI_IOC_MAGIC, 1, __u8) #define SPI_IOC_WR_MODE _IOW(SPI_IOC_MAGIC, 1, __u8) /* Read / Write SPI bit justification */ #define SPI_IOC_RD_LSB_FIRST _IOR(SPI_IOC_MAGIC, 2, __u8) #define SPI_IOC_WR_LSB_FIRST _IOW(SPI_IOC_MAGIC, 2, __u8) /* Read / Write SPI device word length (1..N) */ #define SPI_IOC_RD_BITS_PER_WORD _IOR(SPI_IOC_MAGIC, 3, __u8) #define SPI_IOC_WR_BITS_PER_WORD _IOW(SPI_IOC_MAGIC, 3, __u8) /* Read / Write SPI device default max speed hz */ #define SPI_IOC_RD_MAX_SPEED_HZ _IOR(SPI_IOC_MAGIC, 4, __u32) #define SPI_IOC_WR_MAX_SPEED_HZ _IOW(SPI_IOC_MAGIC, 4, __u32) #endif /* SPIDEV_H */ #ifndef __LINUX_KVM_H #define __LINUX_KVM_H /* * Userspace interface for /dev/kvm - kernel based virtual machine * * Note: you must update KVM_API_VERSION if you change this interface. */ #include #include #include #define KVM_API_VERSION 12 /* *** Deprecated interfaces *** */ #define KVM_TRC_SHIFT 16 #define KVM_TRC_ENTRYEXIT (1 << KVM_TRC_SHIFT) #define KVM_TRC_HANDLER (1 << (KVM_TRC_SHIFT + 1)) #define KVM_TRC_VMENTRY (KVM_TRC_ENTRYEXIT + 0x01) #define KVM_TRC_VMEXIT (KVM_TRC_ENTRYEXIT + 0x02) #define KVM_TRC_PAGE_FAULT (KVM_TRC_HANDLER + 0x01) #define KVM_TRC_HEAD_SIZE 12 #define KVM_TRC_CYCLE_SIZE 8 #define KVM_TRC_EXTRA_MAX 7 #define KVM_TRC_INJ_VIRQ (KVM_TRC_HANDLER + 0x02) #define KVM_TRC_REDELIVER_EVT (KVM_TRC_HANDLER + 0x03) #define KVM_TRC_PEND_INTR (KVM_TRC_HANDLER + 0x04) #define KVM_TRC_IO_READ (KVM_TRC_HANDLER + 0x05) #define KVM_TRC_IO_WRITE (KVM_TRC_HANDLER + 0x06) #define KVM_TRC_CR_READ (KVM_TRC_HANDLER + 0x07) #define KVM_TRC_CR_WRITE (KVM_TRC_HANDLER + 0x08) #define KVM_TRC_DR_READ (KVM_TRC_HANDLER + 0x09) #define KVM_TRC_DR_WRITE (KVM_TRC_HANDLER + 0x0A) #define KVM_TRC_MSR_READ (KVM_TRC_HANDLER + 0x0B) #define KVM_TRC_MSR_WRITE (KVM_TRC_HANDLER + 0x0C) #define KVM_TRC_CPUID (KVM_TRC_HANDLER + 0x0D) #define KVM_TRC_INTR (KVM_TRC_HANDLER + 0x0E) #define KVM_TRC_NMI (KVM_TRC_HANDLER + 0x0F) #define KVM_TRC_VMMCALL (KVM_TRC_HANDLER + 0x10) #define KVM_TRC_HLT (KVM_TRC_HANDLER + 0x11) #define KVM_TRC_CLTS (KVM_TRC_HANDLER + 0x12) #define KVM_TRC_LMSW (KVM_TRC_HANDLER + 0x13) #define KVM_TRC_APIC_ACCESS (KVM_TRC_HANDLER + 0x14) #define KVM_TRC_TDP_FAULT (KVM_TRC_HANDLER + 0x15) #define KVM_TRC_GTLB_WRITE (KVM_TRC_HANDLER + 0x16) #define KVM_TRC_STLB_WRITE (KVM_TRC_HANDLER + 0x17) #define KVM_TRC_STLB_INVAL (KVM_TRC_HANDLER + 0x18) #define KVM_TRC_PPC_INSTR (KVM_TRC_HANDLER + 0x19) struct kvm_user_trace_setup { __u32 buf_size; __u32 buf_nr; }; #define __KVM_DEPRECATED_MAIN_W_0x06 \ _IOW(KVMIO, 0x06, struct kvm_user_trace_setup) #define __KVM_DEPRECATED_MAIN_0x07 _IO(KVMIO, 0x07) #define __KVM_DEPRECATED_MAIN_0x08 _IO(KVMIO, 0x08) #define __KVM_DEPRECATED_VM_R_0x70 _IOR(KVMIO, 0x70, struct kvm_assigned_irq) struct kvm_breakpoint { __u32 enabled; __u32 padding; __u64 address; }; struct kvm_debug_guest { __u32 enabled; __u32 pad; struct kvm_breakpoint breakpoints[4]; __u32 singlestep; }; #define __KVM_DEPRECATED_VCPU_W_0x87 _IOW(KVMIO, 0x87, struct kvm_debug_guest) /* *** End of deprecated interfaces *** */ /* for KVM_CREATE_MEMORY_REGION */ struct kvm_memory_region { __u32 slot; __u32 flags; __u64 guest_phys_addr; __u64 memory_size; /* bytes */ }; /* for KVM_SET_USER_MEMORY_REGION */ struct kvm_userspace_memory_region { __u32 slot; __u32 flags; __u64 guest_phys_addr; __u64 memory_size; /* bytes */ __u64 userspace_addr; /* start of the userspace allocated memory */ }; /* for kvm_memory_region::flags */ #define KVM_MEM_LOG_DIRTY_PAGES 1UL #define KVM_MEMSLOT_INVALID (1UL << 1) /* for KVM_IRQ_LINE */ struct kvm_irq_level { /* * ACPI gsi notion of irq. * For IA-64 (APIC model) IOAPIC0: irq 0-23; IOAPIC1: irq 24-47.. * For X86 (standard AT mode) PIC0/1: irq 0-15. IOAPIC0: 0-23.. */ union { __u32 irq; __s32 status; }; __u32 level; }; struct kvm_irqchip { __u32 chip_id; __u32 pad; union { char dummy[512]; /* reserving space */ #ifdef __KVM_HAVE_PIT struct kvm_pic_state pic; #endif #ifdef __KVM_HAVE_IOAPIC struct kvm_ioapic_state ioapic; #endif } chip; }; /* for KVM_CREATE_PIT2 */ struct kvm_pit_config { __u32 flags; __u32 pad[15]; }; #define KVM_PIT_SPEAKER_DUMMY 1 #define KVM_EXIT_UNKNOWN 0 #define KVM_EXIT_EXCEPTION 1 #define KVM_EXIT_IO 2 #define KVM_EXIT_HYPERCALL 3 #define KVM_EXIT_DEBUG 4 #define KVM_EXIT_HLT 5 #define KVM_EXIT_MMIO 6 #define KVM_EXIT_IRQ_WINDOW_OPEN 7 #define KVM_EXIT_SHUTDOWN 8 #define KVM_EXIT_FAIL_ENTRY 9 #define KVM_EXIT_INTR 10 #define KVM_EXIT_SET_TPR 11 #define KVM_EXIT_TPR_ACCESS 12 #define KVM_EXIT_S390_SIEIC 13 #define KVM_EXIT_S390_RESET 14 #define KVM_EXIT_DCR 15 #define KVM_EXIT_NMI 16 #define KVM_EXIT_INTERNAL_ERROR 17 #define KVM_EXIT_OSI 18 /* For KVM_EXIT_INTERNAL_ERROR */ #define KVM_INTERNAL_ERROR_EMULATION 1 #define KVM_INTERNAL_ERROR_SIMUL_EX 2 /* for KVM_RUN, returned by mmap(vcpu_fd, offset=0) */ struct kvm_run { /* in */ __u8 request_interrupt_window; __u8 padding1[7]; /* out */ __u32 exit_reason; __u8 ready_for_interrupt_injection; __u8 if_flag; __u8 padding2[2]; /* in (pre_kvm_run), out (post_kvm_run) */ __u64 cr8; __u64 apic_base; #ifdef __KVM_S390 /* the processor status word for s390 */ __u64 psw_mask; /* psw upper half */ __u64 psw_addr; /* psw lower half */ #endif union { /* KVM_EXIT_UNKNOWN */ struct { __u64 hardware_exit_reason; } hw; /* KVM_EXIT_FAIL_ENTRY */ struct { __u64 hardware_entry_failure_reason; } fail_entry; /* KVM_EXIT_EXCEPTION */ struct { __u32 exception; __u32 error_code; } ex; /* KVM_EXIT_IO */ struct { #define KVM_EXIT_IO_IN 0 #define KVM_EXIT_IO_OUT 1 __u8 direction; __u8 size; /* bytes */ __u16 port; __u32 count; __u64 data_offset; /* relative to kvm_run start */ } io; struct { struct kvm_debug_exit_arch arch; } debug; /* KVM_EXIT_MMIO */ struct { __u64 phys_addr; __u8 data[8]; __u32 len; __u8 is_write; } mmio; /* KVM_EXIT_HYPERCALL */ struct { __u64 nr; __u64 args[6]; __u64 ret; __u32 longmode; __u32 pad; } hypercall; /* KVM_EXIT_TPR_ACCESS */ struct { __u64 rip; __u32 is_write; __u32 pad; } tpr_access; /* KVM_EXIT_S390_SIEIC */ struct { __u8 icptcode; __u16 ipa; __u32 ipb; } s390_sieic; /* KVM_EXIT_S390_RESET */ #define KVM_S390_RESET_POR 1 #define KVM_S390_RESET_CLEAR 2 #define KVM_S390_RESET_SUBSYSTEM 4 #define KVM_S390_RESET_CPU_INIT 8 #define KVM_S390_RESET_IPL 16 __u64 s390_reset_flags; /* KVM_EXIT_DCR */ struct { __u32 dcrn; __u32 data; __u8 is_write; } dcr; struct { __u32 suberror; /* Available with KVM_CAP_INTERNAL_ERROR_DATA: */ __u32 ndata; __u64 data[16]; } internal; /* KVM_EXIT_OSI */ struct { __u64 gprs[32]; } osi; /* Fix the size of the union. */ char padding[256]; }; }; /* for KVM_REGISTER_COALESCED_MMIO / KVM_UNREGISTER_COALESCED_MMIO */ struct kvm_coalesced_mmio_zone { __u64 addr; __u32 size; __u32 pad; }; struct kvm_coalesced_mmio { __u64 phys_addr; __u32 len; __u32 pad; __u8 data[8]; }; struct kvm_coalesced_mmio_ring { __u32 first, last; struct kvm_coalesced_mmio coalesced_mmio[0]; }; #define KVM_COALESCED_MMIO_MAX \ ((PAGE_SIZE - sizeof(struct kvm_coalesced_mmio_ring)) / \ sizeof(struct kvm_coalesced_mmio)) /* for KVM_TRANSLATE */ struct kvm_translation { /* in */ __u64 linear_address; /* out */ __u64 physical_address; __u8 valid; __u8 writeable; __u8 usermode; __u8 pad[5]; }; /* for KVM_INTERRUPT */ struct kvm_interrupt { /* in */ __u32 irq; }; /* for KVM_GET_DIRTY_LOG */ struct kvm_dirty_log { __u32 slot; __u32 padding1; union { void *dirty_bitmap; /* one bit per page */ __u64 padding2; }; }; /* for KVM_SET_SIGNAL_MASK */ struct kvm_signal_mask { __u32 len; __u8 sigset[0]; }; /* for KVM_TPR_ACCESS_REPORTING */ struct kvm_tpr_access_ctl { __u32 enabled; __u32 flags; __u32 reserved[8]; }; /* for KVM_SET_VAPIC_ADDR */ struct kvm_vapic_addr { __u64 vapic_addr; }; /* for KVM_SET_MPSTATE */ #define KVM_MP_STATE_RUNNABLE 0 #define KVM_MP_STATE_UNINITIALIZED 1 #define KVM_MP_STATE_INIT_RECEIVED 2 #define KVM_MP_STATE_HALTED 3 #define KVM_MP_STATE_SIPI_RECEIVED 4 struct kvm_mp_state { __u32 mp_state; }; struct kvm_s390_psw { __u64 mask; __u64 addr; }; /* valid values for type in kvm_s390_interrupt */ #define KVM_S390_SIGP_STOP 0xfffe0000u #define KVM_S390_PROGRAM_INT 0xfffe0001u #define KVM_S390_SIGP_SET_PREFIX 0xfffe0002u #define KVM_S390_RESTART 0xfffe0003u #define KVM_S390_INT_VIRTIO 0xffff2603u #define KVM_S390_INT_SERVICE 0xffff2401u #define KVM_S390_INT_EMERGENCY 0xffff1201u struct kvm_s390_interrupt { __u32 type; __u32 parm; __u64 parm64; }; /* for KVM_SET_GUEST_DEBUG */ #define KVM_GUESTDBG_ENABLE 0x00000001 #define KVM_GUESTDBG_SINGLESTEP 0x00000002 struct kvm_guest_debug { __u32 control; __u32 pad; struct kvm_guest_debug_arch arch; }; enum { kvm_ioeventfd_flag_nr_datamatch, kvm_ioeventfd_flag_nr_pio, kvm_ioeventfd_flag_nr_deassign, kvm_ioeventfd_flag_nr_max, }; #define KVM_IOEVENTFD_FLAG_DATAMATCH (1 << kvm_ioeventfd_flag_nr_datamatch) #define KVM_IOEVENTFD_FLAG_PIO (1 << kvm_ioeventfd_flag_nr_pio) #define KVM_IOEVENTFD_FLAG_DEASSIGN (1 << kvm_ioeventfd_flag_nr_deassign) #define KVM_IOEVENTFD_VALID_FLAG_MASK ((1 << kvm_ioeventfd_flag_nr_max) - 1) struct kvm_ioeventfd { __u64 datamatch; __u64 addr; /* legal pio/mmio address */ __u32 len; /* 1, 2, 4, or 8 bytes */ __s32 fd; __u32 flags; __u8 pad[36]; }; /* for KVM_ENABLE_CAP */ struct kvm_enable_cap { /* in */ __u32 cap; __u32 flags; __u64 args[4]; __u8 pad[64]; }; /* for KVM_PPC_GET_PVINFO */ struct kvm_ppc_pvinfo { /* out */ __u32 flags; __u32 hcall[4]; __u8 pad[108]; }; #define KVMIO 0xAE /* * ioctls for /dev/kvm fds: */ #define KVM_GET_API_VERSION _IO(KVMIO, 0x00) #define KVM_CREATE_VM _IO(KVMIO, 0x01) /* returns a VM fd */ #define KVM_GET_MSR_INDEX_LIST _IOWR(KVMIO, 0x02, struct kvm_msr_list) #define KVM_S390_ENABLE_SIE _IO(KVMIO, 0x06) /* * Check if a kvm extension is available. Argument is extension number, * return is 1 (yes) or 0 (no, sorry). */ #define KVM_CHECK_EXTENSION _IO(KVMIO, 0x03) /* * Get size for mmap(vcpu_fd) */ #define KVM_GET_VCPU_MMAP_SIZE _IO(KVMIO, 0x04) /* in bytes */ #define KVM_GET_SUPPORTED_CPUID _IOWR(KVMIO, 0x05, struct kvm_cpuid2) #define KVM_TRACE_ENABLE __KVM_DEPRECATED_MAIN_W_0x06 #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 /* * Extension capability list. */ #define KVM_CAP_IRQCHIP 0 #define KVM_CAP_HLT 1 #define KVM_CAP_MMU_SHADOW_CACHE_CONTROL 2 #define KVM_CAP_USER_MEMORY 3 #define KVM_CAP_SET_TSS_ADDR 4 #define KVM_CAP_VAPIC 6 #define KVM_CAP_EXT_CPUID 7 #define KVM_CAP_CLOCKSOURCE 8 #define KVM_CAP_NR_VCPUS 9 /* returns max vcpus per vm */ #define KVM_CAP_NR_MEMSLOTS 10 /* returns max memory slots per vm */ #define KVM_CAP_PIT 11 #define KVM_CAP_NOP_IO_DELAY 12 #define KVM_CAP_PV_MMU 13 #define KVM_CAP_MP_STATE 14 #define KVM_CAP_COALESCED_MMIO 15 #define KVM_CAP_SYNC_MMU 16 /* Changes to host mmap are reflected in guest */ #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT #define KVM_CAP_DEVICE_ASSIGNMENT 17 #endif #define KVM_CAP_IOMMU 18 #ifdef __KVM_HAVE_MSI #define KVM_CAP_DEVICE_MSI 20 #endif /* Bug in KVM_SET_USER_MEMORY_REGION fixed: */ #define KVM_CAP_DESTROY_MEMORY_REGION_WORKS 21 #ifdef __KVM_HAVE_USER_NMI #define KVM_CAP_USER_NMI 22 #endif #ifdef __KVM_HAVE_GUEST_DEBUG #define KVM_CAP_SET_GUEST_DEBUG 23 #endif #ifdef __KVM_HAVE_PIT #define KVM_CAP_REINJECT_CONTROL 24 #endif #ifdef __KVM_HAVE_IOAPIC #define KVM_CAP_IRQ_ROUTING 25 #endif #define KVM_CAP_IRQ_INJECT_STATUS 26 #ifdef __KVM_HAVE_DEVICE_ASSIGNMENT #define KVM_CAP_DEVICE_DEASSIGNMENT 27 #endif #ifdef __KVM_HAVE_MSIX #define KVM_CAP_DEVICE_MSIX 28 #endif #define KVM_CAP_ASSIGN_DEV_IRQ 29 /* Another bug in KVM_SET_USER_MEMORY_REGION fixed: */ #define KVM_CAP_JOIN_MEMORY_REGIONS_WORKS 30 #ifdef __KVM_HAVE_MCE #define KVM_CAP_MCE 31 #endif #define KVM_CAP_IRQFD 32 #ifdef __KVM_HAVE_PIT #define KVM_CAP_PIT2 33 #endif #define KVM_CAP_SET_BOOT_CPU_ID 34 #ifdef __KVM_HAVE_PIT_STATE2 #define KVM_CAP_PIT_STATE2 35PÛQÛRÛSÛTÛUÛVÛWÛXÛYÛ #endif #define KVM_CAP_IOEVENTFD 36 #define KVM_CAP_SET_IDENTITY_MAP_ADDR 37 #ifdef __KVM_HAVE_XEN_HVM #define KVM_CAP_XEN_HVM 38 #endif #define KVM_CAP_ADJUST_CLOCK 39 #define KVM_CAP_INTERNAL_ERROR_DATA 40 #ifdef __KVM_HAVE_VCPU_EVENTS #define KVM_CAP_VCPU_EVENTS 41 #endif #define KVM_CAP_S390_PSW 42 #define KVM_CAP_PPC_SEGSTATE 43 #define KVM_CAP_HYPERV 44 #define KVM_CAP_HYPERV_VAPIC 45 #define KVM_CAP_HYPERV_SPIN 46 #define KVM_CAP_PCI_SEGMENT 47 #define KVM_CAP_PPC_PAIRED_SINGLES 48 #define KVM_CAP_INTR_SHADOW 49 #ifdef __KVM_HAVE_DEBUGREGS #define KVM_CAP_DEBUGREGS 50 #endif #define KVM_CAP_X86_ROBUST_SINGLESTEP 51 #define KVM_CAP_PPC_OSI 52 #define KVM_CAP_PPC_UNSET_IRQ 53 #define KVM_CAP_ENABLE_CAP 54 #ifdef __KVM_HAVE_XSAVE #define KVM_CAP_XSAVE 55 #endif #ifdef __KVM_HAVE_XCRS #define KVM_CAP_XCRS 56 #endif #define KVM_CAP_PPC_GET_PVINFO 57 #define KVM_CAP_PPC_IRQ_LEVEL 58 #ifdef KVM_CAP_IRQ_ROUTING struct kvm_irq_routing_irqchip { __u32 irqchip; __u32 pin; }; struct kvm_irq_routing_msi { __u32 address_lo; __u32 address_hi; __u32 data; __u32 pad; }; /* gsi routing entry types */ #define KVM_IRQ_ROUTING_IRQCHIP 1 #define KVM_IRQ_ROUTING_MSI 2 struct kvm_irq_routing_entry { __u32 gsi; __u32 type; __u32 flags; __u32 pad; union { struct kvm_irq_routing_irqchip irqchip; struct kvm_irq_routing_msi msi; __u32 pad[8]; } u; }; struct kvm_irq_routing { __u32 nr; __u32 flags; struct kvm_irq_routing_entry entries[0]; }; #endif #ifdef KVM_CAP_MCE /* x86 MCE */ struct kvm_x86_mce { __u64 status; __u64 addr; __u64 misc; __u64 mcg_status; __u8 bank; __u8 pad1[7]; __u64 pad2[3]; }; #endif #ifdef KVM_CAP_XEN_HVM struct kvm_xen_hvm_config { __u32 flags; __u32 msr; __u64 blob_addr_32; __u64 blob_addr_64; __u8 blob_size_32; __u8 blob_size_64; __u8 pad2[30]; }; #endif #define KVM_IRQFD_FLAG_DEASSIGN (1 << 0) struct kvm_irqfd { __u32 fd; __u32 gsi; __u32 flags; __u8 pad[20]; }; struct kvm_clock_data { __u64 clock; __u32 flags; __u32 pad[9]; }; /* * ioctls for VM fds */ #define KVM_SET_MEMORY_REGION _IOW(KVMIO, 0x40, struct kvm_memory_region) /* * KVM_CREATE_VCPU receives as a parameter the vcpu slot, and returns * a vcpu fd. */ #define KVM_CREATE_VCPU _IO(KVMIO, 0x41) #define KVM_GET_DIRTY_LOG _IOW(KVMIO, 0x42, struct kvm_dirty_log) /* KVM_SET_MEMORY_ALIAS is obsolete: */ #define KVM_SET_MEMORY_ALIAS _IOW(KVMIO, 0x43, struct kvm_memory_alias) #define KVM_SET_NR_MMU_PAGES _IO(KVMIO, 0x44) #define KVM_GET_NR_MMU_PAGES _IO(KVMIO, 0x45) #define KVM_SET_USER_MEMORY_REGION _IOW(KVMIO, 0x46, \ struct kvm_userspace_memory_region) #define KVM_SET_TSS_ADDR _IO(KVMIO, 0x47) #define KVM_SET_IDENTITY_MAP_ADDR _IOW(KVMIO, 0x48, __u64) /* Device model IOC */ #define KVM_CREATE_IRQCHIP _IO(KVMIO, 0x60) #define KVM_IRQ_LINE _IOW(KVMIO, 0x61, struct kvm_irq_level) #define KVM_GET_IRQCHIP _IOWR(KVMIO, 0x62, struct kvm_irqchip) #define KVM_SET_IRQCHIP _IOR(KVMIO, 0x63, struct kvm_irqchip) #define KVM_CREATE_PIT _IO(KVMIO, 0x64) #define KVM_GET_PIT _IOWR(KVMIO, 0x65, struct kvm_pit_state) #define KVM_SET_PIT _IOR(KVMIO, 0x66, struct kvm_pit_state) #define KVM_IRQ_LINE_STATUS _IOWR(KVMIO, 0x67, struct kvm_irq_level) #define KVM_REGISTER_COALESCED_MMIO \ _IOW(KVMIO, 0x67, struct kvm_coalesced_mmio_zone) #define KVM_UNREGISTER_COALESCED_MMIO \ _IOW(KVMIO, 0x68, struct kvm_coalesced_mmio_zone) #define KVM_ASSIGN_PCI_DEVICE _IOR(KVMIO, 0x69, \ struct kvm_assigned_pci_dev) #define KVM_SET_GSI_ROUTING _IOW(KVMIO, 0x6a, struct kvm_irq_routing) /* deprecated, replaced by KVM_ASSIGN_DEV_IRQ */ #define KVM_ASSIGN_IRQ __KVM_DEPRECATED_VM_R_0x70 #define KVM_ASSIGN_DEV_IRQ _IOW(KVMIO, 0x70, struct kvm_assigned_irq) #define KVM_REINJECT_CONTROL _IO(KVMIO, 0x71) #define KVM_DEASSIGN_PCI_DEVICE _IOW(KVMIO, 0x72, \ struct kvm_assigned_pci_dev) #define KVM_ASSIGN_SET_MSIX_NR _IOW(KVMIO, 0x73, \ struct kvm_assigned_msix_nr) #define KVM_ASSIGN_SET_MSIX_ENTRY _IOW(KVMIO, 0x74, \ struct kvm_assigned_msix_entry) #define KVM_DEASSIGN_DEV_IRQ _IOW(KVMIO, 0x75, struct kvm_assigned_irq) #define KVM_IRQFD _IOW(KVMIO, 0x76, struct kvm_irqfd) #define KVM_CREATE_PIT2 _IOW(KVMIO, 0x77, struct kvm_pit_config) #define KVM_SET_BOOT_CPU_ID _IO(KVMIO, 0x78) #define KVM_IOEVENTFD _IOW(KVMIO, 0x79, struct kvm_ioeventfd) #define KVM_XEN_HVM_CONFIG _IOW(KVMIO, 0x7a, struct kvm_xen_hvm_config) #define KVM_SET_CLOCK _IOW(KVMIO, 0x7b, struct kvm_clock_data) #define KVM_GET_CLOCK _IOR(KVMIO, 0x7c, struct kvm_clock_data) /* Available with KVM_CAP_PIT_STATE2 */ #define KVM_GET_PIT2 _IOR(KVMIO, 0x9f, struct kvm_pit_state2) #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2) /* Available with KVM_CAP_PPC_GET_PVINFO */ #define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo) /* * ioctls for vcpu fds */ #define KVM_RUN _IO(KVMIO, 0x80) #define KVM_GET_REGS _IOR(KVMIO, 0x81, struct kvm_regs) #define KVM_SET_REGS _IOW(KVMIO, 0x82, struct kvm_regs) #define KVM_GET_SREGS _IOR(KVMIO, 0x83, struct kvm_sregs) #define KVM_SET_SREGS _IOW(KVMIO, 0x84, struct kvm_sregs) #define KVM_TRANSLATE _IOWR(KVMIO, 0x85, struct kvm_translation) #define KVM_INTERRUPT _IOW(KVMIO, 0x86, struct kvm_interrupt) /* KVM_DEBUG_GUEST is no longer supported, use KVM_SET_GUEST_DEBUG instead */ #define KVM_DEBUG_GUEST __KVM_DEPRECATED_VCPU_W_0x87 #define KVM_GET_MSRS _IOWR(KVMIO, 0x88, struct kvm_msrs) #define KVM_SET_MSRS _IOW(KVMIO, 0x89, struct kvm_msrs) #define KVM_SET_CPUID _IOW(KVMIO, 0x8a, struct kvm_cpuid) #define KVM_SET_SIGNAL_MASK _IOW(KVMIO, 0x8b, struct kvm_signal_mask) #define KVM_GET_FPU _IOR(KVMIO, 0x8c, struct kvm_fpu) #define KVM_SET_FPU _IOW(KVMIO, 0x8d, struct kvm_fpu) #define KVM_GET_LAPIC _IOR(KVMIO, 0x8e, struct kvm_lapic_state) #define KVM_SET_LAPIC _IOW(KVMIO, 0x8f, struct kvm_lapic_state) #define KVM_SET_CPUID2 _IOW(KVMIO, 0x90, struct kvm_cpuid2) #define KVM_GET_CPUID2 _IOWR(KVMIO, 0x91, struct kvm_cpuid2) /* Available with KVM_CAP_VAPIC */ #define KVM_TPR_ACCESS_REPORTING _IOWR(KVMIO, 0x92, struct kvm_tpr_access_ctl) /* Available with KVM_CAP_VAPIC */ #define KVM_SET_VAPIC_ADDR _IOW(KVMIO, 0x93, struct kvm_vapic_addr) /* valid for virtual machine (for floating interrupt)_and_ vcpu */ #define KVM_S390_INTERRUPT _IOW(KVMIO, 0x94, struct kvm_s390_interrupt) /* store status for s390 */ #define KVM_S390_STORE_STATUS_NOADDR (-1ul) #define KVM_S390_STORE_STATUS_PREFIXED (-2ul) #define KVM_S390_STORE_STATUS _IOW(KVMIO, 0x95, unsigned long) /* initial ipl psw for s390 */ #define KVM_S390_SET_INITIAL_PSW _IOW(KVMIO, 0x96, struct kvm_s390_psw) /* initial reset for s390 */ #define KVM_S390_INITIAL_RESET _IO(KVMIO, 0x97) #define KVM_GET_MP_STATE _IOR(KVMIO, 0x98, struct kvm_mp_state) #define KVM_SET_MP_STATE _IOW(KVMIO, 0x99, struct kvm_mp_state) /* Available with KVM_CAP_NMI */ #define KVM_NMI _IO(KVMIO, 0x9a) /* Available with KVM_CAP_SET_GUEST_DEBUG */ #define KVM_SET_GUEST_DEBUG _IOW(KVMIO, 0x9b, struct kvm_guest_debug) /* MCE for x86 */ #define KVM_X86_SETUP_MCE _IOW(KVMIO, 0x9c, __u64) #define KVM_X86_GET_MCE_CAP_SUPPORTED _IOR(KVMIO, 0x9d, __u64) #define KVM_X86_SET_MCE _IOW(KVMIO, 0x9e, struct kvm_x86_mce) /* IA64 stack access */ #define KVM_IA64_VCPU_GET_STACK _IOR(KVMIO, 0x9a, void *) #define KVM_IA64_VCPU_SET_STACK _IOW(KVMIO, 0x9b, void *) /* Available with KVM_CAP_VCPU_EVENTS */ #define KVM_GET_VCPU_EVENTS _IOR(KVMIO, 0x9f, struct kvm_vcpu_events) #define KVM_SET_VCPU_EVENTS _IOW(KVMIO, 0xa0, struct kvm_vcpu_events) /* Available with KVM_CAP_DEBUGREGS */ #define KVM_GET_DEBUGREGS _IOR(KVMIO, 0xa1, struct kvm_debugregs) #define KVM_SET_DEBUGREGS _IOW(KVMIO, 0xa2, struct kvm_debugregs) #define KVM_ENABLE_CAP _IOW(KVMIO, 0xa3, struct kvm_enable_cap) /* Available with KVM_CAP_XSAVE */ #define KVM_GET_XSAVE _IOR(KVMIO, 0xa4, struct kvm_xsave) #define KVM_SET_XSAVE _IOW(KVMIO, 0xa5, struct kvm_xsave) /* Available with KVM_CAP_XCRS */ #define KVM_GET_XCRS _IOR(KVMIO, 0xa6, struct kvm_xcrs) #define KVM_SET_XCRS _IOW(KVMIO, 0xa7, struct kvm_xcrs) #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) struct kvm_assigned_pci_dev { __u32 assigned_dev_id; __u32 busnr; __u32 devfn; __u32 flags; __u32 segnr; union { __u32 reserved[11]; }; }; #define KVM_DEV_IRQ_HOST_INTX (1 << 0) #define KVM_DEV_IRQ_HOST_MSI (1 << 1) #define KVM_DEV_IRQ_HOST_MSIX (1 << 2) #define KVM_DEV_IRQ_GUEST_INTX (1 << 8) #define KVM_DEV_IRQ_GUEST_MSI (1 << 9) #define KVM_DEV_IRQ_GUEST_MSIX (1 << 10) #define KVM_DEV_IRQ_HOST_MASK 0x00ff #define KVM_DEV_IRQ_GUEST_MASK 0xff00 struct kvm_assigned_irq { __u32 assigned_dev_id; __u32 host_irq; __u32 guest_irq; __u32 flags; union { struct { __u32 addr_lo; __u32 addr_hi; __u32 data; } guest_msi; __u32 reserved[12]; }; }; struct kvm_assigned_msix_nr { __u32 assigned_dev_id; __u16 entry_nr; __u16 padding; }; #define KVM_MAX_MSIX_PER_DEV 256 struct kvm_assigned_msix_entry { __u32 assigned_dev_id; __u32 gsi; __u16 entry; /* The index of entry in the MSI-X table */ __u16 padding[3]; }; #endif /* __LINUX_KVM_H */ /* * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved. * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions * of the GNU General Public License v.2. */ #ifndef __GFS2_ONDISK_DOT_H__ #define __GFS2_ONDISK_DOT_H__ #include #define GFS2_MAGIC 0x01161970 #define GFS2_BASIC_BLOCK 512 #define GFS2_BASIC_BLOCK_SHIFT 9 /* Lock numbers of the LM_TYPE_NONDISK type */ #define GFS2_MOUNT_LOCK 0 #define GFS2_LIVE_LOCK 1 #define GFS2_TRANS_LOCK 2 #define GFS2_RENAME_LOCK 3 /* Format numbers for various metadata types */ #define GFS2_FORMAT_NONE 0 #define GFS2_FORMAT_SB 100 #define GFS2_FORMAT_RG 200 #define GFS2_FORMAT_RB 300 #define GFS2_FORMAT_DI 400 #define GFS2_FORMAT_IN 500 #define GFS2_FORMAT_LF 600 #define GFS2_FORMAT_JD 700 #define GFS2_FORMAT_LH 800 #define GFS2_FORMAT_LD 900 #define GFS2_FORMAT_LB 1000 #define GFS2_FORMAT_EA 1600 #define GFS2_FORMAT_ED 1700 #define GFS2_FORMAT_QC 1400 /* These are format numbers for entities contained in files */ #define GFS2_FORMAT_RI 1100 #define GFS2_FORMAT_DE 1200 #define GFS2_FORMAT_QU 1500 /* These are part of the superblock */ #define GFS2_FORMAT_FS 1801 #define GFS2_FORMAT_MULTI 1900 /* * An on-disk inode number */ struct gfs2_inum { __be64 no_formal_ino; __be64 no_addr; }; /* * Generic metadata head structure * Every inplace buffer logged in the journal must start with this. */ #define GFS2_METATYPE_NONE 0 #define GFS2_METATYPE_SB 1 #define GFS2_METATYPE_RG 2 #define GFS2_METATYPE_RB 3 #define GFS2_METATYPE_DI 4 #define GFS2_METATYPE_IN 5 #define GFS2_METATYPE_LF 6 #define GFS2_METATYPE_JD 7 #define GFS2_METATYPE_LH 8 #define GFS2_METATYPE_LD 9 #define GFS2_METATYPE_LB 12 #define GFS2_METATYPE_EA 10 #define GFS2_METATYPE_ED 11 #define GFS2_METATYPE_QC 14 struct gfs2_meta_header { __be32 mh_magic; __be32 mh_type; __be64 __pad0; /* Was generation number in gfs1 */ __be32 mh_format; /* This union is to keep userspace happy */ union { __be32 mh_jid; /* Was incarnation number in gfs1 */ __be32 __pad1; }; }; /* * super-block structure * * It's probably good if SIZEOF_SB <= GFS2_BASIC_BLOCK (512 bytes) * * Order is important, need to be able to read old superblocks to do on-disk * version upgrades. */ /* Address of superblock in GFS2 basic blocks */ #define GFS2_SB_ADDR 128 /* The lock number for the superblock (must be zero) */ #define GFS2_SB_LOCK 0 /* Requirement: GFS2_LOCKNAME_LEN % 8 == 0 Includes: the fencing zero at the end */ #define GFS2_LOCKNAME_LEN 64 struct gfs2_sb { struct gfs2_meta_header sb_header; __be32 sb_fs_format; __be32 sb_multihost_format; __u32 __pad0; /* Was superblock flags in gfs1 */ __be32 sb_bsize; __be32 sb_bsize_shift; __u32 __pad1; /* Was journal segment size in gfs1 */ struct gfs2_inum sb_master_dir; /* Was jindex dinode in gfs1 */ struct gfs2_inum __pad2; /* Was rindex dinode in gfs1 */ struct gfs2_inum sb_root_dir; char sb_lockproto[GFS2_LOCKNAME_LEN]; char sb_locktable[GFS2_LOCKNAME_LEN]; struct gfs2_inum __pad3; /* Was quota inode in gfs1 */ struct gfs2_inum __pad4; /* Was licence inode in gfs1 */ #define GFS2_HAS_UUID 1 __u8 sb_uuid[16]; /* The UUID, maybe 0 for backwards compat */ }; /* * resource index structure */ struct gfs2_rindex { __be64 ri_addr; /* grp block disk address */ __be32 ri_length; /* length of rgrp header in fs blocks */ __u32 __pad; __be64 ri_data0; /* first data location */ __be32 ri_data; /* num of data blocks in rgrp */ __be32 ri_bitbytes; /* number of bytes in data bitmaps */ __u8 ri_reserved[64]; }; /* * resource group header structure */ /* Number of blocks per byte in rgrp */ #define GFS2_NBBY 4 #define GFS2_BIT_SIZE 2 #define GFS2_BIT_MASK 0x00000003 #define GFS2_BLKST_FREE 0 #define GFS2_BLKST_USED 1 #define GFS2_BLKST_UNLINKED 2 #define GFS2_BLKST_DINODE 3 #define GFS2_RGF_JOURNAL 0x00000001 #define GFS2_RGF_METAONLY 0x00000002 #define GFS2_RGF_DATAONLY 0x00000004 #define GFS2_RGF_NOALLOC 0x00000008 struct gfs2_rgrp { struct gfs2_meta_header rg_header; __be32 rg_flags; __be32 rg_free; __be32 rg_dinodes; __be32 __pad; __be64 rg_igeneration; __u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */ }; /* * quota structure */ struct gfs2_quota { __be64 qu_limit; __be64 qu_warn; __be64 qu_value; __u8 qu_reserved[64]; }; /* * dinode structure */ #define GFS2_MAX_META_HEIGHT 10 #define GFS2_DIR_MAX_DEPTH 17 #define DT2IF(dt) (((dt) << 12) & S_IFMT) #define IF2DT(sif) (((sif) & S_IFMT) >> 12) enum { gfs2fl_Jdata = 0, gfs2fl_ExHash = 1, gfs2fl_Unused = 2, gfs2fl_EaIndirect = 3, gfs2fl_Directio = 4, gfs2fl_Immutable = 5, gfs2fl_AppendOnly = 6, gfs2fl_NoAtime = 7, gfs2fl_Sync = 8, gfs2fl_System = 9, gfs2fl_TruncInProg = 29, gfs2fl_InheritDirectio = 30, gfs2fl_InheritJdata = 31, }; /* Dinode flags */ #define GFS2_DIF_JDATA 0x00000001 #define GFS2_DIF_EXHASH 0x00000002 #define GFS2_DIF_UNUSED 0x00000004 /* only in gfs1 */ #define GFS2_DIF_EA_INDIRECT 0x00000008 #define GFS2_DIF_DIRECTIO 0x00000010 #define GFS2_DIF_IMMUTABLE 0x00000020 #define GFS2_DIF_APPENDONLY 0x00000040 #define GFS2_DIF_NOATIME 0x00000080 #define GFS2_DIF_SYNC 0x00000100 #define GFS2_DIF_SYSTEM 0x00000200 /* New in gfs2 */ #define GFS2_DIF_TRUNC_IN_PROG 0x20000000 /* New in gfs2 */ #define GFS2_DIF_INHERIT_DIRECTIO 0x40000000 #define GFS2_DIF_INHERIT_JDATA 0x80000000 struct gfs2_dinode { struct gfs2_meta_header di_header; struct gfs2_inum di_num; __be32 di_mode; /* mode of file */ __be32 di_uid; /* owner's user id */ __be32 di_gid; /* owner's group id */ __be32 di_nlink; /* number of links to this file */ __be64 di_size; /* number of bytes in file */ __be64 di_blocks; /* number of blocks in file */ __be64 di_atime; /* time last accessed */ __be64 di_mtime; /* time last modified */ __be64 di_ctime; /* time last changed */ __be32 di_major; /* device major number */ __be32 di_minor; /* device minor number */ /* This section varies from gfs1. Padding added to align with * remainder of dinode */ __be64 di_goal_meta; /* rgrp to alloc from next */ __be64 di_goal_data; /* data block goal */ __be64 di_generation; /* generation number for NFS */ __be32 di_flags; /* GFS2_DIF_... */ __be32 di_payload_format; /* GFS2_FORMAT_... */ __u16 __pad1; /* Was ditype in gfs1 */ __be16 di_height; /* height of metadata */ __u32 __pad2; /* Unused incarnation number from gfs1 */ /* These only apply to directories */ __u16 __pad3; /* Padding */ __be16 di_depth; /* Number of bits in the table */ __be32 di_entries; /* The number of entries in the directory */ struct gfs2_inum __pad4; /* Unused even in current gfs1 */ __be64 di_eattr; /* extended attribute block number */ __be32 di_atime_nsec; /* nsec portion of atime */ __be32 di_mtime_nsec; /* nsec portion of mtime */ __be32 di_ctime_nsec; /* nsec portion of ctime */ __u8 di_reserved[44]; }; /* * directory structure - many of these per directory file */ #define GFS2_FNAMESIZE 255 #define GFS2_DIRENT_SIZE(name_len) ((sizeof(struct gfs2_dirent) + (name_len) + 7) & ~7) struct gfs2_dirent { struct gfs2_inum de_inum; __be32 de_hash; __be16 de_rec_len; __be16 de_name_len; __be16 de_type; __u8 __pad[14]; }; /* * Header of leaf directory nodes */ struct gfs2_leaf { struct gfs2_meta_header lf_header; __be16 lf_depth; /* Depth of leaf */ __be16 lf_entries; /* Number of dirents in leaf */ __be32 lf_dirent_format; /* Format of the dirents */ __be64 lf_next; /* Next leaf, if overflow */ __u8 lf_reserved[64]; }; /* * Extended attribute header format * * This works in a similar way to dirents. There is a fixed size header * followed by a variable length section made up of the name and the * associated data. In the case of a "stuffed" entry, the value is * __inline__ directly after the name, the ea_num_ptrs entry will be * zero in that case. For non-"stuffed" entries, there will be * a set of pointers (aligned to 8 byte boundary) to the block(s) * containing the value. * * The blocks containing the values and the blocks containing the * extended attribute headers themselves all start with the common * metadata header. Each inode, if it has extended attributes, will * have either a single block containing the extended attribute headers * or a single indirect block pointing to blocks containing the * extended attribure headers. * * The maximim size of the data part of an extended attribute is 64k * so the number of blocks required depends upon block size. Since the * block size also determines the number of pointers in an indirect * block, its a fairly complicated calculation to work out the maximum * number of blocks that an inode may have relating to extended attributes. * */ #define GFS2_EA_MAX_NAME_LEN 255 #define GFS2_EA_MAX_DATA_LEN 65536 #define GFS2_EATYPE_UNUSED 0 #define GFS2_EATYPE_USR 1 #define GFS2_EATYPE_SYS 2 #define GFS2_EATYPE_SECURITY 3 #define GFS2_EATYPE_LAST 3 #define GFS2_EATYPE_VALID(x) ((x) <= GFS2_EATYPE_LAST) #define GFS2_EAFLAG_LAST 0x01 /* last ea in block */ struct gfs2_ea_header { __be32 ea_rec_len; __be32 ea_data_len; __u8 ea_name_len; /* no NULL pointer after the string */ __u8 ea_type; /* GFS2_EATYPE_... */ __u8 ea_flags; /* GFS2_EAFLAG_... */ __u8 ea_num_ptrs; __u32 __pad; }; /* * Log header structure */ #define GFS2_LOG_HEAD_UNMOUNT 0x00000001 /* log is clean */ struct gfs2_log_header { struct gfs2_meta_header lh_header; __be64 lh_sequence; /* Sequence number of this transaction */ __be32 lh_flags; /* GFS2_LOG_HEAD_... */ __be32 lh_tail; /* Block number of log tail */ __be32 lh_blkno; __be32 lh_hash; }; /* * Log type descriptor */ #define GFS2_LOG_DESC_METADATA 300 /* ld_data1 is the number of metadata blocks in the descriptor. ld_data2 is unused. */ #define GFS2_LOG_DESC_REVOKE 301 /* ld_data1 is the number of revoke blocks in the descriptor. ld_data2 is unused. */ #define GFS2_LOG_DESC_JDATA 302 /* ld_data1 is the number of data blocks in the descriptor. ld_data2 is unused. */ struct gfs2_log_descriptor { struct gfs2_meta_header ld_header; __be32 ld_type; /* GFS2_LOG_DESC_... */ __be32 ld_length; /* Number of buffers in this chunk */ __be32 ld_data1; /* descriptor-specific field */ __be32 ld_data2; /* descriptor-specific field */ __u8 ld_reserved[32]; }; /* * Inum Range * Describe a range of formal inode numbers allocated to * one machine to assign to inodes. */ #define GFS2_INUM_QUANTUM 1048576 struct gfs2_inum_range { __be64 ir_start; __be64 ir_length; }; /* * Statfs change * Describes an change to the pool of free and allocated * blocks. */ struct gfs2_statfs_change { __be64 sc_total; __be64 sc_free; __be64 sc_dinodes; }; /* * Quota change * Describes an allocation change for a particular * user or group. */ #define GFS2_QCF_USER 0x00000001 struct gfs2_quota_change { __be64 qc_change; __be32 qc_flags; /* GFS2_QCF_... */ __be32 qc_id; }; struct gfs2_quota_lvb { __be32 qb_magic; __u32 __pad; __be64 qb_limit; /* Hard limit of # blocks to alloc */ __be64 qb_warn; /* Warn user when alloc is above this # */ __be64 qb_value; /* Current # blocks allocated */ }; #endif /* __GFS2_ONDISK_DOT_H__ */ #ifndef _LINUX_NFS_MOUNT_H #define _LINUX_NFS_MOUNT_H /* * linux/include/linux/nfs_mount.h * * Copyright (C) 1992 Rick Sladkey * * structure passed from user-space to kernel-space during an nfs mount */ #include #include #include #include /* * WARNING! Do not delete or change the order of these fields. If * a new field is required then add it to the end. The version field * tracks which fields are present. This will ensure some measure of * mount-to-kernel version compatibility. Some of these aren't used yet * but here they are anyway. */ #define NFS_MOUNT_VERSION 6 #define NFS_MAX_CONTEXT_LEN 256 struct nfs_mount_data { int version; /* 1 */ int fd; /* 1 */ struct nfs2_fh old_root; /* 1 */ int flags; /* 1 */ int rsize; /* 1 */ int wsize; /* 1 */ int timeo; /* 1 */ int retrans; /* 1 */ int acregmin; /* 1 */ int acregmax; /* 1 */ int acdirmin; /* 1 */ int acdirmax; /* 1 */ struct sockaddr_in addr; /* 1 */ char hostname[NFS_MAXNAMLEN + 1]; /* 1 */ int namlen; /* 2 */ unsigned int bsize; /* 3 */ struct nfs3_fh root; /* 4 */ int pseudoflavor; /* 5 */ char context[NFS_MAX_CONTEXT_LEN + 1]; /* 6 */ }; /* bits in the flags field visible to user space */ #define NFS_MOUNT_SOFT 0x0001 /* 1 */ #define NFS_MOUNT_INTR 0x0002 /* 1 */ /* now unused, but ABI */ #define NFS_MOUNT_SECURE 0x0004 /* 1 */ #define NFS_MOUNT_POSIX 0x0008 /* 1 */ #define NFS_MOUNT_NOCTO 0x0010 /* 1 */ #define NFS_MOUNT_NOAC 0x0020 /* 1 */ #define NFS_MOUNT_TCP 0x0040 /* 2 */ #define NFS_MOUNT_VER3 0x0080 /* 3 */ #define NFS_MOUNT_KERBEROS 0x0100 /* 3 */ #define NFS_MOUNT_NONLM 0x0200 /* 3 */ #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ #define NFS_MOUNT_NOACL 0x0800 /* 4 */ #define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */ #define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */ #define NFS_MOUNT_NORDIRPLUS 0x4000 /* 5 */ #define NFS_MOUNT_UNSHARED 0x8000 /* 5 */ #define NFS_MOUNT_FLAGMASK 0xFFFF /* The following are for internal use only */ #define NFS_MOUNT_LOOKUP_CACHE_NONEG 0x10000 #define NFS_MOUNT_LOOKUP_CACHE_NONE 0x20000 #define NFS_MOUNT_NORESVPORT 0x40000 #define NFS_MOUNT_LEGACY_INTERFACE 0x80000 #define NFS_MOUNT_LOCAL_FLOCK 0x100000 #define NFS_MOUNT_LOCAL_FCNTL 0x200000 #endif /* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * Definitions of the Internet Protocol. * * Version: @(#)in.h 1.0.1 04/21/93 * * Authors: Original taken from the GNU Project file. * Fred N. van Kempen, * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifndef _LINUX_IN_H #define _LINUX_IN_H #include #include /* Standard well-defined IP protocols. */ enum { IPPROTO_IP = 0, /* Dummy protocol for TCP */ IPPROTO_ICMP = 1, /* Internet Control Message Protocol */ IPPROTO_IGMP = 2, /* Internet Group Management Protocol */ IPPROTO_IPIP = 4, /* IPIP tunnels (older KA9Q tunnels use 94) */ IPPROTO_TCP = 6, /* Transmission Control Protocol */ IPPROTO_EGP = 8, /* Exterior Gateway Protocol */ IPPROTO_PUP = 12, /* PUP protocol */ IPPROTO_UDP = 17, /* User Datagram Protocol */ IPPROTO_IDP = 22, /* XNS IDP protocol */ IPPROTO_DCCP = 33, /* Datagram Congestion Control Protocol */ IPPROTO_RSVP = 46, /* RSVP protocol */ IPPROTO_GRE = 47, /* Cisco GRE tunnels (rfc 1701,1702) */ IPPROTO_IPV6 = 41, /* IPv6-in-IPv4 tunnelling */ IPPROTO_ESP = 50, /* Encapsulation Security Payload protocol */ IPPROTO_AH = 51, /* Authentication Header protocol */ IPPROTO_BEETPH = 94, /* IP option pseudo header for BEET */ IPPROTO_PIM = 103, /* Protocol Independent Multicast */ IPPROTO_COMP = 108, /* Compression Header protocol */ IPPROTO_SCTP = 132, /* Stream Control Transport Protocol */ IPPROTO_UDPLITE = 136, /* UDP-Lite (RFC 3828) */ IPPROTO_RAW = 255, /* Raw IP packets */ IPPROTO_MAX }; /* Internet address. */ struct in_addr { __be32 s_addr; }; #define IP_TOS 1 #define IP_TTL 2 #define IP_HDRINCL 3 #define IP_OPTIONS 4 #define IP_ROUTER_ALERT 5 #define IP_RECVOPTS 6 #define IP_RETOPTS 7 #define IP_PKTINFO 8 #define IP_PKTOPTIONS 9 #define IP_MTU_DISCOVER 10 #define IP_RECVERR 11 #define IP_RECVTTL 12 #define IP_RECVTOS 13 #define IP_MTU 14 #define IP_FREEBIND 15 #define IP_IPSEC_POLICY 16 #define IP_XFRM_POLICY 17 #define IP_PASSSEC 18 #define IP_TRANSPARENT 19 /* BSD compatibility */ #define IP_RECVRETOPTS IP_RETOPTS /* TProxy original addresses */ #define IP_ORIGDSTADDR 20 #define IP_RECVORIGDSTADDR IP_ORIGDSTADDR #define IP_MINTTL 21 #define IP_NODEFRAG 22 /* IP_MTU_DISCOVER values */ #define IP_PMTUDISC_DONT 0 /* Never send DF frames */ #define IP_PMTUDISC_WANT 1 /* Use per route hints */ #define IP_PMTUDISC_DO 2 /* Always DF */ #define IP_PMTUDISC_PROBE 3 /* Ignore dst pmtu */ #define IP_MULTICAST_IF 32 #define IP_MULTICAST_TTL 33 #define IP_MULTICAST_LOOP 34 #define IP_ADD_MEMBERSHIP 35 #define IP_DROP_MEMBERSHIP 36 #define IP_UNBLOCK_SOURCE 37 #define IP_BLOCK_SOURCE 38 #define IP_ADD_SOURCE_MEMBERSHIP 39 #define IP_DROP_SOURCE_MEMBERSHIP 40 #define IP_MSFILTER 41 #define MCAST_JOIN_GROUP 42 #define MCAST_BLOCK_SOURCE 43 #define MCAST_UNBLOCK_SOURCE 44 #define MCAST_LEAVE_GROUP 45 #define MCAST_JOIN_SOURCE_GROUP 46 #define MCAST_LEAVE_SOURCE_GROUP 47 #define MCAST_MSFILTER 48 #define IP_MULTICAST_ALL 49 #define MCAST_EXCLUDE 0 #define MCAST_INCLUDE 1 /* These need to appear somewhere around here */ #define IP_DEFAULT_MULTICAST_TTL 1 #define IP_DEFAULT_MULTICAST_LOOP 1 /* Request struct for multicast socket ops */ struct ip_mreq { struct in_addr imr_multiaddr; /* IP multicast address of group */ struct in_addr imr_interface; /* local IP address of interface */ }; struct ip_mreqn { struct in_addr imr_multiaddr; /* IP multicast address of group */ struct in_addr imr_address; /* local IP address of interface */ int imr_ifindex; /* Interface index */ }; struct ip_mreq_source { __be32 imr_multiaddr; __be32 imr_interface; __be32 imr_sourceaddr; }; struct ip_msfilter { __be32 imsf_multiaddr; __be32 imsf_interface; __u32 imsf_fmode; __u32 imsf_numsrc; __be32 imsf_slist[1]; }; #define IP_MSFILTER_SIZE(numsrc) \ (sizeof(struct ip_msfilter) - sizeof(__u32) \ + (numsrc) * sizeof(__u32)) struct group_req { __u32 gr_interface; /* interface index */ struct __kernel_sockaddr_storage gr_group; /* group address */ }; struct group_source_req { __u32 gsr_interface; /* interface index */ struct __kernel_sockaddr_storage gsr_group; /* group address */ struct __kernel_sockaddr_storage gsr_source; /* source address */ }; struct group_filter { __u32 gf_interface; /* interface index */ struct __kernel_sockaddr_storage gf_group; /* multicast address */ __u32 gf_fmode; /* filter mode */ __u32 gf_numsrc; /* number of sources */ struct __kernel_sockaddr_storage gf_slist[1]; /* interface index */ }; #define GROUP_FILTER_SIZE(numsrc) \ (sizeof(struct group_filter) - sizeof(struct __kernel_sockaddr_storage) \ + (numsrc) * sizeof(struct __kernel_sockaddr_storage)) struct in_pktinfo { int ipi_ifindex; struct in_addr ipi_spec_dst; struct in_addr ipi_addr; }; /* Structure describing an Internet (IP) socket address. */ #define __SOCK_SIZE__ 16 /* sizeof(struct sockaddr) */ struct sockaddr_in { sa_family_t sin_family; /* Address family */ __be16 sin_port; /* Port number */ struct in_addr sin_addr; /* Internet address */ /* Pad to size of `struct sockaddr'. */ unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) - sizeof(unsigned short int) - sizeof(struct in_addr)]; }; #define sin_zero __pad /* for BSD UNIX comp. -FvK */ /* * Definitions of the bits in an Internet address integer. * On subnets, host and network parts are found according * to the subnet mask, not these masks. */ #define IN_CLASSA(a) ((((long int) (a)) & 0x80000000) == 0) #define IN_CLASSA_NET 0xff000000 #define IN_CLASSA_NSHIFT 24 #define IN_CLASSA_HOST (0xffffffff & ~IN_CLASSA_NET) #define IN_CLASSA_MAX 128 #define IN_CLASSB(a) ((((long int) (a)) & 0xc0000000) == 0x80000000) #define IN_CLASSB_NET 0xffff0000 #define IN_CLASSB_NSHIFT 16 #define IN_CLASSB_HOST (0xffffffff & ~IN_CLASSB_NET) #define IN_CLASSB_MAX 65536 #define IN_CLASSC(a) ((((long int) (a)) & 0xe0000000) == 0xc0000000) #define IN_CLASSC_NET 0xffffff00 #define IN_CLASSC_NSHIFT 8 #define IN_CLASSC_HOST (0xffffffff & ~IN_CLASSC_NET) #define IN_CLASSD(a) ((((long int) (a)) & 0xf0000000) == 0xe0000000) #define IN_MULTICAST(a) IN_CLASSD(a) #define IN_MULTICAST_NET 0xF0000000 #define IN_EXPERIMENTAL(a) ((((long int) (a)) & 0xf0000000) == 0xf0000000) #define IN_BADCLASS(a) IN_EXPERIMENTAL((a)) /* Address to accept any incoming messages. */ #define INADDR_ANY ((unsigned long int) 0x00000000) /* Address to send to all hosts. */ #define INADDR_BROADCAST ((unsigned long int) 0xffffffff) /* Address indicating an error return. */ #define INADDR_NONE ((unsigned long int) 0xffffffff) /* Network number for local host loopback. */ #define IN_LOOPBACKNET 127 /* Address to loopback in software to local host. */ #define INADDR_LOOPBACK 0x7f000001 /* 127.0.0.1 */ #define IN_LOOPBACK(a) ((((long int) (a)) & 0xff000000) == 0x7f000000) /* Defines for Multicast INADDR */ #define INADDR_UNSPEC_GROUP 0xe0000000U /* 224.0.0.0 */ #define INADDR_ALLHOSTS_GROUP 0xe0000001U /* 224.0.0.1 */ #define INADDR_ALLRTRS_GROUP 0xe0000002U /* 224.0.0.2 */ #define INADDR_MAX_LOCAL_GROUP 0xe00000ffU /* 224.0.0.255 */ /* contains the htonl type stuff.. */ #include #endif /* _LINUX_IN_H */ D, .ñ* ..E, ..install.cmdF,.installG,Àioctl.hcmd_/usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux/include/linux/hdlc/.install := perl scripts/headers_install.pl /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux-2.6.37.2/include/linux/hdlc /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux/include/linux/hdlc x86 ioctl.h; perl scripts/headers_install.pl /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux-2.6.37.2/include/linux/hdlc /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux/include/linux/hdlc x86 ; touch /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux/include/linux/hdlc/.install #ifndef __HDLC_IOCTL_H__ #define __HDLC_IOCTL_H__ #define GENERIC_HDLC_VERSION 4 /* For synchronization with sethdlc utility */ #define CLOCK_DEFAULT 0 /* Default setting */ #define CLOCK_EXT 1 /* External TX and RX clock - DTE */ #define CLOCK_INT 2 /* Internal TX and RX clock - DCE */ #define CLOCK_TXINT 3 /* Internal TX and external RX clock */ #define CLOCK_TXFROMRX 4 /* TX clock derived from external RX clock */ #define ENCODING_DEFAULT 0 /* Default setting */ #define ENCODING_NRZ 1 #define ENCODING_NRZI 2 #define ENCODING_FM_MARK 3 #define ENCODING_FM_SPACE 4 #define ENCODING_MANCHESTER 5 #define PARITY_DEFAULT 0 /* Default setting */ #define PARITY_NONE 1 /* No parity */ #define PARITY_CRC16_PR0 2 /* CRC16, initial value 0x0000 */ #define PARITY_CRC16_PR1 3 /* CRC16, initial value 0xFFFF */ #define PARITY_CRC16_PR0_CCITT 4 /* CRC16, initial 0x0000, ITU-T version */ #define PARITY_CRC16_PR1_CCITT 5 /* CRC16, initial 0xFFFF, ITU-T version */ #define PARITY_CRC32_PR0_CCITT 6 /* CRC32, initial value 0x00000000 */ #define PARITY_CRC32_PR1_CCITT 7 /* CRC32, initial value 0xFFFFFFFF */ #define LMI_DEFAULT 0 /* Default setting */ #define LMI_NONE 1 /* No LMI, all PVCs are static */ #define LMI_ANSI 2 /* ANSI Annex D */ #define LMI_CCITT 3 /* ITU-T Annex A */ #define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */ typedef struct { unsigned int clock_rate; /* bits per second */ unsigned int clock_type; /* internal, external, TX-internal etc. */ unsigned short loopback; } sync_serial_settings; /* V.35, V.24, X.21 */ typedef struct { unsigned int clock_rate; /* bits per second */ unsigned int clock_type; /* internal, external, TX-internal etc. */ unsigned short loopback; unsigned int slot_map; } te1_settings; /* T1, E1 */ typedef struct { unsigned short encoding; unsigned short parity; } raw_hdlc_proto; typedef struct { unsigned int t391; unsigned int t392; unsigned int n391; unsigned int n392; unsigned int n393; unsigned short lmi; unsigned short dce; /* 1 for DCE (network side) operation */ } fr_proto; typedef struct { unsigned int dlci; } fr_proto_pvc; /* for creating/deleting FR PVCs */ typedef struct { unsigned int dlci; char master[IFNAMSIZ]; /* Name of master FRAD device */ }fr_proto_pvc_info; /* for returning PVC information only */ typedef struct { unsigned int interval; unsigned int timeout; } cisco_proto; /* PPP doesn't need any info now - supply length = 0 to ioctl */ #endif /* __HDLC_IOCTL_H__ */ #ifndef _LINUX_VIRTIO_RNG_H #define _LINUX_VIRTIO_RNG_H /* This header is BSD licensed so anyone can use the definitions to implement * compatible drivers/servers. */ #include #include #endif /* _LINUX_VIRTIO_RNG_H */ /* * FS_IOC_FIEMAP ioctl infrastructure. * * Some portions copyright (C) 2007 Cluster File Systems, Inc * * Authors: Mark Fasheh * Kalpak Shah * Andreas Dilger */ #ifndef _LINUX_FIEMAP_H #define _LINUX_FIEMAP_H #include struct fiemap_extent { __u64 fe_logical; /* logical offset in bytes for the start of * the extent from the beginning of the file */ __u64 fe_physical; /* physical offset in bytes for the start * of the extent from the beginning of the disk */ __u64 fe_length; /* length in bytes for this extent */ __u64 fe_reserved64[2]; __u32 fe_flags; /* FIEMAP_EXTENT_* flags for this extent */ __u32 fe_reserved[3]; }; struct fiemap { __u64 fm_start; /* logical offset (inclusive) at * which to start mapping (in) */ __u64 fm_length; /* logical length of mapping which * userspace wants (in) */ __u32 fm_flags; /* FIEMAP_FLAG_* flags for request (in/out) */ __u32 fm_mapped_extents;/* number of extents that were mapped (out) */ __u32 fm_extent_count; /* size of fm_extents array (in) */ __u32 fm_reserved; struct fiemap_extent fm_extents[0]; /* array of mapped extents (out) */ }; #define FIEMAP_MAX_OFFSET (~0ULL) #define FIEMAP_FLAG_SYNC 0x00000001 /* sync file data before map */ #define FIEMAP_FLAG_XATTR 0x00000002 /* map extended attribute tree */ #define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR) #define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */ #define FIEMAP_EXTENT_UNKNOWN 0x00000002 /* Data location unknown. */ #define FIEMAP_EXTENT_DELALLOC 0x00000004 /* Location still pending. * Sets EXTENT_UNKNOWN. */ #define FIEMAP_EXTENT_ENCODED 0x00000008 /* Data can not be read * while fs is unmounted */ #define FIEMAP_EXTENT_DATA_ENCRYPTED 0x00000080 /* Data is encrypted by fs. * Sets EXTENT_NO_BYPASS. */ #define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100 /* Extent offsets may not be * block aligned. */ #define FIEMAP_EXTENT_DATA_INLINE 0x00000200 /* Data mixed with metadata. * Sets EXTENT_NOT_ALIGNED.*/ #define FIEMAP_EXTENT_DATA_TAIL 0x00000400 /* Multiple files in block. * Sets EXTENT_NOT_ALIGNED.*/ #define FIEMAP_EXTENT_UNWRITTEN 0x00000800 /* Space allocated, but * no data (i.e. zero). */ #define FIEMAP_EXTENT_MERGED 0x00001000 /* File does not natively * support extents. Result * merged for efficiency. */ #define FIEMAP_EXTENT_SHARED 0x00002000 /* Space shared with other * files. */ #endif /* _LINUX_FIEMAP_H */ /* atm_eni.h - Driver-specific declarations of the ENI driver (for use by driver-specific utilities) */ /* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ #ifndef LINUX_ATM_ENI_H #define LINUX_ATM_ENI_H #include struct eni_multipliers { int tx,rx; /* values are in percent and must be > 100 */ }; #define ENI_MEMDUMP _IOW('a',ATMIOC_SARPRV,struct atmif_sioc) /* printk memory map */ #define ENI_SETMULT _IOW('a',ATMIOC_SARPRV+7,struct atmif_sioc) /* set buffer multipliers */ #endif /***************************************************************************** * wanrouter.h Definitions for the WAN Multiprotocol Router Module. * This module provides API and common services for WAN Link * Drivers and is completely hardware-independent. * * Author: Nenad Corbic * Gideon Hack * Additions: Arnaldo Melo * * Copyright: (c) 1995-2000 Sangoma Technologies Inc. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * ============================================================================ * Jul 21, 2000 Nenad Corbic Added WAN_FT1_READY State * Feb 24, 2000 Nenad Corbic Added support for socket based x25api * Jan 28, 2000 Nenad Corbic Added support for the ASYNC protocol. * Oct 04, 1999 Nenad Corbic Updated for 2.1.0 release * Jun 02, 1999 Gideon Hack Added support for the S514 adapter. * May 23, 1999 Arnaldo Melo Added local_addr to wanif_conf_t * WAN_DISCONNECTING state added * Jul 20, 1998 David Fong Added Inverse ARP options to 'wanif_conf_t' * Jun 12, 1998 David Fong Added Cisco HDLC support. * Dec 16, 1997 Jaspreet Singh Moved 'enable_IPX' and 'network_number' to * 'wanif_conf_t' * Dec 05, 1997 Jaspreet Singh Added 'pap', 'chap' to 'wanif_conf_t' * Added 'authenticator' to 'wan_ppp_conf_t' * Nov 06, 1997 Jaspreet Singh Changed Router Driver version to 1.1 from 1.0 * Oct 20, 1997 Jaspreet Singh Added 'cir','bc','be' and 'mc' to 'wanif_conf_t' * Added 'enable_IPX' and 'network_number' to * 'wan_device_t'. Also added defines for * UDP PACKET TYPE, Interrupt test, critical values * for RACE conditions. * Oct 05, 1997 Jaspreet Singh Added 'dlci_num' and 'dlci[100]' to * 'wan_fr_conf_t' to configure a list of dlci(s) * for a NODE * Jul 07, 1997 Jaspreet Singh Added 'ttl' to 'wandev_conf_t' & 'wan_device_t' * May 29, 1997 Jaspreet Singh Added 'tx_int_enabled' to 'wan_device_t' * May 21, 1997 Jaspreet Singh Added 'udp_port' to 'wan_device_t' * Apr 25, 1997 Farhan Thawar Added 'udp_port' to 'wandev_conf_t' * Jan 16, 1997 Gene Kozin router_devlist made public * Jan 02, 1997 Gene Kozin Initial version (based on wanpipe.h). *****************************************************************************/ #ifndef _ROUTER_H #define _ROUTER_H #define ROUTER_NAME "wanrouter" /* in case we ever change it */ #define ROUTER_VERSION 1 /* version number */ #define ROUTER_RELEASE 1 /* release (minor version) number */ #define ROUTER_IOCTL 'W' /* for IOCTL calls */ #define ROUTER_MAGIC 0x524D4157L /* signature: 'WANR' reversed */ /* IOCTL codes for /proc/router/ entries (up to 255) */ enum router_ioctls { ROUTER_SETUP = ROUTER_IOCTL<<8, /* configure device */ ROUTER_DOWN, /* shut down device */ ROUTER_STAT, /* get device status */ ROUTER_IFNEW, /* add interface */ ROUTER_IFDEL, /* delete interface */ ROUTER_IFSTAT, /* get interface status */ ROUTER_USER = (ROUTER_IOCTL<<8)+16, /* driver-specific calls */ ROUTER_USER_MAX = (ROUTER_IOCTL<<8)+31 }; /* identifiers for displaying proc file data for dual port adapters */ #define PROC_DATA_PORT_0 0x8000 /* the data is for port 0 */ #define PROC_DATA_PORT_1 0x8001 /* the data is for port 1 */ /* NLPID for packet encapsulation (ISO/IEC TR 9577) */ #define NLPID_IP 0xCC /* Internet Protocol Datagram */ #define NLPID_SNAP 0x80 /* IEEE Subnetwork Access Protocol */ #define NLPID_CLNP 0x81 /* ISO/IEC 8473 */ #define NLPID_ESIS 0x82 /* ISO/IEC 9542 */ #define NLPID_ISIS 0x83 /* ISO/IEC ISIS */ #define NLPID_Q933 0x08 /* CCITT Q.933 */ /* Miscellaneous */ #define WAN_IFNAME_SZ 15 /* max length of the interface name */ #define WAN_DRVNAME_SZ 15 /* max length of the link driver name */ #define WAN_ADDRESS_SZ 31 /* max length of the WAN media address */ #define USED_BY_FIELD 8 /* max length of the used by field */ /* Defines for UDP PACKET TYPE */ #define UDP_PTPIPE_TYPE 0x01 #define UDP_FPIPE_TYPE 0x02 #define UDP_CPIPE_TYPE 0x03 #define UDP_DRVSTATS_TYPE 0x04 #define UDP_INVALID_TYPE 0x05 /* Command return code */ #define CMD_OK 0 /* normal firmware return code */ #define CMD_TIMEOUT 0xFF /* firmware command timed out */ /* UDP Packet Management */ #define UDP_PKT_FRM_STACK 0x00 #define UDP_PKT_FRM_NETWORK 0x01 /* Maximum interrupt test counter */ #define MAX_INTR_TEST_COUNTER 100 /* Critical Values for RACE conditions*/ #define CRITICAL_IN_ISR 0xA1 #define CRITICAL_INTR_HANDLED 0xB1 /****** Data Types **********************************************************/ /*---------------------------------------------------------------------------- * X.25-specific link-level configuration. */ typedef struct wan_x25_conf { unsigned lo_pvc; /* lowest permanent circuit number */ unsigned hi_pvc; /* highest permanent circuit number */ unsigned lo_svc; /* lowest switched circuit number */ unsigned hi_svc; /* highest switched circuit number */ unsigned hdlc_window; /* HDLC window