delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/09/05/06:10:41

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 5 Sep 2005 12:10:27 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: IP_TOS possible bug?
Message-ID: <20050905101027.GC23702@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <000001c5b1d3$8af22cf0$2e55d5a5 AT leemy>
Mime-Version: 1.0
In-Reply-To: <000001c5b1d3$8af22cf0$2e55d5a5@leemy>
User-Agent: Mutt/1.4.2i

On Sep  5 13:37, Yung Leem wrote:
> I am having a trouble with setting IP_TOS.
> 
> Currently I am trying to send UDP packets with TOS parameter set to
> something other than the default value of 0x00.
> 
> I am using cygwin version 1.5.17(0.129/4/2).
> 
> I have no problem sending a UDP packet if I do not call the following
> function,
> 
> int rc = setsockopt( inSettings->mSock, IPPROTO_IP, IP_TOS, (char*) &tos,
> len );
> 
> rc's value is 0 after the call, so it seemed to work fine, but I believe
> this is what's causing the following error.
> 
> "write2 failed: Transport endpoint is not connected"
> 
> With some search around, I found that
> 
> #define	IP_TOS  3   /* old (winsock 1.1) value 8 */
> 
> So I tried this value (3 instead of 8), and now it does not give me the
> previous problem 
> with "write2 failed: Transport endpoint is not connected", but it does not
> seem to do
> anything when I sniffed the IP packet with Ethereal.
> 
> Could anybody help me with this?  I really appreciate your help.

IP_TOS is crappy on Windows.  First, the value of IP_TOS depends on
whether using Winsock1 or WinSock2, second, it's disabled by default in
systems since W2K.
See http://support.microsoft.com/default.aspx?scid=kb;en-us;248611
for the sad details.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019