1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:47:46 +00:00

Userland: ifconfig can change the IP address of the default gateway

ioctl can now perform a request for a specific route and change
the address of it's default gateway.
This commit is contained in:
marprok 2020-03-14 21:00:49 +02:00 committed by Andreas Kling
parent 45d7ea1b63
commit 0fd5f0e4bd
5 changed files with 129 additions and 42 deletions

View file

@ -28,6 +28,12 @@
#include <sys/socket.h>
struct rtentry {
struct sockaddr* rt_gateway;
struct sockaddr rt_gateway; /* the gateway address */
struct sockaddr rt_genmask; /* the target network mask */
unsigned short int rt_flags;
char* rt_dev;
/* FIXME: complete the struct */
};
#define RTF_UP 0x1 /* do not delete the route */
#define RTF_GATEWAY 0x2 /* the route is a gateway and not an end host */