Java Network Traffic Generator: Difference between revisions
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
=User Manual= | =User Manual= | ||
==Common Arguments== | |||
====--interface==== | |||
<pre> | |||
--interface=<interface-name>|<address> | |||
</pre> | |||
Example: | |||
<pre> | |||
--interface=eth0 | |||
</pre> | |||
<pre> | |||
--interface=172.20.1.11 | |||
</pre> | |||
Listen for multicast: | Listen for multicast: |
Revision as of 03:03, 16 March 2017
External
- https://docs.oracle.com/javase/tutorial/networking/datagrams/broadcasting.html
- https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html
Internal
Overview
A Java program sends multicast socket using DatagramSocket and listens for multicast traffic with MulticastSocket.
GitHub
User Manual
Common Arguments
--interface
--interface=<interface-name>|<address>
Example:
--interface=eth0
--interface=172.20.1.11
Listen for multicast:
java -jar multicast.jar listen <network-interface-name> <multicast-address>:<port>
The network interface name is one of those returned by ip addr.
Send multicast:
java -jar multicast.jar send <network-interface-name> <multicast-address>:<port>
The network interface name is one of those returned by ip addr.