Ghvstcode / Rust-Tcp

Implementing TCP In Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Corrections for chapter 1

Ti0x-f opened this issue · comments

commented

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.