Re: [Diffserv] APIs for diffserv

"Andreas Kassler" <kassler@informatik.uni-ulm.de> Thu, 17 October 2002 15:00 UTC

Received: from www1.ietf.org (ietf.org [132.151.1.19] (may be forged)) by ietf.org (8.9.1a/8.9.1a) with ESMTP id LAA13879 for <diffserv-archive@odin.ietf.org>; Thu, 17 Oct 2002 11:00:18 -0400 (EDT)
Received: (from mailnull@localhost) by www1.ietf.org (8.11.6/8.11.6) id g9HF2Xp29675 for diffserv-archive@odin.ietf.org; Thu, 17 Oct 2002 11:02:33 -0400
Received: from www1.ietf.org (localhost.localdomain [127.0.0.1]) by www1.ietf.org (8.11.6/8.11.6) with ESMTP id g9HEjLv28469; Thu, 17 Oct 2002 10:45:21 -0400
Received: from ietf.org (odin.ietf.org [132.151.1.176]) by www1.ietf.org (8.11.6/8.11.6) with ESMTP id g9HEENv26520 for <diffserv@optimus.ietf.org>; Thu, 17 Oct 2002 10:14:23 -0400
Received: from vs.informatik.uni-ulm.de (ietf-mx.ietf.org [132.151.6.1]) by ietf.org (8.9.1a/8.9.1a) with ESMTP id KAA12104 for <diffserv@ietf.org>; Thu, 17 Oct 2002 10:12:08 -0400 (EDT)
Received: from lamagra (lamagra.informatik.uni-ulm.de [134.60.77.31]) by vs.informatik.uni-ulm.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with SMTP id g9HDGpJ15112; Thu, 17 Oct 2002 15:16:53 +0200
X-Authentication-Warning: vs.informatik.uni-ulm.de: Host lamagra.informatik.uni-ulm.de [134.60.77.31] claimed to be lamagra
Message-ID: <00a501c275e7$d405cbc0$1f4d3c86@lamagra>
From: "Andreas Kassler" <kassler@informatik.uni-ulm.de>
To: "Thomas Narten" <narten@us.ibm.com>
Cc: <diffserv@ietf.org>, <ipng@sunroof.eng.sun.com>
References: <Pine.LNX.4.44.0210160929350.5018-100000@melkinpaasi.cs.Helsinki.FI>
Subject: Re: [Diffserv] APIs for diffserv
Date: Thu, 17 Oct 2002 16:16:45 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Content-Transfer-Encoding: 7bit
Sender: diffserv-admin@ietf.org
Errors-To: diffserv-admin@ietf.org
X-BeenThere: diffserv@ietf.org
X-Mailman-Version: 2.0.12
Precedence: bulk
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/diffserv>, <mailto:diffserv-request@ietf.org?subject=unsubscribe>
List-Id: Diffserv Discussion List <diffserv.ietf.org>
List-Post: <mailto:diffserv@ietf.org>
List-Help: <mailto:diffserv-request@ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/diffserv>, <mailto:diffserv-request@ietf.org?subject=subscribe>
Content-Transfer-Encoding: 7bit

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" <jmanner@cs.helsinki.fi>
To: "Thomas Narten" <narten@us.ibm.com>
Cc: <diffserv@ietf.org>rg>; <ipng@sunroof.eng.sun.com>
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
> diffserv@ietf.org
> https://www1.ietf.org/mailman/listinfo/diffserv
> Archive:
http://www.ietf.org/mail-archive/working-groups/diffserv/current/maillist.ht
ml
>

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