From 69bf3a39931ce61a92fb04d8888b4655fd5620a2 Mon Sep 17 00:00:00 2001 From: Dmitrij Tejblum Date: Thu, 18 Aug 2011 20:22:17 +0400 Subject: 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 --- lib/sockopt.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'lib/sockopt.h') 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. */ -- cgit v1.2.1 From 6d0732c8abad7ace509d033a41814ea03a3a1b16 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 28 Sep 2011 14:23:35 +0400 Subject: IPv6 transport class suppport IPv6 supports the same concept of differentiated service for routing protocols as IPv4, but like too many things, the standards committee decided that having two names for the same thing wasn't good enough and introduced a third more generic term transport class. The socket option to set transport class works the same as IPv4, but the arguments are different. * lib/sockopt.[ch] * setsockopt_ipv6_tclass(): new function * bgpd/bgp_network.c * bgp_connect(): set socket option * bgp_listener(): set socket option * ospf6d/ospf6_network.c * ospf6_set_transport_class(): new function * ospf6_serv_sock(): set socket option * ripngd/ripngd.c * ripng_make_socket(): set socket option --- lib/sockopt.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/sockopt.h') diff --git a/lib/sockopt.h b/lib/sockopt.h index 69309e00..aced6d48 100644 --- a/lib/sockopt.h +++ b/lib/sockopt.h @@ -35,6 +35,7 @@ extern int setsockopt_ipv6_multicast_hops (int, int); extern int setsockopt_ipv6_unicast_hops (int, int); extern int setsockopt_ipv6_hoplimit (int, int); extern int setsockopt_ipv6_multicast_loop (int, int); +extern int setsockopt_ipv6_tclass (int, int); #endif /* HAVE_IPV6 */ /* -- cgit v1.2.1