1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09: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
Notes: sideshowbarker 2024-07-19 08:17:34 +09:00
5 changed files with 129 additions and 42 deletions

View file

@ -528,6 +528,17 @@ struct ifreq {
#define ifr_hwaddr ifr_ifru.ifru_hwaddr // MAC address
};
struct rtentry {
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 */
#define AT_FDCWD -100
#define PURGE_ALL_VOLATILE 0x1