summaryrefslogtreecommitdiff
path: root/mausezahn.8
diff options
context:
space:
mode:
authorMatteo Croce <mcroce@redhat.com>2018-08-21 16:38:09 +0200
committerTobias Klauser <tklauser@distanz.ch>2018-08-22 10:21:37 +0200
commitc7c176394ad2b87f56b0aed2731eb9dde29750f0 (patch)
tree1c423f98bc7ac52feb134044efeed38ccc6d0507 /mausezahn.8
parent01f339a7bb170310f9dd6a389d9c89b6c62032d0 (diff)
mausezahn: improve random mac address generation
Modify -b option to generate all random MAC addresses. Improve the random generation algorithm, use nrand48() which fills the ethernet address in two calls instead of six calls to rand() and six floating point calculations. Set the locally administered bit of generated MAC addresses. Signed-off-by: Matteo Croce <mcroce@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'mausezahn.8')
-rw-r--r--mausezahn.810
1 files changed, 4 insertions, 6 deletions
diff --git a/mausezahn.8 b/mausezahn.8
index 1ad7667..44a76ab 100644
--- a/mausezahn.8
+++ b/mausezahn.8
@@ -105,18 +105,16 @@ higher layer packets the number of additional padding bytes are specified.
.PP
.SS -a <src-mac|keyword>
Use specified source MAC address with hexadecimal notation such as 00:00:aa:bb:cc:dd.
-By default the interface MAC address will be used. The keywords ''rand'' and
- ''own'' refer to a random MAC address (only unicast addresses are created)
+By default the interface MAC address will be used. The keywords ''rand'' and ''own''
+refer to a random MAC address (only unicast addresses are created)
and the own address, respectively. You can also use the keywords mentioned
below although broadcast-type source addresses are officially invalid.
.PP
.SS -b <dst-mac|keyword>
Use specified destination MAC address. By default, a broadcast is sent in raw
layer 2 mode or to the destination hosts or gateway interface MAC address in normal
-(IP) mode. You can use the same keywords as mentioned above, as well as
- ''bc'' or ''bcast'', ''cisco'', and ''stp''. Please note that for the destination
-MAC address the ''rand'' keyword is supported but creates a random address only
-once, even when you send multiple packets.
+(IP) mode. You can use the same keywords as mentioned above, as well as ''bc''
+or ''bcast'', ''cisco'', and ''stp''.
.PP
.SS -A <src-ip|range|rand>
Use specified source IP address, default is own interface address. Optionally, the