02-08-2003 Marco Gerards <metgerards@student.han.nl> * ioctl_types.h [__KERNEL__]: Include <linux/route.h>. [!__KERNEL]: Include <net/route.h>. rtentry_t: New typedef. * pfinet.defs: Import <hurd/ioctl_types.h>. (ifname_t): New type. (rtentry_t): Likewise. (pfinet_siocaddrt): New RPC. (pfinet_siocdelrt): Likewise. Common subdirectories: /home/marco/src/hurdcvs/hurd/hurd/CVS and hurd/CVS diff -up /home/marco/src/hurdcvs/hurd/hurd/ioctl_types.h hurd/ioctl_types.h --- /home/marco/src/hurdcvs/hurd/hurd/ioctl_types.h 2001-01-11 23:28:29.000000000 +0100 +++ hurd/ioctl_types.h 2003-08-02 18:10:23.000000000 +0200 @@ -1,5 +1,5 @@ /* Types used in RPC definitions corresponding to ioctls. - Copyright (C) 1994, 1996 Free Software Foundation + Copyright (C) 1994, 1996, 2003 Free Software Foundation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -30,4 +30,15 @@ typedef struct winsize winsize_t; typedef struct sockaddr sockaddr_t; typedef char ifname_t[16]; +/* Check if this header is included from pfinet. Don't use + <net/route.h> in pfinet because of the way pfinet changes the + include path. */ +#ifdef __KERNEL__ +#include <linux/route.h> +#else +#include <net/route.h> +#endif + +typedef struct rtentry rtentry_t; + #endif /* hurd/ioctl_types.h */ diff -up /home/marco/src/hurdcvs/hurd/hurd/pfinet.defs hurd/pfinet.defs --- /home/marco/src/hurdcvs/hurd/hurd/pfinet.defs 2002-06-11 23:37:13.000000000 +0200 +++ hurd/pfinet.defs 2003-08-02 18:25:07.000000000 +0200 @@ -1,5 +1,5 @@ /* Definitions for pfinet-specific calls - Copyright (C) 1999,2000,02 Free Software Foundation, Inc. + Copyright (C) 1999,2000,02,03 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -20,6 +20,9 @@ the Free Software Foundation, 675 Mass A subsystem pfinet 37000; #include <hurd/hurd_types.defs> +import <hurd/ioctl_types.h>; /* XXX */ + +type ifname_t = array[16] of char; /* IFNAMSIZ is 16. */ #ifdef SOCKET_IMPORTS SOCKET_IMPORTS @@ -27,6 +30,8 @@ SOCKET_IMPORTS INTR_INTERFACE +type rtentry_t = struct[84] of char; /* sizeof(struct rtentry) is 84. */ + /* Return a list of interfaces as expected by the SIOCGIFCONF ioctl. The maximum number of bytes returned can be given in AMOUNT, but if AMOUNT is negative, all interfaces will be returned. Always @@ -37,3 +42,15 @@ routine pfinet_siocgifconf ( amount: vm_size_t; out buf: data_t, dealloc ); + +routine pfinet_siocaddrt ( + port: io_t; + entry: rtentry_t; + device: ifname_t +); + +routine pfinet_siocdelrt ( + port: io_t; + entry: rtentry_t; + device: ifname_t +);