Package edu.internet2.ndt
Class Tcpbw100
- All Implemented Interfaces:
ActionListener
public class Tcpbw100 extends JApplet implements ActionListener
Main Applet class that creates UI, defines tests and interprets results from
the tests.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
Tcpbw100.TestWorker
Class to start tests in a thread. -
Field Summary
Fields Modifier and Type Field Description (package private) boolean
_bCanCopy
(package private) boolean
_bFailed
(package private) boolean
_bIsApplication
(package private) boolean
_bRandomize
(package private) JButton
_buttonDetails
(package private) JButton
_buttonDetailsCopy
(package private) JButton
_buttonDetailsDismiss
(package private) JButton
_buttonMailTo
(package private) JButton
_buttonOptions
(package private) JButton
_buttonStartTest
(package private) JButton
_buttonStatistics
(package private) JButton
_buttonStatsCopy
(package private) JButton
_buttonStatsDismiss
(package private) int
_c2sspdUpdateTime
(package private) JCheckBox
_chkboxDefaultTest
(package private) JCheckBox
_chkboxPreferIPv6
(package private) JComboBox
_cmboboxDelay
(package private) double
_dC2sspd
(package private) double
_dS2cspd
(package private) double
_dSbytes
(package private) double
_dSc2sspd
(package private) double
_dSs2cspd
(package private) double
_dTime
(package private) NewFrame
_frameDetailedStats
(package private) NewFrame
_frameOptions
(package private) NewFrame
_frameWeb100Vars
(package private) int
_iAckPktsIn
(package private) int
_iAckPktsOut
(package private) int
_iC2sAck
(package private) int
_iC2sData
(package private) int
_iC2sSFWResult
(package private) int
_iCongestionSignals
(package private) int
_iCountRTT
(package private) int
_iCurrentCwnd
(package private) int
_iCurrentMSS
(package private) int
_iCurrentRTO
(package private) long
_iDataBytesOut
(package private) int
_iDataPktsOut
(package private) int
_iDupAcksIn
(package private) int
_iECNEnabled
(package private) int
_iFastRetran
(package private) int
_iLength
(package private) int
_iMaxCwnd
(package private) int
_iMaxRwinRcvd
(package private) int
_iMaxRwinSent
(package private) int
_iMaxSsthresh
(package private) int
_iNagleEnabled
(package private) int
_iPkts
(package private) int
_iPktsOut
(package private) int
_iPktsRetrans
(package private) int
_iRcvbuf
(package private) int
_iRcvWinScale
(package private) int
_iS2cAck
(package private) int
_iS2cData
(package private) int
_iS2cSFWResult
(package private) int
_iSACKEnabled
(package private) int
_iSACKsRcvd
(package private) int
_iSmoothedRTT
(package private) int
_iSndbuf
(package private) int
_iSndLimTimeCwnd
(package private) int
_iSndLimTimeRwin
(package private) int
_iSndLimTimeSender
(package private) int
_iSndLimTransCwnd
(package private) int
_iSndLimTransRwin
(package private) int
_iSndLimTransSender
(package private) int
_iSsndqueue
(package private) int
_iSumRTT
(package private) int
_iTimeouts
(package private) int
_iTimestampsEnabled
(package private) int
_iWinScaleRcvd
(package private) int
_iWinScaleSent
(package private) ResultsTextPane
_resultsTxtPane
(package private) int
_s2cspdUpdateTime
(package private) String[]
_saDelays
(package private) String
_sEmailText
(package private) String
_sErrMsg
(package private) String
_sMidBoxTestResult
(package private) JSpinner
_spinnerTestCount
(package private) String
_sServerType
(package private) String
_sTestResults
protected URL
_targetURL
(package private) JTextArea
_txtDiagnosis
(package private) JTextArea
_txtStatistics
(package private) byte[]
_yabuff2Write
(package private) byte
_yTests
(package private) double
aspd
(package private) double
avgrtt
(package private) int
bad_cable
(package private) int
congestion
(package private) double
cwin
(package private) double
cwndtime
(package private) double
estimate
(package private) int
half_duplex
(package private) InetAddress
hostAddress
(package private) double
loss
(package private) int
mismatch
(package private) int
MSSRcvd
(package private) int
MSSSent
(package private) double
mylink
(package private) double
order
(package private) double
rttsec
(package private) double
rwin
(package private) double
rwintime
(package private) double
sendtime
(package private) String
sHostName
(package private) double
spd
(package private) double
swin
(package private) double
timesec
(package private) double
waitsec
-
Constructor Summary
Constructors Constructor Description Tcpbw100(boolean useSSL)
-
Method Summary
Modifier and Type Method Description void
actionPerformed(ActionEvent paramEventObj)
Action handler method called when an associated action is performedvoid
createDiagnoseWindow()
Create the "More details" window.void
createOptionsWindow()
Create the "Options" window.void
createStatsWindow()
Create the "Statistics" window.void
dottcp(StatusPanel sPanel)
Method to run tests and interpret the results sent by the serverString
get_AccessTech()
String
get_avgrtt()
String
get_Bad_cable()
String
get_c2sspd()
String
get_clientIP()
String
get_congestion()
String
get_CurRTO()
String
get_CurRwinRcvd()
String
get_cwndtime()
String
get_diagnosis()
String
get_DupAcksIn()
String
get_DupAcksOut()
String
get_errmsg()
String
get_host()
String
get_instSpeed()
String
get_jitter()
String
get_loss()
String
get_MaxRTT()
String
get_MaxRwinRcvd()
String
get_mismatch()
String
get_natStatus()
String
get_optimalRcvrBuffer()
String
get_osArch()
String
get_osName()
String
get_osVer()
String
get_PcBuffSpdLimit()
String
get_Ping()
String
get_pluginVer()
String
get_rcvrLimiting()
String
get_s2cspd()
String
get_SACKsRcvd()
String
get_statistics()
String
get_status()
String
get_TimeStamp()
String
get_WaitSec()
int
getC2sSFWTestResults()
Get Client->Server fire-wall test results.String
getNDTvar(String varName)
Function that returns a variable corresponding to the parameter passed to it as a request.String
getParameter(String paramStrName)
Utility method to get parameter value.int
getS2cSFWTestResults()
Get Server->Client fire-wall test results.String
getStatus()
I2P Translated status, not HTML escaped.String
getUserAgent()
Set UserAgent String containing browser details.void
init()
Initialize the base NDT window Applet init() methodboolean
isTestInProgress()
I2Pvoid
killIt()
bigly -- must have been started with main() or runIt()static void
main(String[] args)
public static void main for invoking as an Applicationstatic Tcpbw100
mainSupport(String[] args)
biglyvoid
middleboxResults(String sMidBoxTestResParam)
This routine decodes the middlebox test results.void
run_test()
"Remote Control" function - invoke NDT' runtest() method from the APIvoid
runIt()
biglyvoid
runtest()
Run the Thread that calls the "dottcp" method to run tests.void
save_dbl_values(String sSysvarParam, double dSysvalParam)
Method to save double values of various "keys" from the the test results string into corresponding double datatypes.void
save_int_values(String sSysvarParam, int iSysvalParam)
Method to save integer values of various "keys" from the the test results string into corresponding integer datatypes.void
save_long_values(String sSysvarParam, long lSysvalParam)
Method to save long values of various "keys" from the the test results string into corresponding long datatypes.void
setC2sSFWTestResults(int iParamC2SRes)
Set Client->Server fire-wall test results.void
setS2cSFWTestResults(int iParamS2CRes)
Set server->Client fire-wall test results.void
setUserAgent(String paramStrUserAgent)
Set UserAgent String.void
showBufferedBytesInfo()
Pop up a window to display some information about TCP packet queuing.void
showStatus(String msg)
Display current status in Applet window.boolean
test_c2s(Protocol paramProtoObj)
Client to server throughput test.boolean
test_meta(Protocol paramProtoObj, String application)
The META test allows the Client to send an additional information to the Server that basically gets included along with the overall set of test results.boolean
test_mid(Protocol paramProtoObj)
MiddleBox testing is a throughput test from the Server to the Client to check for duplex mismatch conditions.boolean
test_s2c(Protocol paramProtoObj, Socket paramSocketObj)
S2C throughput test to measure network bandwidth from server to client.boolean
test_sfw(Protocol protocolObj)
Fire-wall tests aiming to find out if one exists between Client and server.void
testResults(String sTestResParam)
Method that interprets test results.Methods inherited from class com.vuze.plugins.mlab.tools.ndt.swingemu.JApplet
getAppletContext, getCodeBase, start
Methods inherited from class com.vuze.plugins.mlab.tools.ndt.swingemu.JFrame
destroy, dispose, getContentPane, toBack
Methods inherited from class com.vuze.plugins.mlab.tools.ndt.swingemu.Component
add, add, add, addMouseListener, addWindowListener, getToolkit, pack, repaint, setBorder, setCursor, setEditable, setEnabled, setForeground, setLayout, setLayout, setPreferredSize, setResizable, setSize, setTitle, setVisible
-
Field Details
-
_txtDiagnosis
JTextArea _txtDiagnosis -
_txtStatistics
JTextArea _txtStatistics -
_resultsTxtPane
ResultsTextPane _resultsTxtPane -
_sErrMsg
String _sErrMsg -
_buttonStartTest
JButton _buttonStartTest -
_buttonDetailsDismiss
JButton _buttonDetailsDismiss -
_buttonStatsDismiss
JButton _buttonStatsDismiss -
_buttonDetailsCopy
JButton _buttonDetailsCopy -
_buttonStatsCopy
JButton _buttonStatsCopy -
_buttonDetails
JButton _buttonDetails -
_buttonStatistics
JButton _buttonStatistics -
_buttonMailTo
JButton _buttonMailTo -
_buttonOptions
JButton _buttonOptions -
_chkboxDefaultTest
JCheckBox _chkboxDefaultTest -
_chkboxPreferIPv6
JCheckBox _chkboxPreferIPv6 -
_spinnerTestCount
JSpinner _spinnerTestCount -
_saDelays
String[] _saDelays -
_cmboboxDelay
JComboBox _cmboboxDelay -
_bRandomize
boolean _bRandomize -
_bFailed
boolean _bFailed -
_bCanCopy
boolean _bCanCopy -
_frameWeb100Vars
NewFrame _frameWeb100Vars -
_frameDetailedStats
NewFrame _frameDetailedStats -
_frameOptions
NewFrame _frameOptions -
_dTime
double _dTime -
_s2cspdUpdateTime
int _s2cspdUpdateTime -
_c2sspdUpdateTime
int _c2sspdUpdateTime -
_iECNEnabled
int _iECNEnabled -
_iNagleEnabled
int _iNagleEnabled -
MSSSent
int MSSSent -
MSSRcvd
int MSSRcvd -
_iSACKEnabled
int _iSACKEnabled -
_iTimestampsEnabled
int _iTimestampsEnabled -
_iWinScaleRcvd
int _iWinScaleRcvd -
_iWinScaleSent
int _iWinScaleSent -
_iFastRetran
int _iFastRetran -
_iAckPktsOut
int _iAckPktsOut -
_iSmoothedRTT
int _iSmoothedRTT -
_iCurrentCwnd
int _iCurrentCwnd -
_iMaxCwnd
int _iMaxCwnd -
_iSndLimTimeRwin
int _iSndLimTimeRwin -
_iSndLimTimeCwnd
int _iSndLimTimeCwnd -
_iSndLimTimeSender
int _iSndLimTimeSender -
_iSndLimTransRwin
int _iSndLimTransRwin -
_iSndLimTransCwnd
int _iSndLimTransCwnd -
_iSndLimTransSender
int _iSndLimTransSender -
_iMaxSsthresh
int _iMaxSsthresh -
_iSumRTT
int _iSumRTT -
_iCountRTT
int _iCountRTT -
_iCurrentMSS
int _iCurrentMSS -
_iTimeouts
int _iTimeouts -
_iPktsRetrans
int _iPktsRetrans -
_iSACKsRcvd
int _iSACKsRcvd -
_iDupAcksIn
int _iDupAcksIn -
_iMaxRwinRcvd
int _iMaxRwinRcvd -
_iMaxRwinSent
int _iMaxRwinSent -
_iDataPktsOut
int _iDataPktsOut -
_iRcvbuf
int _iRcvbuf -
_iSndbuf
int _iSndbuf -
_iAckPktsIn
int _iAckPktsIn -
_iDataBytesOut
long _iDataBytesOut -
_iPktsOut
int _iPktsOut -
_iCongestionSignals
int _iCongestionSignals -
_iRcvWinScale
int _iRcvWinScale -
_iPkts
int _iPkts -
_iLength
int _iLength -
_iCurrentRTO
int _iCurrentRTO -
_iC2sData
int _iC2sData -
_iC2sAck
int _iC2sAck -
_iS2cData
int _iS2cData -
_iS2cAck
int _iS2cAck -
_sServerType
String _sServerType -
_targetURL
-
_sEmailText
String _sEmailText -
_dS2cspd
double _dS2cspd -
_dC2sspd
double _dC2sspd -
_dSc2sspd
double _dSc2sspd -
_dSs2cspd
double _dSs2cspd -
_iSsndqueue
int _iSsndqueue -
_dSbytes
double _dSbytes -
_yabuff2Write
byte[] _yabuff2Write -
half_duplex
int half_duplex -
congestion
int congestion -
bad_cable
int bad_cable -
mismatch
int mismatch -
mylink
double mylink -
loss
double loss -
estimate
double estimate -
avgrtt
double avgrtt -
spd
double spd -
waitsec
double waitsec -
timesec
double timesec -
rttsec
double rttsec -
order
double order -
rwintime
double rwintime -
sendtime
double sendtime -
cwndtime
double cwndtime -
rwin
double rwin -
swin
double swin -
cwin
double cwin -
aspd
double aspd -
_bIsApplication
boolean _bIsApplication -
sHostName
String sHostName -
hostAddress
InetAddress hostAddress -
_sTestResults
String _sTestResults -
_sMidBoxTestResult
String _sMidBoxTestResult -
_yTests
byte _yTests -
_iC2sSFWResult
int _iC2sSFWResult -
_iS2cSFWResult
int _iS2cSFWResult
-
-
Constructor Details
-
Tcpbw100
public Tcpbw100(boolean useSSL)
-
-
Method Details
-
main
public static void main for invoking as an Application- Parameters:
args
- String array of command line arguments- Throws:
IllegalArgumentException
- on bad hostname
-
mainSupport
bigly- Throws:
IllegalArgumentException
- on bad hostname
-
get_c2sspd
-
get_s2cspd
-
get_CurRwinRcvd
-
get_MaxRwinRcvd
-
get_Ping
-
get_MaxRTT
-
get_loss
-
get_avgrtt
-
get_CurRTO
-
get_SACKsRcvd
-
get_osVer
-
get_pluginVer
-
get_host
-
get_osName
-
get_osArch
-
get_mismatch
-
get_Bad_cable
-
get_congestion
-
get_cwndtime
-
get_AccessTech
-
get_rcvrLimiting
-
get_optimalRcvrBuffer
-
get_clientIP
-
get_natStatus
-
get_DupAcksOut
-
get_DupAcksIn
-
get_TimeStamp
-
get_PcBuffSpdLimit
-
get_jitter
-
get_WaitSec
-
get_errmsg
-
get_diagnosis
-
get_statistics
-
get_status
-
get_instSpeed
-
getUserAgent
Set UserAgent String containing browser details.- Returns:
- String UserAgent details set locally
- See Also:
UserAgentTools
-
setUserAgent
Set UserAgent String.- Parameters:
paramStrUserAgent
- UserAgent String to be set locally- See Also:
UserAgentTools
-
getC2sSFWTestResults
public int getC2sSFWTestResults()Get Client->Server fire-wall test results.- Returns:
- integer indicating C->S test results
-
setC2sSFWTestResults
public void setC2sSFWTestResults(int iParamC2SRes)Set Client->Server fire-wall test results.- Parameters:
iParamC2SRes
- integer indicating C->S test results
-
getS2cSFWTestResults
public int getS2cSFWTestResults()Get Server->Client fire-wall test results.- Returns:
- integer indicating C->S test results
-
setS2cSFWTestResults
public void setS2cSFWTestResults(int iParamS2CRes)Set server->Client fire-wall test results.- Parameters:
iParamS2CRes
- integer indicating C->S test results
-
isTestInProgress
public boolean isTestInProgress()I2P -
run_test
public void run_test()"Remote Control" function - invoke NDT' runtest() method from the API -
init
public void init()Initialize the base NDT window Applet init() method -
createDiagnoseWindow
public void createDiagnoseWindow()Create the "More details" window. -
createStatsWindow
public void createStatsWindow()Create the "Statistics" window. -
createOptionsWindow
public void createOptionsWindow()Create the "Options" window. The options displayed to the user are:- Would you like to Perform default tests?
- Would you prefer IPV6?
- Select number of times the test-suite is to be run
-
runtest
public void runtest()Run the Thread that calls the "dottcp" method to run tests. This method is called by the Applet's init method if user selected an "autorun" option, is run individually if user presses the "start button", or, is internally invoked by the API call. -
actionPerformed
Action handler method called when an associated action is performed- Parameters:
paramEventObj
- Event object that prompted the call
-
showStatus
Display current status in Applet window.- Overrides:
showStatus
in classJApplet
- Parameters:
msg
- String value of status
-
getStatus
I2P Translated status, not HTML escaped. -
test_mid
MiddleBox testing is a throughput test from the Server to the Client to check for duplex mismatch conditions. It determines if routers or switches in the path may be making changes to some TCP parameters.- Parameters:
paramProtoObj
- Protocol Object used to exchange messages- Returns:
- boolean value indicating test failure status true if test was not completed false if test was completed
- Throws:
IOException
- when sending/receiving messages from server fails- See Also:
Protocol.recv_msg(Message msgParam)
,These methods indicate more information about IOException
-
test_sfw
Fire-wall tests aiming to find out if one exists between Client and server. Tests are performed in both directions.- Parameters:
protocolObj
- Protocol Object used for message exchange- Returns:
- boolean, true if test was not completed, false if test was completed.
- Throws:
IOException
- when sending/receiving messages from server fails. See the @see methods for more information on causes for Exception.- See Also:
Protocol.recv_msg(Message msgParam)
,Protocol.send_json_msg(byte bParamType, byte[] baParamTab)
-
test_c2s
Client to server throughput test. This test performs 10 seconds memory-to-memory data transfer to test achievable network bandwidth.- Parameters:
paramProtoObj
- Protocol Object used to exchange messages- Returns:
- boolean, true if test was not completed, false if test was completed.
- Throws:
IOException
- when sending/receiving messages from server fails- See Also:
Protocol.recv_msg(Message msgParam)
,Protocol.send_json_msg(byte bParamType, byte[] baParamTab)
-
test_s2c
S2C throughput test to measure network bandwidth from server to client.- Parameters:
paramProtoObj
- Protocol Object used to exchange messagesparamSocketObj
- Socket Object to write/read NDTProtocol control messages- Returns:
- boolean, true if test was not completed, false if test was completed.
- Throws:
IOException
- when sending/receiving messages from server fails- See Also:
Protocol.recv_msg(Message msgParam)
,Protocol.send_json_msg(byte bParamType, byte[] baParamTab)
-
test_meta
The META test allows the Client to send an additional information to the Server that basically gets included along with the overall set of test results.- Parameters:
paramProtoObj
- Protocol Object used to exchange protocol messages- Returns:
- boolean, true if test was completed, false if test is incomplete.
- Throws:
IOException
- when sending/receiving messages from server fails- See Also:
Protocol.recv_msg(Message msgParam)
,These methods indicate more information about IOException
-
dottcp
Method to run tests and interpret the results sent by the server- Parameters:
sPanel
- StatusPanel object to describe status of tests- Throws:
IOException
- when sending/receiving messages from server fails- See Also:
Protocol.recv_msg(Message msgParam)
,Protocol.send_json_msg(byte bParamType, byte[] baParamTab)
-
testResults
Method that interprets test results. This routine extracts the key-value pairs of results of various categories and assigns these to the correct variables. These values are then interpreted to make decisions about various measurement items and written to the main results, statistics, web100 or mail-to panels.- Parameters:
sTestResParam
- String containing all results
-
middleboxResults
This routine decodes the middlebox test results. The data is returned from the server is a specific order. This routine pulls the string apart and puts the values into the proper variable. It then compares the values to known values and writes out the specific results. server data is ordered as: Server IP; Client IP; CurrentMSS; WinScaleSent; WinScaleRcvd; SumRTT; CountRTT; MaxRwinRcvd; Client then adds Server IP; Client IP.- Parameters:
sMidBoxTestResParam
- String Middlebox results
-
showBufferedBytesInfo
public void showBufferedBytesInfo()Pop up a window to display some information about TCP packet queuing. -
save_dbl_values
Method to save double values of various "keys" from the the test results string into corresponding double datatypes.- Parameters:
sSysvarParam
- key name stringdSysvalParam
- Value for this key name
-
save_long_values
Method to save long values of various "keys" from the the test results string into corresponding long datatypes.- Parameters:
sSysvarParam
- key name stringlSysvalParam
- Value for this key name
-
save_int_values
Method to save integer values of various "keys" from the the test results string into corresponding integer datatypes.- Parameters:
sSysvarParam
- String key nameiSysvalParam
- Value for this key name
-
getParameter
Utility method to get parameter value.- Overrides:
getParameter
in classJApplet
- Parameters:
paramStrName
- Key String whose value has to be found- Returns:
- String Value of key requested for
-
getNDTvar
Function that returns a variable corresponding to the parameter passed to it as a request.- Parameters:
varName
- {String} The parameter which the caller is seeking.- Returns:
- {String} The value of the desired parameter.
-
killIt
public void killIt()bigly -- must have been started with main() or runIt() -
runIt
public void runIt()bigly
-