#	$OpenBSD: cbq.ssh_tos,v 1.2 2002/02/07 10:22:02 wilfried Exp $
#
# Artur Grabowski <art@openbsd.org> 2002 Public Domain
#
# Sample configuration that puts ssh traffic into different classes depending
# on if it's a bulk transfer or interactive session.
#

# We have a 10Mbps link on de0
interface de0 bandwidth 10M cbq

# Create the root class. Everything.
class cbq de0 root NULL pbandwidth 100

class cbq de0 ctl_class root pbandwidth 5 control
class cbq de0 def_class root borrow pbandwidth 95 default

class cbq de0 bulk def_class borrow pbandwidth 40
class cbq de0 interactive def_class borrow pbandwidth 40

class cbq de0 inter_ssh interactive borrow pbandwidth 35 red
# TOS 0x10 is IPTOS_LOWDELAY, set in ssh for interactive sessions.
	filter de0 inter_ssh 0 22 0 0 6 tos 0x10
	filter de0 inter_ssh 0 0 0 22 6 tos 0x10

class cbq de0 bulk_ssh bulk borrow pbandwidth 20 red
# TOS 0x08 is IPTOS_THROUGHPUT, set in ssh for bulk sessions.
	filter de0 bulk_ssh 0 22 0 0 6 tos 0x08
	filter de0 bulk_ssh 0 0 0 22 6 tos 0x08
