The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: David Luyer <david_luyer@pacific.net.au>
To: Lincoln Dale <ltd@cisco.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Incoming TCP TOS: A simple question, I would have thought...
Date: Wed, 07 Mar 2001 16:05:45 +1100	[thread overview]
Message-ID: <200103070505.f2755jT17569@typhaon.pacific.net.au> (raw)
In-Reply-To: Message from Lincoln Dale <ltd@cisco.com>  of "Wed, 07 Mar 2001 15:33:44 +1100." <4.3.2.7.2.20010307153216.01b85d58@mira-sjcm-3.cisco.com>
In-Reply-To: <4.3.2.7.2.20010307153216.01b85d58@mira-sjcm-3.cisco.com>

> getsockopt(fd, SOL_IP, IP_TOS, ..

Doesn't work.  Returns the TOS of outgoing packets, which defaults to 0 even if
there is a TOS set on incoming traffic... that was what I tried in my first 
test program.

David.

> cheers,
> 
> lincoln.
> 
> At 03:00 PM 7/03/2001 +1100, David Luyer wrote:
> 
> >I've scrolled through various code in net/ipv4, and I can't see how to query
> >the TOS of an incoming TCP stream (or at the least, the TOS of the SYN which
> >initiated the connection).
> >
> >Someone has sent in a feature request for squid which would require this,
> >presumably so they can set the TOS in their routers and have the squid caches
> >honour the TOS to select performance (via delay pools, multiple parents,
> >different outgoing IP or similar).  However I can't see how to get the TOS for
> >a TCP socket out of the kernel short of having an open raw socket watching for
> >SYNs and looking at the TOS on them.
> >
> >Any pointers?
> >
> >David.
-- 
David Luyer                                        Phone:   +61 3 9674 7525
Engineering Projects Manager   P A C I F I C       Fax:     +61 3 9699 8693
Pacific Internet (Australia)  I N T E R N E T      Mobile:  +61 4 1111 2983
http://www.pacific.net.au/                         NASDAQ:  PCNTF



  reply	other threads:[~2001-03-07  5:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-07  4:00 Incoming TCP TOS: A simple question, I would have thought David Luyer
2001-03-07  4:33 ` Lincoln Dale
2001-03-07  5:05   ` David Luyer [this message]
2001-03-07 20:00 ` kuznet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200103070505.f2755jT17569@typhaon.pacific.net.au \
    --to=david_luyer@pacific.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltd@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox