Skip to content

Commit

Permalink
tap-bridge: Remove unused gateway option from tap-creator
Browse files Browse the repository at this point in the history
  • Loading branch information
a-andre authored and tomhenderson committed Dec 30, 2024
1 parent 223e0ad commit fb6426c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
23 changes: 3 additions & 20 deletions src/tap-bridge/model/tap-creator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);

//
Expand Down

0 comments on commit fb6426c

Please sign in to comment.