#
# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
# All rights reserved.
# This component and the accompanying materials are made available
# under the terms of "Eclipse Public License v1.0"
# which accompanies this distribution, and is available
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
#
# Initial Contributors:
# Nokia Corporation - initial contribution.
#
# Contributors:
#
# Description:
#   USE-CASE-17: Setup multiple PPP connections
#   NOT UP-TO-DATE
#   Testing multiple PPP connections
#
runcmd svcid=6 svchost="penuu"	methodid=10

#######################################################################################
#
# Create an two MTs on the PDSN and the MN
#
#######################################################################################
runcmd svcid=5 svchost="penmn"		methodid=3 CHANNEL_TYPE=1 CHANNEL_ADDR="localhost" CHANNEL_PORT=4000 AIR_OUTADDR="192.169.10.11" AIR_OUTPORT=5000 AIR_INPORT=5000 DATALINKCONFIG=2 FILTERCONFIG=1
runcmd svcid=5 svchost="penpdsn"	methodid=3 CHANNEL_TYPE=1 CHANNEL_ADDR="localhost" CHANNEL_PORT=4000 AIR_OUTADDR="10.22.1.6" AIR_OUTPORT=5000 AIR_INPORT=5000 DATALINKCONFIG=2 FILTERCONFIG=1
runcmd svcid=5 svchost="penmn"		methodid=3 CHANNEL_TYPE=1 CHANNEL_ADDR="localhost" CHANNEL_PORT=4001 AIR_OUTADDR="192.169.10.11" AIR_OUTPORT=5001 AIR_INPORT=5001 DATALINKCONFIG=2 FILTERCONFIG=1
runcmd svcid=5 svchost="penpdsn"	methodid=3 CHANNEL_TYPE=1 CHANNEL_ADDR="localhost" CHANNEL_PORT=4001 AIR_OUTADDR="10.22.1.6" AIR_OUTPORT=5001 AIR_INPORT=5001 DATALINKCONFIG=2 FILTERCONFIG=1

#######################################################################################
#
# Create a PPP session on the MN and PDSN
#
#######################################################################################
runcmd svcid=7 svchost="penmn"		methodid=3 MADDR="localhost" MPORT=4000 CONFIG="nodeflate noaccomp defaultroute noauth debug nodetach"
runcmd svcid=7 svchost="penpdsn"	methodid=3 MADDR="localhost" MPORT=4000 CONFIG="plugin dynip.so nodeflate noaccomp noauth 192.168.200.20:192.168.200.0 debug nodetach"
runcmd svcid=7 svchost="penmn"		methodid=3 MADDR="localhost" MPORT=4001 CONFIG="nodeflate noaccomp defaultroute noauth debug nodetach"
runcmd svcid=7 svchost="penpdsn"	methodid=3 MADDR="localhost" MPORT=4001 CONFIG="plugin dynip.so nodeflate noaccomp noauth 192.168.200.20:192.168.200.0 debug nodetach"
runcmd svcid=9 svchost="localhost"	methodid=1 PERIOD=1000
signal

#######################################################################################
#
# The PPP session should now be setup. 
#
#######################################################################################

#######################################################################################
#
# Cleanup the PPP session (MN and PDSN) (hardcode session ID as zero) retrieving all the logs
#
#######################################################################################
waitforsignal
runcmd svcid=7 svchost="penpdsn"	methodid=4 SID=0
runcmd svcid=9 svchost="localhost"	methodid=1 PERIOD=1000
runcmd svcid=7 svchost="penpdsn"	methodid=6 SID=0
runcmd svcid=7 svchost="penpdsn"	methodid=4 SID=1
runcmd svcid=9 svchost="localhost"	methodid=1 PERIOD=1000
runcmd svcid=7 svchost="penpdsn"	methodid=6 SID=1
signal

waitforsignal
runcmd svcid=7 svchost="penmn"		methodid=4 SID=1
runcmd svcid=9 svchost="localhost"	methodid=1 PERIOD=1000
runcmd svcid=7 svchost="penmn"		methodid=6 SID=1
runcmd svcid=7 svchost="penmn"		methodid=4 SID=0
runcmd svcid=9 svchost="localhost"	methodid=1 PERIOD=1000
runcmd svcid=7 svchost="penmn"		methodid=6 SID=0
signal

#######################################################################################
#
# Cleanup mobster -- retrieving the logs (MN and PDSN)
#
#######################################################################################
runcmd svcid=5  svchost="penpdsn"	methodid=6 DEVICEID=0
runcmd svcid=9	svchost="localhost"	methodid=1 PERIOD=1000
runcmd svcid=5  svchost="penpdsn"	methodid=7 DEVICEID=0
runcmd svcid=5  svchost="penmn"		methodid=6 DEVICEID=0
runcmd svcid=9	svchost="localhost"	methodid=1 PERIOD=1000
runcmd svcid=5  svchost="penmn"		methodid=7 DEVICEID=0

runcmd svcid=5  svchost="penpdsn"	methodid=6 DEVICEID=1
runcmd svcid=9	svchost="localhost"	methodid=1 PERIOD=1000
runcmd svcid=5  svchost="penpdsn"	methodid=7 DEVICEID=1
runcmd svcid=5  svchost="penmn"		methodid=6 DEVICEID=1
runcmd svcid=9	svchost="localhost"	methodid=1 PERIOD=1000
runcmd svcid=5  svchost="penmn"		methodid=7 DEVICEID=1


#######################################################################################
#
# We should be back to our original state now -- quit
#
#######################################################################################
rendezvous