#
#  tkppp v1.4 Initialization File
#
# Put this in your home directory as
#     ~/.tkppprc
#

##############################################################
#                   Configurable Parameters                  #
##############################################################
#
# These are the PPP on/off commands:
#
set ppp_on          {/usr/sbin/ppp-on}
set ppp_off         {/usr/sbin/ppp-off}

# This set the duration (in seconds) after a PPP command
# that we will check the status of the link every second.
# This should be a little LONGER than the maximum time
# needed to connect and bring up the link (see auto_retry).
#
set wait_interval   90

# How often to check the status of the PPP link (in seconds),
# after wait_interval. 
#
set check_interval  10

# Set this to 1 if you want tkppp to mimimize when the PPP
# link goes up.
#
set auto_minimize    0

# Set this to 1 if you want tkppp to maximize when the PPP
# link goes down.
#
set auto_maximize    1

# Set this to 1 if you want tkppp to show the PPP remote
# host's IP name (using nslookup) rather than its address.
#
set show_hostname    0

# Set this to 1 if you want tkppp to retry the ppp_on script
# after $wait_interval if the link is still down (busy-buster).
#
set auto_retry       0

# Set this to 1 if you want tkppp to execute the ppp_on script
# if the link goes down unexpectedly (other then executing
# ppp_off FROM tkppp).
#
set auto_reconnect   1

# Set this to 1 if you want tkppp to ping the host periodically
# to keep the session from timing out for no activity.
#
set auto_ping        1

# How often to ping.  ** Leave this at some nonzero interval **.
# Set auto_ping to 0 to disable the ping feature.
#
set ping_interval   60

# The ping command to execute when auto-pinging.
#
set ping_command     {ping -c 1 $ipaddr >& /dev/null}

# If this is set to a filename, tkppp will append log entries
# to it for each successful connection.
#
set logfile_path     "/dev/null"

# This function calculates the cost of your connection.
# If you can hack a little tcl you can customize it;
# it is passed the number of hours and minutes you have
# been connected--it should return a float representing
# the cost.  This is just an example: 10c per minute.
#
proc conn_cost {hours minutes} {
    set tmp [expr {($hours * 60) + $minutes}] 
    set res [expr {$tmp * .10}]
    return $res
}

##############################################################
#      Your optional networking scripts or programs          #
##############################################################
#
# The format is:
#    addscript <label> <tcl-command>
#
addscript "Get Mail"   {exec getmail &}
addscript "Get WX"     {exec getwx &}

##############################################################
#              Any other TCL customization                   #
##############################################################
#

################################
# END of tkppprc
