2005-04-17 02:20:36 +04:00
/*
* include / asm - s390 / qeth . h
*
* ioctl definitions for qeth driver
*
* Copyright ( C ) 2004 IBM Corporation
*
* Author ( s ) : Thomas Spatzier < tspat @ de . ibm . com >
*
*/
# ifndef __ASM_S390_QETH_IOCTL_H__
# define __ASM_S390_QETH_IOCTL_H__
[S390] types: add/fix types.h include in header files
/include/asm/chpid.h:12: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/chsc.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/cmb.h:28: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/dasd.h:195: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/kvm.h:16: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/kvm.h:30: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/qeth.h:24: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/schid.h:5: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/swab.h:12: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/swab.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-01-09 14:14:52 +03:00
# include <linux/types.h>
2005-04-17 02:20:36 +04:00
# include <linux/ioctl.h>
# define SIOC_QETH_ARP_SET_NO_ENTRIES (SIOCDEVPRIVATE)
# define SIOC_QETH_ARP_QUERY_INFO (SIOCDEVPRIVATE + 1)
# define SIOC_QETH_ARP_ADD_ENTRY (SIOCDEVPRIVATE + 2)
# define SIOC_QETH_ARP_REMOVE_ENTRY (SIOCDEVPRIVATE + 3)
# define SIOC_QETH_ARP_FLUSH_CACHE (SIOCDEVPRIVATE + 4)
# define SIOC_QETH_ADP_SET_SNMP_CONTROL (SIOCDEVPRIVATE + 5)
# define SIOC_QETH_GET_CARD_TYPE (SIOCDEVPRIVATE + 6)
struct qeth_arp_cache_entry {
__u8 macaddr [ 6 ] ;
__u8 reserved1 [ 2 ] ;
__u8 ipaddr [ 16 ] ; /* for both IPv4 and IPv6 */
__u8 reserved2 [ 32 ] ;
} __attribute__ ( ( packed ) ) ;
2010-12-08 05:57:58 +03:00
enum qeth_arp_ipaddrtype {
QETHARP_IP_ADDR_V4 = 1 ,
QETHARP_IP_ADDR_V6 = 2 ,
} ;
struct qeth_arp_entrytype {
__u8 mac ;
__u8 ip ;
} __attribute__ ( ( packed ) ) ;
# define QETH_QARP_MEDIASPECIFIC_BYTES 32
# define QETH_QARP_MACADDRTYPE_BYTES 1
2005-04-17 02:20:36 +04:00
struct qeth_arp_qi_entry7 {
2010-12-08 05:57:58 +03:00
__u8 media_specific [ QETH_QARP_MEDIASPECIFIC_BYTES ] ;
struct qeth_arp_entrytype type ;
2005-04-17 02:20:36 +04:00
__u8 macaddr [ 6 ] ;
__u8 ipaddr [ 4 ] ;
} __attribute__ ( ( packed ) ) ;
2010-12-08 05:57:58 +03:00
struct qeth_arp_qi_entry7_ipv6 {
__u8 media_specific [ QETH_QARP_MEDIASPECIFIC_BYTES ] ;
struct qeth_arp_entrytype type ;
__u8 macaddr [ 6 ] ;
__u8 ipaddr [ 16 ] ;
} __attribute__ ( ( packed ) ) ;
2005-04-17 02:20:36 +04:00
struct qeth_arp_qi_entry7_short {
2010-12-08 05:57:58 +03:00
struct qeth_arp_entrytype type ;
2005-04-17 02:20:36 +04:00
__u8 macaddr [ 6 ] ;
__u8 ipaddr [ 4 ] ;
} __attribute__ ( ( packed ) ) ;
2010-12-08 05:57:58 +03:00
struct qeth_arp_qi_entry7_short_ipv6 {
struct qeth_arp_entrytype type ;
__u8 macaddr [ 6 ] ;
__u8 ipaddr [ 16 ] ;
} __attribute__ ( ( packed ) ) ;
2005-04-17 02:20:36 +04:00
struct qeth_arp_qi_entry5 {
2010-12-08 05:57:58 +03:00
__u8 media_specific [ QETH_QARP_MEDIASPECIFIC_BYTES ] ;
struct qeth_arp_entrytype type ;
2005-04-17 02:20:36 +04:00
__u8 ipaddr [ 4 ] ;
} __attribute__ ( ( packed ) ) ;
2010-12-08 05:57:58 +03:00
struct qeth_arp_qi_entry5_ipv6 {
__u8 media_specific [ QETH_QARP_MEDIASPECIFIC_BYTES ] ;
struct qeth_arp_entrytype type ;
__u8 ipaddr [ 16 ] ;
} __attribute__ ( ( packed ) ) ;
2005-04-17 02:20:36 +04:00
struct qeth_arp_qi_entry5_short {
2010-12-08 05:57:58 +03:00
struct qeth_arp_entrytype type ;
2005-04-17 02:20:36 +04:00
__u8 ipaddr [ 4 ] ;
} __attribute__ ( ( packed ) ) ;
2010-12-08 05:57:58 +03:00
struct qeth_arp_qi_entry5_short_ipv6 {
struct qeth_arp_entrytype type ;
__u8 ipaddr [ 16 ] ;
} __attribute__ ( ( packed ) ) ;
2005-04-17 02:20:36 +04:00
/*
* can be set by user if no " media specific information " is wanted
* - > saves a lot of space in user space buffer
*/
# define QETH_QARP_STRIP_ENTRIES 0x8000
2010-12-08 05:57:58 +03:00
# define QETH_QARP_WITH_IPV6 0x4000
2005-04-17 02:20:36 +04:00
# define QETH_QARP_REQUEST_MASK 0x00ff
/* data sent to user space as result of query arp ioctl */
# define QETH_QARP_USER_DATA_SIZE 20000
# define QETH_QARP_MASK_OFFSET 4
# define QETH_QARP_ENTRIES_OFFSET 6
struct qeth_arp_query_user_data {
union {
__u32 data_len ; /* set by user space program */
__u32 no_entries ; /* set by kernel */
} u ;
__u16 mask_bits ;
char * entries ;
} __attribute__ ( ( packed ) ) ;
# endif /* __ASM_S390_QETH_IOCTL_H__ */