Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 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_QETH_IOCTL_H__ |
| 12 | #define __ASM_S390_QETH_IOCTL_H__ |
Heiko Carstens | 0680ba0 | 2009-01-09 12:14:52 +0100 | [diff] [blame^] | 13 | #include <linux/types.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | #include <linux/ioctl.h> |
| 15 | |
| 16 | #define SIOC_QETH_ARP_SET_NO_ENTRIES (SIOCDEVPRIVATE) |
| 17 | #define SIOC_QETH_ARP_QUERY_INFO (SIOCDEVPRIVATE + 1) |
| 18 | #define SIOC_QETH_ARP_ADD_ENTRY (SIOCDEVPRIVATE + 2) |
| 19 | #define SIOC_QETH_ARP_REMOVE_ENTRY (SIOCDEVPRIVATE + 3) |
| 20 | #define SIOC_QETH_ARP_FLUSH_CACHE (SIOCDEVPRIVATE + 4) |
| 21 | #define SIOC_QETH_ADP_SET_SNMP_CONTROL (SIOCDEVPRIVATE + 5) |
| 22 | #define SIOC_QETH_GET_CARD_TYPE (SIOCDEVPRIVATE + 6) |
| 23 | |
| 24 | struct qeth_arp_cache_entry { |
| 25 | __u8 macaddr[6]; |
| 26 | __u8 reserved1[2]; |
| 27 | __u8 ipaddr[16]; /* for both IPv4 and IPv6 */ |
| 28 | __u8 reserved2[32]; |
| 29 | } __attribute__ ((packed)); |
| 30 | |
| 31 | struct qeth_arp_qi_entry7 { |
| 32 | __u8 media_specific[32]; |
| 33 | __u8 macaddr_type; |
| 34 | __u8 ipaddr_type; |
| 35 | __u8 macaddr[6]; |
| 36 | __u8 ipaddr[4]; |
| 37 | } __attribute__((packed)); |
| 38 | |
| 39 | struct qeth_arp_qi_entry7_short { |
| 40 | __u8 macaddr_type; |
| 41 | __u8 ipaddr_type; |
| 42 | __u8 macaddr[6]; |
| 43 | __u8 ipaddr[4]; |
| 44 | } __attribute__((packed)); |
| 45 | |
| 46 | struct qeth_arp_qi_entry5 { |
| 47 | __u8 media_specific[32]; |
| 48 | __u8 macaddr_type; |
| 49 | __u8 ipaddr_type; |
| 50 | __u8 ipaddr[4]; |
| 51 | } __attribute__((packed)); |
| 52 | |
| 53 | struct qeth_arp_qi_entry5_short { |
| 54 | __u8 macaddr_type; |
| 55 | __u8 ipaddr_type; |
| 56 | __u8 ipaddr[4]; |
| 57 | } __attribute__((packed)); |
| 58 | |
| 59 | /* |
| 60 | * can be set by user if no "media specific information" is wanted |
| 61 | * -> saves a lot of space in user space buffer |
| 62 | */ |
| 63 | #define QETH_QARP_STRIP_ENTRIES 0x8000 |
| 64 | #define QETH_QARP_REQUEST_MASK 0x00ff |
| 65 | |
| 66 | /* data sent to user space as result of query arp ioctl */ |
| 67 | #define QETH_QARP_USER_DATA_SIZE 20000 |
| 68 | #define QETH_QARP_MASK_OFFSET 4 |
| 69 | #define QETH_QARP_ENTRIES_OFFSET 6 |
| 70 | struct qeth_arp_query_user_data { |
| 71 | union { |
| 72 | __u32 data_len; /* set by user space program */ |
| 73 | __u32 no_entries; /* set by kernel */ |
| 74 | } u; |
| 75 | __u16 mask_bits; |
| 76 | char *entries; |
| 77 | } __attribute__((packed)); |
| 78 | |
| 79 | #endif /* __ASM_S390_QETH_IOCTL_H__ */ |