ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-s390 / qeth.h
1 /*
2  * include/asm-s390/qeth.h
3  *
4  * ioctl definitions for qeth driver
5  *
6  * Copyright (C) 2004 IBM Corporation
7  *
8  * Author(s):   Thomas Spatzier <tspat@de.ibm.com>
9  *
10  */
11 #ifndef __ASM_S390_IOCTL_H__
12 #define __ASM_S390_IOCTL_H__
13 #include <linux/ioctl.h>
14
15 #define QETH_IOCTL_LETTER 'Q'
16
17 #define SIOC_QETH_ARP_SET_NO_ENTRIES    _IOWR(QETH_IOCTL_LETTER, 1, int)
18 #define SIOC_QETH_ARP_QUERY_INFO        _IOWR(QETH_IOCTL_LETTER, 2, int)
19 #define SIOC_QETH_ARP_ADD_ENTRY         _IOWR(QETH_IOCTL_LETTER, 3, int)
20 #define SIOC_QETH_ARP_REMOVE_ENTRY      _IOWR(QETH_IOCTL_LETTER, 4, int)
21 #define SIOC_QETH_ARP_FLUSH_CACHE       _IOWR(QETH_IOCTL_LETTER, 5, int)
22 #define SIOC_QETH_ADP_SET_SNMP_CONTROL  _IOWR(QETH_IOCTL_LETTER, 6, int)
23 #define SIOC_QETH_GET_CARD_TYPE         _IOWR(QETH_IOCTL_LETTER, 7, int)
24
25 struct qeth_arp_cache_entry {
26         __u8  macaddr[6];
27         __u8  reserved1[2];
28         __u8  ipaddr[16]; /* for both  IPv4 and IPv6 */
29         __u8  reserved2[32];
30 } __attribute__ ((packed));
31
32 struct qeth_arp_qi_entry7 {
33         __u8 media_specific[32];
34         __u8 macaddr_type;
35         __u8 ipaddr_type;
36         __u8 macaddr[6];
37         __u8 ipaddr[4];
38 } __attribute__((packed));
39
40 struct qeth_arp_qi_entry5 {
41         __u8 media_specific[32];
42         __u8 macaddr_type;
43         __u8 ipaddr_type;
44         __u8 ipaddr[4];
45 } __attribute__((packed));
46
47 /* data sent to user space as result of query arp ioctl */
48 #define QETH_QARP_USER_DATA_SIZE 20000
49 #define QETH_QARP_MASK_OFFSET    4
50 #define QETH_QARP_ENTRIES_OFFSET 6
51 struct qeth_arp_query_user_data {
52         union {
53                 __u32 data_len;         /* set by user space program */
54                 __u32 no_entries;       /* set by kernel */
55         } u;
56         __u16 mask_bits;
57         char *entries;
58 } __attribute__((packed));
59
60 #endif /* __ASM_S390_IOCTL_H__ */