#include <unistd.h>
#include <string>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdlib>
#include <cerrno>
#include <cstring>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/ioctl.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <netinet/in.h>
#include <netpacket/packet.h>
#include <arpa/inet.h>
#include "emu-encode-decode.h"
Go to the source code of this file.
Macros | |
#define | ABORT(msg, printErrno) |
#define | ABORT_IF(cond, msg, printErrno) |
#define | EMU_MAGIC 65867 |
#define | LOG(msg) |
Functions | |
int | main (int argc, char *argv[]) |
static void | SendSocket (const char *path, int fd) |
Send the socket file descriptor we created back to the emu device, which will read it as soon as we're done. |
Variables | |
static int | gVerbose = 0 |
#define ABORT | ( | msg, | |
printErrno | |||
) |
Definition at line 49 of file emu-sock-creator.cc.
#define ABORT_IF | ( | cond, | |
msg, | |||
printErrno | |||
) |
Definition at line 57 of file emu-sock-creator.cc.
Referenced by CreateTap(), main(), ReceiveVifFd(), ns3::SendSocket(), SendSocket(), SetIpv4(), SetIpv6(), SetMacAddress(), SetTunUp(), SetUp(), and TunAlloc().
#define EMU_MAGIC 65867 |
Definition at line 39 of file emu-sock-creator.cc.
Referenced by SendSocket().
#define LOG | ( | msg | ) |
Definition at line 43 of file emu-sock-creator.cc.
Referenced by CreateTap(), main(), ns3::SendSocket(), SendSocket(), SetIpv4(), SetIpv6(), SetMacAddress(), and SetUp().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 196 of file emu-sock-creator.cc.
References ABORT_IF, gVerbose, LOG, and SendSocket().
|
static |
Send the socket file descriptor we created back to the emu device, which will read it as soon as we're done.
path | The socket address information from the Unix socket we use to send the created socket back to. |
fd | The socket we're going to send. |
Definition at line 72 of file emu-sock-creator.cc.
References ABORT_IF, EMU_MAGIC, ns3::EmuStringToBuffer(), and LOG.
Referenced by main().
|
static |
Definition at line 41 of file emu-sock-creator.cc.
Referenced by main().