summaryrefslogtreecommitdiff
path: root/hurd/iioctl.defs
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2001-01-11 22:28:29 +0000
committerMarcus Brinkmann <marcus@gnu.org>2001-01-11 22:28:29 +0000
commit2a0220f19b262f122bc8dc7b68e6f4c0a5a16cae (patch)
tree933d00b5e3b4b7371ccf1b10f2a24affa2bfc70d /hurd/iioctl.defs
parentf63be3bda31acdc2a88e1cd64770966e73ca0b5d (diff)
hurd/
2001-01-07 Marcus Brinkmann <marcus@gnu.org> * ioctl_types.h: Include <net/if.h>, define types sockaddr_t and ifname_t for iioctl.defs. * iioctl.defs: New file for network interface ioctls. * pfinet.defs: Remove old RPCs, fix subsystem number, add RPC for SIOCGIFCONF. pfinet/ 2001-01-07 Marcus Brinkmann <marcus@gnu.org> * pfinet-ops.c: New file to implement hurd/pfinet.defs. * iioctl-ops.c: New file to implement iioctl.defs. * linux-src/net/core/dev.c: If _HURD_, don't define netdev_chain as static. * glue-include/linux/if.h: New file, to avoid conflict between <net/if.h> (imported by iioctl.defs) and linux version of it. * main.c (pfinet_demuxer): Prototype pfinet_server and iioctl_server, use them. * pfinet.h: New global variables pfinetctl, pfinet_owner and pfinet_group. * main.c (main): New variable ST. Request pfinetctl from trivfs_startup. Use it to determine the owner and group of the underlying node. * io-ops.c (S_io_reauthenticate): New index variable j. Set newuser->isroot also for owners of the underlying file and group owners. (S_io_restrict_auth): Likewise. * socket-ops.c: Include <sys/stat.h> and <hurd/fshelp.h>. (S_socket_create): New variable isroot. If master->isroot is not set, use fshelp_isowner to check ownership and if to set it. Pass isroot to make_sock_user instead master->isroot. * linux-src/net/ipv4/devinet.c (configure_device): Accept new parameter BROADCAST, set ifa_broadcast if this is not INADDR_NONE. (inquire_device): Accept new parameter broadcast, set it. * main.c: Add new paramter to prototype of configure_device. (main): Add new parameter to call to configure_device. * options.c: Add new parameters to prototypes of configure_device and inquire_device. (trivfs_append_args): Define new variable BROAD, use its address as the new parameter for inquire_device. * linux-src/net/core/dev.c (dev_ifconf): Don't declare static if _HURD_. * linux-src/net/ipv4/devinet.c (inet_gifconf): If _HURD_, set sin_len member. * Makefile (MIGSRCS): Add pfinetServer.c and iioctlServer.c. (SRCS): Add pfinet-ops.c, iioctl-ops.c.
Diffstat (limited to 'hurd/iioctl.defs')
-rw-r--r--hurd/iioctl.defs172
1 files changed, 172 insertions, 0 deletions
diff --git a/hurd/iioctl.defs b/hurd/iioctl.defs
new file mode 100644
index 00000000..42c1ecaa
--- /dev/null
+++ b/hurd/iioctl.defs
@@ -0,0 +1,172 @@
+/* Definitions for interface ioctls
+ Copyright (C) 2000 Free Software Foundation, Inc.
+
+This file is part of the GNU Hurd.
+
+The GNU Hurd is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+The GNU Hurd is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with the GNU Hurd; see the file COPYING. If not, write to
+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+
+#include <hurd/hurd_types.defs>
+
+INTR_INTERFACE
+
+/* Ioctl class `i'; the subsystem is derived from calculations in
+ <ioctls.h>. */
+subsystem iioctl 112000; /* XXX */
+
+import <hurd/ioctl_types.h>; /* XXX */
+
+/* This is the first arg for a struct ifreq_something as specified by the
+ definition of _IOT_ifreq_something in <net/if.h>. */
+type ifname_t = array[16] of char; /* IFNAMSIZ is 16. */
+
+/* This is the second arg of struct ifreq as specified by the
+ definition of _IOT_ifreq in <net/if.h>. */
+type sockaddr_t = struct[16] of char; /* sizeof(struct sockaddr) is 16. */
+
+skip; skip; skip; skip; /* 0 1 2 3 unused */
+skip; skip; skip; skip; /* 4 5 6 7 unused */
+skip; skip; skip; skip; /* 8 9 10 11 unused */
+
+/* 12 SIOCSIFADDR */
+routine iioctl_siocsifaddr (
+ reqport: io_t;
+ ifnam: ifname_t;
+ addr: sockaddr_t);
+
+skip; /* 13 unused */
+
+/* 14 SIOCSIFDSTADDR */
+routine iioctl_siocsifdstaddr (
+ reqport: io_t;
+ ifnam: ifname_t;
+ dstaddr: sockaddr_t);
+
+skip; /* 15 unused */
+
+/* 16 SIOCSIFFLAGS */
+routine iioctl_siocsifflags (
+ reqport: io_t;
+ ifnam: ifname_t;
+ flags: short);
+
+/* 17 SIOCGIFFLAGS */
+routine iioctl_siocgifflags (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout flags: short);
+
+skip; /* 18 unused */
+
+/* 19 SIOCSIFBRDADDR */
+routine iioctl_siocsifbrdaddr (
+ reqport: io_t;
+ ifnam: ifname_t;
+ brdaddr: sockaddr_t);
+
+skip; skip; /* 20 21 unused */
+
+/* 22 SIOCSIFNETMASK */
+routine iioctl_siocsifnetmask (
+ reqport: io_t;
+ ifnam: ifname_t;
+ netmask: sockaddr_t);
+
+/* 23 SIOCGIFMETRIC */
+routine iioctl_siocgifmetric (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout metric: int);
+
+/* 24 SIOCSIFMETRIC */
+routine iioctl_siocsifmetric (
+ reqport: io_t;
+ ifnam: ifname_t;
+ metric: int);
+
+/* 25 SIOCDIFADDR */
+routine iioctl_siocdifaddr (
+ reqport: io_t;
+ ifnam: ifname_t;
+ addr: sockaddr_t);
+
+skip; skip; skip; skip; /* 26 27 28 29 unused */
+skip; skip; skip; /* 30 31 32 unused */
+
+/* 33 SIOCGIFADDR */
+routine iioctl_siocgifaddr (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout addr: sockaddr_t);
+
+/* 34 SIOCGIFDSTADDR */
+routine iioctl_siocgifdstaddr (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout dstaddr: sockaddr_t);
+
+/* 35 SIOCGIFBRDADDR */
+routine iioctl_siocgifbrdaddr (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout brdaddr: sockaddr_t);
+
+skip; /* 36 SIOCGIFCONF -- implemented in C library */
+
+/* 37 SIOCGIFNETMASK */
+routine iioctl_siocgifnetmask (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout netmask: sockaddr_t);
+
+skip; skip; skip; skip; /* 38, 39, 40, 41 unused */
+skip; skip; skip; skip; /* 42, 43, 44, 45 unused */
+skip; skip; skip; skip; /* 46, 47, 48, 49 unused */
+skip; /* 50 unused */
+
+/* 51 SIOCGIFMTU */
+routine iioctl_siocgifmtu (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout mtu: int);
+
+/* 52 SIOCSIFMTU */
+routine iioctl_siocsifmtu (
+ reqport: io_t;
+ ifnam: ifname_t;
+ mtu: int);
+
+skip; skip; skip; skip; /* 53, 54, 55, 56 unused */
+skip; skip; skip; skip; /* 57, 58, 59, 60 unused */
+skip; skip; skip; skip; /* 61, 62, 63, 64 unused */
+skip; skip; skip; skip; /* 65, 66, 67, 68 unused */
+skip; skip; skip; skip; /* 69, 70, 71, 72 unused */
+skip; skip; skip; skip; /* 73, 74, 75, 76 unused */
+skip; skip; skip; skip; /* 77, 78, 79, 80 unused */
+skip; skip; skip; skip; /* 81, 82, 83, 84 unused */
+skip; skip; skip; skip; /* 85, 86, 87, 88 unused */
+skip; /* 89 unused */
+
+/* 90 SIOCGIFINDEX */
+routine iioctl_siocgifindex (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout index: int);
+
+/* 91 SIOCGIFNAME */
+routine iioctl_siocgifname (
+ reqport: io_t;
+ inout ifnam: ifname_t;
+ inout index: int);