File: README.md

package info (click to toggle)
golang-github-mdlayher-ethernet 0.0~git20220221.529eae5-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, experimental, forky, sid, trixie
  • size: 120 kB
  • sloc: makefile: 3
file content (50 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
etherecho
=========

Command `etherecho` broadcasts a message to all machines in the same network
segment, and listens for other messages from other `etherecho` servers.

`etherecho` only works on Linux and BSD, and requires root permission or
`CAP_NET_ADMIN` on Linux.

Usage
-----

```
$ etherecho -h
Usage of etherecho:
  -i string
        network interface to use to send and receive messages
  -m string
        message to be sent (default: system's hostname)
```

Example
-------

Start an instance of `etherecho` on two machines on the same network segment:

```
foo $ etherecho -i eth0
```
```
bar $ etherecho -i eth0
```

Both machines should begin seeing messages from each other at regular intervals:

```
foo $ etherecho -i eth0
2017/06/14 00:03:13 [aa:aa:aa:aa:aa:aa] bar
2017/06/14 00:03:14 [aa:aa:aa:aa:aa:aa] bar
2017/06/14 00:03:15 [aa:aa:aa:aa:aa:aa] bar
```
```
bar $ etherecho -i eth0
2017/06/14 00:03:13 [bb:bb:bb:bb:bb:bb] foo
2017/06/14 00:03:14 [bb:bb:bb:bb:bb:bb] foo
2017/06/14 00:03:15 [bb:bb:bb:bb:bb:bb] foo
```

Additional machines can be added, so long as they reside on the same network
segment.