Set ToS octet on netjack packets

This commit is contained in:
Alba Mendez 2018-04-21 18:16:32 +02:00 committed by Filipe Coelho
parent d80de6c81a
commit 63269497fd
1 changed files with 1 additions and 9 deletions

View File

@ -125,21 +125,13 @@ namespace Jack
0x00 / 000000 / 0 0 Best Effort BE AC_BE
*/
/*
socklen_t len = sizeof(tos);
res = getsockopt(fSockfd, IPPROTO_IP, IP_TOS, &tos, &len);
printf("getsockopt IPPROTO_IP res = %d tos = %d\n", res, tos);
tos = 46 * 4; // see <netinet/in.h>
res = setsockopt(fSockfd, IPPROTO_IP, IP_TOS, &tos, sizeof(tos));
printf("setsockopt IPPROTO_IP res = %d tos = %d\n", res, tos );
res = getsockopt(fSockfd, IPPROTO_IP, IP_TOS, &tos, &len);
printf("getsockopt IPPROTO_IP res = %d tos = %d\n", res, tos);
*/
return fSockfd;
}