1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-02 23:42:13 +00:00

IPv4: Implement socket ioctls SIOCGIFADDR and SIOCSIFADDR

This allows userspace programs to get and set (superuser-only) the IPv4
address of a network adapter. :^)
This commit is contained in:
Andreas Kling 2019-09-23 19:06:03 +02:00
parent a3575f3c60
commit 2482fc3538
7 changed files with 117 additions and 1 deletions

View file

@ -18,6 +18,7 @@ class NetworkAdapter : public Weakable<NetworkAdapter> {
public:
static void for_each(Function<void(NetworkAdapter&)>);
static WeakPtr<NetworkAdapter> from_ipv4_address(const IPv4Address&);
static WeakPtr<NetworkAdapter> lookup_by_name(const StringView&);
virtual ~NetworkAdapter();
virtual const char* class_name() const = 0;