#include "creator-utils.h"#include "ns3/mac48-address.h"#include <arpa/inet.h>#include <cstdint>#include <cstdlib>#include <cstring>#include <errno.h>#include <fcntl.h>#include <iomanip>#include <iostream>#include <linux/if_tun.h>#include <net/if.h>#include <net/route.h>#include <netinet/in.h>#include <sstream>#include <sys/ioctl.h>#include <sys/socket.h>#include <sys/types.h>#include <sys/un.h>#include <unistd.h> Include dependency graph for tap-device-creator.cc:
 Include dependency graph for tap-device-creator.cc:Go to the source code of this file.
| Classes | |
| struct | in6_ifreq | 
| Struct holding IPv6 address data.  More... | |
| Macros | |
| #define | TAP_MAGIC 95549 | 
| Functions | |
| int | CreateTap (char *deviceName, const char *mac, bool ifftap, bool iffpi, const char *ip4, const char *netmask, const char *ip6, const int netprefix) | 
| void | SetIpv4 (const char *deviceName, const char *ip, const char *netmask) | 
| void | SetIpv6 (const char *deviceName, const char *ip, int netprefix) | 
| void | SetMacAddress (int fd, const char *mac) | 
| void | SetUp (char *deviceName) | 
| #define TAP_MAGIC 95549 | 
Definition at line 30 of file tap-device-creator.cc.
Referenced by ns3::TapFdNetDeviceHelper::CreateFileDescriptor(), ns3::TapBridge::CreateTap(), and SendSocket().
| int CreateTap | ( | char * | deviceName, | 
| const char * | mac, | ||
| bool | ifftap, | ||
| bool | iffpi, | ||
| const char * | ip4, | ||
| const char * | netmask, | ||
| const char * | ip6, | ||
| const int | netprefix ) | 
Definition at line 148 of file tap-device-creator.cc.
References ABORT_IF, LOG, SetIpv4(), SetIpv6(), SetMacAddress(), and SetUp().
 Here is the call graph for this function:
 Here is the call graph for this function:| void SetIpv4 | ( | const char * | deviceName, | 
| const char * | ip, | ||
| const char * | netmask ) | 
Definition at line 45 of file tap-device-creator.cc.
Referenced by CreateTap().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void SetIpv6 | ( | const char * | deviceName, | 
| const char * | ip, | ||
| int | netprefix ) | 
Definition at line 83 of file tap-device-creator.cc.
References ABORT_IF, in6_ifreq::ifr6_addr, in6_ifreq::ifr6_ifindex, in6_ifreq::ifr6_prefixlen, and LOG.
Referenced by CreateTap().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| void SetMacAddress | ( | int | fd, | 
| const char * | mac ) | 
Definition at line 117 of file tap-device-creator.cc.
References ABORT_IF, ns3::Mac48Address::CopyTo(), and LOG.
Referenced by CreateTap().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| void SetUp | ( | char * | deviceName | ) | 
Definition at line 129 of file tap-device-creator.cc.
Referenced by CreateTap(), and SetInterfaceUp().
 Here is the caller graph for this function:
 Here is the caller graph for this function: