Re: APIs for diffserv

"Andreas Kassler" <[email protected]> Thu, 17 Oct 2002 16:16:45 +0200
Newsgroups gmane.ietf.diffserv,gmane.ietf.ipv6
Message-ID <00a501c275e7$d405cbc0$1f4d3c86@lamagra>
And finally on Win32 platforms, the code snippet looks like the following
(see the platform SDK):
   int tos, tos_len;
   tos_len = sizeof(tos);

   if (getsockopt(sock, IPPROTO_IP, IP_TOS, (char *)&tos,
                  &tos_len) == SOCKET_ERROR)
       printf("\nWarning: TCPIP stack does not support the "
              "IP_TOS option - %d\n", WSAGetLastError());

   if (setsockopt(sock, IPPROTO_IP, IP_TOS, (char *)&tos,
                  tos_len) == SOCKET_ERROR)
      printf("\nWarning: Fail to set TOS value: error - %d",
             WSAGetLastError());

You can also modify the following key in the Registry Editor to change the
TOS value set in the header of outgoing IP packets:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\
   Value Name: DefaultTOS
   Value Type: REG_DWORD
   Valid Range: 0x00, 0x02, 0x04, 0x08, 0x10Regards, Andreas
----- Original Message -----
From: "Jukka MJ Manner" <[email protected]>
To: "Thomas Narten" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Wednesday, October 16, 2002 8:37 AM
Subject: Re: [Diffserv] APIs for diffserv


>
> Hi, a quick answer,
>
>
> On Tue, 15 Oct 2002, Thomas Narten wrote:
>
> > 3) What about APIs for IPv4? Aren't they needed too?
>
>   (On Linux) The application can use:
>
>   setsockopt(fd,IPPROTO_IP,IP_TOS, &optval, sizeof(optval));
>
>   where optval includes the DSCP value to be used. The "IPTOS_TOS_MASK"
> is used to mask bits out, eg. the ECN bits.
>
>
> Regards,
>
> Jukka
>
> Research Scient
> Department of Computer Science
> University of Helsinki, Finland
> http://www.cs.Helsinki.Fi/u/jmanner/
>
> _______________________________________________
> diffserv mailing list
> [email protected]
> https://www1.ietf.org/mailman/listinfo/diffserv
> Archive:
http://www.ietf.org/mail-archive/working-groups/diffserv/current/maillist.ht
ml
>

_______________________________________________
diffserv mailing list
[email protected]
https://www1.ietf.org/mailman/listinfo/diffserv
Archive: http://www.ietf.org/mail-archive/working-groups/diffserv/current/maillist.html