#include "tap-encode-decode.h"
#include "ns3/mac48-address.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>
Go to the source code of this file.
Macros | |
#define | ABORT(msg, printErrno) |
#define | ABORT_IF(cond, msg, printErrno) |
#define | LOG(msg) |
#define | TAP_MAGIC 95549 |
Functions | |
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 40 of file tap-creator.cc.
#define ABORT_IF | ( | cond, | |
msg, | |||
printErrno ) |
Definition at line 49 of file tap-creator.cc.
Referenced by CreateTap(), and SendSocket().
#define LOG | ( | msg | ) |
Definition at line 34 of file tap-creator.cc.
Referenced by CreateTap(), and SendSocket().
#define TAP_MAGIC 95549 |
Definition at line 30 of file tap-creator.cc.
Referenced by SendSocket().
|
static |
Definition at line 56 of file tap-creator.cc.
Referenced by CreateTap().
|
static |
Definition at line 192 of file tap-creator.cc.
References ABORT_IF, ns3::Mac48Address::CopyTo(), CreateInetAddress(), and LOG.
|
static |
Definition at line 70 of file tap-creator.cc.
References ABORT_IF, LOG, TAP_MAGIC, and ns3::TapStringToBuffer().
|
static |
Definition at line 32 of file tap-creator.cc.