* Incoming TCP TOS: A simple question, I would have thought...
@ 2001-03-07 4:00 David Luyer
2001-03-07 4:33 ` Lincoln Dale
2001-03-07 20:00 ` kuznet
0 siblings, 2 replies; 4+ messages in thread
From: David Luyer @ 2001-03-07 4:00 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Incoming TCP TOS: A simple question, I would have thought...
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
2001-03-07 20:00 ` kuznet
1 sibling, 1 reply; 4+ messages in thread
From: Lincoln Dale @ 2001-03-07 4:33 UTC (permalink / raw)
To: David Luyer; +Cc: linux-kernel
getsockopt(fd, SOL_IP, IP_TOS, ..
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
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Incoming TCP TOS: A simple question, I would have thought...
2001-03-07 4:33 ` Lincoln Dale
@ 2001-03-07 5:05 ` David Luyer
0 siblings, 0 replies; 4+ messages in thread
From: David Luyer @ 2001-03-07 5:05 UTC (permalink / raw)
To: Lincoln Dale; +Cc: linux-kernel
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Incoming TCP TOS: A simple question, I would have thought...
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 20:00 ` kuznet
1 sibling, 0 replies; 4+ messages in thread
From: kuznet @ 2001-03-07 20:00 UTC (permalink / raw)
To: David Luyer; +Cc: linux-kernel
Hello!
> 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).
No way. Formally it is IP_RECVTOS, followed by IP_PKTOPTIONS.
But getting TOS via IP_PKTOPTIONS is not implemented, only ttl.
Alexey
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-03-07 20:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2001-03-07 20:00 ` kuznet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox