aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compat.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2009-11-06 03:09:03 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-06 23:43:57 -0500
commit2dceba14ef0e62738d58777a1bd4018130d47a74 (patch)
tree61469cdabddc1bf4691cce720e01cf995724ef8e /include/linux/compat.h
parent10d626f4f444b419046309c10f25515adbffcb16 (diff)
compat: add struct compat_ifreq etc to compat.h
In order to move socket ioctl conversion code into multiple places in the socket code, we need a common defintion of the data structures it uses. Also change the name from ifreq32 to compat_ifreq to follow the naming convention for compat.h Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r--include/linux/compat.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h
index af931ee43dd8..8311d2e29632 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -10,6 +10,8 @@
10#include <linux/stat.h> 10#include <linux/stat.h>
11#include <linux/param.h> /* for HZ */ 11#include <linux/param.h> /* for HZ */
12#include <linux/sem.h> 12#include <linux/sem.h>
13#include <linux/socket.h>
14#include <linux/if.h>
13 15
14#include <asm/compat.h> 16#include <asm/compat.h>
15#include <asm/siginfo.h> 17#include <asm/siginfo.h>
@@ -154,6 +156,43 @@ typedef struct compat_sigevent {
154 } _sigev_un; 156 } _sigev_un;
155} compat_sigevent_t; 157} compat_sigevent_t;
156 158
159struct compat_ifmap {
160 compat_ulong_t mem_start;
161 compat_ulong_t mem_end;
162 unsigned short base_addr;
163 unsigned char irq;
164 unsigned char dma;
165 unsigned char port;
166};
167
168struct compat_ifreq {
169#define IFHWADDRLEN 6
170#define IFNAMSIZ 16
171 union {
172 char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */
173 } ifr_ifrn;
174 union {
175 struct sockaddr ifru_addr;
176 struct sockaddr ifru_dstaddr;
177 struct sockaddr ifru_broadaddr;
178 struct sockaddr ifru_netmask;
179 struct sockaddr ifru_hwaddr;
180 short ifru_flags;
181 compat_int_t ifru_ivalue;
182 compat_int_t ifru_mtu;
183 struct compat_ifmap ifru_map;
184 char ifru_slave[IFNAMSIZ]; /* Just fits the size */
185 char ifru_newname[IFNAMSIZ];
186 compat_caddr_t ifru_data;
187 /* XXXX? ifru_settings should be here */
188 } ifr_ifru;
189};
190
191struct compat_ifconf {
192 compat_int_t ifc_len; /* size of buffer */
193 compat_caddr_t ifcbuf;
194};
195
157struct compat_robust_list { 196struct compat_robust_list {
158 compat_uptr_t next; 197 compat_uptr_t next;
159}; 198};