#include "tap-encode-decode.h"#include <cerrno>#include <cstdlib>#include <cstring>#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 <stdint.h>#include <string>#include <sys/ioctl.h>#include <sys/socket.h>#include <sys/types.h>#include <sys/un.h>#include <unistd.h>
Include dependency graph for tap-creator.cc:Go to the source code of this file.
Macros | |
| #define | ABORT(msg, printErrno) |
| #define | ABORT_IF(cond, msg, printErrno) |
| #define | ASCII_a (0x41) |
| #define | ASCII_A (0x61) |
| #define | ASCII_COLON (0x3a) |
| #define | ASCII_DOT (0x2e) |
| #define | ASCII_z (0x5a) |
| #define | ASCII_Z (0x7a) |
| #define | ASCII_ZERO (0x30) |
| #define | LOG(msg) |
| #define | TAP_MAGIC 95549 |
Functions | |
| static uint32_t | AsciiToIpv4 (const char *address) |
| static char | AsciiToLowCase (char c) |
| static void | AsciiToMac48 (const char *str, uint8_t addr[6]) |
| static sockaddr | CreateInetAddress (uint32_t networkOrder) |
| static int | CreateTap (const char *dev, const char *gw, const char *ip, const char *mac, const char *mode, const char *netmask) |
| static void | SendSocket (const char *path, int fd) |
Variables | |
| static bool | gVerbose = false |
| #define ABORT | ( | msg, | |
| printErrno | |||
| ) |
Definition at line 49 of file tap-creator.cc.
| #define ABORT_IF | ( | cond, | |
| msg, | |||
| printErrno | |||
| ) |
Definition at line 58 of file tap-creator.cc.
| #define ASCII_a (0x41) |
Definition at line 69 of file tap-creator.cc.
| #define ASCII_A (0x61) |
Definition at line 71 of file tap-creator.cc.
| #define ASCII_COLON (0x3a) |
Definition at line 73 of file tap-creator.cc.
| #define ASCII_DOT (0x2e) |
Definition at line 67 of file tap-creator.cc.
| #define ASCII_z (0x5a) |
Definition at line 70 of file tap-creator.cc.
| #define ASCII_Z (0x7a) |
Definition at line 72 of file tap-creator.cc.
| #define ASCII_ZERO (0x30) |
Definition at line 68 of file tap-creator.cc.
| #define LOG | ( | msg | ) |
Definition at line 43 of file tap-creator.cc.
| #define TAP_MAGIC 95549 |
Definition at line 39 of file tap-creator.cc.
|
static |
Definition at line 93 of file tap-creator.cc.
References ASCII_DOT, and ASCII_ZERO.
Referenced by CreateTap().
Here is the caller graph for this function:
|
static |
Definition at line 76 of file tap-creator.cc.
References ASCII_a, ASCII_A, ASCII_z, and ASCII_Z.
Referenced by AsciiToMac48().
Here is the caller graph for this function:
|
static |
Definition at line 117 of file tap-creator.cc.
References ASCII_a, ASCII_COLON, ASCII_ZERO, and AsciiToLowCase().
Referenced by CreateTap().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 148 of file tap-creator.cc.
Referenced by CreateTap().
Here is the caller graph for this function:
|
static |
Definition at line 284 of file tap-creator.cc.
References ABORT_IF, AsciiToIpv4(), AsciiToMac48(), CreateInetAddress(), and LOG.
Here is the call graph for this function:
|
static |
Definition at line 162 of file tap-creator.cc.
References ABORT_IF, LOG, TAP_MAGIC, and ns3::TapStringToBuffer().
Here is the call graph for this function:
|
static |
Definition at line 41 of file tap-creator.cc.