c++linuxarmmulticastsocketsysctl

How to set default HopLimit value for multicast in armLinux?


I'm trying to send packets via socket to multicast address. hopLimit by default == 1. I need hopLimit == 255 by default.

I can change hopLimit for all packets that was sent through this socket using IPV6_MULTICAST_HOPS setsockopt. But I need something like system default value for hopLimit for multicast sending.

I found sysctl option. But only for OpenBSD net.inet6.ip6.defmcasthlim

I cannot found the similar option for armLinux


Solution

  • Unfortunately there is no way to change the default multicast hop limit in Linux like there is in OpenBSD. Unless you are willing to change the Linux kernel source, that is. If you do want to modify the kernel for this purpose, you just have to change the IPV6_DEFAULT_MCASTHOPS definition in the include/net/ipv6.h header file in the kernel tree.