From d1e2faa40e17fe8f3db591021994d2f5e8b11335 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 --- ospf6d/ospf6_network.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ospf6d') diff --git a/ospf6d/ospf6_network.c b/ospf6d/ospf6_network.c index 96b82af3..3372238b 100644 --- a/ospf6d/ospf6_network.c +++ b/ospf6d/ospf6_network.c @@ -63,6 +63,14 @@ ospf6_set_pktinfo (void) setsockopt_ipv6_pktinfo (ospf6_sock, 1); } +void +ospf6_set_transport_class (void) +{ +#ifdef IPTOS_PREC_INTERNETCONTROL + setsockopt_ipv6_tclass (ospf6_sock, IPTOS_PREC_INTERNETCONTROL); +#endif +} + void ospf6_set_checksum (void) { @@ -102,6 +110,7 @@ ospf6_serv_sock (void) #endif /*1*/ ospf6_reset_mcastloop (); ospf6_set_pktinfo (); + ospf6_set_transport_class (); ospf6_set_checksum (); /* setup global in6_addr, allspf6 and alldr6 for later use */ -- cgit v1.2.1