diff options
author | Matthieu Boutier <boutier@pps.jussieu.fr> | 2012-01-23 23:46:32 +0100 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2012-03-25 17:06:53 +0100 |
commit | c35fafdf887aa32c5be6ad738d3a3b0140cea6e8 (patch) | |
tree | 4aa21a41dcd82247e467e5b955a6f7813bfd7ba7 /babeld/net.c | |
parent | 16e51b246be6b18641327685f44bd4f5f6649367 (diff) |
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.
Diffstat (limited to 'babeld/net.c')
-rw-r--r-- | babeld/net.c | 10 |
1 files changed, 10 insertions, 0 deletions
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; |