Code Monkey home page Code Monkey logo

cse5462ftptcp's Introduction

CSE 5462 Project
Dan Ziemba

Simple file transfer client and server using fake tcp sockets that actually
connect to tcpd, a program which wraps udp packet with a tcp header then sends
packets through the troll program to simulate poor quality networks.

Build:
Run make

Run (Simple):
Two scripts are included to automate launching tcpd and troll on each machine.
Server-port, listen-port, and port should all be the same.  This will start
troll on each machine with garbling, destroying, and duplication.  Several other
optons are commented out inside each script.
	Server:
	./start_server_support.sh <client-host> <listen-port>
	./ftps <port>

	Client:
	./timer
	./start_client_support.sh <server-host> <server-port>
	./ftpc <host> <port> <file>

Run (Detailed):
In order to start troll on the server, it is necessary to know the host of the
client that will be connecting.  Note the listen-port+1.  If server will listen
on port 10000 for example, client will listen on port 10001 so that is what 
should be given to server side troll.
	Server:
	./troll -S localhost -b 6661 -C <client-host> -a <listen-port+1> 6662 [more]
	./tcpd <listen-port>
	./ftps <listen-port>

	Client:
	./timer
	./troll -S localhost -b 6664 -C <server-host> -a <server-port> 6665 [more]
	./tcpd <server-port> <server-host>
	./ftpc <server-host> <server-port> <file-name>


Implementation Details:
ftps will listen on port 6660 for messages from tcpd
ftps will send messages to tcpd on port 6661
tcpd in server mode will send messages to troll on port 6662
tcpd in server mode will listen on port 6661 for messages from troll
ftpc will listen on port 6663 for messages from tcpd
ftpc will send messages to tcpd on port 6664
tcpd in client mode will send messages to troll on port 6665
tcpd in client mode will listen on port 6664 for messages from troll


Description of Source Files:
common.c:
	Contains various functions that are shared by all of the binaries. See 
	common.h for more detailed descriptions.
ftpc.c:
	Main logic for the ftpc program.
ftps.c:
	Main logic for the ftps program.
pktinfo.c:
	Data structure used by tcpd to maintain a list of sequence numbers with 
	associated lengths, with the ability to remove a specific item, or any one
	item with a sequence number less than a specific value.  Internally  stores
	info as a unordered linked list.
tcpd.c:
	Main logic for the tcpd program.  The same tcpd binary is used for both
	sending and receiving side.
tcpd_interface.c:
	Contains the artificial tcp sockets implementation, and is used by both ftps
	and ftpc.  The various functions actually open a udp socket for
	communication with a tcpd running on the same machine.
tcpheader.c:
	Contains a data structure representing the tcp header and various helper
	methods to fill it or query info from it.
timer.c:
	Main logic for the timer process.
timer_interface.c:
	Contains methods for starting and stopping timers and querying the result of
	expired timers.  This is used by tcpd (and timer-test) to communicate with 
	the timer.  Each method actually uses a udp socket to communicate with a 
	timer process running on the same machine.
timer_test.c:
	Main logic for a simple process to test communication to the timer process
	(but not from it) and the expiration/ordering of timers.  Not needed for the
	main project, but can be built by running `make timer-test`.

cse5462ftptcp's People

Contributors

zman0900 avatar

Watchers

James Cloos avatar Lucas D. avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.