Project 2: chitcp#

In this project you will be implementing the Transmission Control Protocol, as specified in [RFC9293]. However, instead of implementing it inside the operating system itself, you will be implementing it inside a system called chiTCP. This system allows you to write socket-based applications that rely on your TCP implementation instead of the one included in your operating system. To do this, chiTCP provides an alternate socket library, chisocket, that provides the same functions as the standard socket library (connect, send, recv, etc.). Although the chisocket functions have the same expected behaviour as the standard socket functions, they do not implement the entire functionality provided by standard sockets (e.g., non-blocking sockets are not supported).

Please refer to the following documents to complete this project:

Project Timeline#

This project has the following timeline:

What

Requirements

Due Date

Project 2A

Assignment 1 of chiTCP

Thursday, November 5, 8pm

Pre-submission Code Review

Schedule and complete a Pre-submission Code Review with your TA

Wednesday, November 11, 8pm

Project 2B

(Note: Assignment 2 builds on Assignment 1)

Thursday, November 12, 8pm

Feedback Code Review

Schedule and complete a Feedback Code Review with your TA
(only required if you did not score two S’s in Project 2B)

Friday, December 4, 8pm (*)

Resubmission (Optional)

Address feedback received in Project 2

Tuesday, December 8, 8pm (*)

(*) These dates may shift depending on when the Project 2 grading is available.

Please see Project 2 rubric for more details on how each submission will be graded.

Initializing your Team Repository for Project 2#

Make sure that you have read the Getting Started page before following the instructions below.

One-time setup instructions

Only one team member needs to run these commands. In the commands below, $REPO_URL refers to the SSH URL of your repository. To get this URL, log into the CS GitLab server and navigate to your project repository (you can also find a direct link from the CS Course Repositories website). Then, click on the “Code” button and copy the URL that appears under “Clone with SSH”. It should look something like this: git@gitlab.cs.uchicago.edu:courses/aut-26/cmsc23320/cnetid1-cnetid2.git

If you are working with the same partner as in Project 1, you will add the chiTCP code to your existing team repository. Inside your local copy of that repository, run the following commands:

git pull
git remote add -f chitcp-upstream https://github.com/uchicago-cs/chitcp.git
git subtree add --prefix chitcp chitcp-upstream main --squash
git push

If you are working with a new partner, you will first need to request a new team repo (see the Getting Started page). Then, create an empty directory and, inside that directory, run the following commands:

git init
git commit --allow-empty -m "Initial commit"
git branch -M main
git remote add -f origin $REPO_URL
git remote add -f chitcp-upstream https://github.com/uchicago-cs/chitcp.git
git subtree add --prefix chitcp chitcp-upstream main --squash
git push -u origin main

Cloning instructions

Once the repository has been set up, you can clone the repository in other locations as follows (if you already have a local copy of your team repository, just run git pull instead of git clone):

git clone $REPO_URL
git remote add chitcp-upstream https://github.com/uchicago-cs/chitcp.git

Pulling changes to the upstream code

If we make any changes to the upstream repository, and you want to merge them into your repository, you need to run the following command:

git subtree pull --prefix chitcp chitcp-upstream main --squash

Submission#

Before submitting, make sure you’ve added, committed, and pushed all your code to Git. You will submit your code through Gradescope, which you can access through our Canvas site. Please see our Submitting from GitLab page for details on how to submit your GitLab repository on Gradescope.

Please note that you must make a single submission per pair of students (do not make two submissions, one per student). When making your submission, you will be allowed to add “team members” to your submission. Make sure you add your project partner in your submission.

In this project, Gradescope will only fetch the following files from the chitcp/ directory in your repository:

  • src/chitcpd/tcp.h

  • src/chitcpd/tcp.c

  • src/libchitcp/multitimer.c (Project 2B only)

  • include/chitcp/multitimer.h (Project 2B only)

  • The DOCUMENTATION.md file

  • The RESUBMISSION.md file (when making a resubmission)

Once you submit your files, an “autograder” will run. This autograder should produce the same test results as when you run the code yourself; if it doesn’t, please let us know so we can look into it.