1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
3 * ioctl definitions for qeth driver
5 * Copyright IBM Corp. 2004
7 * Author(s): Thomas Spatzier <tspat@de.ibm.com>
10 #ifndef __ASM_S390_QETH_IOCTL_H__
11 #define __ASM_S390_QETH_IOCTL_H__
12 #include <linux/types.h>
13 #include <linux/ioctl.h>
15 #define SIOC_QETH_ARP_SET_NO_ENTRIES (SIOCDEVPRIVATE)
16 #define SIOC_QETH_ARP_QUERY_INFO (SIOCDEVPRIVATE + 1)
17 #define SIOC_QETH_ARP_ADD_ENTRY (SIOCDEVPRIVATE + 2)
18 #define SIOC_QETH_ARP_REMOVE_ENTRY (SIOCDEVPRIVATE + 3)
19 #define SIOC_QETH_ARP_FLUSH_CACHE (SIOCDEVPRIVATE + 4)
20 #define SIOC_QETH_ADP_SET_SNMP_CONTROL (SIOCDEVPRIVATE + 5)
21 #define SIOC_QETH_GET_CARD_TYPE (SIOCDEVPRIVATE + 6)
22 #define SIOC_QETH_QUERY_OAT (SIOCDEVPRIVATE + 7)
24 struct qeth_arp_cache_entry
{
27 __u8 ipaddr
[16]; /* for both IPv4 and IPv6 */
29 } __attribute__ ((packed
));
31 enum qeth_arp_ipaddrtype
{
32 QETHARP_IP_ADDR_V4
= 1,
33 QETHARP_IP_ADDR_V6
= 2,
35 struct qeth_arp_entrytype
{
38 } __attribute__((packed
));
40 #define QETH_QARP_MEDIASPECIFIC_BYTES 32
41 #define QETH_QARP_MACADDRTYPE_BYTES 1
42 struct qeth_arp_qi_entry7
{
43 __u8 media_specific
[QETH_QARP_MEDIASPECIFIC_BYTES
];
44 struct qeth_arp_entrytype type
;
47 } __attribute__((packed
));
49 struct qeth_arp_qi_entry7_ipv6
{
50 __u8 media_specific
[QETH_QARP_MEDIASPECIFIC_BYTES
];
51 struct qeth_arp_entrytype type
;
54 } __attribute__((packed
));
56 struct qeth_arp_qi_entry7_short
{
57 struct qeth_arp_entrytype type
;
60 } __attribute__((packed
));
62 struct qeth_arp_qi_entry7_short_ipv6
{
63 struct qeth_arp_entrytype type
;
66 } __attribute__((packed
));
68 struct qeth_arp_qi_entry5
{
69 __u8 media_specific
[QETH_QARP_MEDIASPECIFIC_BYTES
];
70 struct qeth_arp_entrytype type
;
72 } __attribute__((packed
));
74 struct qeth_arp_qi_entry5_ipv6
{
75 __u8 media_specific
[QETH_QARP_MEDIASPECIFIC_BYTES
];
76 struct qeth_arp_entrytype type
;
78 } __attribute__((packed
));
80 struct qeth_arp_qi_entry5_short
{
81 struct qeth_arp_entrytype type
;
83 } __attribute__((packed
));
85 struct qeth_arp_qi_entry5_short_ipv6
{
86 struct qeth_arp_entrytype type
;
88 } __attribute__((packed
));
90 * can be set by user if no "media specific information" is wanted
91 * -> saves a lot of space in user space buffer
93 #define QETH_QARP_STRIP_ENTRIES 0x8000
94 #define QETH_QARP_WITH_IPV6 0x4000
95 #define QETH_QARP_REQUEST_MASK 0x00ff
97 /* data sent to user space as result of query arp ioctl */
98 #define QETH_QARP_USER_DATA_SIZE 20000
99 #define QETH_QARP_MASK_OFFSET 4
100 #define QETH_QARP_ENTRIES_OFFSET 6
101 struct qeth_arp_query_user_data
{
103 __u32 data_len
; /* set by user space program */
104 __u32 no_entries
; /* set by kernel */
108 } __attribute__((packed
));
110 struct qeth_query_oat_data
{
116 #endif /* __ASM_S390_QETH_IOCTL_H__ */