Sponge
CS144's user-space TCP library
Functions | Variables
tcp_ipv4.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_ipv4.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, bool, char * > get_config (int argc, char **argv)
 
int main (int argc, char **argv)
 
static void show_usage (const char *argv0, const char *msg)
 

Variables

const string LOCAL_ADDRESS_DFLT = "169.254.144.9"
 
constexpr const char * TUN_DFLT = "tun144"
 

Function Documentation

◆ check_argc()

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

Definition at line 48 of file tcp_ipv4.cc.

◆ get_config()

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

Definition at line 55 of file tcp_ipv4.cc.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 137 of file tcp_ipv4.cc.

◆ show_usage()

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

Definition at line 19 of file tcp_ipv4.cc.

Variable Documentation

◆ LOCAL_ADDRESS_DFLT

const string LOCAL_ADDRESS_DFLT = "169.254.144.9"

Definition at line 17 of file tcp_ipv4.cc.

◆ TUN_DFLT

constexpr const char* TUN_DFLT = "tun144"
constexpr

Definition at line 16 of file tcp_ipv4.cc.