Giter VIP home page Giter VIP logo

mixnet's Introduction

15-441/15-641 Project 1: Mixnet

Project 1 for the 15-441/641 (Networking and the Internet) course at CMU. Note: This is a course project, so DO NOT push your solution to a public fork of this repo.

Requirements

This project is designed to run on Linux. It was tested on Ubuntu 20.04.2 LTS, but you may get away by using other distributions.

Building

You need cmake and sctp to build the project. On Ubuntu, you can install them with:

sudo apt install build-essential cmake libsctp-dev

To build the project, in the root directory, run:

mkdir build
cd build
cmake ..
make

From now on you can always build the project by going to the build directory and running make.

Running

Mixnet is test-driven. You can find some examples of these tests under the testing directory. For instance, cp1/test_line_easy.cpp demonstrates how to create a line topology with two nodes, 'subscribe' to packet data from one of them, and send a FLOOD packet from one to the other.

You can run mixnet in two modes: an 'autotester' mode, which we will be using to grade your implementation, and 'manual' mode, which you can use to debug your implementation on either a single machine (using one process per mixnet node) or a cluster of machines. You will also use the second mode to perform experiments on AWS (please see the handout for details).

To run in autotester mode, cd into the build directory and run:

./bin/cp1_test_line_easy -a # '-a' toggles the autotester

At the end, it should produce output indicating whether your implementation passed or failed that particular test-case.

You can also run the same test in 'manual' mode. For the test_line_easy example, you will need three terminal windows open: one for each of the mixnet nodes, and one for the 'orchestrator', which bootstraps the topology, sets up connections, coordinates actions, etc. In general, you will need (n + 1) terminals, where n is the number of mixnet nodes in the test topology. First, start the orchestrator:

./bin/cp1_test_line_easy # Note that '-a' is missing

You should see output that looks like this: [Orchestrator] Started listening on port 9107 with session nonce 39239. Note both the port (it's always 9107) the server is running on, as well as the nonce (changes every run). Next, type the following commands in the other two terminals (one in each):

./bin/node 127.0.0.1 9107 0 {nonce}
./bin/node 127.0.0.1 9107 1 {nonce}

The format is as follows: ./node {server_ip} {server_port} {node_id} {nonce}. The node IDs correspond to indices in the 'topology' vector for the testcase; for this example, the node with ID 0 will be assigned a mixnet address of 0, and the other with a mixnet address of 1 (see 'mixaddrs' in test_line_easy.cpp). Please refer to the other test-cases (as well as the test API in harness/orchestrator.h) for more examples and detailed usage.

The entry-point to your code is the run_node() function in mixnet/node.c. For details, please refer to the handout. Good luck!

mixnet's People

Contributors

yukunj avatar natre avatar hsadok 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.