From 81d0b0e536b228e9d37f6cb32342fc3124b6f38e Mon Sep 17 00:00:00 2001 From: GNU Libc Maintainers Date: Tue, 4 Oct 2022 06:07:58 +0100 Subject: [PATCH] git-net-route.h commit ffd0b295d96aa58d65e642d7519f4d8c33acb3f0 Author: Damien Zammit Date: Wed Sep 21 00:41:31 2022 +0200 hurd: Add ifrtreq structure to net/route.h As used by the hurdish route ioctls. Gbp-Pq: Topic hurd-i386 Gbp-Pq: Name git-net-route.h.diff --- sysdeps/mach/hurd/bits/ioctls.h | 4 +-- sysdeps/mach/hurd/net/route.h | 50 ++++++++++----------------------- 2 files changed, 17 insertions(+), 37 deletions(-) diff --git a/sysdeps/mach/hurd/bits/ioctls.h b/sysdeps/mach/hurd/bits/ioctls.h index 4421a8861..1513b8c6b 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 */ diff --git a/sysdeps/mach/hurd/net/route.h b/sysdeps/mach/hurd/net/route.h index 61e4ccc56..ecf5dcb7e 100644 --- a/sysdeps/mach/hurd/net/route.h +++ b/sysdeps/mach/hurd/net/route.h @@ -25,44 +25,24 @@ #include #include #include +#include -/* This structure gets passed by the SIOCADDRT and SIOCDELRT calls. */ -struct rtentry +typedef struct ifrtreq { - 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; - }; + char ifname[IF_NAMESIZE]; + in_addr_t rt_dest; + in_addr_t rt_mask; + in_addr_t rt_gateway; + int rt_flags; + int rt_metric; + int rt_mtu; + int rt_window; + int rt_irtt; + 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.30.2