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:
parent
45d7ea1b63
commit
0fd5f0e4bd
Notes:
sideshowbarker
2024-07-19 08:17:34 +09:00
Author: https://github.com/marprok
Commit: 0fd5f0e4bd
Pull-request: https://github.com/SerenityOS/serenity/pull/1465
Reviewed-by: https://github.com/awesomekling ✅
5 changed files with 129 additions and 42 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue