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