Sponge
CS144's user-space TCP library
Classes | Functions | Variables
network_simulator.cc File Reference
#include "arp_message.hh"
#include "router.hh"
#include "util.hh"
#include <iostream>
#include <list>
#include <unordered_map>
Include dependency graph for network_simulator.cc:

Go to the source code of this file.

Classes

class  Host
 
class  Network
 

Functions

template<typename T >
void clear (T &queue1, T &queue2)
 
uint32_t ip (const string &str)
 
int main ()
 
void network_simulator ()
 
EthernetAddress random_host_ethernet_address ()
 
EthernetAddress random_router_ethernet_address ()
 
string summary (const EthernetFrame &frame)
 

Variables

auto rd = get_random_generator()
 

Function Documentation

◆ clear()

template<typename T >
void clear ( T &  queue1,
T &  queue2 
)

Definition at line 39 of file network_simulator.cc.

◆ ip()

uint32_t ip ( const string str)

Definition at line 36 of file network_simulator.cc.

◆ main()

int main ( )

Definition at line 346 of file network_simulator.cc.

◆ network_simulator()

void network_simulator ( )

Definition at line 272 of file network_simulator.cc.

◆ random_host_ethernet_address()

EthernetAddress random_host_ethernet_address ( )

Definition at line 13 of file network_simulator.cc.

◆ random_router_ethernet_address()

EthernetAddress random_router_ethernet_address ( )

Definition at line 24 of file network_simulator.cc.

◆ summary()

string summary ( const EthernetFrame frame)

Definition at line 46 of file network_simulator.cc.

Variable Documentation

◆ rd

auto rd = get_random_generator()

Definition at line 11 of file network_simulator.cc.