Giter Site home page Giter Site logo

rust-tcp's Issues

chapter1 fixed started script

#!/bin/bash
cargo b --release
sudo setcap cap_net_admin=eip ./target/release/tcp
./target/release/tcp & 
pid=$1
sudo ip addr add 192.168.0.1/24 dev tun0
trap "kill $pid" INT TERM
wait $pid

fix pid=$1 to pid=$1, so the pid var is correcly assigned?

#!/bin/bash
cargo b --release
sudo setcap cap_net_admin=eip ./target/release/tcp
./target/release/tcp & 
pid=$!
sudo ip addr add 192.168.0.1/24 dev tun0
trap "kill $pid" INT TERM
wait $pid

Chapter 1 - Aside - Consider adding teardown / cleanup instructions

If the reader were to follow the instructions in Chapter 1 and then decide to no longer follow the book, what actions (if any) would be required by the reader to restore their system to the pre-book state?

If actions were required, consider listing them or adding a teardown script.

If no actions are required, consider highlighting that point and explaining why no further actions would be required.

Corrections for chapter 1

Two corrections are needed in chapter 1, in order to improve clarity and usability of the snippets presented.

Creation of the interface tun0

Based on the comment in the code snippet and on the output of the command ip addr presented, the following line of rust given as an exemple :

let nic = tun_tap::Iface::new("tune", tun_tap::Mode::Tun)?;

Needs to be :

let nic = tun_tap::Iface::new("tun0", tun_tap::Mode::Tun)?;

Use of ping

The following command is used : ping - I tun0 192.168.0.2. However, based on the man page of ping, it should be : ping -I tun0 192.168.0.2.

Consider expectation-setting in README.md

Consider adding a section to README.md that outlines the expected level of background knowledge on various topics for best results. E.g:

"This book assumes you have an intermediate understanding of Rust, and are at least passingly familiar with computer networking. The code samples assume you are running Linux, and will not work on other operating systems without modification. It is assumed you are using Rust (XX) or newer - backwards compatibility is not guaranteed."

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.