The setsockopt way to select an interface for the outgoing traffic with IPv4 is IP_MULTICAST_IF, which accepts two arguments. From the ip(4) manual page: Set the local device for a multicast socket. The argument for setsockopt(2) is an ip_mreqn or (since Linux 3.5) ip_mreq structure similar to IP_ADD_MEMBERSHIP, or an in_addr structure. When trying to do the analogous operation with
Tag: multicast
Need to run .jar from console for it to work
I have a java application. I’m using eclipse to write, compile and create a runnable .jar. The program is used to discover OCF devices. It uses UDP and multicast. Multicast code The code works when I start it from eclipse. It also works when I run the .jar from console on Linux. But when I start it with a double
Change maximum number of Virtual interfaces in Kernel
I am running Ubuntu server 14.04.3. I have smcroute installed – Version 0.95, Build 130523. When I attempt to start the daemon I get the error message: ERRO: addVIF, out of VIF space;, this happens after it attempts to add the 33rd network interface of my machine. Looking in mroute.h in /usr/include/linux/ folder, I saw a MAXVIFS defined as 32,
Just like IN_ADDRANY can we creat any macro for port number, such that we can bind to any port insteed of a particular port??
I want to receive the data from different ip addr with different port numbers and the reading the data is in infinite loop? Answer Can’t be done. It would conflict with all other bound sockets on the system. If what you really want to do is read any traffic coming in through the network interface, you need a packet capture