are permitted to the /dev/rtc interface, if * any of the RTC drivers are enabled. */ #define RTC_AIE_ON _IO('p', 0x01) /* Alarm int. enable on */ #define RTC_AIE_OFF _IO('p', 0x02) /* ... off */ #define RTC_UIE_ON _IO('p', 0x03) /* Update int. enable on */ #define RTC_UIE_OFF _IO('p', 0x04) /* ... off */ #define RTC_PIE_ON _IO('p', 0x05) /* Periodic int. enable on */ #define RTC_PIE_OFF _IO('p', 0x06) /* ... off */ #define RTC_WIE_ON _IO('p', 0x0f) /* Watchdog int. enable on */ #define RTC_WIE_OFF _IO('p', 0x10) /* ... off */ #define RTC_ALM_SET _IOW('p', 0x07, struct rtc_time) /* Set alarm time */ #define RTC_ALM_READ _IOR('p', 0x08, struct rtc_time) /* Read alarm time */ #define RTC_RD_TIME _IOR('p', 0x09, struct rtc_time) /* Read RTC time */ #define RTC_SET_TIME _IOW('p', 0x0a, struct rtc_time) /* Set RTC time */ #define RTC_IRQP_READ _IOR('p', 0x0b, unsigned long) /* Read IRQ rate */ #define RTC_IRQP_SET _IOW('p', 0x0c, unsigned long) /* Set IRQ rate */ #define RTC_EPOCH_READ _IOR('p', 0x0d, unsigned long) /* Read epoch */ #define RTC_EPOCH_SET _IOW('p', 0x0e, unsigned long) /* Set epoch */ #define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/ #define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/ #define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ #define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ /* interrupt flags */ #define RTC_IRQF 0x80 /* any of the following is active */ #define RTC_PF 0x40 #define RTC_AF 0x20 #define RTC_UF 0x10 #endif /* _LINUX_RTC_H_ */ /* * 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 for the Interfaces handler. * * Version: @(#)dev.h 1.0.10 08/12/93 * * Authors: Ross Biro * Fred N. van Kempen, * Corey Minyard * Donald J. Becker, * Alan Cox, * Bjorn Ekwall. * Pekka Riikonen * * 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. * * Moved to /usr/include/linux for NET3 */ #ifndef _LINUX_NETDEVICE_H #define _LINUX_NETDEVICE_H #include #include #include #include #define MAX_ADDR_LEN 32 /* Largest hardware address length */ /* Media selection options. */ enum { IF_PORT_UNKNOWN = 0, IF_PORT_10BASE2, IF_PORT_10BASET, IF_PORT_AUI, IF_PORT_100BASET, IF_PORT_100BASETX, IF_PORT_100BASEFX }; #endif /* _LINUX_NETDEVICE_H */ /****************************************************************************** * * atm_nicstar.h * * Driver-specific declarations for use by NICSTAR driver specific utils. * * Author: Rui Prior * * (C) INESC 1998 * ******************************************************************************/ #ifndef LINUX_ATM_NICSTAR_H #define LINUX_ATM_NICSTAR_H /* Note: non-kernel programs including this file must also include * sys/types.h for struct timeval */ #include #include #define NS_GETPSTAT _IOWR('a',ATMIOC_SARPRV+1,struct atmif_sioc) /* get pool statistics */ #define NS_SETBUFLEV _IOW('a',ATMIOC_SARPRV+2,struct atmif_sioc) /* set buffer level markers */ #define NS_ADJBUFLEV _IO('a',ATMIOC_SARPRV+3) /* adjust buffer level */ typedef struct buf_nr { unsigned min; unsigned init; unsigned max; }buf_nr; typedef struct pool_levels { int buftype; int count; /* (At least for now) only used in NS_GETPSTAT */ buf_nr level; } pool_levels; /* type must be one of the following: */ #define NS_BUFTYPE_SMALL 1 #define NS_BUFTYPE_LARGE 2 #define NS_BUFTYPE_HUGE 3 #define NS_BUFTYPE_IOVEC 4 #endif /* LINUX_ATM_NICSTAR_H */ £+ .ñ* ..¤+ ..install.cmd¥+.install¦+À capicmd.hcmd_/usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux/include/linux/isdn/.install := perl scripts/headers_install.pl /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux-2.6.37.2/include/linux/isdn /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux/include/linux/isdn x86 capicmd.h; perl scripts/headers_install.pl /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux-2.6.37.2/include/linux/isdn /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux/include/linux/isdn x86 ; touch /usr/local/home/bellard/cpux86/rootdisk/buildroot-2011.02/output/toolchain/linux/include/linux/isdn/.install /* $Id: capicmd.h,v 1.2.6.2 2001/09/23 22:24:33 kai Exp $ * * CAPI 2.0 Interface for Linux * * Copyright 1997 by Carsten Paeth * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * */ #ifndef __CAPICMD_H__ #define __CAPICMD_H__ #define CAPI_MSG_BASELEN 8 #define CAPI_DATA_B3_REQ_LEN (CAPI_MSG_BASELEN+4+4+2+2+2) #define CAPI_DATA_B3_RESP_LEN (CAPI_MSG_BASELEN+4+2) /*----- CAPI commands -----*/ #define CAPI_ALERT 0x01 #define CAPI_CONNECT 0x02 #define CAPI_CONNECT_ACTIVE 0x03 #define CAPI_CONNECT_B3_ACTIVE 0x83 #define CAPI_CONNECT_B3 0x82 #define CAPI_CONNECT_B3_T90_ACTIVE 0x88 #define CAPI_DATA_B3 0x86 #define CAPI_DISCONNECT_B3 0x84 #define CAPI_DISCONNECT 0x04 #define CAPI_FACILITY 0x80 #define CAPI_INFO 0x08 #define CAPI_LISTEN 0x05 #define CAPI_MANUFACTURER 0xff #define CAPI_RESET_B3 0x87 #define CAPI_SELECT_B_PROTOCOL 0x41 /*----- CAPI subcommands -----*/ #define CAPI_REQ 0x80 #define CAPI_CONF 0x81 #define CAPI_IND 0x82 #define CAPI_RESP 0x83 /*----- CAPI combined commands -----*/ #define CAPICMD(cmd,subcmd) (((cmd)<<8)|(subcmd)) #define CAPI_DISCONNECT_REQ CAPICMD(CAPI_DISCONNECT,CAPI_REQ) #define CAPI_DISCONNECT_CONF CAPICMD(CAPI_DISCONNECT,CAPI_CONF) #define CAPI_DISCONNECT_IND CAPICMD(CAPI_DISCONNECT,CAPI_IND) #define CAPI_DISCONNECT_RESP CAPICMD(CAPI_DISCONNECT,CAPI_RESP) #define CAPI_ALERT_REQ CAPICMD(CAPI_ALERT,CAPI_REQ) #define CAPI_ALERT_CONF CAPICMD(CAPI_ALERT,CAPI_CONF) #define CAPI_CONNECT_REQ CAPICMD(CAPI_CONNECT,CAPI_REQ) #define CAPI_CONNECT_CONF CAPICMD(CAPI_CONNECT,CAPI_CONF) #define CAPI_CONNECT_IND CAPICMD(CAPI_CONNECT,CAPI_IND) #define CAPI_CONNECT_RESP CAPICMD(CAPI_CONNECT,CAPI_RESP) #define CAPI_CONNECT_ACTIVE_REQ CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_REQ) #define CAPI_CONNECT_ACTIVE_CONF CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_CONF) #define CAPI_CONNECT_ACTIVE_IND CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_IND) #define CAPI_CONNECT_ACTIVE_RESP CAPICMD(CAPI_CONNECT_ACTIVE,CAPI_RESP) #define CAPI_SELECT_B_PROTOCOL_REQ CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_REQ) #define CAPI_SELECT_B_PROTOCOL_CONF CAPICMD(CAPI_SELECT_B_PROTOCOL,CAPI_CONF) #define CAPI_CONNECT_B3_ACTIVE_REQ CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_REQ) #define CAPI_CONNECT_B3_ACTIVE_CONF CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_CONF) #define CAPI_CONNECT_B3_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_IND) #define CAPI_CONNECT_B3_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_ACTIVE,CAPI_RESP) #define CAPI_CONNECT_B3_REQ CAPICMD(CAPI_CONNECT_B3,CAPI_REQ) #define CAPI_CONNECT_B3_CONF CAPICMD(CAPI_CONNECT_B3,CAPI_CONF) #define CAPI_CONNECT_B3_IND CAPICMD(CAPI_CONNECT_B3,CAPI_IND) #define CAPI_CONNECT_B3_RESP CAPICMD(CAPI_CONNECT_B3,CAPI_RESP) #define CAPI_CONNECT_B3_T90_ACTIVE_IND CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_IND) #define CAPI_CONNECT_B3_T90_ACTIVE_RESP CAPICMD(CAPI_CONNECT_B3_T90_ACTIVE,CAPI_RESP) #define CAPI_DATA_B3_REQ CAPICMD(CAPI_DATA_B3,CAPI_REQ) #define CAPI_DATA_B3_CONF CAPICMD(CAPI_DATA_B3,CAPI_CONF) #define CAPI_DATA_B3_IND CAPICMD(CAPI_DATA_B3,CAPI_IND) #define CAPI_DATA_B3_RESP CAPICMD(CAPI_DATA_B3,CAPI_RESP) #define CAPI_DISCONNECT_B3_REQ CAPICMD(CAPI_DISCONNECT_B3,CAPI_REQ) #define CAPI_DISCONNECT_B3_CONF CAPICMD(CAPI_DISCONNECT_B3,CAPI_CONF) #define CAPI_DISCONNECT_B3_IND CAPICMD(CAPI_DISCONNECT_B3,CAPI_IND) #define CAPI_DISCONNECT_B3_RESP CAPICMD(CAPI_DISCONNECT_B3,CAPI_RESP) #define CAPI_RESET_B3_REQ CAPICMD(CAPI_RESET_B3,CAPI_REQ) #define CAPI_RESET_B3_CONF CAPICMD(CAPI_RESET_B3,CAPI_CONF) #define CAPI_RESET_B3_IND CAPICMD(CAPI_RESET_B3,CAPI_IND) #define CAPI_RESET_B3_RESP CAPICMD(CAPI_RESET_B3,CAPI_RESP) #define CAPI_LISTEN_REQ CAPICMD(CAPI_LISTEN,CAPI_REQ) #define CAPI_LISTEN_CONF CAPICMD(CAPI_LISTEN,CAPI_CONF) #define CAPI_MANUFACTURER_REQ CAPICMD(CAPI_MANUFACTURER,CAPI_REQ) #define CAPI_MANUFACTURER_CONF CAPICMD(CAPI_MANUFACTURER,CAPI_CONF) #define CAPI_MANUFACTURER_IND CAPICMD(CAPI_MANUFACTURER,CAPI_IND) #define CAPI_MANUFACTURER_RESP CAPICMD(CAPI_MANUFACTURER,CAPI_RESP) #define CAPI_FACILITY_REQ CAPICMD(CAPI_FACILITY,CAPI_REQ) #define CAPI_FACILITY_CONF CAPICMD(CAPI_FACILITY,CAPI_CONF) #define CAPI_FACILITY_IND CAPICMD(CAPI_FACILITY,CAPI_IND) #define CAPI_FACILITY_RESP CAPICMD(CAPI_FACILITY,CAPI_RESP) #define CAPI_INFO_REQ CAPICMD(CAPI_INFO,CAPI_REQ) #define CAPI_INFO_CONF CAPICMD(CAPI_INFO,CAPI_CONF) #define CAPI_INFO_IND CAPICMD(CAPI_INFO,CAPI_IND) #define CAPI_INFO_RESP CAPICMD(CAPI_INFO,CAPI_RESP) #endif /* __CAPICMD_H__ */ /* * Swansea University Computer Society NET3 * * This file declares the constants of special use with the SLIP/CSLIP/ * KISS TNC driver. */ #ifndef __LINUX_SLIP_H #define __LINUX_SLIP_H #define SL_MODE_SLIP 0 #define SL_MODE_CSLIP 1 #define SL_MODE_KISS 4 #define SL_OPT_SIXBIT 2 #define SL_OPT_ADAPTIVE 8 /* * VSV = ioctl for keepalive & outfill in SLIP driver */ #define SIOCSKEEPALIVE (SIOCDEVPRIVATE) /* Set keepalive timeout in sec */ #define SIOCGKEEPALIVE (SIOCDEVPRIVATE+1) /* Get keepalive timeout */ #define SIOCSOUTFILL (SIOCDEVPRIVATE+2) /* Set outfill timeout */ #define SIOCGOUTFILL (SIOCDEVPRIVATE+3) /* Get outfill timeout */ #define SIOCSLEASE (SIOCDEVPRIVATE+4) /* Set "leased" line type */ #define SIOCGLEASE (SIOCDEVPRIVATE+5) /* Get line type */ #endif #ifndef _LINUX_DCCP_H #define _LINUX_DCCP_H #include #include /** * struct dccp_hdr - generic part of DCCP packet header * * @dccph_sport - Relevant port on the endpoint that sent this packet * @dccph_dport - Relevant port on the other endpoint * @dccph_doff - Data Offset from the start of the DCCP header, in 32-bit words * @dccph_ccval - Used by the HC-Sender CCID * @dccph_cscov - Parts of the packet that are covered by the Checksum field * @dccph_checksum - Internet checksum, depends on dccph_cscov * @dccph_x - 0 = 24 bit sequence number, 1 = 48 * @dccph_type - packet type, see DCCP_PKT_ prefixed macros * @dccph_seq - sequence number high or low order 24 bits, depends on dccph_x */ struct dccp_hdr { __be16 dccph_sport, dccph_dport; __u8 dccph_doff; #if defined(__LITTLE_ENDIAN_BITFIELD) __u8 dccph_cscov:4, dccph_ccval:4; #elif defined(__BIG_ENDIAN_BITFIELD) __u8 dccph_ccval:4, dccph_cscov:4; #else #error "Adjust your defines" #endif __sum16 dccph_checksum; #if defined(__LITTLE_ENDIAN_BITFIELD) __u8 dccph_x:1, dccph_type:4, dccph_reserved:3; #elif defined(__BIG_ENDIAN_BITFIELD) __u8 dccph_reserved:3, dccph_type:4, dccph_x:1; #else #error "Adjust your defines" #endif __u8 dccph_seq2; __be16 dccph_seq; }; /** * struct dccp_hdr_ext - the low bits of a 48 bit seq packet * * @dccph_seq_low - low 24 bits of a 48 bit seq packet */ struct dccp_hdr_ext { __be32 dccph_seq_low; }; /** * struct dccp_hdr_request - Connection initiation request header * * @dccph_req_service - Service to which the client app wants to connect */ struct dccp_hdr_request { __be32 dccph_req_service; }; /** * struct dccp_hdr_ack_bits - acknowledgment bits common to most packets * * @dccph_resp_ack_nr_high - 48 bit ack number high order bits, contains GSR * @dccph_resp_ack_nr_low - 48 bit ack number low order bits, contains GSR */ struct dccp_hdr_ack_bits { __be16 dccph_reserved1; __be16 dccph_ack_nr_high; __be32 dccph_ack_nr_low; }; /** * struct dccp_hdr_response - Connection initiation response header * * @dccph_resp_ack - 48 bit Acknowledgment Number Subheader (5.3) * @dccph_resp_service - Echoes the Service Code on a received DCCP-Request */ struct dccp_hdr_response { struct dccp_hdr_ack_bits dccph_resp_ack; __be32 dccph_resp_service; }; /** * struct dccp_hdr_reset - Unconditionally shut down a connection * * @dccph_reset_ack - 48 bit Acknowledgment Number Subheader (5.6) * @dccph_reset_code - one of %dccp_reset_codes * @dccph_reset_data - the Data 1 ... Data 3 fields from 5.6 */ struct dccp_hdr_reset { struct dccp_hdr_ack_bits dccph_reset_ack; __u8 dccph_reset_code, dccph_reset_data[3]; }; enum dccp_pkt_type { DCCP_PKT_REQUEST = 0, DCCP_PKT_RESPONSE, DCCP_PKT_DATA, DCCP_PKT_ACK, DCCP_PKT_DATAACK, DCCP_PKT_CLOSEREQ, DCCP_PKT_CLOSE, DCCP_PKT_RESET, DCCP_PKT_SYNC, DCCP_PKT_SYNCACK, DCCP_PKT_INVALID, }; #define DCCP_NR_PKT_TYPES DCCP_PKT_INVALID static __inline__ unsigned int dccp_packet_hdr_len(const __u8 type) { if (type == DCCP_PKT_DATA) return 0; if (type == DCCP_PKT_DATAACK || type == DCCP_PKT_ACK || type == DCCP_PKT_SYNC || type == DCCP_PKT_SYNCACK || type == DCCP_PKT_CLOSE || type == DCCP_PKT_CLOSEREQ) return sizeof(struct dccp_hdr_ack_bits); if (type == DCCP_PKT_REQUEST) return sizeof(struct dccp_hdr_request); if (type == DCCP_PKT_RESPONSE) return sizeof(struct dccp_hdr_response); return sizeof(struct dccp_hdr_reset); } enum dccp_reset_codes { DCCP_RESET_CODE_UNSPECIFIED = 0, DCCP_RESET_CODE_CLOSED, DCCP_RESET_CODE_ABORTED, DCCP_RESET_CODE_NO_CONNECTION, DCCP_RESET_CODE_PACKET_ERROR, DCCP_RESET_CODE_OPTION_ERROR, DCCP_RESET_CODE_MANDATORY_ERROR, DCCP_RESET_CODE_CONNECTION_REFUSED, DCCP_RESET_CODE_BAD_SERVICE_CODE, DCCP_RESET_CODE_TOO_BUSY, DCCP_RESET_CODE_BAD_INIT_COOKIE, DCCP_RESET_CODE_AGGRESSION_PENALTY, DCCP_MAX_RESET_CODES /* Leave at the end! */ }; /* DCCP options */ enum { DCCPO_PADDING = 0, DCCPO_MANDATORY = 1, DCCPO_MIN_RESERVED = 3, DCCPO_MAX_RESERVED = 31, DCCPO_CHANGE_L = 32, DCCPO_CONFIRM_L = 33, DCCPO_CHANGE_R = 34, DCCPO_CONFIRM_R = 35, DCCPO_NDP_COUNT = 37, DCCPO_ACK_VECTOR_0 = 38, DCCPO_ACK_VECTOR_1 = 39, DCCPO_TIMESTAMP = 41, DCCPO_TIMESTAMP_ECHO = 42, DCCPO_ELAPSED_TIME = 43, DCCPO_MAX = 45, DCCPO_MIN_RX_CCID_SPECIFIC = 128, /* from sender to receiver */ DCCPO_MAX_RX_CCID_SPECIFIC = 191, DCCPO_MIN_TX_CCID_SPECIFIC = 192, /* from receiver to sender */ DCCPO_MAX_TX_CCID_SPECIFIC = 255, }; /* maximum size of a single TLV-encoded DCCP option (sans type/len bytes) */ #define DCCP_SINGLE_OPT_MAXLEN 253 /* DCCP CCIDS */ enum { DCCPC_CCID2 = 2, DCCPC_CCID3 = 3, }; /* DCCP features (RFC 4340 section 6.4) */ enum dccp_feature_numbers { DCCPF_RESERVED = 0, DCCPF_CCID = 1, DCCPF_SHORT_SEQNOS = 2, DCCPF_SEQUENCE_WINDOW = 3, DCCPF_ECN_INCAPABLE = 4, DCCPF_ACK_RATIO = 5, DCCPF_SEND_ACK_VECTOR = 6, DCCPF_SEND_NDP_COUNT = 7, DCCPF_MIN_CSUM_COVER = 8, DCCPF_DATA_CHECKSUM = 9, /* 10-127 reserved */ DCCPF_MIN_CCID_SPECIFIC = 128, DCCPF_SEND_LEV_RATE = 192, /* RFC 4342, sec. 8.4 */ DCCPF_MAX_CCID_SPECIFIC = 255, }; /* DCCP socket options */ #define DCCP_SOCKOPT_PACKET_SIZE 1 /* XXX deprecated, without effect */ #define DCCP_SOCKOPT_SERVICE 2 #define DCCP_SOCKOPT_CHANGE_L 3 #define DCCP_SOCKOPT_CHANGE_R 4 #define DCCP_SOCKOPT_GET_CUR_MPS 5 #define DCCP_SOCKOPT_SERVER_TIMEWAIT 6 #define DCCP_SOCKOPT_SEND_CSCOV 10 #define DCCP_SOCKOPT_RECV_CSCOV 11 #define DCCP_SOCKOPT_AVAILABLE_CCIDS 12 #define DCCP_SOCKOPT_CCID 13 #define DCCP_SOCKOPT_TX_CCID 14 #define DCCP_SOCKOPT_RX_CCID 15 #define DCCP_SOCKOPT_CCID_RX_INFO 128 #define DCCP_SOCKOPT_CCID_TX_INFO 192 /* maximum number of services provided on the same listening port */ #define DCCP_SERVICE_LIST_MAX_LEN 32 #endif /* _LINUX_DCCP_H */ #ifndef _LINUX_RESOURCE_H #define _LINUX_RESOURCE_H #include #include /* * Resource control/accounting header file for linux */ /* * Definition of struct rusage taken from BSD 4.3 Reno * * We don't support all of these yet, but we might as well have them.... * Otherwise, each time we add new items, programs which depend on this * structure will lose. This reduces the chances of that happening. */ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) #define RUSAGE_BOTH (-2) /* sys_wait4() uses this */ #define RUSAGE_THREAD 1 /* only the calling thread */ struct rusage { struct timeval ru_utime; /* user time used */ struct timeval ru_stime; /* system time used */ long ru_maxrss; /* maximum resident set size */ long ru_ixrss; /* integral shared memory size */ long ru_idrss; /* integral unshared data size */ long ru_isrss; /* integral unshared stack size */ long ru_minflt; /* page reclaims */ long ru_majflt; /* page faults */ long ru_nswap; /* swaps */ long ru_inblock; /* block input operations */ long ru_oublock; /* block output operations */ long ru_msgsnd; /* messages sent */ long ru_msgrcv; /* messages received */ long ru_nsignals; /* signals received */ long ru_nvcsw; /* voluntary context switches */ long ru_nivcsw; /* involuntary " */ }; struct rlimit { unsigned long rlim_cur; unsigned long rlim_max; }; #define RLIM64_INFINITY (~0ULL) struct rlimit64 { __u64 rlim_cur; __u64 rlim_max; }; #define PRIO_MIN (-20) #define PRIO_MAX 20 #define PRIO_PROCESS 0 #define PRIO_PGRP 1 #define PRIO_USER 2 /* * Limit the stack by to some sane default: root can always * increase this limit if needed.. 8MB seems reasonable. */ #define _STK_LIM (8*1024*1024) /* * GPG2 wants 64kB of mlocked memory, to make sure pass phrases * and other sensitive information are never written to disk. */ #define MLOCK_LIMIT ((PAGE_SIZE > 64*1024) ? PAGE_SIZE : 64*1024) /* * Due to binary compatibility, the actual resource numbers * may be different for different linux versions.. */ #include #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. * * Global definitions for the HIPPI interface. * * Version: @(#)if_hippi.h 1.0.0 05/26/97 * * Author: Fred N. van Kempen, * Donald Becker, * Alan Cox, * Steve Whitehouse, * Jes Sorensen, * * 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_IF_HIPPI_H #define _LINUX_IF_HIPPI_H #include #include /* * HIPPI magic constants. */ #define HIPPI_ALEN 6 /* Bytes in one HIPPI hw-addr */ #define HIPPI_HLEN sizeof(struct hippi_hdr) #define HIPPI_ZLEN 0 /* Min. bytes in frame without FCS */ #define HIPPI_DATA_LEN 65280 /* Max. bytes in payload */ #define HIPPI_FRAME_LEN (HIPPI_DATA_LEN + HIPPI_HLEN) /* Max. bytes in frame without FCS */ /* * Define LLC and SNAP constants. */ #define HIPPI_EXTENDED_SAP 0xAA #define HIPPI_UI_CMD 0x03 /* * Do we need to list some sort of ID's here? */ /* * HIPPI statistics collection data. */ struct hipnet_statistics { int rx_packets; /* total packets received */ int tx_packets; /* total packets transmitted */ int rx_errors; /* bad packets received */ int tx_errors; /* packet transmit problems */ int rx_dropped; /* no space in linux buffers */ int tx_dropped; /* no space available in linux */ /* detailed rx_errors: */ int rx_length_errors; int rx_over_errors; /* receiver ring buff overflow */ int rx_crc_errors; /* recved pkt with crc error */ int rx_frame_errors; /* recv'd frame alignment error */ int rx_fifo_errors; /* recv'r fifo overrun */ int rx_missed_errors; /* receiver missed packet */ /* detailed tx_errors */ int tx_aborted_errors; int tx_carrier_errors; int tx_fifo_errors; int tx_heartbeat_errors; int tx_window_errors; }; struct hippi_fp_hdr { #if 0 __u8 ulp; /* must contain 4 */ #if defined (__BIG_ENDIAN_BITFIELD) __u8 d1_data_present:1; /* must be 1 */ __u8 start_d2_burst_boundary:1; /* must be zero */ __u8 reserved:6; /* must be zero */ #if 0 __u16 reserved1:5; __u16 d1_area_size:8; /* must be 3 */ __u16 d2_offset:3; /* must be zero */ #endif #elif defined(__LITTLE_ENDIAN_BITFIELD) __u8 reserved:6; /* must be zero */ __u8 start_d2_burst_boundary:1; /* must be zero */ __u8 d1_data_present:1; /* must be 1 */ #if 0 __u16 d2_offset:3; /* must be zero */ __u16 d1_area_size:8; /* must be 3 */ __u16 reserved1:5; /* must be zero */ #endif #else #error "Please fix " #endif #else __be32 fixed; #endif __be32 d2_size; } __attribute__((packed)); struct hippi_le_hdr { #if defined (__BIG_ENDIAN_BITFIELD) __u8 fc:3; __u8 double_wide:1; __u8 message_type:4; #elif defined(__LITTLE_ENDIAN_BITFIELD) __u8 message_type:4; __u8 double_wide:1; __u8 fc:3; #endif __u8 dest_switch_addr[3]; #if defined (__BIG_ENDIAN_BITFIELD) __u8 dest_addr_type:4, src_addr_type:4; #elif defined(__LITTLE_ENDIAN_BITFIELD) __u8 src_addr_type:4, dest_addr_type:4; #endif __u8 src_switch_addr[3]; __u16 reserved; __u8 daddr[HIPPI_ALEN]; __u16 locally_administered; __u8 saddr[HIPPI_ALEN]; } __attribute__((packed)); #define HIPPI_OUI_LEN 3 /* * Looks like the dsap and ssap fields have been swapped by mistake in * RFC 2067 "IP over HIPPI". */ struct hippi_snap_hdr { __u8 dsap; /* always 0xAA */ __u8 ssap; /* always 0xAA */ __u8 ctrl; /* always 0x03 */ __u8 oui[HIPPI_OUI_LEN]; /* organizational universal id (zero)*/ __be16 ethertype; /* packet type ID field */ } __attribute__((packed)); struct hippi_hdr { struct hippi_fp_hdr fp; struct hippi_le_hdr le; struct hippi_snap_hdr snap; } __attribute__((packed)); #endif /* _LINUX_IF_HIPPI_H */ /* * Linux INET6 implementation * * Authors: * Pedro Roque * * 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_IPV6_ROUTE_H #define _LINUX_IPV6_ROUTE_H #include #define RTF_DEFAULT 0x00010000 /* default - learned via ND */ #define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) fallback, no routers on link */ #define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ #define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ #define RTF_ANYCAST 0x00100000 /* Anycast */ #define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ #define RTF_EXPIRES 0x00400000 #define RTF_ROUTEINFO 0x00800000 /* route information - RA */ #define RTF_CACHE 0x01000000 /* cache entry */ #define RTF_FLOW 0x02000000 /* flow significant route */ #define RTF_POLICY 0x04000000 /* policy route */ #define RTF_PREF(pref) ((pref) << 27) #define RTF_PREF_MASK 0x18000000 #define RTF_LOCAL 0x80000000 struct in6_rtmsg { struct in6_addr rtmsg_dst; struct in6_addr rtmsg_src; struct in6_addr rtmsg_gateway; __u32 rtmsg_type; __u16 rtmsg_dst_len; __u16 rtmsg_src_len; __u32 rtmsg_metric; unsigned long rtmsg_info; __u32 rtmsg_flags; int rtmsg_ifindex; }; #define RTMSG_NEWDEVICE 0x11 #define RTMSG_DELDEVICE 0x12 #define RTMSG_NEWROUTE 0x21 #define RTMSG_DELROUTE 0x22 #endif #ifndef _LINUX_SOCKET_H #define _LINUX_SOCKET_H /* * Desired design of maximum size and alignment (see RFC2553) */ #define _K_SS_MAXSIZE 128 /* Implementation specific max size */ #define _K_SS_ALIGNSIZE (__alignof__ (struct sockaddr *)) /* Implementation specific desired alignment */ struct __kernel_sockaddr_storage { unsigned short ss_family; /* address family */ /* Following field(s) are implementation specific */ char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; /* space to achieve desired size, */ /* _SS_MAXSIZE value minus size of ss_family */ } __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ #endif /* _LINUX_SOCKET_H */ /* * Copyright (C) 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 _DLM_NETLINK_H #define _DLM_NETLINK_H #include enum { DLM_STATUS_WAITING = 1, DLM_STATUS_GRANTED = 2, DLM_STATUS_CONVERT = 3, }; #define DLM_LOCK_DATA_VERSION 1 struct dlm_lock_data { __u16 version; __u32 lockspace_id; int nodeid; int ownpid; __u32 id; __u32 remid; __u64 xid; __s8 status; __s8 grmode; __s8 rqmode; unsigned long timestamp; int resource_namelen; char resource_name[DLM_RESNAME_MAXLEN]; }; enum { DLM_CMD_UNSPEC = 0, DLM_CMD_HELLO, /* user->kernel */ DLM_CMD_TIMEOUT, /* kernel->user */ __DLM_CMD_MAX, }; #define DLM_CMD_MAX (__DLM_CMD_MAX - 1) enum { DLM_TYPE_UNSPEC = 0, DLM_TYPE_LOCK, __DLM_TYPE_MAX, }; #define DLM_TYPE_MAX (__DLM_TYPE_MAX - 1) #define DLM_GENL_VERSION 0x1 #define DLM_GENL_NAME "DLM" #endif /* _DLM_NETLINK_H */ #ifndef _ULTRASOUND_H_ #define _ULTRASOUND_H_ /* * ultrasound.h - Macros for programming the Gravis Ultrasound * These macros are extremely device dependent * and not portable. */ /* * Copyright (C) by Hannu Savolainen 1993-1997 * * OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL) * Version 2 (June 1991). See the "COPYING" file distributed with this software * for more info. */ /* * Private events for Gravis Ultrasound (GUS) * * Format: * byte 0 - SEQ_PRIVATE (0xfe) * byte 1 - Synthesizer device number (0-N) * byte 2 - Command (see below) * byte 3 - Voice number (0-31) * bytes 4 and 5 - parameter P1 (unsigned short) * bytes 6 and 7 - parameter P2 (unsigned short) * * Commands: * Each command affects one voice defined in byte 3. * Unused parameters (P1 and/or P2 *MUST* be initialized to zero). * _GUS_NUMVOICES - Sets max. number of concurrent voices (P1=14-31, default 16) * _GUS_VOICESAMPLE- ************ OBSOLETE ************* * _GUS_VOICEON - Starts voice (P1=voice mode) * _GUS_VOICEOFF - Stops voice (no parameters) * _GUS_VOICEFADE - Stops the voice smoothly. * _GUS_VOICEMODE - Alters the voice mode, don't start or stop voice (P1=voice mode) * _GUS_VOICEBALA - Sets voice balance (P1, 0=left, 7=middle and 15=right, default 7) * _GUS_VOICEFREQ - Sets voice (sample) playback frequency (P1=Hz) * _GUS_VOICEVOL - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off) * _GUS_VOICEVOL2 - Sets voice volume (P1=volume, 0xfff=max, 0xeff=half, 0x000=off) * (Like GUS_VOICEVOL but doesn't change the hw * volume. It just updates volume in the voice table). * * _GUS_RAMPRANGE - Sets limits for volume ramping (P1=low volume, P2=high volume) * _GUS_RAMPRATE - Sets the speed for volume ramping (P1=scale, P2=rate) * _GUS_RAMPMODE - Sets the volume ramping mode (P1=ramping mode) * _GUS_RAMPON - Starts volume ramping (no parameters) * _GUS_RAMPOFF - Stops volume ramping (no parameters) * _GUS_VOLUME_SCALE - Changes the volume calculation constants * for all voices. */ #define _GUS_NUMVOICES 0x00 #define _GUS_VOICESAMPLE 0x01 /* OBSOLETE */ #define _GUS_VOICEON 0x02 #define _GUS_VOICEOFF 0x03 #define _GUS_VOICEMODE 0x04 #define _GUS_VOICEBALA 0x05 #define _GUS_VOICEFREQ 0x06 #define _GUS_VOICEVOL 0x07 #define _GUS_RAMPRANGE 0x08 #define _GUS_RAMPRATE 0x09 #define _GUS_RAMPMODE 0x0a #define _GUS_RAMPON 0x0b #define _GUS_RAMPOFF 0x0c #define _GUS_VOICEFADE 0x0d #define _GUS_VOLUME_SCALE 0x0e #define _GUS_VOICEVOL2 0x0f #define _GUS_VOICE_POS 0x10 /* * GUS API macros */ #define _GUS_CMD(chn, voice, cmd, p1, p2) \ {_SEQ_NEEDBUF(8); _seqbuf[_seqbufptr] = SEQ_PRIVATE;\ _seqbuf[_seqbufptr+1] = (chn); _seqbuf[_seqbufptr+2] = cmd;\ _seqbuf[_seqbufptr+3] = voice;\ *(unsigned short*)&_seqbuf[_seqbufptr+4] = p1;\ *(unsigned short*)&_seqbuf[_seqbufptr+6] = p2;\ _SEQ_ADVBUF(8);} #define GUS_NUMVOICES(chn, p1) _GUS_CMD(chn, 0, _GUS_NUMVOICES, (p1), 0) #define GUS_VOICESAMPLE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICESAMPLE, (p1), 0) /* OBSOLETE */ #define GUS_VOICEON(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEON, (p1), 0) #define GUS_VOICEOFF(chn, voice) _GUS_CMD(chn, voice, _GUS_VOICEOFF, 0, 0) #define GUS_VOICEFADE(chn, voice) _GUS_CMD(chn, voice, _GUS_VOICEFADE, 0, 0) #define GUS_VOICEMODE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEMODE, (p1), 0) #define GUS_VOICEBALA(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEBALA, (p1), 0) #define GUS_VOICEFREQ(chn, voice, p) _GUS_CMD(chn, voice, _GUS_VOICEFREQ, \ (p) & 0xffff, ((p) >> 16) & 0xffff) #define GUS_VOICEVOL(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEVOL, (p1), 0) #define GUS_VOICEVOL2(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_VOICEVOL2, (p1), 0) #define GUS_RAMPRANGE(chn, voice, low, high) _GUS_CMD(chn, voice, _GUS_RAMPRANGE, (low), (high)) #define GUS_RAMPRATE(chn, voice, p1, p2) _GUS_CMD(chn, voice, _GUS_RAMPRATE, (p1), (p2)) #define GUS_RAMPMODE(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_RAMPMODE, (p1), 0) #define GUS_RAMPON(chn, voice, p1) _GUS_CMD(chn, voice, _GUS_RAMPON, (p1), 0) #define GUS_RAMPOFF(chn, voice) _GUS_CMD(chn, voice, _GUS_RAMPOFF, 0, 0) #define GUS_VOLUME_SCALE(chn, voice, p1, p2) _GUS_CMD(chn, voice, _GUS_VOLUME_SCALE, (p1), (p2)) #define GUS_VOICE_POS(chn, voice, p) _GUS_CMD(chn, voice, _GUS_VOICE_POS, \ (p) & 0xffff, ((p) >> 16) & 0xffff) #endif #ifndef _LINUX_SWAB_H #define _LINUX_SWAB_H #include #include /* * casts are necessary for constants, because we never know how for sure * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. */ #define ___constant_swab16(x) ((__u16)( \ (((__u16)(x) & (__u16)0x00ffU) << 8) | \ (((__u16)(x) & (__u16)0xff00U) >> 8))) #define ___constant_swab32(x) ((__u32)( \ (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ (((__u32)(x) & (__u32)0xff000000UL) >> 24))) #define ___constant_swab64(x) ((__u64)( \ (((__u64)(x) & (__u64)0x00000000000000ffULL) << 56) | \ (((__u64)(x) & (__u64)0x000000000000ff00ULL) << 40) | \ (((__u64)(x) & (__u64)0x0000000000ff0000ULL) << 24) | \ (((__u64)(x) & (__u64)0x00000000ff000000ULL) << 8) | \ (((__u64)(x) & (__u64)0x000000ff00000000ULL) >> 8) | \ (((__u64)(x) & (__u64)0x0000ff0000000000ULL) >> 24) | \ (((__u64)(x) & (__u64)0x00ff000000000000ULL) >> 40) | \ (((__u64)(x) & (__u64)0xff00000000000000ULL) >> 56))) #define ___constant_swahw32(x) ((__u32)( \ (((__u32)(x) & (__u32)0x0000ffffUL) << 16) | \ (((__u32)(x) & (__u32)0xffff0000UL) >> 16))) #define ___constant_swahb32(x) ((__u32)( \ (((__u32)(x) & (__u32)0x00ff00ffUL) << 8) | \ (((__u32)(x) & (__u32)0xff00ff00UL) >> 8))) /* * Implement the following as inlines, but define the interface using * macros to allow constant folding when possible: * ___swab16, ___swab32, ___swab64, ___swahw32, ___swahb32 */ static __inline__ __u16 __fswab16(__u16 val) { #ifdef __arch_swab16 return __arch_swab16(val); #else return ___constant_swab16(val); #endif } static __inline__ __u32 __fswab32(__u32 val) { #ifdef __arch_swab32 return __arch_swab32(val); #else return ___constant_swab32(val); #endif } static __inline__ __u64 __fswab64(__u64 val) { #ifdef __arch_swab64 return __arch_swab64(val); #elif defined(__SWAB_64_THRU_32__) __u32 h = val >> 32; __u32 l = val & ((1ULL << 32) - 1); return (((__u64)__fswab32(l)) << 32) | ((__u64)(__fswab32(h))); #else return ___constant_swab64(val); #endif } static __inline__ __u32 __fswahw32(__u32 val) { #ifdef __arch_swahw32 return __arch_swahw32(val); #else return ___constant_swahw32(val); #endif } static __inline__ __u32 __fswahb32(__u32 val) { #ifdef __arch_swahb32 return __arch_swahb32(val); #else return ___constant_swahb32(val); #endif } /** * __swab16 - return a byteswapped 16-bit value * @x: value to byteswap */ #define __swab16(x) \ (__builtin_constant_p((__u16)(x)) ? \ ___constant_swab16(x) : \ __fswab16(x)) /** * __swab32 - return a byteswapped 32-bit value * @x: value to byteswap */ #define __swab32(x) \ (__builtin_constant_p((__u32)(x)) ? \ ___constant_swab32(x) : \ __fswab32(x)) /** * __swab64 - return a byteswapped 64-bit value * @x: value to byteswap */ #define __swab64(x) \ (__builtin_constant_p((__u64)(x)) ? \ ___constant_swab64(x) : \ __fswab64(x)) /** * __swahw32 - return a word-swapped 32-bit value * @x: value to wordswap * * __swahw32(0x12340000) is 0x00001234 */ #define __swahw32(x) \ (__builtin_constant_p((__u32)(x)) ? \ ___constant_swahw32(x) : \ __fswahw32(x)) /** * __swahb32 - return a high and low byte-swapped 32-bit value * @x: value to byteswap * * __swahb32(0x12345678) is 0x34127856 */ #define __swahb32(x) \ (__builtin_constant_p((__u32)(x)) ? \ ___constant_swahb32(x) : \ __fswahb32(x)) /** * __swab16p - return a byteswapped 16-bit value from a pointer * @p: pointer to a naturally-aligned 16-bit value */ static __inline__ __u16 __swab16p(const __u16 *p) { #ifdef __arch_swab16p return __arch_swab16p(p); #else return __swab16(*p); #endif } /** * __swab32p - return a byteswapped 32-bit value from a pointer * @p: pointer to a naturally-aligned 32-bit value */ static __inline__ __u32 __swab32p(const __u32 *p) { #ifdef __arch_swab32p return __arch_swab32p(p); #else return __swab32(*p); #endif } /** * __swab64p - return a byteswapped 64-bit value from a pointer * @p: pointer to a naturally-aligned 64-bit value */ static __inline__ __u64 __swab64p(const __u64 *p) { #ifdef __arch_swab64p return __arch_swab64p(p); #else return __swab64(*p); #endif } /** * __swahw32p - return a wordswapped 32-bit value from a pointer * @p: pointer to a naturally-aligned 32-bit value * * See __swahw32() for details of wordswapping. */ static __inline__ __u32 __swahw32p(const __u32 *p) { #ifdef __arch_swahw32p return __arch_swahw32p(p); #else return __swahw32(*p); #endif } /** * __swahb32p - return a high and low byteswapped 32-bit value from a pointer * @p: pointer to a naturally-aligned 32-bit value * * See __swahb32() for details of high/low byteswapping. */ static __inline__ __u32 __swahb32p(const __u32 *p) { #ifdef __arch_swahb32p return __arch_swahb32p(p); #else return __swahb32(*p); #endif } /** * __swab16s - byteswap a 16-bit value in-place * @p: pointer to a naturally-aligned 16-bit value */ static __inline__ void __swab16s(__u16 *p) { #ifdef __arch_swab16s __arch_swab16s(p); #else *p = __swab16p(p); #endif } /** * __swab32s - byteswap a 32-bit value in-place * @p: pointer to a naturally-aligned 32-bit value */ static __inline__ void __swab32s(__u32 *p) { #ifdef __arch_swab32s __arch_swab32s(p); #else *p = __swab32p(p); #endif } /** * __swab64s - byteswap a 64-bit value in-place * @p: pointer to a naturally-aligned 64-bit value */ static __inline__ void __swab64s(__u64 *p) { #ifdef __arch_swab64s __arch_swab64s(p); #else *p = __swab64p(p); #endif } /** * __swahw32s - wordswap a 32-bit value in-place * @p: pointer to a naturally-aligned 32-bit value * * See __swahw32() for details of wordswapping */ static __inline__ void __swahw32s(__u32 *p) { #ifdef __arch_swahw32s __arch_swahw32s(p); #else *p = __swahw32p(p); #endif } /** * __swahb32s - high and low byteswap a 32-bit value in-place * @p: pointer to a naturally-aligned 32-bit value * * See __swahb32() for details of high and low byte swapping */ static __inline__ void __swahb32s(__u32 *p) { #ifdef __arch_swahb32s __arch_swahb32s(p); #else *p = __swahb32p(p); #endif } #endif /* _LINUX_SWAB_H */ /*************************************************************************** * Linux PPP over L2TP (PPPoL2TP) Socket Implementation (RFC 2661) * * This file supplies definitions required by the PPP over L2TP driver * (l2tp_ppp.c). All version information wrt this file is located in l2tp_ppp.c * * License: * 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_IF_PPPOL2TP_H #define __LINUX_IF_PPPOL2TP_H #include /* Structure used to connect() the socket to a particular tunnel UDP * socket. */ struct pppol2tp_addr { __kernel_pid_t pid; /* pid that owns the fd. * 0 => current */ int fd; /* FD of UDP socket to use */ struct sockaddr_in addr; /* IP address and port to send to */ __u16 s_tunnel, s_session; /* For matching incoming packets */ __u16 d_tunnel, d_session; /* For sending outgoing packets */ }; /* The L2TPv3 protocol changes tunnel and session ids from 16 to 32 * bits. So we need a different sockaddr structure. */ struct pppol2tpv3_addr { pid_t pid; /* pid that owns the fd. * 0 => current */ int fd; /* FD of UDP or IP socket to use */ struct sockaddr_in addr; /* IP address and port to send to */ __u32 s_tunnel, s_session; /* For matching incoming packets */ __u32 d_tunnel, d_session; /* For sending outgoing packets */ }; /* Socket options: * DEBUG - bitmask of debug message categories * SENDSEQ - 0 => don't send packets with sequence numbers * 1 => send packets with sequence numbers * RECVSEQ - 0 => receive packet sequence numbers are optional * 1 => drop receive packets without sequence numbers * LNSMODE - 0 => act as LAC. * 1 => act as LNS. * REORDERTO - reorder timeout (in millisecs). If 0, don't try to reorder. */ enum { PPPOL2TP_SO_DEBUG = 1, PPPOL2TP_SO_RECVSEQ = 2, PPPOL2TP_SO_SENDSEQ = 3, PPPOL2TP_SO_LNSMODE = 4, PPPOL2TP_SO_REORDERTO = 5, }; /* Debug message categories for the DEBUG socket option */ enum { PPPOL2TP_MSG_DEBUG = (1 << 0), /* verbose debug (if * compiled in) */ PPPOL2TP_MSG_CONTROL = (1 << 1), /* userspace - kernel * interface */ PPPOL2TP_MSG_SEQ = (1 << 2), /* sequence numbers */ PPPOL2TP_MSG_DATA = (1 << 3), /* data packets */ }; #endif #ifndef _LINUX_MSDOS_FS_H #define _LINUX_MSDOS_FS_H #include #include #include /* * The MS-DOS filesystem constants/structures */ #define SECTOR_SIZE 512 /* sector size (bytes) */ #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ #define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */ #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry)) #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ #define MSDOS_LONGNAME 256 /* maximum name length */ #define CF_LE_W(v) le16_to_cpu(v) #define CF_LE_L(v) le32_to_cpu(v) #define CT_LE_W(v) cpu_to_le16(v) #define CT_LE_L(v) cpu_to_le32(v) #define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */ #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ /* directory limit */ #define FAT_MAX_DIR_ENTRIES (65536) #define FAT_MAX_DIR_SIZE (FAT_MAX_DIR_ENTRIES << MSDOS_DIR_BITS) #define ATTR_NONE 0 /* no attribute bits */ #define ATTR_RO 1 /* read-only */ #define ATTR_HIDDEN 2 /* hidden */ #define ATTR_SYS 4 /* system */ #define ATTR_VOLUME 8 /* volume label */ #define ATTR_DIR 16 /* directory */ #define ATTR_ARCH 32 /* archived */ /* attribute bits that are copied "as is" */ #define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN) /* bits that are used by the Windows 95/Windows NT extended FAT */ #define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME) #define CASE_LOWER_BASE 8 /* base is lower case */ #define CASE_LOWER_EXT 16 /* extension is lower case */ #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */ #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG) #define FAT_LFN_LEN 255 /* maximum long name length */ #define MSDOS_NAME 11 /* maximum name length */ #define MSDOS_SLOTS 21 /* max # of slots for short and long names */ #define MSDOS_DOT ". " /* ".", padded to MSDOS_NAME chars */ #define MSDOS_DOTDOT ".. " /* "..", padded to MSDOS_NAME chars */ #define FAT_FIRST_ENT(s, x) ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \ MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x)) /* start of data cluster's entry (number of reserved clusters) */ #define FAT_START_ENT 2 /* maximum number of clusters */ #define MAX_FAT12 0xFF4 #define MAX_FAT16 0xFFF4 #define MAX_FAT32 0x0FFFFFF6 #define MAX_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? MAX_FAT32 : \ MSDOS_SB(s)->fat_bits == 16 ? MAX_FAT16 : MAX_FAT12) /* bad cluster mark */ #define BAD_FAT12 0xFF7 #define BAD_FAT16 0xFFF7 #define BAD_FAT32 0x0FFFFFF7 /* standard EOF */ #define EOF_FAT12 0xFFF #define EOF_FAT16 0xFFFF #define EOF_FAT32 0x0FFFFFFF #define FAT_ENT_FREE (0) #define FAT_ENT_BAD (BAD_FAT32) #define FAT_ENT_EOF (EOF_FAT32) #define FAT_FSINFO_SIG1 0x41615252 #define FAT_FSINFO_SIG2 0x61417272 #define IS_FSINFO(x) (le32_to_cpu((x)->signature1) == FAT_FSINFO_SIG1 \ && le32_to_cpu((x)->signature2) == FAT_FSINFO_SIG2) struct __fat_dirent { long d_ino; __kernel_off_t d_off; unsigned short d_reclen; char d_name[256]; /* We must not include limits.h! */ }; /* * ioctl commands */ #define VFAT_IOCTL_READDIR_BOTH _IOR('r', 1, struct __fat_dirent[2]) #define VFAT_IOCTL_READDIR_SHORT _IOR('r', 2, struct __fat_dirent[2]) /* has used 0x72 ('r') in collision, so skip a few */ #define FAT_IOCTL_GET_ATTRIBUTES _IOR('r', 0x10, __u32) #define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32) struct fat_boot_sector { __u8 ignored[3]; /* Boot strap short or near jump */ __u8 system_id[8]; /* Name - can be used to special case partition manager volumes */ __u8 sector_size[2]; /* bytes per logical sector */ __u8 sec_per_clus; /* sectors/cluster */ __le16 reserved; /* reserved sectors */ __u8 fats; /* number of FATs */ __u8 dir_entries[2]; /* root directory entries */ __u8 sectors[2]; /* number of sectors */ __u8 media; /* media code */ __le16 fat_length; /* sectors/FAT */ __le16 secs_track; /* sectors per track */ __le16 heads; /* number of heads */ __le32 hidden; /* hidden sectors (unused) */ __le32 total_sect; /* number of sectors (if sectors == 0) */ /* The following fields are only used by FAT32 */ __le32 fat32_length; /* sectors/FAT */ __le16 flags; /* bit 8: fat mirroring, low 4: active fat */ __u8 version[2]; /* major, minor filesystem version */ __le32 root_cluster; /* first cluster in root directory */ __le16 info_sector; /* filesystem info sector */ __le16 backup_boot; /* backup boot sector */ __le16 reserved2[6]; /* Unused */ }; struct fat_boot_fsinfo { __le32 signature1; /* 0x41615252L */ __le32 reserved1[120]; /* Nothing as far as I can tell */ __le32 signature2; /* 0x61417272L */ __le32 free_clusters; /* Free cluster count. -1 if unknown */ __le32 next_cluster; /* Most recently allocated cluster */ __le32 reserved2[4]; }; struct msdos_dir_entry { __u8 name[MSDOS_NAME];/* name and extension */ __u8 attr; /* attribute bits */ __u8 lcase; /* Case for base and extension */ __u8 ctime_cs; /* Creation time, centiseconds (0-199) */ __le16 ctime; /* Creation time */ __le16 cdate; /* Creation date */ __le16 adate; /* Last access date */ __le16 starthi; /* High 16 bits of cluster in FAT32 */ __le16 time,date,start;/* time, date and first cluster */ __le32 size; /* file size (in bytes) */ }; /* Up to 13 characters of the name */ struct msdos_dir_slot { __u8 id; /* sequence number for slot */ __u8 name0_4[10]; /* first 5 characters in name */ __u8 attr; /* attribute byte */ __u8 reserved; /* always 0 */ __u8 alias_checksum; /* checksum for 8.3 alias */ __u8 name5_10[12]; /* 6 more characters in name */ __le16 start; /* starting cluster number, 0 in long slots */ __u8 name11_12[4]; /* last 2 characters in name */ }; #endif /* !_LINUX_MSDOS_FS_H */ /* * ATM Lan Emulation Daemon driver interface * * Marko Kiiskila */ #ifndef _ATMLEC_H_ #define _ATMLEC_H_ #include #include #include #include #include /* ATM lec daemon control socket */ #define ATMLEC_CTRL _IO('a', ATMIOC_LANE) #define ATMLEC_DATA _IO('a', ATMIOC_LANE+1) #define ATMLEC_MCAST _IO('a', ATMIOC_LANE+2) /* Maximum number of LEC interfaces (tweakable) */ #define MAX_LEC_ITF 48 /* * From the total of MAX_LEC_ITF, last NUM_TR_DEVS are reserved for Token Ring. * E.g. if MAX_LEC_ITF = 48 and NUM_TR_DEVS = 8, then lec0-lec39 are for * Ethernet ELANs and lec40-lec47 are for Token Ring ELANS. */ #define NUM_TR_DEVS 8 typedef enum { l_set_mac_addr, l_del_mac_addr, l_svc_setup, l_addr_delete, l_topology_change, l_flush_complete, l_arp_update, l_narp_req, /* LANE2 mandates the use of this */ l_config, l_flush_tran_id, l_set_lecid, l_arp_xmt, l_rdesc_arp_xmt, l_associate_req, l_should_bridge /* should we bridge this MAC? */ } atmlec_msg_type; #define ATMLEC_MSG_TYPE_MAX l_should_bridge struct atmlec_config_msg { unsigned int maximum_unknown_frame_count; unsigned int max_unknown_frame_time; unsigned short max_retry_count; unsigned int aging_time; unsigned int forward_delay_time; unsigned int arp_response_time; unsigned int flush_timeout; unsigned int path_switching_delay; unsigned int lane_version; /* LANE2: 1 for LANEv1, 2 for LANEv2 */ int mtu; int is_proxy; }; struct atmlec_msg { atmlec_msg_type type; int sizeoftlvs; /* LANE2: if != 0, tlvs follow */ union { struct { unsigned char mac_addr[ETH_ALEN]; unsigned char atm_addr[ATM_ESA_LEN]; unsigned int flag; /* * Topology_change flag, * remoteflag, permanent flag, * lecid, transaction id */ unsigned int targetless_le_arp; /* LANE2 */ unsigned int no_source_le_narp; /* LANE2 */ } normal; struct atmlec_config_msg config; struct { __u16 lec_id; /* requestor lec_id */ __u32 tran_id; /* transaction id */ unsigned char mac_addr[ETH_ALEN]; /* dst mac addr */ unsigned char atm_addr[ATM_ESA_LEN]; /* reqestor ATM addr */ } proxy; /* * For mapping LE_ARP requests to responses. Filled by * zeppelin, returned by kernel. Used only when proxying */ } content; } __ATM_API_ALIGN; struct atmlec_ioc { int dev_num; unsigned char atm_addr[ATM_ESA_LEN]; unsigned char receive; /* 1= receive vcc, 0 = send vcc */ }; #endif /* _ATMLEC_H_ */ #ifndef _LINUX_TTY_H #define _LINUX_TTY_H /* * 'tty.h' defines some structures used by tty_io.c and some defines. */ #endif /* * if_addrlabel.h - netlink interface for address labels * * Copyright (C)2007 USAGI/WIDE Project, All Rights Reserved. * * Authors: * YOSHIFUJI Hideaki @ USAGI/WIDE */ #ifndef __LINUX_IF_ADDRLABEL_H #define __LINUX_IF_ADDRLABEL_H #include struct ifaddrlblmsg { __u8 ifal_family; /* Address family */ __u8 __ifal_reserved; /* Reserved */ __u8 ifal_prefixlen; /* Prefix length */ __u8 ifal_flags; /* Flags */ __u32 ifal_index; /* Link index */ __u32 ifal_seq; /* sequence number */ }; enum { IFAL_ADDRESS = 1, IFAL_LABEL = 2, __IFAL_MAX }; #define IFAL_MAX (__IFAL_MAX - 1) #endif #ifndef _LINUX_ERRNO_H #define _LINUX_ERRNO_H #include #endif #ifndef _LINUX_UTIME_H #define _LINUX_UTIME_H #include struct utimbuf { __kernel_time_t actime; __kernel_time_t modtime; }; #endif /* toshiba.h -- Linux driver for accessing the SMM on Toshiba laptops * * Copyright (c) 1996-2000 Jonathan A. Buzzard (jonathan@buzzard.org.uk) * * Thanks to Juergen Heinzl for the pointers * on making sure the structure is aligned and packed. * * 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, or (at your option) any * later version. * * This program is distributed in the hope that 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. * */ #ifndef _LINUX_TOSHIBA_H #define _LINUX_TOSHIBA_H #define TOSH_PROC "/proc/toshiba" #define TOSH_DEVICE "/dev/toshiba" #define TOSH_SMM _IOWR('t', 0x90, int) /* broken: meant 24 bytes */ typedef struct { unsigned int eax; unsigned int ebx __attribute__ ((packed)); unsigned int ecx __attribute__ ((packed)); unsigned int edx __attribute__ ((packed)); unsigned int esi __attribute__ ((packed)); unsigned int edi __attribute__ ((packed)); } SMMRegisters; int tosh_smm(SMMRegisters *regs); #endif ¸+ virtio_ids.h¹+generic_serial.hº+ qnxtypes.h»+ inet_diag.h¼+ if_link.h½+ mempolicy.h¾+ cn_proc.hÀ+affs_hardblocks.hÁ+ivtvfb.hÂ+ genetlink.hÃ+l2tp.hÄ+coff.hÅ+nfs_fs.hÆ+ ..install.cmdÇ+ kernelcapi.hÈ+auxvec.hÉ+xfrm.hÊ+ if_addr.hË+map_to_7segment.hÌ+limits.hÍ+hdreg.hÎ+flat.hÏ+filter.hÐ+input.hÑ+ vt.hÒ+ joystick.hÓ+hdlc.hÔ+rose.hÕ+ efs_fs_sb.hÖ+ dn.h×+ hdlcdrv.hØ+ dqblk_xfs.hÙ+ipmi.hÚ+kdev_t.hÛ+.installÜ+raw.hÝ+virtio_console.hÞ+if_tr.hß+signal.hà+atmsap.há+prctl.hâ+ coda_psdev.hã+mroute.hä+uio.hå+bfs_fs.hæ+veth.hç+uinput.hè+ if_packet.hé+chio.hê+ atmclip.hë+ ppp_defs.hì+ if_pppox.hí+ personality.hî+if_arp.hï+ netlink.h , hysdn_if.h