default:
load sventy
log-normal:
log +bund +link +chat +lcp +auth +fsm +phys +ipcp
log-minimal:
log -all +bund +link +auth
sventy:
load log-normal
log +all
set login ConsoleLogin
new sventytest link1 link2 link3 link4
log +console
set bundle enable multilink
set bundle enable bw-manage
set bundle idle 11000000000000
set iface route 129.241.57.52/32
set ipcp yes vjcomp
link vanligmodem
set link yes acfcomp protocomp
set link disable chap
set link accept chap
set link disable pap
set link accept pap
link link1
set link yes acfcomp protocomp
set link disable chap
set link accept chap
set link disable pap
set link accept pap
link link2
set link yes acfcomp protocomp
set link disable chap
set link accept chap
set link disable pap
set link accept pap
link link3
set link yes acfcomp protocomp
set link disable chap
set link accept chap
set link disable pap
set link accept pap
link link4
set link yes acfcomp protocomp
set link disable chap
set link accept chap
set link disable pap
set link accept pap
set iface addrs 129.241.57.51 129.241.57.52
set modem script answer-ring
open
vanligmodem:
set link type modem
set link device /dev/cuaa0
set modem speed 115200
set link latency 100000
set link bandwidth 28800
set modem watch +cd
set modem var $InitString "z"
link1:
set link type modem
set link device /dev/cuaa0
set modem speed 115200
set link latency 400000
set link bandwidth 9600
set modem watch +cd
set modem var $InitString "z"
link2:
set link type modem
set link device /dev/cuaa1
set modem speed 115200
set link latency 400000
set link bandwidth 9600
set modem watch +cd
set modem var $InitString "z"
link3:
set link type modem
set link device /dev/cuaa2
set modem speed 115200
set link latency 400000
set link bandwidth 9600
set modem watch +cd
set modem var $InitString "z"
link4:
set link type modem
set link device /dev/cuaa3
set modem speed 115200
set link latency 400000
set link bandwidth 9600
set modem watch +cd
set modem var $InitString "z"
answer-ring: call InitModem log "waiting for ring..." call GetRing failure DialModem: print "ATDT$Telephone\r\n" match "NO CARRIER" DialAbort match "NO DIAL" DialAbort match "BUSY" DialAbort match "ERR" DialAbort match "CONNECT" DialConnect wait $Timeout log "dialing timed out" return DialAbort: log "dialing aborted on \"$matchedString\"" return DialConnect: success InitModem: set $cmd "Z" call ModemCmd return HangUpModem: print "\r\n" wait 2 print "+++" wait 2 return ModemCmd: print "AT$cmd\r\n" match ok "OK" CmdOk match ok "ERROR" CmdErr wait 2 cancel ok log "no response from modem" failure CmdErr: log "modem command \"$cmd\" failed" failure CmdOk: return GetRing: match ring "RING" GotRing wait 6000 cancel ring return GotRing: log "detected ring..." match connect "CONNECT" RingConnectOk wait 40 cancel connect log "failed to connect..." return RingConnectOk: success
default: load gustav log-normal: log +bund +link +chat +lcp +auth +fsm +phys +ipcp log-minimal: log -all +bund +link +auth gustav: load log-normal log +console set login ConsoleLogin new gustavtest GS18A GS18B GS18C GS18D set bundle enable multilink set bundle enable bw-manage set bundle idle 300 set iface addrs 129.241.57.52 129.241.57.51 set iface route default set ipcp yes vjcomp link vanligmodem set link yes acfcomp protocomp set link disable chap set link accept chap set link disable pap set link accept pap link GS18A set link yes acfcomp protocomp set link disable chap set link accept chap set link disable pap set link accept pap link GS18B set link yes acfcomp protocomp set link disable chap set link accept chap set link disable pap set link accept pap link GS18C set link yes acfcomp protocomp set link disable chap set link accept chap set link disable pap set link accept pap link GS18D set link yes acfcomp protocomp set link disable chap set link accept chap set link disable pap set link accept pap set modem script ntnu-dial open
vanligmodem: set link type modem set link device /dev/cuaa0 set link latency 100000 set link bandwith 28800 set modem speed 115200 set modem watch +cd set modem var $PhoenNummer "50444" GS18A: set link type modem set link device /dev/cuaa0 set link latency 400000 set link bandwith 9600 set modem speed 9600 set modem watch +cd set modem var $PhoenNummer "73550443" GS18B: set link type modem set link device /dev/cuaa1 set link latency 400000 set link bandwith 9600 set modem speed 9600 set modem watch +cd set modem var $PhoenNummer "73550444" GS18C: set link type modem set link device /dev/cuaa2 set link latency 400000 set link bandwith 9600 set modem speed 9600 set modem watch +cd set modem var $PhoenNummer "73550445" GS18D: set link type modem set link device /dev/cuaa3 set link latency 400000 set link bandwith 9600 set modem speed 9600 set modem watch +cd set modem var $PhoenNummer "73550446"
ntnu-dial:
if $Timeout == "" set $Timeout 50
set $Telephone $PhoenNummer
set $Timeout 600
log "initialiserer modem..."
set $moreInit ""
call InitModem
log "ringer opp paa nummer $Telephone..."
call DialModem
log "Saa langt alt vel"
success
direct-dial:
if $Timeout == "" set $Timeout 50
log "initializing modem..."
set $moreInit ""
call InitModem
log "dialing peer at $Telephone..."
call DialModem
failure
answer-ring:
set $moreInit "S0=0"
call InitModem
log "waiting for ring..."
call GetRing
failure
DialModem:
print "ATDT$Telephone\r\n"
match "NO CARRIER" DialAbort
match "NO DIAL" DialAbort
match "BUSY" DialAbort
match "ERR" DialAbort
match "CONNECT" DialConnect
wait $Timeout
log "dialing timed out"
return
DialAbort:
log "dialing aborted on \"$matchedString\""
return
DialConnect:
return
InitModem:
set $cmd "Z"
call ModemCmd
set $cmd $moreInit$InitString
call ModemCmd
return
HangUpModem:
print "\r\n"
wait 2
print "+++"
wait 2
return
ModemCmd:
print "AT$cmd\r\n"
match ok "OK" CmdOk
match ok "ERROR" CmdErr
wait 2
cancel ok
log "no response from modem"
failure
CmdErr:
log "modem command \"$cmd\" failed"
failure
CmdOk:
return
GetRing:
match ring "RING" GotRing
wait 6000
cancel ring
return
GotRing:
log "detected ring..."
print "ATA\r\n"
match connect "CONNECT" RingConnectOk
wait $Timeout
cancel connect
log "failed to connect..."
return
RingConnectOk:
success
ntnu-login:
log "logger inn paa terminalserver"
log "Venter paa Username:"
match ogin "name:" FikkLogin
wait 120
cancel ogin
log "Fikk ikke login:"
return
FikkLogin:
log "Fikk login: sender brukernavn"
print "gustavf\r\n"
log "Venter paa password:"
match passwd "word:" FikkPassword
wait $Timeout
cancel passwd
log "Fikk ikke password:"
return
FikkPassword:
log "Fikk password: sender passord"
print "sensurert\r\n"
log "Venter paa prompt"
match prompt ">" FikkPrompt
wait $Timeout
cancel prompt
log "Fikk ikke prompt"
return
FikkPrompt:
log "Fikk prompt, sender ppp"
print "ppp\r\r"
return