diff options
Diffstat (limited to 'Userland/Services/DHCPClient/main.cpp')
-rw-r--r-- | Userland/Services/DHCPClient/main.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Userland/Services/DHCPClient/main.cpp b/Userland/Services/DHCPClient/main.cpp index 812ab78275..36d6802db0 100644 --- a/Userland/Services/DHCPClient/main.cpp +++ b/Userland/Services/DHCPClient/main.cpp @@ -5,19 +5,26 @@ */ #include "DHCPv4Client.h" +#include <LibCore/ArgsParser.h> #include <LibCore/EventLoop.h> #include <LibCore/System.h> #include <LibMain/Main.h> -ErrorOr<int> serenity_main(Main::Arguments) +ErrorOr<int> serenity_main(Main::Arguments args) { + Vector<String> interfaces; + + Core::ArgsParser parser; + parser.add_positional_argument(interfaces, "Interfaces to run DHCP server on", "interfaces"); + parser.parse(args); + TRY(Core::System::pledge("stdio unix inet cpath rpath")); Core::EventLoop event_loop; TRY(Core::System::unveil("/proc/net/", "r")); TRY(Core::System::unveil(nullptr, nullptr)); - auto client = TRY(DHCPv4Client::try_create()); + auto client = TRY(DHCPv4Client::try_create(interfaces)); TRY(Core::System::pledge("stdio inet cpath rpath")); return event_loop.exec(); |