Java Network Traffic Generator: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 21: Line 21:


<pre>
<pre>
java -jar multicast.jar listen <network-interface> <multicast-address>:<port>
java -jar multicast.jar listen <network-interface-name> <multicast-address>:<port>
</pre>
</pre>
The network interface name is one of those returned by <tt>ip addr</tt>.


Send multicast:
Send multicast:


<pre>
<pre>
java -jar multicast.jar send <network-interface> <multicast-address>:<port>
java -jar multicast.jar send <network-interface-name> <multicast-address>:<port>
</pre>
</pre>
The network interface name is one of those returned by <tt>ip addr</tt>.

Revision as of 23:42, 15 March 2017

External

Internal

Overview

A Java program sends multicast socket using DatagramSocket and listens for multicast traffic with MulticastSocket.

GitHub

https://github.com/NovaOrdis/playground/tree/master/java/network/multicast

User Manual

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.