#!/bin/sh 
: ' vim:set ft=sh nowrap: '

: '080119 PeterG <pg_scr {at} scr.for.sabi.co.UK>'

: ' LOCAL DETAILS'

: '
  Of nominal capacity of an ADSL link about 20% is wasted by overheads.
  So a 576kb/s link usually can only carry at most 470kb/s (or about
  56KB/s in practice including *all* protocol overheads (IP+TCP+HTTP
  for example) and indeed what matters here includes those).

  200Kb/s =~ 23KB/s, 220Kb/s =~ 25KB/s, 240Kb/s =~ 28KB/s
  400Kb/s =~ 46KB/s, 440Kb/s =~ 51KB/s, 480Kb/s =~ 56KB/s
'

: "
  Usually if your host connects directly to an ADSL modem, e.g. via
  'ppp0', you will want to leave the 'LNET' an empty string. If your
  host connects to an ADSL modem indirectly, e.g. via 'eth0', and you
  also have a number of local hosts on the same interface, define
  'LNET' to be nonempty, or set a nonempty parameter.
"

case "$SITE" in

'sabity')	
  : ${LNET:='192.168.1.0/24'}
  : ${KBEGRE:='240'}
  : ${KBINGR:='480'};;

'DLS'*)	
  : ${LNET:='172.23.0.0/16'}
  : ${KBEGRE:='90000'}
  : ${KBINGR:='90000'};;

*)
  : ${LNET:='192.168.0.0/16'}
  : ${KBEGRE:='220'}
  : ${KBINGR:='440'};;

esac

case "$HULL+$EXIF" in

'base+eth0')
  : ${MBLNET:='90'};;
'base+eth1')
  : ${MBLNET:='900'};;

'tree+eth0')
  : ${MBLNET:='90'};;
'tree+wlan0')
  KBEGRE='900'
  KBINGR='900'
  MBLNET='900';;

'leaf+eth0')
  : ${MBLNET:='90'};;
'leaf+eth1')
  : ${MBLNET:='900'};;

'soft+eth0')
  : ${MBLNET:='900'};;

*)
  : ${MBLNET:='90'};;

esac

: ' LOCAL DEFAULTS'

: '
  Default low priority ports for egress.
  BitTorrent and eDonkey seem reasonable defaults.
'
: ${LOWPPORTDST:=''}
: ${LOWPPORTSRC:='4661 4662 4665 4672 6881 6882 6883 6884'}

: '
  Default low priority addresses for egress.
'
: ${LOWPADDRDST:=''}
: ${LOWPADDRSRC:=''}
