size (1..7) */ unsigned pkt_window; /* X.25 packet window size (1..7) */ unsigned t1; /* HDLC timer T1, sec (1..30) */ unsigned t2; /* HDLC timer T2, sec (0..29) */ unsigned t4; /* HDLC supervisory frame timer = T4 * T1 */ unsigned n2; /* HDLC retransmission limit (1..30) */ unsigned t10_t20; /* X.25 RESTART timeout, sec (1..255) */ unsigned t11_t21; /* X.25 CALL timeout, sec (1..255) */ unsigned t12_t22; /* X.25 RESET timeout, sec (1..255) */ unsigned t13_t23; /* X.25 CLEAR timeout, sec (1..255) */ unsigned t16_t26; /* X.25 INTERRUPT timeout, sec (1..255) */ unsigned t28; /* X.25 REGISTRATION timeout, sec (1..255) */ unsigned r10_r20; /* RESTART retransmission limit (0..250) */ unsigned r12_r22; /* RESET retransmission limit (0..250) */ unsigned r13_r23; /* CLEAR retransmission limit (0..250) */ unsigned ccitt_compat; /* compatibility mode: 1988/1984/1980 */ unsigned x25_conf_opt; /* User defined x25 config optoins */ unsigned char LAPB_hdlc_only; /* Run in HDLC only mode */ unsigned char logging; /* Control connection logging */ unsigned char oob_on_modem; /* Whether to send modem status to the user app */ } wan_x25_conf_t; /*---------------------------------------------------------------------------- * Frame relay specific link-level configuration. */ typedef struct wan_fr_conf { unsigned signalling; /* local in-channel signalling type */ unsigned t391; /* link integrity verification timer */ unsigned t392; /* polling verification timer */ unsigned n391; /* full status polling cycle counter */ unsigned n392; /* error threshold counter */ unsigned n393; /* monitored events counter */ unsigned dlci_num; /* number of DLCs (access node) */ unsigned dlci[100]; /* List of all DLCIs */ } wan_fr_conf_t; /*---------------------------------------------------------------------------- * PPP-specific link-level configuration. */ typedef struct wan_ppp_conf { unsigned restart_tmr; /* restart timer */ unsigned auth_rsrt_tmr; /* authentication timer */ unsigned auth_wait_tmr; /* authentication timer */ unsigned mdm_fail_tmr; /* modem failure timer */ unsigned dtr_drop_tmr; /* DTR drop timer */ unsigned connect_tmout; /* connection timeout */ unsigned conf_retry; /* max. retry */ unsigned term_retry; /* max. retry */ unsigned fail_retry; /* max. retry */ unsigned auth_retry; /* max. retry */ unsigned auth_options; /* authentication opt. */ unsigned ip_options; /* IP options */ char authenticator; /* AUTHENTICATOR or not */ char ip_mode; /* Static/Host/Peer */ } wan_ppp_conf_t; /*---------------------------------------------------------------------------- * CHDLC-specific link-level configuration. */ typedef struct wan_chdlc_conf { unsigned char ignore_dcd; /* Protocol options: */ unsigned char ignore_cts; /* Ignore these to determine */ unsigned char ignore_keepalive; /* link status (Yes or No) */ unsigned char hdlc_streaming; /* hdlc_streaming mode (Y/N) */ unsigned char receive_only; /* no transmit buffering (Y/N) */ unsigned keepalive_tx_tmr; /* transmit keepalive timer */ unsigned keepalive_rx_tmr; /* receive keepalive timer */ unsigned keepalive_err_margin; /* keepalive_error_tolerance */ unsigned slarp_timer; /* SLARP request timer */ } wan_chdlc_conf_t; /*---------------------------------------------------------------------------- * WAN device configuration. Passed to ROUTER_SETUP IOCTL. */ typedef struct wandev_conf { unsigned magic; /* magic number (for verification) */ unsigned config_id; /* configuration structure identifier */ /****** hardware configuration ******/ unsigned ioport; /* adapter I/O port base */ unsigned long maddr; /* dual-port memory address */ unsigned msize; /* dual-port memory size */ int irq; /* interrupt request level */ int dma; /* DMA request level */ char S514_CPU_no[1]; /* S514 PCI adapter CPU number ('A' or 'B') */ unsigned PCI_slot_no; /* S514 PCI adapter slot number */ char auto_pci_cfg; /* S515 PCI automatic slot detection */ char comm_port; /* Communication Port (PRI=0, SEC=1) */ unsigned bps; /* data transfer rate */ unsigned mtu; /* maximum transmit unit size */ unsigned udp_port; /* UDP port for management */ unsigned char ttl; /* Time To Live for UDP security */ unsigned char ft1; /* FT1 Configurator Option */ char interface; /* RS-232/V.35, etc. */ char clocking; /* external/internal */ char line_coding; /* NRZ/NRZI/FM0/FM1, etc. */ char station; /* DTE/DCE, primary/secondary, etc. */ char connection; /* permanent/switched/on-demand */ char read_mode; /* read mode: Polling or interrupt */ char receive_only; /* disable tx buffers */ char tty; /* Create a fake tty device */ unsigned tty_major; /* Major number for wanpipe tty device */ unsigned tty_minor; /* Minor number for wanpipe tty device */ unsigned tty_mode; /* TTY operation mode SYNC or ASYNC */ char backup; /* Backup Mode */ unsigned hw_opt[4]; /* other hardware options */ unsigned reserved[4]; /****** arbitrary data ***************/ unsigned data_size; /* data buffer size */ void* data; /* data buffer, e.g. firmware */ union /****** protocol-specific ************/ { wan_x25_conf_t x25; /* X.25 configuration */ wan_ppp_conf_t ppp; /* PPP configuration */ wan_fr_conf_t fr; /* frame relay configuration */ wan_chdlc_conf_t chdlc; /* Cisco HDLC configuration */ } u; } wandev_conf_t; /* 'config_id' definitions */ #define WANCONFIG_X25 101 /* X.25 link */ #define WANCONFIG_FR 102 /* frame relay link */ #define WANCONFIG_PPP 103 /* synchronous PPP link */ #define WANCONFIG_CHDLC 104 /* Cisco HDLC Link */ #define WANCONFIG_BSC 105 /* BiSync Streaming */ #define WANCONFIG_HDLC 106 /* HDLC Support */ #define WANCONFIG_MPPP 107 /* Multi Port PPP over RAW CHDLC */ /* * Configuration options defines. */ /* general options */ #define WANOPT_OFF 0 #define WANOPT_ON 1 #define WANOPT_NO 0 #define WANOPT_YES 1 /* intercace options */ #define WANOPT_RS232 0 #define WANOPT_V35 1 /* data encoding options */ #define WANOPT_NRZ 0 #define WANOPT_NRZI 1 #define WANOPT_FM0 2 #define WANOPT_FM1 3 /* link type options */ #define WANOPT_POINTTOPOINT 0 /* RTS always active */ #define WANOPT_MULTIDROP 1 /* RTS is active when transmitting */ /* clocking options */ #define WANOPT_EXTERNAL 0 #define WANOPT_INTERNAL 1 /* station options */ #define WANOPT_DTE 0 #define WANOPT_DCE 1 #define WANOPT_CPE 0 #define WANOPT_NODE 1 #define WANOPT_SECONDARY 0 #define WANOPT_PRIMARY 1 /* connection options */ #define WANOPT_PERMANENT 0 /* DTR always active */ #define WANOPT_SWITCHED 1 /* use DTR to setup link (dial-up) */ #define WANOPT_ONDEMAND 2 /* activate DTR only before sending */ /* frame relay in-channel signalling */ #define WANOPT_FR_ANSI 1 /* ANSI T1.617 Annex D */ #define WANOPT_FR_Q933 2 /* ITU Q.933A */ #define WANOPT_FR_LMI 3 /* LMI */ /* PPP IP Mode Options */ #define WANOPT_PPP_STATIC 0 #define WANOPT_PPP_HOST 1 #define WANOPT_PPP_PEER 2 /* ASY Mode Options */ #define WANOPT_ONE 1 #define WANOPT_TWO 2 #define WANOPT_ONE_AND_HALF 3 #define WANOPT_NONE 0 #define WANOPT_ODD 1 #define WANOPT_EVEN 2 /* CHDLC Protocol Options */ /* DF Commmented out for now. #define WANOPT_CHDLC_NO_DCD IGNORE_DCD_FOR_LINK_STAT #define WANOPT_CHDLC_NO_CTS IGNORE_CTS_FOR_LINK_STAT #define WANOPT_CHDLC_NO_KEEPALIVE IGNORE_KPALV_FOR_LINK_STAT */ /* Port options */ #define WANOPT_PRI 0 #define WANOPT_SEC 1 /* read mode */ #define WANOPT_INTR 0 #define WANOPT_POLL 1 #define WANOPT_TTY_SYNC 0 #define WANOPT_TTY_ASYNC 1 /*---------------------------------------------------------------------------- * WAN Link Status Info (for ROUTER_STAT IOCTL). */ typedef struct wandev_stat { unsigned state; /* link state */ unsigned ndev; /* number of configured interfaces */ /* link/interface configuration */ unsigned connection; /* permanent/switched/on-demand */ unsigned media_type; /* Frame relay/PPP/X.25/SDLC, etc. */ unsigned mtu; /* max. transmit unit for this device */ /* physical level statistics */ unsigned modem_status; /* modem status */ unsigned rx_frames; /* received frames count */ unsigned rx_overruns; /* receiver overrun error count */ unsigned rx_crc_err; /* receive CRC error count */ unsigned rx_aborts; /* received aborted frames count */ unsigned rx_bad_length; /* unexpetedly long/short frames count */ unsigned rx_dropped; /* frames discarded at device level */ unsigned tx_frames; /* transmitted frames count */ unsigned tx_underruns; /* aborted transmissions (underruns) count */ unsigned tx_timeouts; /* transmission timeouts */ unsigned tx_rejects; /* other transmit errors */ /* media level statistics */ unsigned rx_bad_format; /* frames with invalid format */ unsigned rx_bad_addr; /* frames with invalid media address */ unsigned tx_retries; /* frames re-transmitted */ unsigned reserved[16]; /* reserved for future use */ } wandev_stat_t; /* 'state' defines */ enum wan_states { WAN_UNCONFIGURED, /* link/channel is not configured */ WAN_DISCONNECTED, /* link/channel is disconnected */ WAN_CONNECTING, /* connection is in progress */ WAN_CONNECTED, /* link/channel is operational */ WAN_LIMIT, /* for verification only */ WAN_DUALPORT, /* for Dual Port cards */ WAN_DISCONNECTING, WAN_FT1_READY /* FT1 Configurator Ready */ }; enum { WAN_LOCAL_IP, WAN_POINTOPOINT_IP, WAN_NETMASK_IP, WAN_BROADCAST_IP }; /* 'modem_status' masks */ #define WAN_MODEM_CTS 0x0001 /* CTS line active */ #define WAN_MODEM_DCD 0x0002 /* DCD line active */ #define WAN_MODEM_DTR 0x0010 /* DTR line active */ #define WAN_MODEM_RTS 0x0020 /* RTS line active */ /*---------------------------------------------------------------------------- * WAN interface (logical channel) configuration (for ROUTER_IFNEW IOCTL). */ typedef struct wanif_conf { unsigned magic; /* magic number */ unsigned config_id; /* configuration identifier */ char name[WAN_IFNAME_SZ+1]; /* interface name, ASCIIZ */ char addr[WAN_ADDRESS_SZ+1]; /* media address, ASCIIZ */ char usedby[USED_BY_FIELD]; /* used by API or WANPIPE */ unsigned idle_timeout; /* sec, before disconnecting */ unsigned hold_timeout; /* sec, before re-connecting */ unsigned cir; /* Committed Information Rate fwd,bwd*/ unsigned bc; /* Committed Burst Size fwd, bwd */ unsigned be; /* Excess Burst Size fwd, bwd */ unsigned char enable_IPX; /* Enable or Disable IPX */ unsigned char inarp; /* Send Inverse ARP requests Y/N */ unsigned inarp_interval; /* sec, between InARP requests */ unsigned long network_number; /* Network Number for IPX */ char mc; /* Multicast on or off */ char local_addr[WAN_ADDRESS_SZ+1];/* local media address, ASCIIZ */ unsigned char port; /* board port */ unsigned char protocol; /* prococol used in this channel (TCPOX25 or X25) */ char pap; /* PAP enabled or disabled */ char chap; /* CHAP enabled or disabled */ unsigned char userid[511]; /* List of User Id */ unsigned char passwd[511]; /* List of passwords */ unsigned char sysname[31]; /* Name of the system */ unsigned char ignore_dcd; /* Protocol options: */ unsigned char ignore_cts; /* Ignore these to determine */ unsigned char ignore_keepalive; /* link status (Yes or No) */ unsigned char hdlc_streaming; /* Hdlc streaming mode (Y/N) */ unsigned keepalive_tx_tmr; /* transmit keepalive timer */ unsigned keepalive_rx_tmr; /* receive keepalive timer */ unsigned keepalive_err_margin; /* keepalive_error_tolerance */ unsigned slarp_timer; /* SLARP request timer */ unsigned char ttl; /* Time To Live for UDP security */ char interface; /* RS-232/V.35, etc. */ char clocking; /* external/internal */ unsigned bps; /* data transfer rate */ unsigned mtu; /* maximum transmit unit size */ unsigned char if_down; /* brind down interface when disconnected */ unsigned char gateway; /* Is this interface a gateway */ unsigned char true_if_encoding; /* Set the dev->type to true board protocol */ unsigned char asy_data_trans; /* async API options */ unsigned char rts_hs_for_receive; /* async Protocol options */ unsigned char xon_xoff_hs_for_receive; unsigned char xon_xoff_hs_for_transmit; unsigned char dcd_hs_for_transmit; unsigned char cts_hs_for_transmit; unsigned char async_mode; unsigned tx_bits_per_char; unsigned rx_bits_per_char; unsigned stop_bits; unsigned char parity; unsigned break_timer; unsigned inter_char_timer; unsigned rx_complete_length; unsigned xon_char; unsigned xoff_char; unsigned char receive_only; /* no transmit buffering (Y/N) */ } wanif_conf_t; #endif /* _ROUTER_H */ /* taskstats.h - exporting per-task statistics * * Copyright (C) Shailabh Nagar, IBM Corp. 2006 * (C) Balbir Singh, IBM Corp. 2006 * (C) Jay Lan, SGI, 2006 * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2.1 of the GNU Lesser General Public License * as published by the Free Software Foundation. * * This program is distributed in the hope that it would be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ #ifndef _LINUX_TASKSTATS_H #define _LINUX_TASKSTATS_H #include /* Format for per-task data returned to userland when * - a task exits * - listener requests stats for a task * * The struct is versioned. Newer versions should only add fields to * the bottom of the struct to maintain backward compatibility. * * * To add new fields * a) bump up TASKSTATS_VERSION * b) add comment indicating new version number at end of struct * c) add new fields after version comment; maintain 64-bit alignment */ #define TASKSTATS_VERSION 8 #define TS_COMM_LEN 32 /* should be >= TASK_COMM_LEN * in linux/sched.h */ struct taskstats { /* The version number of this struct. This field is always set to * TAKSTATS_VERSION, which is defined in . * Each time the struct is changed, the value should be incremented. */ __u16 version; __u32 ac_exitcode; /* Exit status */ /* The accounting flags of a task as defined in * Defined values are AFORK, ASU, ACOMPAT, ACORE, and AXSIG. */ __u8 ac_flag; /* Record flags */ __u8 ac_nice; /* task_nice */ /* Delay accounting fields start * * All values, until comment "Delay accounting fields end" are * available only if delay accounting is enabled, even though the last * few fields are not delays * * xxx_count is the number of delay values recorded * xxx_delay_total is the corresponding cumulative delay in nanoseconds * * xxx_delay_total wraps around to zero on overflow * xxx_count incremented regardless of overflow */ /* Delay waiting for cpu, while runnable * count, delay_total NOT updated atomically */ __u64 cpu_count __attribute__((aligned(8))); __u64 cpu_delay_total; /* Following four fields atomically updated using task->delays->lock */ /* Delay waiting for synchronous block I/O to complete * does not account for delays in I/O submission */ __u64 blkio_count; __u64 blkio_delay_total; /* Delay waiting for page fault I/O (swap in only) */ __u64 swapin_count; __u64 swapin_delay_total; /* cpu "wall-clock" running time * On some architectures, value will adjust for cpu time stolen * from the kernel in involuntary waits due to virtualization. * Value is cumulative, in nanoseconds, without a corresponding count * and wraps around to zero silently on overflow */ __u64 cpu_run_real_total; /* cpu "virtual" running time * Uses time intervals seen by the kernel i.e. no adjustment * for kernel's involuntary waits due to virtualization. * Value is cumulative, in nanoseconds, without a corresponding count * and wraps around to zero silently on overflow */ __u64 cpu_run_virtual_total; /* Delay accounting fields end */ /* version 1 ends here */ /* Basic Accounting Fields start */ char ac_comm[TS_COMM_LEN]; /* Command name */ __u8 ac_sched __attribute__((aligned(8))); /* Scheduling discipline */ __u8 ac_pad[3]; __u32 ac_uid __attribute__((aligned(8))); /* User ID */ __u32 ac_gid; /* Group ID */ __u32 ac_pid; /* Process ID */ __u32 ac_ppid; /* Parent process ID */ __u32 ac_btime; /* Begin time [sec since 1970] */ __u64 ac_etime __attribute__((aligned(8))); /* Elapsed time [usec] */ __u64 ac_utime; /* User CPU time [usec] */ __u64 ac_stime; /* SYstem CPU time [usec] */ __u64 ac_minflt; /* Minor Page Fault Count */ __u64 ac_majflt; /* Major Page Fault Count */ /* Basic Accounting Fields end */ /* Extended accounting fields start */ /* Accumulated RSS usage in duration of a task, in MBytes-usecs. * The current rss usage is added to this counter every time * a tick is charged to a task's system time. So, at the end we * will have memory usage multiplied by system time. Thus an * average usage per system time unit can be calculated. */ __u64 coremem; /* accumulated RSS usage in MB-usec */ /* Accumulated virtual memory usage in duration of a task. * Same as acct_rss_mem1 above except that we keep track of VM usage. */ __u64 virtmem; /* accumulated VM usage in MB-usec */ /* High watermark of RSS and virtual memory usage in duration of * a task, in KBytes. */ __u64 hiwater_rss; /* High-watermark of RSS usage, in KB */ __u64 hiwater_vm; /* High-water VM usage, in KB */ /* The following four fields are I/O statistics of a task. */ __u64 read_char; /* bytes read */ __u64 write_char; /* bytes written */ __u64 read_syscalls; /* read syscalls */ __u64 write_syscalls; /* write syscalls */ /* Extended accounting fields end */ #define TASKSTATS_HAS_IO_ACCOUNTING /* Per-task storage I/O accounting starts */ __u64 read_bytes; /* bytes of read I/O */ __u64 write_bytes; /* bytes of write I/O */ __u64 cancelled_write_bytes; /* bytes of cancelled write I/O */ __u64 nvcsw; /* voluntary_ctxt_switches */ __u64 nivcsw; /* nonvoluntary_ctxt_switches */ /* time accounting for SMT machines */ __u64 ac_utimescaled; /* utime scaled on frequency etc */ __u64 ac_stimescaled; /* stime scaled on frequency etc */ __u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */ /* Delay waiting for memory reclaim */ __u64 freepages_count; __u64 freepages_delay_total; }; /* * Commands sent from userspace * Not versioned. New commands should only be inserted at the enum's end * prior to __TASKSTATS_CMD_MAX */ enum { TASKSTATS_CMD_UNSPEC = 0, /* Reserved */ TASKSTATS_CMD_GET, /* user->kernel request/get-response */ TASKSTATS_CMD_NEW, /* kernel->user event */ __TASKSTATS_CMD_MAX, }; #define TASKSTATS_CMD_MAX (__TASKSTATS_CMD_MAX - 1) enum { TASKSTATS_TYPE_UNSPEC = 0, /* Reserved */ TASKSTATS_TYPE_PID, /* Process id */ TASKSTATS_TYPE_TGID, /* Thread group id */ TASKSTATS_TYPE_STATS, /* taskstats structure */ TASKSTATS_TYPE_AGGR_PID, /* contains pid + stats */ TASKSTATS_TYPE_AGGR_TGID, /* contains tgid + stats */ TASKSTATS_TYPE_NULL, /* contains nothing */ __TASKSTATS_TYPE_MAX, }; #define TASKSTATS_TYPE_MAX (__TASKSTATS_TYPE_MAX - 1) enum { TASKSTATS_CMD_ATTR_UNSPEC = 0, TASKSTATS_CMD_ATTR_PID, TASKSTATS_CMD_ATTR_TGID, TASKSTATS_CMD_ATTR_REGISTER_CPUMASK, TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK, __TASKSTATS_CMD_ATTR_MAX, }; #define TASKSTATS_CMD_ATTR_MAX (__TASKSTATS_CMD_ATTR_MAX - 1) /* NETLINK_GENERIC related info */ #define TASKSTATS_GENL_NAME "TASKSTATS" #define TASKSTATS_GENL_VERSION 0x1 #endif /* _LINUX_TASKSTATS_H */ #ifndef CCISS_DEFS_H #define CCISS_DEFS_H #include /* general boundary definitions */ #define SENSEINFOBYTES 32 /* note that this value may vary between host implementations */ /* Command Status value */ #define CMD_SUCCESS 0x0000 #define CMD_TARGET_STATUS 0x0001 #define CMD_DATA_UNDERRUN 0x0002 #define CMD_DATA_OVERRUN 0x0003 #define CMD_INVALID 0x0004 #define CMD_PROTOCOL_ERR 0x0005 #define CMD_HARDWARE_ERR 0x0006 #define CMD_CONNECTION_LOST 0x0007 #define CMD_ABORTED 0x0008 #define CMD_ABORT_FAILED 0x0009 #define CMD_UNSOLICITED_ABORT 0x000A #define CMD_TIMEOUT 0x000B #define CMD_UNABORTABLE 0x000C /* transfer direction */ #define XFER_NONE 0x00 #define XFER_WRITE 0x01 #define XFER_READ 0x02 #define XFER_RSVD 0x03 /* task attribute */ #define ATTR_UNTAGGED 0x00 #define ATTR_SIMPLE 0x04 #define ATTR_HEADOFQUEUE 0x05 #define ATTR_ORDERED 0x06 #define ATTR_ACA 0x07 /* cdb type */ #define TYPE_CMD 0x00 #define TYPE_MSG 0x01 /* Type defs used in the following structs */ #define BYTE __u8 #define WORD __u16 #define HWORD __u16 #define DWORD __u32 #define CISS_MAX_LUN 1024 #define LEVEL2LUN 1 /* index into Target(x) structure, due to byte swapping */ #define LEVEL3LUN 0 #pragma pack(1) /* Command List Structure */ typedef union _SCSI3Addr_struct { struct { BYTE Dev; BYTE Bus:6; BYTE Mode:2; /* b00 */ } PeripDev; struct { BYTE DevLSB; BYTE DevMSB:6; BYTE Mode:2; /* b01 */ } LogDev; struct { BYTE Dev:5; BYTE Bus:3; BYTE Targ:6; BYTE Mode:2; /* b10 */ } LogUnit; } SCSI3Addr_struct; typedef struct _PhysDevAddr_struct { DWORD TargetId:24; DWORD Bus:6; DWORD Mode:2; SCSI3Addr_struct Target[2]; /* 2 level target device addr */ } PhysDevAddr_struct; typedef struct _LogDevAddr_struct { DWORD VolId:30; DWORD Mode:2; BYTE reserved[4]; } LogDevAddr_struct; typedef union _LUNAddr_struct { BYTE LunAddrBytes[8]; SCSI3Addr_struct SCSI3Lun[4]; PhysDevAddr_struct PhysDev; LogDevAddr_struct LogDev; } LUNAddr_struct; typedef struct _RequestBlock_struct { BYTE CDBLen; struct { BYTE Type:3; BYTE Attribute:3; BYTE Direction:2; } Type; HWORD Timeout; BYTE CDB[16]; } RequestBlock_struct; typedef union _MoreErrInfo_struct{ struct { BYTE Reserved[3]; BYTE Type; DWORD ErrorInfo; } Common_Info; struct{ BYTE Reserved[2]; BYTE offense_size; /* size of offending entry */ BYTE offense_num; /* byte # of offense 0-base */ DWORD offense_value; } Invalid_Cmd; } MoreErrInfo_struct; typedef struct _ErrorInfo_struct { BYTE ScsiStatus; BYTE SenseLen; HWORD CommandStatus; DWORD ResidualCnt; MoreErrInfo_struct MoreErrInfo; BYTE SenseInfo[SENSEINFOBYTES]; } ErrorInfo_struct; #pragma pack() #endif /* CCISS_DEFS_H */ /****************************************************************************** ******************************************************************************* ** ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. ** Copyright (C) 2004-2007 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 _LINUX_DLM_DEVICE_H #define _LINUX_DLM_DEVICE_H /* This is the device interface for dlm, most users will use a library * interface. */ #include #include #define DLM_USER_LVB_LEN 32 /* Version of the device interface */ #define DLM_DEVICE_VERSION_MAJOR 6 #define DLM_DEVICE_VERSION_MINOR 0 #define DLM_DEVICE_VERSION_PATCH 1 /* struct passed to the lock write */ struct dlm_lock_params { __u8 mode; __u8 namelen; __u16 unused; __u32 flags; __u32 lkid; __u32 parent; __u64 xid; __u64 timeout; void *castparam; void *castaddr; void *bastparam; void *bastaddr; struct dlm_lksb *lksb; char lvb[DLM_USER_LVB_LEN]; char name[0]; }; struct dlm_lspace_params { __u32 flags; __u32 minor; char name[0]; }; struct dlm_purge_params { __u32 nodeid; __u32 pid; }; struct dlm_write_request { __u32 version[3]; __u8 cmd; __u8 is64bit; __u8 unused[2]; union { struct dlm_lock_params lock; struct dlm_lspace_params lspace; struct dlm_purge_params purge; } i; }; struct dlm_device_version { __u32 version[3]; }; /* struct read from the "device" fd, consists mainly of userspace pointers for the library to use */ struct dlm_lock_result { __u32 version[3]; __u32 length; void * user_astaddr; void * user_astparam; struct dlm_lksb * user_lksb; struct dlm_lksb lksb; __u8 bast_mode; __u8 unused[3]; /* Offsets may be zero if no data is present */ __u32 lvb_offset; }; /* Commands passed to the device */ #define DLM_USER_LOCK 1 #define DLM_USER_UNLOCK 2 #define DLM_USER_QUERY 3 #define DLM_USER_CREATE_LOCKSPACE 4 #define DLM_USER_REMOVE_LOCKSPACE 5 #define DLM_USER_PURGE 6 #define DLM_USER_DEADLOCK 7 /* Lockspace flags */ #define DLM_USER_LSFLG_AUTOFREE 1 #define DLM_USER_LSFLG_FORCEFREE 2 #endif /* * ncp_fs.h * * Copyright (C) 1995, 1996 by Volker Lendecke * */ #ifndef _LINUX_NCP_FS_H #define _LINUX_NCP_FS_H #include #include #include #include #include #include /* * ioctl commands */ struct ncp_ioctl_request { unsigned int function; unsigned int size; char *data; }; struct ncp_fs_info { int version; struct sockaddr_ipx addr; __kernel_uid_t mounted_uid; int connection; /* Connection number the server assigned us */ int buffer_size; /* The negotiated buffer size, to be used for read/write requests! */ int volume_number; __le32 directory_id; }; struct ncp_fs_info_v2 { int version; unsigned long mounted_uid; unsigned int connection; unsigned int buffer_size; unsigned int volume_number; __le32 directory_id; __u32 dummy1; __u32 dummy2; __u32 dummy3; }; struct ncp_sign_init { char sign_root[8]; char sign_last[16]; }; struct ncp_lock_ioctl { #define NCP_LOCK_LOG 0 #define NCP_LOCK_SH 1 #define NCP_LOCK_EX 2 #define NCP_LOCK_CLEAR 256 int cmd; int origin; unsigned int offset; unsigned int length; #define NCP_LOCK_DEFAULT_TIMEOUT 18 #define NCP_LOCK_MAX_TIMEOUT 180 int timeout; }; struct ncp_setroot_ioctl { int volNumber; int namespace; __le32 dirEntNum; }; struct ncp_objectname_ioctl { #define NCP_AUTH_NONE 0x00 #define NCP_AUTH_BIND 0x31 #define NCP_AUTH_NDS 0x32 int auth_type; size_t object_name_len; void * object_name; /* a userspace data, in most cases user name */ }; struct ncp_privatedata_ioctl { size_t len; void * data; /* ~1000 for NDS */ }; /* NLS charsets by ioctl */ #define NCP_IOCSNAME_LEN 20 struct ncp_nls_ioctl { unsigned char codepage[NCP_IOCSNAME_LEN+1]; unsigned char iocharset[NCP_IOCSNAME_LEN+1]; }; #define NCP_IOC_NCPREQUEST _IOR('n', 1, struct ncp_ioctl_request) #define NCP_IOC_GETMOUNTUID _IOW('n', 2, __kernel_old_uid_t) #define NCP_IOC_GETMOUNTUID2 _IOW('n', 2, unsigned long) #define NCP_IOC_CONN_LOGGED_IN _IO('n', 3) #define NCP_GET_FS_INFO_VERSION (1) #define NCP_IOC_GET_FS_INFO _IOWR('n', 4, struct ncp_fs_info) #define NCP_GET_FS_INFO_VERSION_V2 (2) #define NCP_IOC_GET_FS_INFO_V2 _IOWR('n', 4, struct ncp_fs_info_v2) #define NCP_IOC_SIGN_INIT _IOR('n', 5, struct ncp_sign_init) #define NCP_IOC_SIGN_WANTED _IOR('n', 6, int) #define NCP_IOC_SET_SIGN_WANTED _IOW('n', 6, int) #define NCP_IOC_LOCKUNLOCK _IOR('n', 7, struct ncp_lock_ioctl) #define NCP_IOC_GETROOT _IOW('n', 8, struct ncp_setroot_ioctl) #define NCP_IOC_SETROOT _IOR('n', 8, struct ncp_setroot_ioctl) #define NCP_IOC_GETOBJECTNAME _IOWR('n', 9, struct ncp_objectname_ioctl) #define NCP_IOC_SETOBJECTNAME _IOR('n', 9, struct ncp_objectname_ioctl) #define NCP_IOC_GETPRIVATEDATA _IOWR('n', 10, struct ncp_privatedata_ioctl) #define NCP_IOC_SETPRIVATEDATA _IOR('n', 10, struct ncp_privatedata_ioctl) #define NCP_IOC_GETCHARSETS _IOWR('n', 11, struct ncp_nls_ioctl) #define NCP_IOC_SETCHARSETS _IOR('n', 11, struct ncp_nls_ioctl) #define NCP_IOC_GETDENTRYTTL _IOW('n', 12, __u32) #define NCP_IOC_SETDENTRYTTL _IOR('n', 12, __u32) /* * The packet size to allocate. One page should be enough. */ #define NCP_PACKET_SIZE 4070 #define NCP_MAXPATHLEN 255 #define NCP_MAXNAMELEN 14 #endif /* _LINUX_NCP_FS_H */ /* * Copyright (c) 2008, Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 Temple * Place - Suite 330, Boston, MA 02111-1307 USA. * * Author: Lucy Liu */ #ifndef __LINUX_DCBNL_H__ #define __LINUX_DCBNL_H__ #include struct dcbmsg { __u8 dcb_family; __u8 cmd; __u16 dcb_pad; }; /** * enum dcbnl_commands - supported DCB commands * * @DCB_CMD_UNDEFINED: unspecified command to catch errors * @DCB_CMD_GSTATE: request the state of DCB in the device * @DCB_CMD_SSTATE: set the state of DCB in the device * @DCB_CMD_PGTX_GCFG: request the priority group configuration for Tx * @DCB_CMD_PGTX_SCFG: set the priority group configuration for Tx * @DCB_CMD_PGRX_GCFG: request the priority group configuration for Rx * @DCB_CMD_PGRX_SCFG: set the priority group configuration for Rx * @DCB_CMD_PFC_GCFG: request the priority flow control configuration * @DCB_CMD_PFC_SCFG: set the priority flow control configuration * @DCB_CMD_SET_ALL: apply all changes to the underlying device * @DCB_CMD_GPERM_HWADDR: get the permanent MAC address of the underlying * device. Only useful when using bonding. * @DCB_CMD_GCAP: request the DCB capabilities of the device * @DCB_CMD_GNUMTCS: get the number of traffic classes currently supported * @DCB_CMD_SNUMTCS: set the number of traffic classes * @DCB_CMD_GBCN: set backward congestion notification configuration * @DCB_CMD_SBCN: get backward congestion notification configration. * @DCB_CMD_GAPP: get application protocol configuration * @DCB_CMD_SAPP: set application protocol configuration */ enum dcbnl_commands { DCB_CMD_UNDEFINED, DCB_CMD_GSTATE, DCB_CMD_SSTATE, DCB_CMD_PGTX_GCFG, DCB_CMD_PGTX_SCFG, DCB_CMD_PGRX_GCFG, DCB_CMD_PGRX_SCFG, DCB_CMD_PFC_GCFG, DCB_CMD_PFC_SCFG, DCB_CMD_SET_ALL, DCB_CMD_GPERM_HWADDR, DCB_CMD_GCAP, DCB_CMD_GNUMTCS, DCB_CMD_SNUMTCS, DCB_CMD_PFC_GSTATE, DCB_CMD_PFC_SSTATE, DCB_CMD_BCN_GCFG, DCB_CMD_BCN_SCFG, DCB_CMD_GAPP, DCB_CMD_SAPP, __DCB_CMD_ENUM_MAX, DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, }; /** * enum dcbnl_attrs - DCB top-level netlink attributes * * @DCB_ATTR_UNDEFINED: unspecified attribute to catch errors * @DCB_ATTR_IFNAME: interface name of the underlying device (NLA_STRING) * @DCB_ATTR_STATE: enable state of DCB in the device (NLA_U8) * @DCB_ATTR_PFC_STATE: enable state of PFC in the device (NLA_U8) * @DCB_ATTR_PFC_CFG: priority flow control configuration (NLA_NESTED) * @DCB_ATTR_NUM_TC: number of traffic classes supported in the device (NLA_U8) * @DCB_ATTR_PG_CFG: priority group configuration (NLA_NESTED) * @DCB_ATTR_SET_ALL: bool to commit changes to hardware or not (NLA_U8) * @DCB_ATTR_PERM_HWADDR: MAC address of the physical device (NLA_NESTED) * @DCB_ATTR_CAP: DCB capabilities of the device (NLA_NESTED) * @DCB_ATTR_NUMTCS: number of traffic classes supported (NLA_NESTED) * @DCB_ATTR_BCN: backward congestion notification configuration (NLA_NESTED) */ enum dcbnl_attrs { DCB_ATTR_UNDEFINED, DCB_ATTR_IFNAME, DCB_ATTR_STATE, DCB_ATTR_PFC_STATE, DCB_ATTR_PFC_CFG, DCB_ATTR_NUM_TC, DCB_ATTR_PG_CFG, DCB_ATTR_SET_ALL, DCB_ATTR_PERM_HWADDR, DCB_ATTR_CAP, DCB_ATTR_NUMTCS, DCB_ATTR_BCN, DCB_ATTR_APP, __DCB_ATTR_ENUM_MAX, DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, }; /** * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs * * @DCB_PFC_UP_ATTR_UNDEFINED: unspecified attribute to catch errors * @DCB_PFC_UP_ATTR_0: Priority Flow Control value for User Priority 0 (NLA_U8) * @DCB_PFC_UP_ATTR_1: Priority Flow Control value for User Priority 1 (NLA_U8) * @DCB_PFC_UP_ATTR_2: Priority Flow Control value for User Priority 2 (NLA_U8) * @DCB_PFC_UP_ATTR_3: Priority Flow Control value for User Priority 3 (NLA_U8) * @DCB_PFC_UP_ATTR_4: Priority Flow Control value for User Priority 4 (NLA_U8) * @DCB_PFC_UP_ATTR_5: Priority Flow Control value for User Priority 5 (NLA_U8) * @DCB_PFC_UP_ATTR_6: Priority Flow Control value for User Priority 6 (NLA_U8) * @DCB_PFC_UP_ATTR_7: Priority Flow Control value for User Priority 7 (NLA_U8) * @DCB_PFC_UP_ATTR_MAX: highest attribute number currently defined * @DCB_PFC_UP_ATTR_ALL: apply to all priority flow control attrs (NLA_FLAG) * */ enum dcbnl_pfc_up_attrs { DCB_PFC_UP_ATTR_UNDEFINED, DCB_PFC_UP_ATTR_0, DCB_PFC_UP_ATTR_1, DCB_PFC_UP_ATTR_2, DCB_PFC_UP_ATTR_3, DCB_PFC_UP_ATTR_4, DCB_PFC_UP_ATTR_5, DCB_PFC_UP_ATTR_6, DCB_PFC_UP_ATTR_7, DCB_PFC_UP_ATTR_ALL, __DCB_PFC_UP_ATTR_ENUM_MAX, DCB_PFC_UP_ATTR_MAX = __DCB_PFC_UP_ATTR_ENUM_MAX - 1, }; /** * enum dcbnl_pg_attrs - DCB Priority Group attributes * * @DCB_PG_ATTR_UNDEFINED: unspecified attribute to catch errors * @DCB_PG_ATTR_TC_0: Priority Group Traffic Class 0 configuration (NLA_NESTED) * @DCB_PG_ATTR_TC_1: Priority Group Traffic Class 1 configuration (NLA_NESTED) * @DCB_PG_ATTR_TC_2: Priority Group Traffic Class 2 configuration (NLA_NESTED) * @DCB_PG_ATTR_TC_3: Priority Group Traffic Class 3 configuration (NLA_NESTED) * @DCB_PG_ATTR_TC_4: Priority Group Traffic Class 4 configuration (NLA_NESTED) * @DCB_PG_ATTR_TC_5: Priority Group Traffic Class 5 configuration (NLA_NESTED) * @DCB_PG_ATTR_TC_6: Priority Group Traffic Class 6 configuration (NLA_NESTED) * @DCB_PG_ATTR_TC_7: Priority Group Traffic Class 7 configuration (NLA_NESTED) * @DCB_PG_ATTR_TC_MAX: highest attribute number currently defined * @DCB_PG_ATTR_TC_ALL: apply to all traffic classes (NLA_NESTED) * @DCB_PG_ATTR_BW_ID_0: Percent of link bandwidth for Priority Group 0 (NLA_U8) * @DCB_PG_ATTR_BW_ID_1: Percent of link bandwidth for Priority Group 1 (NLA_U8) * @DCB_PG_ATTR_BW_ID_2: Percent of link bandwidth for Priority Group 2 (NLA_U8) * @DCB_PG_ATTR_BW_ID_3: Percent of link bandwidth for Priority Group 3 (NLA_U8) * @DCB_PG_ATTR_BW_ID_4: Percent of link bandwidth for Priority Group 4 (NLA_U8) * @DCB_PG_ATTR_BW_ID_5: Percent of link bandwidth for Priority Group 5 (NLA_U8) * @DCB_PG_ATTR_BW_ID_6: Percent of link bandwidth for Priority Group 6 (NLA_U8) * @DCB_PG_ATTR_BW_ID_7: Percent of link bandwidth for Priority Group 7 (NLA_U8) * @DCB_PG_ATTR_BW_ID_MAX: highest attribute number currently defined * @DCB_PG_ATTR_BW_ID_ALL: apply to all priority groups (NLA_FLAG) * */ enum dcbnl_pg_attrs { DCB_PG_ATTR_UNDEFINED, DCB_PG_ATTR_TC_0, DCB_PG_ATTR_TC_1, DCB_PG_ATTR_TC_2, DCB_PG_ATTR_TC_3, DCB_PG_ATTR_TC_4, DCB_PG_ATTR_TC_5, DCB_PG_ATTR_TC_6, DCB_PG_ATTR_TC_7, DCB_PG_ATTR_TC_MAX, DCB_PG_ATTR_TC_ALL, DCB_PG_ATTR_BW_ID_0, DCB_PG_ATTR_BW_ID_1, DCB_PG_ATTR_BW_ID_2, DCB_PG_ATTR_BW_ID_3, DCB_PG_ATTR_BW_ID_4, DCB_PG_ATTR_BW_ID_5, DCB_PG_ATTR_BW_ID_6, DCB_PG_ATTR_BW_ID_7, DCB_PG_ATTR_BW_ID_MAX, DCB_PG_ATTR_BW_ID_ALL, __DCB_PG_ATTR_ENUM_MAX, DCB_PG_ATTR_MAX = __DCB_PG_ATTR_ENUM_MAX - 1, }; /** * enum dcbnl_tc_attrs - DCB Traffic Class attributes * * @DCB_TC_ATTR_PARAM_UNDEFINED: unspecified attribute to catch errors * @DCB_TC_ATTR_PARAM_PGID: (NLA_U8) Priority group the traffic class belongs to * Valid values are: 0-7 * @DCB_TC_ATTR_PARAM_UP_MAPPING: (NLA_U8) Traffic class to user priority map * Some devices may not support changing the * user priority map of a TC. * @DCB_TC_ATTR_PARAM_STRICT_PRIO: (NLA_U8) Strict priority setting * 0 - none * 1 - group strict * 2 - link strict * @DCB_TC_ATTR_PARAM_BW_PCT: optional - (NLA_U8) If supported by the device and * not configured to use link strict priority, * this is the percentage of bandwidth of the * priority group this traffic class belongs to * @DCB_TC_ATTR_PARAM_ALL: (NLA_FLAG) all traffic class parameters * */ enum dcbnl_tc_attrs { DCB_TC_ATTR_PARAM_UNDEFINED, DCB_TC_ATTR_PARAM_PGID, DCB_TC_ATTR_PARAM_UP_MAPPING, DCB_TC_ATTR_PARAM_STRICT_PRIO, DCB_TC_ATTR_PARAM_BW_PCT, DCB_TC_ATTR_PARAM_ALL, __DCB_TC_ATTR_PARAM_ENUM_MAX, DCB_TC_ATTR_PARAM_MAX = __DCB_TC_ATTR_PARAM_ENUM_MAX - 1, }; /** * enum dcbnl_cap_attrs - DCB Capability attributes * * @DCB_CAP_ATTR_UNDEFINED: unspecified attribute to catch errors * @DCB_CAP_ATTR_ALL: (NLA_FLAG) all capability parameters * @DCB_CAP_ATTR_PG: (NLA_U8) device supports Priority Groups * @DCB_CAP_ATTR_PFC: (NLA_U8) device supports Priority Flow Control * @DCB_CAP_ATTR_UP2TC: (NLA_U8) device supports user priority to * traffic class mapping * @DCB_CAP_ATTR_PG_TCS: (NLA_U8) bitmap where each bit represents a * number of traffic classes the device * can be configured to use for Priority Groups * @DCB_CAP_ATTR_PFC_TCS: (NLA_U8) bitmap where each bit represents a * number of traffic classes the device can be * configured to use for Priority Flow Control * @DCB_CAP_ATTR_GSP: (NLA_U8) device supports group strict priority * @DCB_CAP_ATTR_BCN: (NLA_U8) device supports Backwards Congestion * Notification */ enum dcbnl_cap_attrs { DCB_CAP_ATTR_UNDEFINED, DCB_CAP_ATTR_ALL, DCB_CAP_ATTR_PG, DCB_CAP_ATTR_PFC, DCB_CAP_ATTR_UP2TC, DCB_CAP_ATTR_PG_TCS, DCB_CAP_ATTR_PFC_TCS, DCB_CAP_ATTR_GSP, DCB_CAP_ATTR_BCN, __DCB_CAP_ATTR_ENUM_MAX, DCB_CAP_ATTR_MAX = __DCB_CAP_ATTR_ENUM_MAX - 1, }; /** * enum dcbnl_numtcs_attrs - number of traffic classes * * @DCB_NUMTCS_ATTR_UNDEFINED: unspecified attribute to catch errors * @DCB_NUMTCS_ATTR_ALL: (NLA_FLAG) all traffic class attributes * @DCB_NUMTCS_ATTR_PG: (NLA_U8) number of traffic classes used for * priority groups * @DCB_NUMTCS_ATTR_PFC: (NLA_U8) number of traffic classes which can * support priority flow control */ enum dcbnl_numtcs_attrs { DCB_NUMTCS_ATTR_UNDEFINED, DCB_NUMTCS_ATTR_ALL, DCB_NUMTCS_ATTR_PG, DCB_NUMTCS_ATTR_PFC, __DCB_NUMTCS_ATTR_ENUM_MAX, DCB_NUMTCS_ATTR_MAX = __DCB_NUMTCS_ATTR_ENUM_MAX - 1, }; enum dcbnl_bcn_attrs{ DCB_BCN_ATTR_UNDEFINED = 0, DCB_BCN_ATTR_RP_0, DCB_BCN_ATTR_RP_1, DCB_BCN_ATTR_RP_2, DCB_BCN_ATTR_RP_3, DCB_BCN_ATTR_RP_4, DCB_BCN_ATTR_RP_5, DCB_BCN_ATTR_RP_6, DCB_BCN_ATTR_RP_7, DCB_BCN_ATTR_RP_ALL, DCB_BCN_ATTR_BCNA_0, DCB_BCN_ATTR_BCNA_1, DCB_BCN_ATTR_ALPHA, DCB_BCN_ATTR_BETA, DCB_BCN_ATTR_GD, DCB_BCN_ATTR_GI, DCB_BCN_ATTR_TMAX, DCB_BCN_ATTR_TD, DCB_BCN_ATTR_RMIN, DCB_BCN_ATTR_W, DCB_BCN_ATTR_RD, DCB_BCN_ATTR_RU, DCB_BCN_ATTR_WRTT, DCB_BCN_ATTR_RI, DCB_BCN_ATTR_C, DCB_BCN_ATTR_ALL, __DCB_BCN_ATTR_ENUM_MAX, DCB_BCN_ATTR_MAX = __DCB_BCN_ATTR_ENUM_MAX - 1, }; /** * enum dcb_general_attr_values - general DCB attribute values * * @DCB_ATTR_UNDEFINED: value used to indicate an attribute is not supported * */ enum dcb_general_attr_values { DCB_ATTR_VALUE_UNDEFINED = 0xff }; #define DCB_APP_IDTYPE_ETHTYPE 0x00 #define DCB_APP_IDTYPE_PORTNUM 0x01 enum dcbnl_app_attrs { DCB_APP_ATTR_UNDEFINED, DCB_APP_ATTR_IDTYPE, DCB_APP_ATTR_ID, DCB_APP_ATTR_PRIORITY, __DCB_APP_ATTR_ENUM_MAX, DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1, }; #endif /* __LINUX_DCBNL_H__ */ #ifndef _SCREEN_INFO_H #define _SCREEN_INFO_H #include /* * These are set up by the setup-routine at boot-time: */ struct screen_info { __u8 orig_x; /* 0x00 */ __u8 orig_y; /* 0x01 */ __u16 ext_mem_k; /* 0x02 */ __u16 orig_video_page; /* 0x04 */ __u8 orig_video_mode; /* 0x06 */ __u8 orig_video_cols; /* 0x07 */ __u8 flags; /* 0x08 */ __u8 unused2; /* 0x09 */ __u16 orig_video_ega_bx;/* 0x0a */ __u16 unused3; /* 0x0c */ __u8 orig_video_lines; /* 0x0e */ __u8 orig_video_isVGA; /* 0x0f */ __u16 orig_video_points;/* 0x10 */ /* VESA graphic mode -- linear frame buffer */ __u16 lfb_width; /* 0x12 */ __u16 lfb_height; /* 0x14 */ __u16 lfb_depth; /* 0x16 */ __u32 lfb_base; /* 0x18 */ __u32 lfb_size; /* 0x1c */ __u16 cl_magic, cl_offset; /* 0x20 */ __u16 lfb_linelength; /* 0x24 */ __u8 red_size; /* 0x26 */ __u8 red_pos; /* 0x27 */ __u8 green_size; /* 0x28 */ __u8 green_pos; /* 0x29 */ __u8 blue_size; /* 0x2a */ __u8 blue_pos; /* 0x2b */ __u8 rsvd_size; /* 0x2c */ __u8 rsvd_pos; /* 0x2d */ __u16 vesapm_seg; /* 0x2e */ __u16 vesapm_off; /* 0x30 */ __u16 pages; /* 0x32 */ __u16 vesa_attributes; /* 0x34 */ __u32 capabilities; /* 0x36 */ __u8 _reserved[6]; /* 0x3a */ } __attribute__((packed)); #define VIDEO_TYPE_MDA 0x10 /* Monochrome Text Display */ #define VIDEO_TYPE_CGA 0x11 /* CGA Display */ #define VIDEO_TYPE_EGAM 0x20 /* EGA/VGA in Monochrome Mode */ #define VIDEO_TYPE_EGAC 0x21 /* EGA in Color Mode */ #define VIDEO_TYPE_VGAC 0x22 /* VGA+ in Color Mode */ #define VIDEO_TYPE_VLFB 0x23 /* VESA VGA in graphic mode */ #define VIDEO_TYPE_PICA_S3 0x30 /* ACER PICA-61 local S3 video */ #define VIDEO_TYPE_MIPS_G364 0x31 /* MIPS Magnum 4000 G364 video */ #define VIDEO_TYPE_SGI 0x33 /* Various SGI graphics hardware */ #define VIDEO_TYPE_TGAC 0x40 /* DEC TGA */ #define VIDEO_TYPE_SUN 0x50 /* Sun frame buffer. */ #define VIDEO_TYPE_SUNPCI 0x51 /* Sun PCI based frame buffer. */ #define VIDEO_TYPE_PMAC 0x60 /* PowerMacintosh frame buffer. */ #define VIDEO_TYPE_EFI 0x70 /* EFI graphic mode */ #define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ #endif /* _SCREEN_INFO_H */ #ifndef __LINUX_ARCFB_H__ #define __LINUX_ARCFB_H__ #define FBIO_WAITEVENT _IO('F', 0x88) #define FBIO_GETCONTROL2 _IOR('F', 0x89, size_t) #endif #ifndef _ATMMPC_H_ #define _ATMMPC_H_ #include #include #include #include #define ATMMPC_CTRL _IO('a', ATMIOC_MPOA) #define ATMMPC_DATA _IO('a', ATMIOC_MPOA+1) #define MPC_SOCKET_INGRESS 1 #define MPC_SOCKET_EGRESS 2 struct atmmpc_ioc { int dev_num; __be32 ipaddr; /* the IP address of the shortcut */ int type; /* ingress or egress */ }; typedef struct in_ctrl_info { __u8 Last_NHRP_CIE_code; __u8 Last_Q2931_cause_value; __u8 eg_MPC_ATM_addr[ATM_ESA_LEN]; __be32 tag; __be32 in_dst_ip; /* IP address this ingress MPC sends packets to */ __u16 holding_time; __u32 request_id; } in_ctrl_info; typedef struct eg_ctrl_info { __u8 DLL_header[256]; __u8 DH_length; __be32 cache_id; __be32 tag; __be32 mps_ip; __be32 eg_dst_ip; /* IP address to which ingress MPC sends packets */ __u8 in_MPC_data_ATM_addr[ATM_ESA_LEN]; __u16 holding_time; } eg_ctrl_info; struct mpc_parameters { __u16 mpc_p1; /* Shortcut-Setup Frame Count */ __u16 mpc_p2; /* Shortcut-Setup Frame Time */ __u8 mpc_p3[8]; /* Flow-detection Protocols */ __u16 mpc_p4; /* MPC Initial Retry Time */ __u16 mpc_p5; /* MPC Retry Time Maximum */ __u16 mpc_p6; /* Hold Down Time */ } ; struct k_message { __u16 type; __be32 ip_mask; __u8 MPS_ctrl[ATM_ESA_LEN]; union { in_ctrl_info in_info; eg_ctrl_info eg_info; struct mpc_parameters params; } content; struct atm_qos qos; } __ATM_API_ALIGN; struct llc_snap_hdr { /* RFC 1483 LLC/SNAP encapsulation for routed IP PDUs */ __u8 dsap; /* Destination Service Access Point (0xAA) */ __u8 ssap; /* Source Service Access Point (0xAA) */ __u8 ui; /* Unnumbered Information (0x03) */ __u8 org[3]; /* Organizational identification (0x000000) */ __u8 type[2]; /* Ether type (for IP) (0x0800) */ }; /* TLVs this MPC recognizes */ #define TLV_MPOA_DEVICE_TYPE 0x00a03e2a /* MPOA device types in MPOA Device Type TLV */ #define NON_MPOA 0 #define MPS 1 #define MPC 2 #define MPS_AND_MPC 3 /* MPC parameter defaults */ #define MPC_P1 10 /* Shortcut-Setup Frame Count */ #define MPC_P2 1 /* Shortcut-Setup Frame Time */ #define MPC_P3 0 /* Flow-detection Protocols */ #define MPC_P4 5 /* MPC Initial Retry Time */ #define MPC_P5 40 /* MPC Retry Time Maximum */ #define MPC_P6 160 /* Hold Down Time */ #define HOLDING_TIME_DEFAULT 1200 /* same as MPS-p7 */ /* MPC constants */ #define MPC_C1 2 /* Retry Time Multiplier */ #define MPC_C2 60 /* Initial Keep-Alive Lifetime */ /* Message types - to MPOA daemon */ #define SND_MPOA_RES_RQST 201 #define SET_MPS_CTRL_ADDR 202 #define SND_MPOA_RES_RTRY 203 /* Different type in a retry due to req id */ #define STOP_KEEP_ALIVE_SM 204 #define EGRESS_ENTRY_REMOVED 205 #define SND_EGRESS_PURGE 206 #define DIE 207 /* tell the daemon to exit() */ #define DATA_PLANE_PURGE 208 /* Data plane purge because of egress cache hit miss or dead MPS */ #define OPEN_INGRESS_SVC 209 /* Message types - from MPOA daemon */ #define MPOA_TRIGGER_RCVD 101 #define MPOA_RES_REPLY_RCVD 102 #define INGRESS_PURGE_RCVD 103 #define EGRESS_PURGE_RCVD 104 #define MPS_DEATH 105 #define CACHE_IMPOS_RCVD 106 #define SET_MPC_CTRL_ADDR 107 /* Our MPC's control ATM address */ #define SET_MPS_MAC_ADDR 108 #define CLEAN_UP_AND_EXIT 109 #define SET_MPC_PARAMS 110 /* MPC configuration parameters */ /* Message types - bidirectional */ #define RELOAD 301 /* kill -HUP the daemon for reload */ #endif /* _ATMMPC_H_ */ /* * include/linux/eventpoll.h ( Efficent event polling implementation ) * Copyright (C) 2001,...,2006 Davide Libenzi * * 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. * * Davide Libenzi * */ #ifndef _LINUX_EVENTPOLL_H #define _LINUX_EVENTPOLL_H /* For O_CLOEXEC */ #include #include /* Flags for epoll_create1. */ #define EPOLL_CLOEXEC O_CLOEXEC /* Valid opcodes to issue to sys_epoll_ctl() */ #define EPOLL_CTL_ADD 1 #define EPOLL_CTL_DEL 2 #define EPOLL_CTL_MOD 3 /* Set the One Shot behaviour for the target file descriptor */ #define EPOLLONESHOT (1 << 30) /* Set the Edge Triggered behaviour for the target file descriptor */ #define EPOLLET (1 << 31) /* * On x86-64 make the 64bit structure have the same alignment as the * 32bit structure. This makes 32bit emulation easier. * * UML/x86_64 needs the same packing as x86_64 */ #ifdef __x86_64__ #define EPOLL_PACKED __attribute__((packed)) #else #define EPOLL_PACKED #endif struct epoll_event { __u32 events; __u64 data; } EPOLL_PACKED; #endif /* #ifndef _LINUX_EVENTPOLL_H */ /* * linux/mii.h: definitions for MII-compatible transceivers * Originally drivers/net/sunhme.h. * * Copyright (C) 1996, 1999, 2001 David S. Miller (davem@redhat.com) */ #ifndef __LINUX_MII_H__ #define __LINUX_MII_H__ #include /* Generic MII registers. */ #define MII_BMCR 0x00 /* Basic mode control register */ #define MII_BMSR 0x01 /* Basic mode status register */ #define MII_PHYSID1 0x02 /* PHYS ID 1 */ #define MII_PHYSID2 0x03 /* PHYS ID 2 */ #define MII_ADVERTISE 0x04 /* Advertisement control reg */ #define MII_LPA 0x05 /* Link partner ability reg */ #define MII_EXPANSION 0x06 /* Expansion register */ #define MII_CTRL1000 0x09 /* 1000BASE-T control */ #define MII_STAT1000 0x0a /* 1000BASE-T status */ #define MII_ESTATUS 0x0f /* Extended Status */ #define MII_DCOUNTER 0x12 /* Disconnect counter */ #define MII_FCSCOUNTER 0x13 /* False carrier counter */ #define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ #define MII_RERRCOUNTER 0x15 /* Receive error counter */ #define MII_SREVISION 0x16 /* Silicon revision */ #define MII_RESV1 0x17 /* Reserved... */ #define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ #define MII_PHYADDR 0x19 /* PHY address */ #define MII_RESV2 0x1a /* Reserved... */ #define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ #define MII_NCONFIG 0x1c /* Network interface config */ /* Basic mode control register. */ #define BMCR_RESV 0x003f /* Unused... */ #define BMCR_SPEED1000 0x0040 /* MSB of Speed (1000) */ #define BMCR_CTST 0x0080 /* Collision test */ #define BMCR_FULLDPLX 0x0100 /* Full duplex */ #define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ #define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */ #define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */ #define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ #define BMCR_SPEED100 0x2000 /* Select 100Mbps */ #define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ #define BMCR_RESET 0x8000 /* Reset the DP83840 */ /* Basic mode status register. */ #define BMSR_ERCAP 0x0001 /* Ext-reg capability */ #define BMSR_JCD 0x0002 /* Jabber detected */ #define BMSR_LSTATUS 0x0004 /* Link status */ #define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ #define BMSR_RFAULT 0x0010 /* Remote fault detected */ #define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ #define BMSR_RESV 0x00c0 /* Unused... */ #define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */ #define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */ #define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */ #define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ #define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ #define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ #define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ #define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ /* Advertisement control register. */ #define ADVERTISE_SLCT 0x001f /* Selector bits */ #define ADVERTISE_CSMA 0x0001 /* Only selector supported */ #define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ #define ADVERTISE_1000XFULL 0x0020 /* Try for 1000BASE-X full-duplex */ #define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ #define ADVERTISE_1000XHALF 0x0040 /* Try for 1000BASE-X half-duplex */ #define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ #define ADVERTISE_1000XPAUSE 0x0080 /* Try for 1000BASE-X pause */ #define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ #define ADVERTISE_1000XPSE_ASYM 0x0100 /* Try for 1000BASE-X asym pause */ #define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ #define ADVERTISE_PAUSE_CAP 0x0400 /* Try for pause */ #define ADVERTISE_PAUSE_ASYM 0x0800 /* Try for asymetric pause */ #define ADVERTISE_RESV 0x1000 /* Unused... */ #define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ #define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ #define ADVERTISE_NPAGE 0x8000 /* Next page bit */ #define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \ ADVERTISE_CSMA) #define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \ ADVERTISE_100HALF | ADVERTISE_100FULL) /* Link partner ability register. */ #define LPA_SLCT 0x001f /* Same as advertise selector */ #define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ #define LPA_1000XFULL 0x0020 /* Can do 1000BASE-X full-duplex */ #define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ #define LPA_1000XHALF 0x0040 /* Can do 1000BASE-X half-duplex */ #define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ #define LPA_1000XPAUSE 0x0080 /* Can do 1000BASE-X pause */ #define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ #define LPA_1000XPAUSE_ASYM 0x0100 /* Can do 1000BASE-X pause asym*/ #define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ #define LPA_PAUSE_CAP 0x0400 /* Can pause */ #define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */ #define LPA_RESV 0x1000 /* Unused... */ #define LPA_RFAULT 0x2000 /* Link partner faulted */ #define LPA_LPACK 0x4000 /* Link partner acked us */ #define LPA_NPAGE 0x8000 /* Next page bit */ #define LPA_DUPLEX (LPA_10FULL | LPA_100FULL) #define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4) /* Expansion register for auto-negotiation. */ #define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */ #define EXPANSION_LCWP 0x0002 /* Got new RX page code word */ #define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */ #define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */ #define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */ #define EXPANSION_RESV 0xffe0 /* Unused... */ #define ESTATUS_1000_TFULL 0x2000 /* Can do 1000BT Full */ #define ESTATUS_1000_THALF 0x1000 /* Can do 1000BT Half */ /* N-way test register. */ #define NWAYTEST_RESV1 0x00ff /* Unused... */ #define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ #define NWAYTEST_RESV2 0xfe00 /* Unused... */ /* 1000BASE-T Control register */ #define ADVERTISE_1000FULL 0x0200 /* Advertise 1000BASE-T full duplex */ #define ADVERTISE_1000HALF 0x0100 /* Advertise 1000BASE-T half duplex */ /* 1000BASE-T Status register */ #define LPA_1000LOCALRXOK 0x2000 /* Link partner local receiver status */ #define LPA_1000REMRXOK 0x1000 /* Link partner remote receiver status */ #define LPA_1000FULL 0x0800 /* Link partner 1000BASE-T full duplex */ #define LPA_1000HALF 0x0400 /* Link partner 1000BASE-T half duplex */ /* Flow control flags */ #define FLOW_CTRL_TX 0x01 #define FLOW_CTRL_RX 0x02 /* This structure is used in all SIOCxMIIxxx ioctl calls */ struct mii_ioctl_data { __u16 phy_id; __u16 reg_num; __u16 val_in; __u16 val_out; }; #endif /* __LINUX_MII_H__ */