public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [hurd,commited 0/3] Add route definitions
@ 2022-09-21 17:56 Samuel Thibault
  2022-09-21 17:56 ` [hurd,commited 1/3] hurd: Add _IOT_ifrtreq to <net/route.h> Samuel Thibault
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Samuel Thibault @ 2022-09-21 17:56 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

This adds the needed definitions for route ioctls

Damien Zammit (1):
  hurd: Add _IOT_ifrtreq to <net/route.h>

Samuel Thibault (2):
  hurd: Drop struct rtentry and in6_rtmsg
  hurd: Fix SIOCADD/DELRT ioctls

 sysdeps/mach/hurd/bits/ioctls.h |  4 ++--
 sysdeps/mach/hurd/net/route.h   | 39 +--------------------------------
 2 files changed, 3 insertions(+), 40 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [hurd,commited 1/3] hurd: Add _IOT_ifrtreq to <net/route.h>
  2022-09-21 17:56 [hurd,commited 0/3] Add route definitions Samuel Thibault
@ 2022-09-21 17:56 ` Samuel Thibault
  2022-09-21 17:56 ` [hurd,commited 2/3] hurd: Drop struct rtentry and in6_rtmsg Samuel Thibault
  2022-09-21 17:56 ` [hurd,commited 3/3] hurd: Fix SIOCADD/DELRT ioctls Samuel Thibault
  2 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2022-09-21 17:56 UTC (permalink / raw)
  To: libc-alpha; +Cc: Damien Zammit, commit-hurd

From: Damien Zammit <damien@zamaudio.com>

So that we can use struct ifrtreq in ioctls.
---
 sysdeps/mach/hurd/net/route.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sysdeps/mach/hurd/net/route.h b/sysdeps/mach/hurd/net/route.h
index e7c276edf3..73abcbf253 100644
--- a/sysdeps/mach/hurd/net/route.h
+++ b/sysdeps/mach/hurd/net/route.h
@@ -80,6 +80,7 @@ typedef struct ifrtreq
     int rt_tos;
     int rt_class;
   } ifrtreq_t;
+#define _IOT_ifrtreq _IOT (_IOTS(char), IF_NAMESIZE, _IOTS(int), 10, 0, 0)
 
 
 #define	RTF_UP		0x0001		/* Route usable.  */
-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [hurd,commited 2/3] hurd: Drop struct rtentry and in6_rtmsg
  2022-09-21 17:56 [hurd,commited 0/3] Add route definitions Samuel Thibault
  2022-09-21 17:56 ` [hurd,commited 1/3] hurd: Add _IOT_ifrtreq to <net/route.h> Samuel Thibault
@ 2022-09-21 17:56 ` Samuel Thibault
  2022-09-21 17:56 ` [hurd,commited 3/3] hurd: Fix SIOCADD/DELRT ioctls Samuel Thibault
  2 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2022-09-21 17:56 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

These were cargo-culted, they are not used at all in Hurd interfaces.
---
 sysdeps/mach/hurd/net/route.h | 38 -----------------------------------
 1 file changed, 38 deletions(-)

diff --git a/sysdeps/mach/hurd/net/route.h b/sysdeps/mach/hurd/net/route.h
index 73abcbf253..ecf5dcb7ef 100644
--- a/sysdeps/mach/hurd/net/route.h
+++ b/sysdeps/mach/hurd/net/route.h
@@ -28,44 +28,6 @@
 #include <net/if.h>
 
 
-/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */
-struct rtentry
-  {
-    unsigned long int rt_pad1;
-    struct sockaddr rt_dst;		/* Target address.  */
-    struct sockaddr rt_gateway;		/* Gateway addr (RTF_GATEWAY).  */
-    struct sockaddr rt_genmask;		/* Target network mask (IP).  */
-    unsigned short int rt_flags;
-    short int rt_pad2;
-    unsigned long int rt_pad3;
-    unsigned char rt_tos;
-    unsigned char rt_class;
-    short int rt_pad4;
-    short int rt_metric;		/* +1 for binary compatibility!  */
-    char *rt_dev;			/* Forcing the device at add.  */
-    unsigned long int rt_mtu;		/* Per route MTU/Window.  */
-    unsigned long int rt_window;	/* Window clamping.  */
-    unsigned short int rt_irtt;		/* Initial RTT.  */
-  };
-/* Compatibility hack.  */
-#define rt_mss	rt_mtu
-
-
-struct in6_rtmsg
-  {
-    struct in6_addr rtmsg_dst;
-    struct in6_addr rtmsg_src;
-    struct in6_addr rtmsg_gateway;
-    uint32_t rtmsg_type;
-    uint16_t rtmsg_dst_len;
-    uint16_t rtmsg_src_len;
-    uint32_t rtmsg_metric;
-    unsigned long int rtmsg_info;
-    uint32_t rtmsg_flags;
-    int rtmsg_ifindex;
-  };
-
-
 typedef struct ifrtreq
   {
     char ifname[IF_NAMESIZE];
-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [hurd,commited 3/3] hurd: Fix SIOCADD/DELRT ioctls
  2022-09-21 17:56 [hurd,commited 0/3] Add route definitions Samuel Thibault
  2022-09-21 17:56 ` [hurd,commited 1/3] hurd: Add _IOT_ifrtreq to <net/route.h> Samuel Thibault
  2022-09-21 17:56 ` [hurd,commited 2/3] hurd: Drop struct rtentry and in6_rtmsg Samuel Thibault
@ 2022-09-21 17:56 ` Samuel Thibault
  2 siblings, 0 replies; 4+ messages in thread
From: Samuel Thibault @ 2022-09-21 17:56 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

The hurd network stack uses struct ifrtreq rather than ortentry.
---
 sysdeps/mach/hurd/bits/ioctls.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h
index 4421a88611..1513b8c6b8 100644
--- a/sysdeps/mach/hurd/bits/ioctls.h
+++ b/sysdeps/mach/hurd/bits/ioctls.h
@@ -281,8 +281,8 @@ enum __ioctl_datum { IOC_8, IOC_16, IOC_32, IOC_64 };
 #define	SIOCSPGRP	_IOW('s',  8, int)		/* set process group */
 #define	SIOCGPGRP	_IOR('s',  9, int)		/* get process group */
 
-#define	SIOCADDRT	_IOW('r', 10, struct ortentry)	/* add route */
-#define	SIOCDELRT	_IOW('r', 11, struct ortentry)	/* delete route */
+#define	SIOCADDRT	_IOW('r', 10, struct ifrtreq)	/* add route */
+#define	SIOCDELRT	_IOW('r', 11, struct ifrtreq)	/* delete route */
 
 #define	SIOCSIFADDR	_IOW('i', 12, struct ifreq)	/* set ifnet address */
 #define	OSIOCGIFADDR	_IOWR('i',13, struct ifreq)	/* get ifnet address */
-- 
2.35.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-21 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 17:56 [hurd,commited 0/3] Add route definitions Samuel Thibault
2022-09-21 17:56 ` [hurd,commited 1/3] hurd: Add _IOT_ifrtreq to <net/route.h> Samuel Thibault
2022-09-21 17:56 ` [hurd,commited 2/3] hurd: Drop struct rtentry and in6_rtmsg Samuel Thibault
2022-09-21 17:56 ` [hurd,commited 3/3] hurd: Fix SIOCADD/DELRT ioctls Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).