Sponge
CS144's user-space TCP library
Functions | Variables
tcp_ip_ethernet.cc File Reference
#include "bidirectional_stream_copy.hh"
#include "tcp_config.hh"
#include "tcp_sponge_socket.hh"
#include "tun.hh"
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <random>
#include <string>
#include <tuple>
Include dependency graph for tcp_ip_ethernet.cc:

Go to the source code of this file.

Functions

static void check_argc (int argc, char **argv, int curr, const char *err)
 
static tuple< TCPConfig, FdAdapterConfig, Address, stringget_config (int argc, char **argv)
 
int main (int argc, char **argv)
 
static void show_usage (const char *argv0, const char *msg)
 

Variables

const string GATEWAY_DFLT = "169.254.10.1"
 
const string LOCAL_ADDRESS_DFLT = "169.254.10.9"
 
constexpr const char * TAP_DFLT = "tap10"
 

Function Documentation

◆ check_argc()

static void check_argc ( int  argc,
char **  argv,
int  curr,
const char *  err 
)
static

Definition at line 44 of file tcp_ip_ethernet.cc.

◆ get_config()

static tuple<TCPConfig, FdAdapterConfig, Address, string> get_config ( int  argc,
char **  argv 
)
static

Definition at line 51 of file tcp_ip_ethernet.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 112 of file tcp_ip_ethernet.cc.

◆ show_usage()

static void show_usage ( const char *  argv0,
const char *  msg 
)
static

Definition at line 20 of file tcp_ip_ethernet.cc.

Variable Documentation

◆ GATEWAY_DFLT

const string GATEWAY_DFLT = "169.254.10.1"

Definition at line 18 of file tcp_ip_ethernet.cc.

◆ LOCAL_ADDRESS_DFLT

const string LOCAL_ADDRESS_DFLT = "169.254.10.9"

Definition at line 17 of file tcp_ip_ethernet.cc.

◆ TAP_DFLT

constexpr const char* TAP_DFLT = "tap10"
constexpr

Definition at line 16 of file tcp_ip_ethernet.cc.