# example.3.conf: shape masq'd hosts
#
# send a SIGHUP to reload this file with the command killall -HUP shaperd

# this is an "internal" log level (all logs are sent with facility daemon,
# priority info; see the syslog manpage for more information).
# valid levels are:
# alert   (1)
# error   (2)
# warning (3)
# info    (4)
# debug1  (5)
# debug2  (6)
# log levels beggining from warning (3) will log unmatched packets
log level = warning

# this is a required option. note that shaperd must have been built with
# the correct forwarding mechanism(s) in order for these to work
# see the README for further details
# packet forwarding = ipq
# packet forwarding = divert
packet forwarding = ipq

# this is useful for debugging
# shaperd will run detached if set to "yes"
daemon = yes

# full path to shaperd's pidfile
# it will be generated in daemon mode only
pidfile = /var/run/shaperd.pid


# Amit nem teszel bele a QUEUE-ba (iptables), az nem
# kerul korlatozasra. Csak  tcp protokollos, cimre
# tarto, illetve cimrol erkezo csomagkorlatozas van
# ervenyben.

# Vigyazz! Ha jol tudom, INPUT es OUTPUT lancok csak
# a geprol indulo es gepre erkezo csomagokat tartalmazzak.
# A tovabbitottat NEM!!!
#
# queue limit: ha a QUEUE lancba tobb, mint 100 db, 
# egyenkent maximum 100kb-os csomagnal tobb kerul, akkor
# eldobalja a csomagokat. Ez a korlatozas _ELOTT_ tortenik.
# Itt barmennyit megadhatsz, a savszelesseg a bandwith-tol
# fugg. Ha itt pl 10 kilos csomagot adsz meg, akkor a
# 10 kilosnal nagyobb csomagokat automatice eldobja!!
#
# borrow from: ha nincs kihasznalva az itt megadott osztaly,
# akkor onnan atvehet savszelesseget. 
#
# Itt a 192.168.1.20-as gep es a studio.sth.sze.hu gepek
# kozotti forgalmat szabalyoztam. 
#
# iptables -A INPUT -s 192.168.1.20 -p tcp -j QUEUE (A_up)
# iptables -A OUTPUT -d 192.168.1.20 -p tcp -j QUEUE (A_down)
# shaperd -c /etc/shaperd.conf

# 1.20 felol 256 kbit/s
class A_up {
        bandwidth = 384 kbit/s
        ipv4 classifier proto=tcp saddr=192.168.1.20
        queue limits = 100 kb 100 packets
}

class B_up {
        bandwidth = 384 kbit/s
        ipv4 classifier proto=udp saddr=192.168.1.20
        queue limits = 100 kb 100 packets
}

# 1.20 fele 512 kbit/s
#class A_down {
#        bandwidth = 512 kbit/s
#        ipv4 classifier proto=tcp daddr=192.168.1.20
#        queue limits = 100 kb 100 packets
#}
