Expand PMF_FN_* macros.
[netbsd-mini2440.git] / sys / compat / linux / common / linux_sockio.h
blobcb1e7f14a6639796aa7eda96179d6d57ca92a52c
1 /* $NetBSD: linux_sockio.h,v 1.17 2009/11/13 21:45:03 joerg Exp $ */
3 /*-
4 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Frank van der Linden and Eric Haszlakiewicz.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef _LINUX_SOCKIO_H
33 #define _LINUX_SOCKIO_H
35 #define LINUX_SIOCGIFNAME _LINUX_IO(0x89, 0x10)
36 #define LINUX_SIOCGIFCONF _LINUX_IO(0x89, 0x12)
37 #define LINUX_SIOCGIFFLAGS _LINUX_IO(0x89, 0x13)
38 #define LINUX_SIOCSIFFLAGS _LINUX_IO(0x89, 0x14)
39 #define LINUX_SIOCGIFADDR _LINUX_IO(0x89, 0x15)
40 #define LINUX_SIOCSIFADDR _LINUX_IO(0x89, 0x16)
41 #define LINUX_SIOCGIFDSTADDR _LINUX_IO(0x89, 0x17)
42 #define LINUX_SIOCGIFBRDADDR _LINUX_IO(0x89, 0x19)
43 #define LINUX_SIOCGIFNETMASK _LINUX_IO(0x89, 0x1b)
44 #define LINUX_SIOCGIFMTU _LINUX_IO(0x89, 0x21)
45 #define LINUX_SIOCADDMULTI _LINUX_IO(0x89, 0x31)
46 #define LINUX_SIOCDELMULTI _LINUX_IO(0x89, 0x32)
47 #define LINUX_SIOCGIFHWADDR _LINUX_IO(0x89, 0x27)
48 #define LINUX_SIOCDEVPRIVATE _LINUX_IO(0x89, 0xf0)
49 #define LINUX_SIOCGIFBR _LINUX_IO(0x89, 0x40)
50 #define LINUX_SIOCSIFBR _LINUX_IO(0x89, 0x41)
52 #define LINUX_IFNAMSIZ 16
54 struct linux_ifmap {
55 unsigned long mem_start;
56 unsigned long mem_end;
57 unsigned short base_addr;
58 unsigned char irq;
59 unsigned char dma;
60 unsigned char port;
63 struct linux_ifreq {
64 union {
65 char ifrn_name[LINUX_IFNAMSIZ]; /* if name, e.g. "en0" */
66 } ifr_ifrn;
67 union {
68 struct osockaddr ifru_addr;
69 struct osockaddr ifru_hwaddr;
70 struct linux_ifmap ifru_map;
71 int ifru_ifindex;
72 } ifr_ifru;
73 #define ifr_name ifr_ifrn.ifrn_name /* interface name */
74 #define ifr_addr ifr_ifru.ifru_addr /* address */
75 #define ifr_hwaddr ifr_ifru.ifru_hwaddr /* MAC address */
76 #define ifr_map ifr_ifru.ifru_map /* device map */
79 #endif /* !_LINUX_SOCKIO_H */