From fb6426c3f3ba629a9f282c26f2674192505a2250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Wed, 11 Dec 2024 17:10:39 +0100 Subject: [PATCH] tap-bridge: Remove unused gateway option from tap-creator --- CHANGES.md | 1 + src/tap-bridge/model/tap-creator.cc | 23 +++-------------------- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c4bd0f4058..926120b91e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -28,6 +28,7 @@ This file is a best-effort approach to solving this issue; we will do our best b * (lr-wpan) ``LrWpanMac`` is now also aggregated to ``LrWpanNetDevice``. * (stats) Deprecated ns3::NaN and ns3::isNaN to use std::nan and std::isnan in their place * (tap-bridge) Deprecated "Gateway" attribute. +* (tap-bridge) Removed unused gateway option from tap-creator. * (wifi) Added a new **ProtectedIfResponded** attribute to `FrameExchangeManager` to disable RTS/CTS protection for stations that have already responded to a frame requiring acknowledgment in the same TXOP, even if such frame had not been protected by RTS/CTS. The default value is true, even though it represents a change with respect to the previous behavior, because it is likely a more realistic choice. * (wifi) Deprecated setters/getters of the {Ht,Vht,He}Configuration classes that trivially set/get member variables, which have been made public and hence accessible to users. diff --git a/src/tap-bridge/model/tap-creator.cc b/src/tap-bridge/model/tap-creator.cc index 18e163b578..a4e101c69a 100644 --- a/src/tap-bridge/model/tap-creator.cc +++ b/src/tap-bridge/model/tap-creator.cc @@ -189,12 +189,7 @@ SendSocket(const char* path, int fd) } static int -CreateTap(const char* dev, - const char* gw, - const char* ip, - const char* mac, - const char* mode, - const char* netmask) +CreateTap(const char* dev, const char* ip, const char* mac, const char* mode, const char* netmask) { // // Creation and management of Tap devices is done via the tun device @@ -275,7 +270,6 @@ main(int argc, char* argv[]) { int c; char* dev = (char*)""; - char* gw = nullptr; char* ip = nullptr; char* mac = nullptr; char* netmask = nullptr; @@ -284,16 +278,13 @@ main(int argc, char* argv[]) opterr = 0; - while ((c = getopt(argc, argv, "vd:g:i:m:n:o:p:")) != -1) + while ((c = getopt(argc, argv, "vd:i:m:n:o:p:")) != -1) { switch (c) { case 'd': dev = optarg; // name of the new tap device break; - case 'g': - gw = optarg; // gateway address for the new device - break; case 'i': ip = optarg; // ip address of the new device break; @@ -323,14 +314,6 @@ main(int argc, char* argv[]) // LOG("Provided Device Name is \"" << dev << "\""); - // - // We have got to be able to provide a gateway to the external Linux host - // so it can talk to the ns-3 network. This ip address is provided in - // gw. - // - ABORT_IF(gw == nullptr, "Gateway Address is a required argument", 0); - LOG("Provided Gateway Address is \"" << gw << "\""); - // // We have got to be able to assign an IP address to the tap device we are // allocating. This address is allocated in the simulation and assigned to @@ -385,7 +368,7 @@ main(int argc, char* argv[]) // us to execute the following code: // LOG("Creating Tap"); - int sock = CreateTap(dev, gw, ip, mac, operatingMode, netmask); + int sock = CreateTap(dev, ip, mac, operatingMode, netmask); ABORT_IF(sock == -1, "main(): Unable to create tap socket", 1); //