bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pfinet: Add SIOCADDRT and SIOCDELRT equivalent iioctls


From: Samuel Thibault
Subject: Re: [PATCH] pfinet: Add SIOCADDRT and SIOCDELRT equivalent iioctls
Date: Sat, 27 Aug 2022 12:26:04 +0200
User-agent: NeoMutt/20170609 (1.8.3)

Damien Zammit, le sam. 27 août 2022 03:14:13 +0000, a ecrit:
> This adds support for ioctls for adding and removing routes in pfinet.
> 
> Tested to still access network, but there seems to be a mismatch between
> <net/route.h> and <linux/route.h>, I can only make it compile
> using the linux header.

linux/route.h is only for building the linux stack. The user interface
is net/route.h.

Now, that being said

> +/* This is the whole struct rtentry from <net/route.h>. */
> +type rtentry_t = struct[84] of char; /* sizeof(struct rtentry) is 84. */
> +

That won't fly. See the _IOR/W and _IOT* macros, we are quite limited in
what structures can be passed to ioctls. The rtentry structure as it is
can't fit. Better define a simpler one that can fit, and translate
between it and what the rtentry structure of the Linux stack.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]