[Olsr-dev] TosValue and IPv6
Henning Rogge
(spam-protected)
Wed Sep 5 09:24:00 CEST 2012
On 09/04/2012 05:46 PM, jpo wrote:
>
>
> Hello all,
> the current code in unix/ifnet.c looks like this:
>
> #ifdef linux
> /* Set TOS */
>
> if (setsockopt(ifp->send_socket, SOL_SOCKET, SO_PRIORITY, (char *)&precedence, sizeof(precedence)) < 0) {
> perror("setsockopt(SO_PRIORITY)");
> olsr_syslog(OLSR_LOG_ERR, "OLSRD: setsockopt(SO_PRIORITY) error %m");
> }
> if (setsockopt(ifp->send_socket, IPPROTO_IP, IP_TOS, (char *)&tos_bits, sizeof(tos_bits)) < 0) {
> perror("setsockopt(IP_TOS)");
> olsr_syslog(OLSR_LOG_ERR, "setsockopt(IP_TOS) error %m");
> }
> #endif
>
> My understanding is, that SO_PRIORITY affects the local queuing priority and IP_TOS is IPv4 only.
> For IPv6 one should use
> setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, &ds, sizeof(ds));
Not really my area of knowledge, but maybe someone else on the list can
check this.
Henning Rogge
--
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Neuenahrer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961, Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de
GPG: E1C6 0914 490B 3909 D944 F80D 4487 C67C 55EC CFE0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20120905/484ae2b3/attachment.bin>
More information about the Olsr-dev
mailing list