From c35fafdf887aa32c5be6ad738d3a3b0140cea6e8 Mon Sep 17 00:00:00 2001 From: Matthieu Boutier Date: Mon, 23 Jan 2012 23:46:32 +0100 Subject: babeld: babelz merge. Babelz is the last version of the stand-alone babel daemon. In particular, it use multiple channels to diminuate interferences. Please refer to this one for more details. --- babeld/net.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'babeld/net.c') diff --git a/babeld/net.c b/babeld/net.c index eaed51d2..5e0200b0 100644 --- a/babeld/net.c +++ b/babeld/net.c @@ -58,6 +58,7 @@ babel_socket(int port) int s, rc; int saved_errno; int one = 1, zero = 0; + const int ds = 0xc0; /* CS6 - Network Control */ s = socket(PF_INET6, SOCK_DGRAM, 0); if(s < 0) @@ -86,6 +87,15 @@ babel_socket(int port) if(rc < 0) goto fail; +#ifdef IPV6_TCLASS + rc = setsockopt(s, IPPROTO_IPV6, IPV6_TCLASS, &ds, sizeof(ds)); +#else + rc = -1; + errno = ENOSYS; +#endif + if(rc < 0) + perror("Couldn't set traffic class"); + rc = fcntl(s, F_GETFL, 0); if(rc < 0) goto fail; -- cgit v1.2.1