Auto merge with /home/aegl/GIT/linus
This commit is contained in:
@@ -224,6 +224,7 @@ struct ata_taskfile {
|
||||
};
|
||||
|
||||
#define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0)
|
||||
#define ata_id_is_sata(id) ((id)[93] == 0)
|
||||
#define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6))
|
||||
#define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5))
|
||||
#define ata_id_has_flush(id) ((id)[83] & (1 << 12))
|
||||
|
||||
@@ -27,15 +27,52 @@
|
||||
#include <linux/sched.h>
|
||||
#include <linux/elf.h>
|
||||
|
||||
/* Request and reply types */
|
||||
#define AUDIT_GET 1000 /* Get status */
|
||||
#define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */
|
||||
#define AUDIT_LIST 1002 /* List filtering rules */
|
||||
#define AUDIT_ADD 1003 /* Add filtering rule */
|
||||
#define AUDIT_DEL 1004 /* Delete filtering rule */
|
||||
#define AUDIT_USER 1005 /* Send a message from user-space */
|
||||
#define AUDIT_LOGIN 1006 /* Define the login id and informaiton */
|
||||
#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
|
||||
/* The netlink messages for the audit system is divided into blocks:
|
||||
* 1000 - 1099 are for commanding the audit system
|
||||
* 1100 - 1199 user space trusted application messages
|
||||
* 1200 - 1299 messages internal to the audit daemon
|
||||
* 1300 - 1399 audit event messages
|
||||
* 1400 - 1499 SE Linux use
|
||||
* 1500 - 1999 future use
|
||||
* 2000 is for otherwise unclassified kernel audit messages
|
||||
*
|
||||
* Messages from 1000-1199 are bi-directional. 1200-1299 are exclusively user
|
||||
* space. Anything over that is kernel --> user space communication.
|
||||
*/
|
||||
#define AUDIT_GET 1000 /* Get status */
|
||||
#define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */
|
||||
#define AUDIT_LIST 1002 /* List syscall filtering rules */
|
||||
#define AUDIT_ADD 1003 /* Add syscall filtering rule */
|
||||
#define AUDIT_DEL 1004 /* Delete syscall filtering rule */
|
||||
#define AUDIT_USER 1005 /* Message from userspace -- deprecated */
|
||||
#define AUDIT_LOGIN 1006 /* Define the login id and information */
|
||||
#define AUDIT_WATCH_INS 1007 /* Insert file/dir watch entry */
|
||||
#define AUDIT_WATCH_REM 1008 /* Remove file/dir watch entry */
|
||||
#define AUDIT_WATCH_LIST 1009 /* List all file/dir watches */
|
||||
#define AUDIT_SIGNAL_INFO 1010 /* Get info about sender of signal to auditd */
|
||||
|
||||
#define AUDIT_FIRST_USER_MSG 1100 /* Userspace messages uninteresting to kernel */
|
||||
#define AUDIT_LAST_USER_MSG 1199
|
||||
|
||||
#define AUDIT_DAEMON_START 1200 /* Daemon startup record */
|
||||
#define AUDIT_DAEMON_END 1201 /* Daemon normal stop record */
|
||||
#define AUDIT_DAEMON_ABORT 1202 /* Daemon error stop record */
|
||||
#define AUDIT_DAEMON_CONFIG 1203 /* Daemon config change */
|
||||
|
||||
#define AUDIT_SYSCALL 1300 /* Syscall event */
|
||||
#define AUDIT_FS_WATCH 1301 /* Filesystem watch event */
|
||||
#define AUDIT_PATH 1302 /* Filename path information */
|
||||
#define AUDIT_IPC 1303 /* IPC record */
|
||||
#define AUDIT_SOCKETCALL 1304 /* sys_socketcall arguments */
|
||||
#define AUDIT_CONFIG_CHANGE 1305 /* Audit system configuration change */
|
||||
#define AUDIT_SOCKADDR 1306 /* sockaddr copied as syscall arg */
|
||||
#define AUDIT_CWD 1307 /* Current working directory */
|
||||
|
||||
#define AUDIT_AVC 1400 /* SE Linux avc denial or grant */
|
||||
#define AUDIT_SELINUX_ERR 1401 /* Internal SE Linux Errors */
|
||||
#define AUDIT_AVC_PATH 1402 /* dentry, vfsmount pair from avc */
|
||||
|
||||
#define AUDIT_KERNEL 2000 /* Asynchronous audit record. NOT A REQUEST. */
|
||||
|
||||
/* Rule flags */
|
||||
#define AUDIT_PER_TASK 0x01 /* Apply rule at task creation (not syscall) */
|
||||
@@ -132,16 +169,9 @@
|
||||
#define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE)
|
||||
#define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
|
||||
|
||||
#ifndef __KERNEL__
|
||||
struct audit_message {
|
||||
struct nlmsghdr nlh;
|
||||
char data[1200];
|
||||
};
|
||||
#endif
|
||||
|
||||
struct audit_status {
|
||||
__u32 mask; /* Bit mask for valid entries */
|
||||
__u32 enabled; /* 1 = enabled, 0 = disbaled */
|
||||
__u32 enabled; /* 1 = enabled, 0 = disabled */
|
||||
__u32 failure; /* Failure-to-log action */
|
||||
__u32 pid; /* pid of auditd process */
|
||||
__u32 rate_limit; /* messages rate limit (per second) */
|
||||
@@ -161,6 +191,11 @@ struct audit_rule { /* for AUDIT_LIST, AUDIT_ADD, and AUDIT_DEL */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
struct audit_sig_info {
|
||||
uid_t uid;
|
||||
pid_t pid;
|
||||
};
|
||||
|
||||
struct audit_buffer;
|
||||
struct audit_context;
|
||||
struct inode;
|
||||
@@ -185,11 +220,16 @@ extern void audit_inode(const char *name, const struct inode *inode);
|
||||
/* Private API (for audit.c only) */
|
||||
extern int audit_receive_filter(int type, int pid, int uid, int seq,
|
||||
void *data, uid_t loginuid);
|
||||
extern void audit_get_stamp(struct audit_context *ctx,
|
||||
struct timespec *t, unsigned int *serial);
|
||||
extern unsigned int audit_serial(void);
|
||||
extern void auditsc_get_stamp(struct audit_context *ctx,
|
||||
struct timespec *t, unsigned int *serial);
|
||||
extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid);
|
||||
extern uid_t audit_get_loginuid(struct audit_context *ctx);
|
||||
extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode);
|
||||
extern int audit_socketcall(int nargs, unsigned long *args);
|
||||
extern int audit_sockaddr(int len, void *addr);
|
||||
extern int audit_avc_path(struct dentry *dentry, struct vfsmount *mnt);
|
||||
extern void audit_signal_info(int sig, struct task_struct *t);
|
||||
#else
|
||||
#define audit_alloc(t) ({ 0; })
|
||||
#define audit_free(t) do { ; } while (0)
|
||||
@@ -198,18 +238,24 @@ extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mo
|
||||
#define audit_getname(n) do { ; } while (0)
|
||||
#define audit_putname(n) do { ; } while (0)
|
||||
#define audit_inode(n,i) do { ; } while (0)
|
||||
#define audit_receive_filter(t,p,u,s,d,l) ({ -EOPNOTSUPP; })
|
||||
#define auditsc_get_stamp(c,t,s) do { BUG(); } while (0)
|
||||
#define audit_get_loginuid(c) ({ -1; })
|
||||
#define audit_ipc_perms(q,u,g,m) ({ 0; })
|
||||
#define audit_socketcall(n,a) ({ 0; })
|
||||
#define audit_sockaddr(len, addr) ({ 0; })
|
||||
#define audit_avc_path(dentry, mnt) ({ 0; })
|
||||
#define audit_signal_info(s,t) do { ; } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_AUDIT
|
||||
/* These are defined in audit.c */
|
||||
/* Public API */
|
||||
extern void audit_log(struct audit_context *ctx,
|
||||
extern void audit_log(struct audit_context *ctx, int type,
|
||||
const char *fmt, ...)
|
||||
__attribute__((format(printf,2,3)));
|
||||
__attribute__((format(printf,3,4)));
|
||||
|
||||
extern struct audit_buffer *audit_log_start(struct audit_context *ctx);
|
||||
extern struct audit_buffer *audit_log_start(struct audit_context *ctx,int type);
|
||||
extern void audit_log_format(struct audit_buffer *ab,
|
||||
const char *fmt, ...)
|
||||
__attribute__((format(printf,2,3)));
|
||||
@@ -229,8 +275,8 @@ extern void audit_send_reply(int pid, int seq, int type,
|
||||
void *payload, int size);
|
||||
extern void audit_log_lost(const char *message);
|
||||
#else
|
||||
#define audit_log(t,f,...) do { ; } while (0)
|
||||
#define audit_log_start(t) ({ NULL; })
|
||||
#define audit_log(c,t,f,...) do { ; } while (0)
|
||||
#define audit_log_start(c,t) ({ NULL; })
|
||||
#define audit_log_vformat(b,f,a) do { ; } while (0)
|
||||
#define audit_log_format(b,f,...) do { ; } while (0)
|
||||
#define audit_log_end(b) do { ; } while (0)
|
||||
|
||||
@@ -544,7 +544,7 @@ extern void blk_end_sync_rq(struct request *rq);
|
||||
extern void blk_attempt_remerge(request_queue_t *, struct request *);
|
||||
extern void __blk_attempt_remerge(request_queue_t *, struct request *);
|
||||
extern struct request *blk_get_request(request_queue_t *, int, int);
|
||||
extern void blk_insert_request(request_queue_t *, struct request *, int, void *, int);
|
||||
extern void blk_insert_request(request_queue_t *, struct request *, int, void *);
|
||||
extern void blk_requeue_request(request_queue_t *, struct request *);
|
||||
extern void blk_plug_device(request_queue_t *);
|
||||
extern int blk_remove_plug(request_queue_t *);
|
||||
|
||||
168
include/linux/chio.h
Normal file
168
include/linux/chio.h
Normal file
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* ioctl interface for the scsi media changer driver
|
||||
*/
|
||||
|
||||
/* changer element types */
|
||||
#define CHET_MT 0 /* media transport element (robot) */
|
||||
#define CHET_ST 1 /* storage element (media slots) */
|
||||
#define CHET_IE 2 /* import/export element */
|
||||
#define CHET_DT 3 /* data transfer element (tape/cdrom/whatever) */
|
||||
#define CHET_V1 4 /* vendor specific #1 */
|
||||
#define CHET_V2 5 /* vendor specific #2 */
|
||||
#define CHET_V3 6 /* vendor specific #3 */
|
||||
#define CHET_V4 7 /* vendor specific #4 */
|
||||
|
||||
|
||||
/*
|
||||
* CHIOGPARAMS
|
||||
* query changer properties
|
||||
*
|
||||
* CHIOVGPARAMS
|
||||
* query vendor-specific element types
|
||||
*
|
||||
* accessing elements works by specifing type and unit of the element.
|
||||
* for eample, storage elements are addressed with type = CHET_ST and
|
||||
* unit = 0 .. cp_nslots-1
|
||||
*
|
||||
*/
|
||||
struct changer_params {
|
||||
int cp_curpicker; /* current transport element */
|
||||
int cp_npickers; /* number of transport elements (CHET_MT) */
|
||||
int cp_nslots; /* number of storage elements (CHET_ST) */
|
||||
int cp_nportals; /* number of import/export elements (CHET_IE) */
|
||||
int cp_ndrives; /* number of data transfer elements (CHET_DT) */
|
||||
};
|
||||
struct changer_vendor_params {
|
||||
int cvp_n1; /* number of vendor specific elems (CHET_V1) */
|
||||
char cvp_label1[16];
|
||||
int cvp_n2; /* number of vendor specific elems (CHET_V2) */
|
||||
char cvp_label2[16];
|
||||
int cvp_n3; /* number of vendor specific elems (CHET_V3) */
|
||||
char cvp_label3[16];
|
||||
int cvp_n4; /* number of vendor specific elems (CHET_V4) */
|
||||
char cvp_label4[16];
|
||||
int reserved[8];
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* CHIOMOVE
|
||||
* move a medium from one element to another
|
||||
*/
|
||||
struct changer_move {
|
||||
int cm_fromtype; /* type/unit of source element */
|
||||
int cm_fromunit;
|
||||
int cm_totype; /* type/unit of destination element */
|
||||
int cm_tounit;
|
||||
int cm_flags;
|
||||
};
|
||||
#define CM_INVERT 1 /* flag: rotate media (for double-sided like MOD) */
|
||||
|
||||
|
||||
/*
|
||||
* CHIOEXCHANGE
|
||||
* move one medium from element #1 to element #2,
|
||||
* and another one from element #2 to element #3.
|
||||
* element #1 and #3 are allowed to be identical.
|
||||
*/
|
||||
struct changer_exchange {
|
||||
int ce_srctype; /* type/unit of element #1 */
|
||||
int ce_srcunit;
|
||||
int ce_fdsttype; /* type/unit of element #2 */
|
||||
int ce_fdstunit;
|
||||
int ce_sdsttype; /* type/unit of element #3 */
|
||||
int ce_sdstunit;
|
||||
int ce_flags;
|
||||
};
|
||||
#define CE_INVERT1 1
|
||||
#define CE_INVERT2 2
|
||||
|
||||
|
||||
/*
|
||||
* CHIOPOSITION
|
||||
* move the transport element (robot arm) to a specific element.
|
||||
*/
|
||||
struct changer_position {
|
||||
int cp_type;
|
||||
int cp_unit;
|
||||
int cp_flags;
|
||||
};
|
||||
#define CP_INVERT 1
|
||||
|
||||
|
||||
/*
|
||||
* CHIOGSTATUS
|
||||
* get element status for all elements of a specific type
|
||||
*/
|
||||
struct changer_element_status {
|
||||
int ces_type;
|
||||
unsigned char *ces_data;
|
||||
};
|
||||
#define CESTATUS_FULL 0x01 /* full */
|
||||
#define CESTATUS_IMPEXP 0x02 /* media was imported (inserted by sysop) */
|
||||
#define CESTATUS_EXCEPT 0x04 /* error condition */
|
||||
#define CESTATUS_ACCESS 0x08 /* access allowed */
|
||||
#define CESTATUS_EXENAB 0x10 /* element can export media */
|
||||
#define CESTATUS_INENAB 0x20 /* element can import media */
|
||||
|
||||
|
||||
/*
|
||||
* CHIOGELEM
|
||||
* get more detailed status informtion for a single element
|
||||
*/
|
||||
struct changer_get_element {
|
||||
int cge_type; /* type/unit */
|
||||
int cge_unit;
|
||||
int cge_status; /* status */
|
||||
int cge_errno; /* errno */
|
||||
int cge_srctype; /* source element of the last move/exchange */
|
||||
int cge_srcunit;
|
||||
int cge_id; /* scsi id (for data transfer elements) */
|
||||
int cge_lun; /* scsi lun (for data transfer elements) */
|
||||
char cge_pvoltag[36]; /* primary volume tag */
|
||||
char cge_avoltag[36]; /* alternate volume tag */
|
||||
int cge_flags;
|
||||
};
|
||||
/* flags */
|
||||
#define CGE_ERRNO 0x01 /* errno available */
|
||||
#define CGE_INVERT 0x02 /* media inverted */
|
||||
#define CGE_SRC 0x04 /* media src available */
|
||||
#define CGE_IDLUN 0x08 /* ID+LUN available */
|
||||
#define CGE_PVOLTAG 0x10 /* primary volume tag available */
|
||||
#define CGE_AVOLTAG 0x20 /* alternate volume tag available */
|
||||
|
||||
|
||||
/*
|
||||
* CHIOSVOLTAG
|
||||
* set volume tag
|
||||
*/
|
||||
struct changer_set_voltag {
|
||||
int csv_type; /* type/unit */
|
||||
int csv_unit;
|
||||
char csv_voltag[36]; /* volume tag */
|
||||
int csv_flags;
|
||||
};
|
||||
#define CSV_PVOLTAG 0x01 /* primary volume tag */
|
||||
#define CSV_AVOLTAG 0x02 /* alternate volume tag */
|
||||
#define CSV_CLEARTAG 0x04 /* clear volume tag */
|
||||
|
||||
/* ioctls */
|
||||
#define CHIOMOVE _IOW('c', 1,struct changer_move)
|
||||
#define CHIOEXCHANGE _IOW('c', 2,struct changer_exchange)
|
||||
#define CHIOPOSITION _IOW('c', 3,struct changer_position)
|
||||
#define CHIOGPICKER _IOR('c', 4,int) /* not impl. */
|
||||
#define CHIOSPICKER _IOW('c', 5,int) /* not impl. */
|
||||
#define CHIOGPARAMS _IOR('c', 6,struct changer_params)
|
||||
#define CHIOGSTATUS _IOW('c', 8,struct changer_element_status)
|
||||
#define CHIOGELEM _IOW('c',16,struct changer_get_element)
|
||||
#define CHIOINITELEM _IO('c',17)
|
||||
#define CHIOSVOLTAG _IOW('c',18,struct changer_set_voltag)
|
||||
#define CHIOGVPARAMS _IOR('c',19,struct changer_vendor_params)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* c-basic-offset: 8
|
||||
* End:
|
||||
*/
|
||||
36
include/linux/dm9000.h
Normal file
36
include/linux/dm9000.h
Normal file
@@ -0,0 +1,36 @@
|
||||
/* include/linux/dm9000.h
|
||||
*
|
||||
* Copyright (c) 2004 Simtec Electronics
|
||||
* Ben Dooks <ben@simtec.co.uk>
|
||||
*
|
||||
* Header file for dm9000 platform data
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __DM9000_PLATFORM_DATA
|
||||
#define __DM9000_PLATFORM_DATA __FILE__
|
||||
|
||||
/* IO control flags */
|
||||
|
||||
#define DM9000_PLATF_8BITONLY (0x0001)
|
||||
#define DM9000_PLATF_16BITONLY (0x0002)
|
||||
#define DM9000_PLATF_32BITONLY (0x0004)
|
||||
|
||||
/* platfrom data for platfrom device structure's platfrom_data field */
|
||||
|
||||
struct dm9000_plat_data {
|
||||
unsigned int flags;
|
||||
|
||||
/* allow replacement IO routines */
|
||||
|
||||
void (*inblk)(void __iomem *reg, void *data, int len);
|
||||
void (*outblk)(void __iomem *reg, void *data, int len);
|
||||
void (*dumpblk)(void __iomem *reg, int len);
|
||||
};
|
||||
|
||||
#endif /* __DM9000_PLATFORM_DATA */
|
||||
|
||||
@@ -14,7 +14,12 @@ enum dma_data_direction {
|
||||
};
|
||||
|
||||
#define DMA_64BIT_MASK 0xffffffffffffffffULL
|
||||
#define DMA_40BIT_MASK 0x000000ffffffffffULL
|
||||
#define DMA_39BIT_MASK 0x0000007fffffffffULL
|
||||
#define DMA_32BIT_MASK 0x00000000ffffffffULL
|
||||
#define DMA_31BIT_MASK 0x000000007fffffffULL
|
||||
#define DMA_30BIT_MASK 0x000000003fffffffULL
|
||||
#define DMA_29BIT_MASK 0x000000001fffffffULL
|
||||
|
||||
#include <asm/dma-mapping.h>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Generic HDLC support routines for Linux
|
||||
*
|
||||
* Copyright (C) 1999-2003 Krzysztof Halasa <khc@pm.waw.pl>
|
||||
* Copyright (C) 1999-2005 Krzysztof Halasa <khc@pm.waw.pl>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License
|
||||
@@ -41,6 +41,7 @@
|
||||
#define LMI_NONE 1 /* No LMI, all PVCs are static */
|
||||
#define LMI_ANSI 2 /* ANSI Annex D */
|
||||
#define LMI_CCITT 3 /* ITU-T Annex A */
|
||||
#define LMI_CISCO 4 /* The "original" LMI, aka Gang of Four */
|
||||
|
||||
#define HDLC_MAX_MTU 1500 /* Ethernet 1500 bytes */
|
||||
#define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */
|
||||
@@ -89,6 +90,7 @@ typedef struct pvc_device_struct {
|
||||
unsigned int deleted: 1;
|
||||
unsigned int fecn: 1;
|
||||
unsigned int becn: 1;
|
||||
unsigned int bandwidth; /* Cisco LMI reporting only */
|
||||
}state;
|
||||
}pvc_device;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#define IFF_LOOPBACK 0x8 /* is a loopback net */
|
||||
#define IFF_POINTOPOINT 0x10 /* interface is has p-p link */
|
||||
#define IFF_NOTRAILERS 0x20 /* avoid use of trailers */
|
||||
#define IFF_RUNNING 0x40 /* resources allocated */
|
||||
#define IFF_RUNNING 0x40 /* interface running and carrier ok */
|
||||
#define IFF_NOARP 0x80 /* no ARP protocol */
|
||||
#define IFF_PROMISC 0x100 /* receive all packets */
|
||||
#define IFF_ALLMULTI 0x200 /* receive all multicast packets*/
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/config.h>
|
||||
#include <linux/types.h>
|
||||
#include <net/request_sock.h>
|
||||
#include <net/sock.h>
|
||||
#include <linux/igmp.h>
|
||||
#include <net/flow.h>
|
||||
@@ -107,6 +108,26 @@ struct ip_options {
|
||||
|
||||
#define optlength(opt) (sizeof(struct ip_options) + opt->optlen)
|
||||
|
||||
struct inet_request_sock {
|
||||
struct request_sock req;
|
||||
u32 loc_addr;
|
||||
u32 rmt_addr;
|
||||
u16 rmt_port;
|
||||
u16 snd_wscale : 4,
|
||||
rcv_wscale : 4,
|
||||
tstamp_ok : 1,
|
||||
sack_ok : 1,
|
||||
wscale_ok : 1,
|
||||
ecn_ok : 1,
|
||||
acked : 1;
|
||||
struct ip_options *opt;
|
||||
};
|
||||
|
||||
static inline struct inet_request_sock *inet_rsk(const struct request_sock *sk)
|
||||
{
|
||||
return (struct inet_request_sock *)sk;
|
||||
}
|
||||
|
||||
struct ipv6_pinfo;
|
||||
|
||||
struct inet_sock {
|
||||
|
||||
@@ -193,6 +193,19 @@ struct inet6_skb_parm {
|
||||
|
||||
#define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb))
|
||||
|
||||
struct tcp6_request_sock {
|
||||
struct tcp_request_sock req;
|
||||
struct in6_addr loc_addr;
|
||||
struct in6_addr rmt_addr;
|
||||
struct sk_buff *pktopts;
|
||||
int iif;
|
||||
};
|
||||
|
||||
static inline struct tcp6_request_sock *tcp6_rsk(const struct request_sock *sk)
|
||||
{
|
||||
return (struct tcp6_request_sock *)sk;
|
||||
}
|
||||
|
||||
/**
|
||||
* struct ipv6_pinfo - ipv6 private area
|
||||
*
|
||||
|
||||
@@ -421,6 +421,7 @@ extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg,
|
||||
extern unsigned int ata_dev_classify(struct ata_taskfile *tf);
|
||||
extern void ata_dev_id_string(u16 *id, unsigned char *s,
|
||||
unsigned int ofs, unsigned int len);
|
||||
extern void ata_dev_config(struct ata_port *ap, unsigned int i);
|
||||
extern void ata_bmdma_setup (struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_start (struct ata_queued_cmd *qc);
|
||||
extern void ata_bmdma_stop(struct ata_port *ap);
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
#define I2O_MAJOR 80 /* 80->87 */
|
||||
|
||||
#define SHMIQ_MAJOR 85 /* Linux/mips, SGI /dev/shmiq */
|
||||
#define SCSI_CHANGER_MAJOR 86
|
||||
|
||||
#define IDE6_MAJOR 88
|
||||
#define IDE7_MAJOR 89
|
||||
|
||||
@@ -156,7 +156,7 @@ struct netlink_notify
|
||||
};
|
||||
|
||||
static __inline__ struct nlmsghdr *
|
||||
__nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len)
|
||||
__nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
|
||||
{
|
||||
struct nlmsghdr *nlh;
|
||||
int size = NLMSG_LENGTH(len);
|
||||
@@ -164,15 +164,31 @@ __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len)
|
||||
nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size));
|
||||
nlh->nlmsg_type = type;
|
||||
nlh->nlmsg_len = size;
|
||||
nlh->nlmsg_flags = 0;
|
||||
nlh->nlmsg_flags = flags;
|
||||
nlh->nlmsg_pid = pid;
|
||||
nlh->nlmsg_seq = seq;
|
||||
return nlh;
|
||||
}
|
||||
|
||||
#define NLMSG_NEW(skb, pid, seq, type, len, flags) \
|
||||
({ if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) \
|
||||
goto nlmsg_failure; \
|
||||
__nlmsg_put(skb, pid, seq, type, len, flags); })
|
||||
|
||||
#define NLMSG_PUT(skb, pid, seq, type, len) \
|
||||
({ if (skb_tailroom(skb) < (int)NLMSG_SPACE(len)) goto nlmsg_failure; \
|
||||
__nlmsg_put(skb, pid, seq, type, len); })
|
||||
NLMSG_NEW(skb, pid, seq, type, len, 0)
|
||||
|
||||
#define NLMSG_NEW_ANSWER(skb, cb, type, len, flags) \
|
||||
NLMSG_NEW(skb, NETLINK_CB((cb)->skb).pid, \
|
||||
(cb)->nlh->nlmsg_seq, type, len, flags)
|
||||
|
||||
#define NLMSG_END(skb, nlh) \
|
||||
({ (nlh)->nlmsg_len = (skb)->tail - (unsigned char *) (nlh); \
|
||||
(skb)->len; })
|
||||
|
||||
#define NLMSG_CANCEL(skb, nlh) \
|
||||
({ skb_trim(skb, (unsigned char *) (nlh) - (skb)->data); \
|
||||
-1; })
|
||||
|
||||
extern int netlink_dump_start(struct sock *ssk, struct sk_buff *skb,
|
||||
struct nlmsghdr *nlh,
|
||||
|
||||
@@ -89,6 +89,13 @@ enum {
|
||||
RTM_GETANYCAST = 62,
|
||||
#define RTM_GETANYCAST RTM_GETANYCAST
|
||||
|
||||
RTM_NEWNEIGHTBL = 64,
|
||||
#define RTM_NEWNEIGHTBL RTM_NEWNEIGHTBL
|
||||
RTM_GETNEIGHTBL = 66,
|
||||
#define RTM_GETNEIGHTBL RTM_GETNEIGHTBL
|
||||
RTM_SETNEIGHTBL,
|
||||
#define RTM_SETNEIGHTBL RTM_SETNEIGHTBL
|
||||
|
||||
__RTM_MAX,
|
||||
#define RTM_MAX (((__RTM_MAX + 3) & ~3) - 1)
|
||||
};
|
||||
@@ -493,6 +500,106 @@ struct nda_cacheinfo
|
||||
__u32 ndm_refcnt;
|
||||
};
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
* Neighbour tables specific messages.
|
||||
*
|
||||
* To retrieve the neighbour tables send RTM_GETNEIGHTBL with the
|
||||
* NLM_F_DUMP flag set. Every neighbour table configuration is
|
||||
* spread over multiple messages to avoid running into message
|
||||
* size limits on systems with many interfaces. The first message
|
||||
* in the sequence transports all not device specific data such as
|
||||
* statistics, configuration, and the default parameter set.
|
||||
* This message is followed by 0..n messages carrying device
|
||||
* specific parameter sets.
|
||||
* Although the ordering should be sufficient, NDTA_NAME can be
|
||||
* used to identify sequences. The initial message can be identified
|
||||
* by checking for NDTA_CONFIG. The device specific messages do
|
||||
* not contain this TLV but have NDTPA_IFINDEX set to the
|
||||
* corresponding interface index.
|
||||
*
|
||||
* To change neighbour table attributes, send RTM_SETNEIGHTBL
|
||||
* with NDTA_NAME set. Changeable attribute include NDTA_THRESH[1-3],
|
||||
* NDTA_GC_INTERVAL, and all TLVs in NDTA_PARMS unless marked
|
||||
* otherwise. Device specific parameter sets can be changed by
|
||||
* setting NDTPA_IFINDEX to the interface index of the corresponding
|
||||
* device.
|
||||
****/
|
||||
|
||||
struct ndt_stats
|
||||
{
|
||||
__u64 ndts_allocs;
|
||||
__u64 ndts_destroys;
|
||||
__u64 ndts_hash_grows;
|
||||
__u64 ndts_res_failed;
|
||||
__u64 ndts_lookups;
|
||||
__u64 ndts_hits;
|
||||
__u64 ndts_rcv_probes_mcast;
|
||||
__u64 ndts_rcv_probes_ucast;
|
||||
__u64 ndts_periodic_gc_runs;
|
||||
__u64 ndts_forced_gc_runs;
|
||||
};
|
||||
|
||||
enum {
|
||||
NDTPA_UNSPEC,
|
||||
NDTPA_IFINDEX, /* u32, unchangeable */
|
||||
NDTPA_REFCNT, /* u32, read-only */
|
||||
NDTPA_REACHABLE_TIME, /* u64, read-only, msecs */
|
||||
NDTPA_BASE_REACHABLE_TIME, /* u64, msecs */
|
||||
NDTPA_RETRANS_TIME, /* u64, msecs */
|
||||
NDTPA_GC_STALETIME, /* u64, msecs */
|
||||
NDTPA_DELAY_PROBE_TIME, /* u64, msecs */
|
||||
NDTPA_QUEUE_LEN, /* u32 */
|
||||
NDTPA_APP_PROBES, /* u32 */
|
||||
NDTPA_UCAST_PROBES, /* u32 */
|
||||
NDTPA_MCAST_PROBES, /* u32 */
|
||||
NDTPA_ANYCAST_DELAY, /* u64, msecs */
|
||||
NDTPA_PROXY_DELAY, /* u64, msecs */
|
||||
NDTPA_PROXY_QLEN, /* u32 */
|
||||
NDTPA_LOCKTIME, /* u64, msecs */
|
||||
__NDTPA_MAX
|
||||
};
|
||||
#define NDTPA_MAX (__NDTPA_MAX - 1)
|
||||
|
||||
struct ndtmsg
|
||||
{
|
||||
__u8 ndtm_family;
|
||||
__u8 ndtm_pad1;
|
||||
__u16 ndtm_pad2;
|
||||
};
|
||||
|
||||
struct ndt_config
|
||||
{
|
||||
__u16 ndtc_key_len;
|
||||
__u16 ndtc_entry_size;
|
||||
__u32 ndtc_entries;
|
||||
__u32 ndtc_last_flush; /* delta to now in msecs */
|
||||
__u32 ndtc_last_rand; /* delta to now in msecs */
|
||||
__u32 ndtc_hash_rnd;
|
||||
__u32 ndtc_hash_mask;
|
||||
__u32 ndtc_hash_chain_gc;
|
||||
__u32 ndtc_proxy_qlen;
|
||||
};
|
||||
|
||||
enum {
|
||||
NDTA_UNSPEC,
|
||||
NDTA_NAME, /* char *, unchangeable */
|
||||
NDTA_THRESH1, /* u32 */
|
||||
NDTA_THRESH2, /* u32 */
|
||||
NDTA_THRESH3, /* u32 */
|
||||
NDTA_CONFIG, /* struct ndt_config, read-only */
|
||||
NDTA_PARMS, /* nested TLV NDTPA_* */
|
||||
NDTA_STATS, /* struct ndt_stats, read-only */
|
||||
NDTA_GC_INTERVAL, /* u64, msecs */
|
||||
__NDTA_MAX
|
||||
};
|
||||
#define NDTA_MAX (__NDTA_MAX - 1)
|
||||
|
||||
#define NDTA_RTA(r) ((struct rtattr*)(((char*)(r)) + \
|
||||
NLMSG_ALIGN(sizeof(struct ndtmsg))))
|
||||
#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
|
||||
|
||||
|
||||
/****
|
||||
* General form of address family dependent message.
|
||||
****/
|
||||
@@ -789,6 +896,75 @@ extern void __rta_fill(struct sk_buff *skb, int attrtype, int attrlen, const voi
|
||||
({ if (unlikely(skb_tailroom(skb) < (int)(attrlen))) \
|
||||
goto rtattr_failure; \
|
||||
memcpy(skb_put(skb, RTA_ALIGN(attrlen)), data, attrlen); })
|
||||
|
||||
#define RTA_PUT_U8(skb, attrtype, value) \
|
||||
({ u8 _tmp = (value); \
|
||||
RTA_PUT(skb, attrtype, sizeof(u8), &_tmp); })
|
||||
|
||||
#define RTA_PUT_U16(skb, attrtype, value) \
|
||||
({ u16 _tmp = (value); \
|
||||
RTA_PUT(skb, attrtype, sizeof(u16), &_tmp); })
|
||||
|
||||
#define RTA_PUT_U32(skb, attrtype, value) \
|
||||
({ u32 _tmp = (value); \
|
||||
RTA_PUT(skb, attrtype, sizeof(u32), &_tmp); })
|
||||
|
||||
#define RTA_PUT_U64(skb, attrtype, value) \
|
||||
({ u64 _tmp = (value); \
|
||||
RTA_PUT(skb, attrtype, sizeof(u64), &_tmp); })
|
||||
|
||||
#define RTA_PUT_SECS(skb, attrtype, value) \
|
||||
RTA_PUT_U64(skb, attrtype, (value) / HZ)
|
||||
|
||||
#define RTA_PUT_MSECS(skb, attrtype, value) \
|
||||
RTA_PUT_U64(skb, attrtype, jiffies_to_msecs(value))
|
||||
|
||||
#define RTA_PUT_STRING(skb, attrtype, value) \
|
||||
RTA_PUT(skb, attrtype, strlen(value) + 1, value)
|
||||
|
||||
#define RTA_PUT_FLAG(skb, attrtype) \
|
||||
RTA_PUT(skb, attrtype, 0, NULL);
|
||||
|
||||
#define RTA_NEST(skb, type) \
|
||||
({ struct rtattr *__start = (struct rtattr *) (skb)->tail; \
|
||||
RTA_PUT(skb, type, 0, NULL); \
|
||||
__start; })
|
||||
|
||||
#define RTA_NEST_END(skb, start) \
|
||||
({ (start)->rta_len = ((skb)->tail - (unsigned char *) (start)); \
|
||||
(skb)->len; })
|
||||
|
||||
#define RTA_NEST_CANCEL(skb, start) \
|
||||
({ if (start) \
|
||||
skb_trim(skb, (unsigned char *) (start) - (skb)->data); \
|
||||
-1; })
|
||||
|
||||
#define RTA_GET_U8(rta) \
|
||||
({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u8)) \
|
||||
goto rtattr_failure; \
|
||||
*(u8 *) RTA_DATA(rta); })
|
||||
|
||||
#define RTA_GET_U16(rta) \
|
||||
({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u16)) \
|
||||
goto rtattr_failure; \
|
||||
*(u16 *) RTA_DATA(rta); })
|
||||
|
||||
#define RTA_GET_U32(rta) \
|
||||
({ if (!rta || RTA_PAYLOAD(rta) < sizeof(u32)) \
|
||||
goto rtattr_failure; \
|
||||
*(u32 *) RTA_DATA(rta); })
|
||||
|
||||
#define RTA_GET_U64(rta) \
|
||||
({ u64 _tmp; \
|
||||
if (!rta || RTA_PAYLOAD(rta) < sizeof(u64)) \
|
||||
goto rtattr_failure; \
|
||||
memcpy(&_tmp, RTA_DATA(rta), sizeof(_tmp)); \
|
||||
_tmp; })
|
||||
|
||||
#define RTA_GET_FLAG(rta) (!!(rta))
|
||||
|
||||
#define RTA_GET_SECS(rta) ((unsigned long) RTA_GET_U64(rta) * HZ)
|
||||
#define RTA_GET_MSECS(rta) (msecs_to_jiffies((unsigned long) RTA_GET_U64(rta)))
|
||||
|
||||
static inline struct rtattr *
|
||||
__rta_reserve(struct sk_buff *skb, int attrtype, int attrlen)
|
||||
|
||||
@@ -64,6 +64,7 @@ extern int kmem_cache_shrink(kmem_cache_t *);
|
||||
extern void *kmem_cache_alloc(kmem_cache_t *, unsigned int __nocast);
|
||||
extern void kmem_cache_free(kmem_cache_t *, void *);
|
||||
extern unsigned int kmem_cache_size(kmem_cache_t *);
|
||||
extern const char *kmem_cache_name(kmem_cache_t *);
|
||||
extern kmem_cache_t *kmem_find_general_cachep(size_t size, int gfpflags);
|
||||
|
||||
/* Size description struct for general caches. */
|
||||
|
||||
@@ -230,6 +230,17 @@ struct tcp_options_received {
|
||||
__u16 mss_clamp; /* Maximal mss, negotiated at connection setup */
|
||||
};
|
||||
|
||||
struct tcp_request_sock {
|
||||
struct inet_request_sock req;
|
||||
__u32 rcv_isn;
|
||||
__u32 snt_isn;
|
||||
};
|
||||
|
||||
static inline struct tcp_request_sock *tcp_rsk(const struct request_sock *req)
|
||||
{
|
||||
return (struct tcp_request_sock *)req;
|
||||
}
|
||||
|
||||
struct tcp_sock {
|
||||
/* inet_sock has to be the first member of tcp_sock */
|
||||
struct inet_sock inet;
|
||||
@@ -368,22 +379,7 @@ struct tcp_sock {
|
||||
|
||||
__u32 total_retrans; /* Total retransmits for entire connection */
|
||||
|
||||
/* The syn_wait_lock is necessary only to avoid proc interface having
|
||||
* to grab the main lock sock while browsing the listening hash
|
||||
* (otherwise it's deadlock prone).
|
||||
* This lock is acquired in read mode only from listening_get_next()
|
||||
* and it's acquired in write mode _only_ from code that is actively
|
||||
* changing the syn_wait_queue. All readers that are holding
|
||||
* the master sock lock don't need to grab this lock in read mode
|
||||
* too as the syn_wait_queue writes are always protected from
|
||||
* the main sock lock.
|
||||
*/
|
||||
rwlock_t syn_wait_lock;
|
||||
struct tcp_listen_opt *listen_opt;
|
||||
|
||||
/* FIFO of established children */
|
||||
struct open_request *accept_queue;
|
||||
struct open_request *accept_queue_tail;
|
||||
struct request_sock_queue accept_queue; /* FIFO of established children */
|
||||
|
||||
unsigned int keepalive_time; /* time before keep alive takes place */
|
||||
unsigned int keepalive_intvl; /* time interval between keep alive probes */
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/*
|
||||
* This file define a set of standard wireless extensions
|
||||
*
|
||||
* Version : 17 21.6.04
|
||||
* Version : 18 12.3.05
|
||||
*
|
||||
* Authors : Jean Tourrilhes - HPL - <jt@hpl.hp.com>
|
||||
* Copyright (c) 1997-2004 Jean Tourrilhes, All Rights Reserved.
|
||||
* Copyright (c) 1997-2005 Jean Tourrilhes, All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_WIRELESS_H
|
||||
@@ -82,7 +82,7 @@
|
||||
* (there is some stuff that will be added in the future...)
|
||||
* I just plan to increment with each new version.
|
||||
*/
|
||||
#define WIRELESS_EXT 17
|
||||
#define WIRELESS_EXT 18
|
||||
|
||||
/*
|
||||
* Changes :
|
||||
@@ -182,6 +182,21 @@
|
||||
* - Document (struct iw_quality *)->updated, add new flags (INVALID)
|
||||
* - Wireless Event capability in struct iw_range
|
||||
* - Add support for relative TxPower (yick !)
|
||||
*
|
||||
* V17 to V18 (From Jouni Malinen <jkmaline@cc.hut.fi>)
|
||||
* ----------
|
||||
* - Add support for WPA/WPA2
|
||||
* - Add extended encoding configuration (SIOCSIWENCODEEXT and
|
||||
* SIOCGIWENCODEEXT)
|
||||
* - Add SIOCSIWGENIE/SIOCGIWGENIE
|
||||
* - Add SIOCSIWMLME
|
||||
* - Add SIOCSIWPMKSA
|
||||
* - Add struct iw_range bit field for supported encoding capabilities
|
||||
* - Add optional scan request parameters for SIOCSIWSCAN
|
||||
* - Add SIOCSIWAUTH/SIOCGIWAUTH for setting authentication and WPA
|
||||
* related parameters (extensible up to 4096 parameter values)
|
||||
* - Add wireless events: IWEVGENIE, IWEVMICHAELMICFAILURE,
|
||||
* IWEVASSOCREQIE, IWEVASSOCRESPIE, IWEVPMKIDCAND
|
||||
*/
|
||||
|
||||
/**************************** CONSTANTS ****************************/
|
||||
@@ -256,6 +271,30 @@
|
||||
#define SIOCSIWPOWER 0x8B2C /* set Power Management settings */
|
||||
#define SIOCGIWPOWER 0x8B2D /* get Power Management settings */
|
||||
|
||||
/* WPA : Generic IEEE 802.11 informatiom element (e.g., for WPA/RSN/WMM).
|
||||
* This ioctl uses struct iw_point and data buffer that includes IE id and len
|
||||
* fields. More than one IE may be included in the request. Setting the generic
|
||||
* IE to empty buffer (len=0) removes the generic IE from the driver. Drivers
|
||||
* are allowed to generate their own WPA/RSN IEs, but in these cases, drivers
|
||||
* are required to report the used IE as a wireless event, e.g., when
|
||||
* associating with an AP. */
|
||||
#define SIOCSIWGENIE 0x8B30 /* set generic IE */
|
||||
#define SIOCGIWGENIE 0x8B31 /* get generic IE */
|
||||
|
||||
/* WPA : IEEE 802.11 MLME requests */
|
||||
#define SIOCSIWMLME 0x8B16 /* request MLME operation; uses
|
||||
* struct iw_mlme */
|
||||
/* WPA : Authentication mode parameters */
|
||||
#define SIOCSIWAUTH 0x8B32 /* set authentication mode params */
|
||||
#define SIOCGIWAUTH 0x8B33 /* get authentication mode params */
|
||||
|
||||
/* WPA : Extended version of encoding configuration */
|
||||
#define SIOCSIWENCODEEXT 0x8B34 /* set encoding token & mode */
|
||||
#define SIOCGIWENCODEEXT 0x8B35 /* get encoding token & mode */
|
||||
|
||||
/* WPA2 : PMKSA cache management */
|
||||
#define SIOCSIWPMKSA 0x8B36 /* PMKSA cache operation */
|
||||
|
||||
/* -------------------- DEV PRIVATE IOCTL LIST -------------------- */
|
||||
|
||||
/* These 32 ioctl are wireless device private, for 16 commands.
|
||||
@@ -297,6 +336,34 @@
|
||||
#define IWEVCUSTOM 0x8C02 /* Driver specific ascii string */
|
||||
#define IWEVREGISTERED 0x8C03 /* Discovered a new node (AP mode) */
|
||||
#define IWEVEXPIRED 0x8C04 /* Expired a node (AP mode) */
|
||||
#define IWEVGENIE 0x8C05 /* Generic IE (WPA, RSN, WMM, ..)
|
||||
* (scan results); This includes id and
|
||||
* length fields. One IWEVGENIE may
|
||||
* contain more than one IE. Scan
|
||||
* results may contain one or more
|
||||
* IWEVGENIE events. */
|
||||
#define IWEVMICHAELMICFAILURE 0x8C06 /* Michael MIC failure
|
||||
* (struct iw_michaelmicfailure)
|
||||
*/
|
||||
#define IWEVASSOCREQIE 0x8C07 /* IEs used in (Re)Association Request.
|
||||
* The data includes id and length
|
||||
* fields and may contain more than one
|
||||
* IE. This event is required in
|
||||
* Managed mode if the driver
|
||||
* generates its own WPA/RSN IE. This
|
||||
* should be sent just before
|
||||
* IWEVREGISTERED event for the
|
||||
* association. */
|
||||
#define IWEVASSOCRESPIE 0x8C08 /* IEs used in (Re)Association
|
||||
* Response. The data includes id and
|
||||
* length fields and may contain more
|
||||
* than one IE. This may be sent
|
||||
* between IWEVASSOCREQIE and
|
||||
* IWEVREGISTERED events for the
|
||||
* association. */
|
||||
#define IWEVPMKIDCAND 0x8C09 /* PMKID candidate for RSN
|
||||
* pre-authentication
|
||||
* (struct iw_pmkid_cand) */
|
||||
|
||||
#define IWEVFIRST 0x8C00
|
||||
|
||||
@@ -432,12 +499,94 @@
|
||||
#define IW_SCAN_THIS_MODE 0x0020 /* Scan only this Mode */
|
||||
#define IW_SCAN_ALL_RATE 0x0040 /* Scan all Bit-Rates */
|
||||
#define IW_SCAN_THIS_RATE 0x0080 /* Scan only this Bit-Rate */
|
||||
/* struct iw_scan_req scan_type */
|
||||
#define IW_SCAN_TYPE_ACTIVE 0
|
||||
#define IW_SCAN_TYPE_PASSIVE 1
|
||||
/* Maximum size of returned data */
|
||||
#define IW_SCAN_MAX_DATA 4096 /* In bytes */
|
||||
|
||||
/* Max number of char in custom event - use multiple of them if needed */
|
||||
#define IW_CUSTOM_MAX 256 /* In bytes */
|
||||
|
||||
/* Generic information element */
|
||||
#define IW_GENERIC_IE_MAX 1024
|
||||
|
||||
/* MLME requests (SIOCSIWMLME / struct iw_mlme) */
|
||||
#define IW_MLME_DEAUTH 0
|
||||
#define IW_MLME_DISASSOC 1
|
||||
|
||||
/* SIOCSIWAUTH/SIOCGIWAUTH struct iw_param flags */
|
||||
#define IW_AUTH_INDEX 0x0FFF
|
||||
#define IW_AUTH_FLAGS 0xF000
|
||||
/* SIOCSIWAUTH/SIOCGIWAUTH parameters (0 .. 4095)
|
||||
* (IW_AUTH_INDEX mask in struct iw_param flags; this is the index of the
|
||||
* parameter that is being set/get to; value will be read/written to
|
||||
* struct iw_param value field) */
|
||||
#define IW_AUTH_WPA_VERSION 0
|
||||
#define IW_AUTH_CIPHER_PAIRWISE 1
|
||||
#define IW_AUTH_CIPHER_GROUP 2
|
||||
#define IW_AUTH_KEY_MGMT 3
|
||||
#define IW_AUTH_TKIP_COUNTERMEASURES 4
|
||||
#define IW_AUTH_DROP_UNENCRYPTED 5
|
||||
#define IW_AUTH_80211_AUTH_ALG 6
|
||||
#define IW_AUTH_WPA_ENABLED 7
|
||||
#define IW_AUTH_RX_UNENCRYPTED_EAPOL 8
|
||||
#define IW_AUTH_ROAMING_CONTROL 9
|
||||
#define IW_AUTH_PRIVACY_INVOKED 10
|
||||
|
||||
/* IW_AUTH_WPA_VERSION values (bit field) */
|
||||
#define IW_AUTH_WPA_VERSION_DISABLED 0x00000001
|
||||
#define IW_AUTH_WPA_VERSION_WPA 0x00000002
|
||||
#define IW_AUTH_WPA_VERSION_WPA2 0x00000004
|
||||
|
||||
/* IW_AUTH_PAIRWISE_CIPHER and IW_AUTH_GROUP_CIPHER values (bit field) */
|
||||
#define IW_AUTH_CIPHER_NONE 0x00000001
|
||||
#define IW_AUTH_CIPHER_WEP40 0x00000002
|
||||
#define IW_AUTH_CIPHER_TKIP 0x00000004
|
||||
#define IW_AUTH_CIPHER_CCMP 0x00000008
|
||||
#define IW_AUTH_CIPHER_WEP104 0x00000010
|
||||
|
||||
/* IW_AUTH_KEY_MGMT values (bit field) */
|
||||
#define IW_AUTH_KEY_MGMT_802_1X 1
|
||||
#define IW_AUTH_KEY_MGMT_PSK 2
|
||||
|
||||
/* IW_AUTH_80211_AUTH_ALG values (bit field) */
|
||||
#define IW_AUTH_ALG_OPEN_SYSTEM 0x00000001
|
||||
#define IW_AUTH_ALG_SHARED_KEY 0x00000002
|
||||
#define IW_AUTH_ALG_LEAP 0x00000004
|
||||
|
||||
/* IW_AUTH_ROAMING_CONTROL values */
|
||||
#define IW_AUTH_ROAMING_ENABLE 0 /* driver/firmware based roaming */
|
||||
#define IW_AUTH_ROAMING_DISABLE 1 /* user space program used for roaming
|
||||
* control */
|
||||
|
||||
/* SIOCSIWENCODEEXT definitions */
|
||||
#define IW_ENCODE_SEQ_MAX_SIZE 8
|
||||
/* struct iw_encode_ext ->alg */
|
||||
#define IW_ENCODE_ALG_NONE 0
|
||||
#define IW_ENCODE_ALG_WEP 1
|
||||
#define IW_ENCODE_ALG_TKIP 2
|
||||
#define IW_ENCODE_ALG_CCMP 3
|
||||
/* struct iw_encode_ext ->ext_flags */
|
||||
#define IW_ENCODE_EXT_TX_SEQ_VALID 0x00000001
|
||||
#define IW_ENCODE_EXT_RX_SEQ_VALID 0x00000002
|
||||
#define IW_ENCODE_EXT_GROUP_KEY 0x00000004
|
||||
#define IW_ENCODE_EXT_SET_TX_KEY 0x00000008
|
||||
|
||||
/* IWEVMICHAELMICFAILURE : struct iw_michaelmicfailure ->flags */
|
||||
#define IW_MICFAILURE_KEY_ID 0x00000003 /* Key ID 0..3 */
|
||||
#define IW_MICFAILURE_GROUP 0x00000004
|
||||
#define IW_MICFAILURE_PAIRWISE 0x00000008
|
||||
#define IW_MICFAILURE_STAKEY 0x00000010
|
||||
#define IW_MICFAILURE_COUNT 0x00000060 /* 1 or 2 (0 = count not supported)
|
||||
*/
|
||||
|
||||
/* Bit field values for enc_capa in struct iw_range */
|
||||
#define IW_ENC_CAPA_WPA 0x00000001
|
||||
#define IW_ENC_CAPA_WPA2 0x00000002
|
||||
#define IW_ENC_CAPA_CIPHER_TKIP 0x00000004
|
||||
#define IW_ENC_CAPA_CIPHER_CCMP 0x00000008
|
||||
|
||||
/* Event capability macros - in (struct iw_range *)->event_capa
|
||||
* Because we have more than 32 possible events, we use an array of
|
||||
* 32 bit bitmasks. Note : 32 bits = 0x20 = 2^5. */
|
||||
@@ -546,6 +695,132 @@ struct iw_thrspy
|
||||
struct iw_quality high; /* High threshold */
|
||||
};
|
||||
|
||||
/*
|
||||
* Optional data for scan request
|
||||
*
|
||||
* Note: these optional parameters are controlling parameters for the
|
||||
* scanning behavior, these do not apply to getting scan results
|
||||
* (SIOCGIWSCAN). Drivers are expected to keep a local BSS table and
|
||||
* provide a merged results with all BSSes even if the previous scan
|
||||
* request limited scanning to a subset, e.g., by specifying an SSID.
|
||||
* Especially, scan results are required to include an entry for the
|
||||
* current BSS if the driver is in Managed mode and associated with an AP.
|
||||
*/
|
||||
struct iw_scan_req
|
||||
{
|
||||
__u8 scan_type; /* IW_SCAN_TYPE_{ACTIVE,PASSIVE} */
|
||||
__u8 essid_len;
|
||||
__u8 num_channels; /* num entries in channel_list;
|
||||
* 0 = scan all allowed channels */
|
||||
__u8 flags; /* reserved as padding; use zero, this may
|
||||
* be used in the future for adding flags
|
||||
* to request different scan behavior */
|
||||
struct sockaddr bssid; /* ff:ff:ff:ff:ff:ff for broadcast BSSID or
|
||||
* individual address of a specific BSS */
|
||||
|
||||
/*
|
||||
* Use this ESSID if IW_SCAN_THIS_ESSID flag is used instead of using
|
||||
* the current ESSID. This allows scan requests for specific ESSID
|
||||
* without having to change the current ESSID and potentially breaking
|
||||
* the current association.
|
||||
*/
|
||||
__u8 essid[IW_ESSID_MAX_SIZE];
|
||||
|
||||
/*
|
||||
* Optional parameters for changing the default scanning behavior.
|
||||
* These are based on the MLME-SCAN.request from IEEE Std 802.11.
|
||||
* TU is 1.024 ms. If these are set to 0, driver is expected to use
|
||||
* reasonable default values. min_channel_time defines the time that
|
||||
* will be used to wait for the first reply on each channel. If no
|
||||
* replies are received, next channel will be scanned after this. If
|
||||
* replies are received, total time waited on the channel is defined by
|
||||
* max_channel_time.
|
||||
*/
|
||||
__u32 min_channel_time; /* in TU */
|
||||
__u32 max_channel_time; /* in TU */
|
||||
|
||||
struct iw_freq channel_list[IW_MAX_FREQUENCIES];
|
||||
};
|
||||
|
||||
/* ------------------------- WPA SUPPORT ------------------------- */
|
||||
|
||||
/*
|
||||
* Extended data structure for get/set encoding (this is used with
|
||||
* SIOCSIWENCODEEXT/SIOCGIWENCODEEXT. struct iw_point and IW_ENCODE_*
|
||||
* flags are used in the same way as with SIOCSIWENCODE/SIOCGIWENCODE and
|
||||
* only the data contents changes (key data -> this structure, including
|
||||
* key data).
|
||||
*
|
||||
* If the new key is the first group key, it will be set as the default
|
||||
* TX key. Otherwise, default TX key index is only changed if
|
||||
* IW_ENCODE_EXT_SET_TX_KEY flag is set.
|
||||
*
|
||||
* Key will be changed with SIOCSIWENCODEEXT in all cases except for
|
||||
* special "change TX key index" operation which is indicated by setting
|
||||
* key_len = 0 and ext_flags |= IW_ENCODE_EXT_SET_TX_KEY.
|
||||
*
|
||||
* tx_seq/rx_seq are only used when respective
|
||||
* IW_ENCODE_EXT_{TX,RX}_SEQ_VALID flag is set in ext_flags. Normal
|
||||
* TKIP/CCMP operation is to set RX seq with SIOCSIWENCODEEXT and start
|
||||
* TX seq from zero whenever key is changed. SIOCGIWENCODEEXT is normally
|
||||
* used only by an Authenticator (AP or an IBSS station) to get the
|
||||
* current TX sequence number. Using TX_SEQ_VALID for SIOCSIWENCODEEXT and
|
||||
* RX_SEQ_VALID for SIOCGIWENCODEEXT are optional, but can be useful for
|
||||
* debugging/testing.
|
||||
*/
|
||||
struct iw_encode_ext
|
||||
{
|
||||
__u32 ext_flags; /* IW_ENCODE_EXT_* */
|
||||
__u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
|
||||
__u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
|
||||
struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast
|
||||
* (group) keys or unicast address for
|
||||
* individual keys */
|
||||
__u16 alg; /* IW_ENCODE_ALG_* */
|
||||
__u16 key_len;
|
||||
__u8 key[0];
|
||||
};
|
||||
|
||||
/* SIOCSIWMLME data */
|
||||
struct iw_mlme
|
||||
{
|
||||
__u16 cmd; /* IW_MLME_* */
|
||||
__u16 reason_code;
|
||||
struct sockaddr addr;
|
||||
};
|
||||
|
||||
/* SIOCSIWPMKSA data */
|
||||
#define IW_PMKSA_ADD 1
|
||||
#define IW_PMKSA_REMOVE 2
|
||||
#define IW_PMKSA_FLUSH 3
|
||||
|
||||
#define IW_PMKID_LEN 16
|
||||
|
||||
struct iw_pmksa
|
||||
{
|
||||
__u32 cmd; /* IW_PMKSA_* */
|
||||
struct sockaddr bssid;
|
||||
__u8 pmkid[IW_PMKID_LEN];
|
||||
};
|
||||
|
||||
/* IWEVMICHAELMICFAILURE data */
|
||||
struct iw_michaelmicfailure
|
||||
{
|
||||
__u32 flags;
|
||||
struct sockaddr src_addr;
|
||||
__u8 tsc[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
|
||||
};
|
||||
|
||||
/* IWEVPMKIDCAND data */
|
||||
#define IW_PMKID_CAND_PREAUTH 0x00000001 /* RNS pre-authentication enabled */
|
||||
struct iw_pmkid_cand
|
||||
{
|
||||
__u32 flags; /* IW_PMKID_CAND_* */
|
||||
__u32 index; /* the smaller the index, the higher the
|
||||
* priority */
|
||||
struct sockaddr bssid;
|
||||
};
|
||||
|
||||
/* ------------------------ WIRELESS STATS ------------------------ */
|
||||
/*
|
||||
* Wireless statistics (used for /proc/net/wireless)
|
||||
@@ -725,6 +1000,8 @@ struct iw_range
|
||||
struct iw_freq freq[IW_MAX_FREQUENCIES]; /* list */
|
||||
/* Note : this frequency list doesn't need to fit channel numbers,
|
||||
* because each entry contain its channel index */
|
||||
|
||||
__u32 enc_capa; /* IW_ENC_CAPA_* bit field */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -174,6 +174,8 @@ enum xfrm_attr_type_t {
|
||||
XFRMA_ALG_COMP, /* struct xfrm_algo */
|
||||
XFRMA_ENCAP, /* struct xfrm_algo + struct xfrm_encap_tmpl */
|
||||
XFRMA_TMPL, /* 1 or more struct xfrm_user_tmpl */
|
||||
XFRMA_SA,
|
||||
XFRMA_POLICY,
|
||||
__XFRMA_MAX
|
||||
|
||||
#define XFRMA_MAX (__XFRMA_MAX - 1)
|
||||
@@ -257,5 +259,7 @@ struct xfrm_usersa_flush {
|
||||
|
||||
#define XFRMGRP_ACQUIRE 1
|
||||
#define XFRMGRP_EXPIRE 2
|
||||
#define XFRMGRP_SA 4
|
||||
#define XFRMGRP_POLICY 8
|
||||
|
||||
#endif /* _LINUX_XFRM_H */
|
||||
|
||||
Reference in New Issue
Block a user