mkdir out && cd out && cmake -GNinja .. && ninja && sudo ninja install
```
### Commands
Now your machine is ready and you will be able to use the following commads:
*`donar` is our main binary. It can be run as a client or a server.
*`udpecho` is a simple udp server that send back the data sent to him.
*`torecho` is a simple tcp server that send back the data sent to him + configure the tor daemon to generate a hidden service URL and be accessible on the Tor network.
*`measlat` can be used in conjunction with `udpecho` or `torecho` to measure a Rount Time Trip (RTT)
Try to run the previous commands in your terminal without any option, you will see their help.
At any moment, you can use the following commands that are not part of the project to understand what you are doing:
```bash
netstat -ulpn # Show programs that listen on an UDP port
netstat -tlpn # Show prograns that listen on a TCP port
nc 127.0.0.1 8000 # Connect via TCP on server 127.0.0.1 listening on port 8000
nc -u 127.0.0.1 8000 # Connect via UDP on server 127.0.0.1 listening on port 8000
```
### Introduction to the debug tools `udpecho` and `measlat`
Now let's start simple, we will launch our udp echo server and access it locally:
```bash
udpecho -p 8000 &
nc 127.0.0.1 8000
```
If you write some data on your terminal and press enter, you will see that your data has been repeated. Well done!
Now, instead of using `nc`, we will use `measlat` to use this echo server to measure latencies:
```bash
udpecho -p 8001 &
measlat -h 127.0.0.1 -p 8001 -t udp
```
`measlat` will send one packet to our udpecho server and wait to receive it back, measure the time it took, display it and exit.
You can use `measlat` more extensively by defining the number of measures to do, an interval and the size of the packet: