summaryrefslogtreecommitdiff
path: root/lib/sockopt.h
diff options
context:
space:
mode:
authorDmitrij Tejblum <tejblum@yandex-team.ru>2011-08-18 20:22:17 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-09-27 21:37:35 +0400
commit69bf3a39931ce61a92fb04d8888b4655fd5620a2 (patch)
treee49dae20b1dbc0d1ee37121cd45c75d94290bdd1 /lib/sockopt.h
parentea4021984f9eec3f2a85551ae0822e1dff0ed2bc (diff)
lib: simplify interface of setsockopt_multicast_ipv4().
* sockopt.[ch] (setsockopt_ipv4_multicast): ifindex is now mandatory (all non-ancient OSes can use it anyway), and if_addr parameter (the address of the interface) is now gone. (setsockopt_ipv4_multicast_if): IP_MULTICAST_IF processing moved to this new function * ospf_network.c (ospf_if_add_allspfrouters, ospf_if_drop_allspfrouters, ospf_if_add_alldrouters, ospf_if_drop_alldrouters, ospf_if_ipmulticast), rip_interface.c (ipv4_multicast_join, ipv4_multicast_leave, rip_interface_new): adapt to the new interface
Diffstat (limited to 'lib/sockopt.h')
-rw-r--r--lib/sockopt.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/sockopt.h b/lib/sockopt.h
index cb05c6fb..69309e00 100644
--- a/lib/sockopt.h
+++ b/lib/sockopt.h
@@ -82,13 +82,11 @@ extern int setsockopt_ipv6_multicast_loop (int, int);
(((af) == AF_INET) : SOPT_SIZE_CMSG_IFINDEX_IPV4() \
? SOPT_SIZE_CMSG_PKTINFO_IPV6())
-extern int setsockopt_multicast_ipv4(int sock, int optname,
- struct in_addr if_addr
- /* required: interface to join on */,
+extern int setsockopt_ipv4_multicast_if(int sock,
+ unsigned int ifindex);
+extern int setsockopt_ipv4_multicast(int sock, int optname,
unsigned int mcast_addr,
- unsigned int ifindex
- /* optional: if non-zero, may be used
- instead of if_addr */);
+ unsigned int ifindex);
extern int setsockopt_ipv4_tos(int sock, int tos);
/* Ask for, and get, ifindex, by whatever method is supported. */