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) classTcpbw100.TestWorkerClass 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_sTestResultsprotected URL_targetURL(package private) JTextArea_txtDiagnosis(package private) JTextArea_txtStatistics(package private) byte[]_yabuff2Write(package private) byte_yTests(package private) doubleaspd(package private) doubleavgrtt(package private) intbad_cable(package private) intcongestion(package private) doublecwin(package private) doublecwndtime(package private) doubleestimate(package private) inthalf_duplex(package private) InetAddresshostAddress(package private) doubleloss(package private) intmismatch(package private) intMSSRcvd(package private) intMSSSent(package private) doublemylink(package private) doubleorder(package private) doublerttsec(package private) doublerwin(package private) doublerwintime(package private) doublesendtime(package private) StringsHostName(package private) doublespd(package private) doubleswin(package private) doubletimesec(package private) doublewaitsec
-
Constructor Summary
Constructors Constructor Description Tcpbw100(boolean useSSL)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactionPerformed(ActionEvent paramEventObj)Action handler method called when an associated action is performedvoidcreateDiagnoseWindow()Create the "More details" window.voidcreateOptionsWindow()Create the "Options" window.voidcreateStatsWindow()Create the "Statistics" window.voiddottcp(StatusPanel sPanel)Method to run tests and interpret the results sent by the serverStringget_AccessTech()Stringget_avgrtt()Stringget_Bad_cable()Stringget_c2sspd()Stringget_clientIP()Stringget_congestion()Stringget_CurRTO()Stringget_CurRwinRcvd()Stringget_cwndtime()Stringget_diagnosis()Stringget_DupAcksIn()Stringget_DupAcksOut()Stringget_errmsg()Stringget_host()Stringget_instSpeed()Stringget_jitter()Stringget_loss()Stringget_MaxRTT()Stringget_MaxRwinRcvd()Stringget_mismatch()Stringget_natStatus()Stringget_optimalRcvrBuffer()Stringget_osArch()Stringget_osName()Stringget_osVer()Stringget_PcBuffSpdLimit()Stringget_Ping()Stringget_pluginVer()Stringget_rcvrLimiting()Stringget_s2cspd()Stringget_SACKsRcvd()Stringget_statistics()Stringget_status()Stringget_TimeStamp()Stringget_WaitSec()intgetC2sSFWTestResults()Get Client->Server fire-wall test results.StringgetNDTvar(String varName)Function that returns a variable corresponding to the parameter passed to it as a request.StringgetParameter(String paramStrName)Utility method to get parameter value.intgetS2cSFWTestResults()Get Server->Client fire-wall test results.StringgetStatus()I2P Translated status, not HTML escaped.StringgetUserAgent()Set UserAgent String containing browser details.voidinit()Initialize the base NDT window Applet init() methodbooleanisTestInProgress()I2PvoidkillIt()bigly -- must have been started with main() or runIt()static voidmain(String[] args)public static void main for invoking as an Applicationstatic Tcpbw100mainSupport(String[] args)biglyvoidmiddleboxResults(String sMidBoxTestResParam)This routine decodes the middlebox test results.voidrun_test()"Remote Control" function - invoke NDT' runtest() method from the APIvoidrunIt()biglyvoidruntest()Run the Thread that calls the "dottcp" method to run tests.voidsave_dbl_values(String sSysvarParam, double dSysvalParam)Method to save double values of various "keys" from the the test results string into corresponding double datatypes.voidsave_int_values(String sSysvarParam, int iSysvalParam)Method to save integer values of various "keys" from the the test results string into corresponding integer datatypes.voidsave_long_values(String sSysvarParam, long lSysvalParam)Method to save long values of various "keys" from the the test results string into corresponding long datatypes.voidsetC2sSFWTestResults(int iParamC2SRes)Set Client->Server fire-wall test results.voidsetS2cSFWTestResults(int iParamS2CRes)Set server->Client fire-wall test results.voidsetUserAgent(String paramStrUserAgent)Set UserAgent String.voidshowBufferedBytesInfo()Pop up a window to display some information about TCP packet queuing.voidshowStatus(String msg)Display current status in Applet window.booleantest_c2s(Protocol paramProtoObj)Client to server throughput test.booleantest_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.booleantest_mid(Protocol paramProtoObj)MiddleBox testing is a throughput test from the Server to the Client to check for duplex mismatch conditions.booleantest_s2c(Protocol paramProtoObj, Socket paramSocketObj)S2C throughput test to measure network bandwidth from server to client.booleantest_sfw(Protocol protocolObj)Fire-wall tests aiming to find out if one exists between Client and server.voidtestResults(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 Detail
-
_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
protected URL _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
-
-
Method Detail
-
main
public static void main(String[] args)
public static void main for invoking as an Application- Parameters:
args- String array of command line arguments- Throws:
IllegalArgumentException- on bad hostname
-
mainSupport
public static Tcpbw100 mainSupport(String[] args)
bigly- Throws:
IllegalArgumentException- on bad hostname
-
get_c2sspd
public String get_c2sspd()
-
get_s2cspd
public String get_s2cspd()
-
get_CurRwinRcvd
public String get_CurRwinRcvd()
-
get_MaxRwinRcvd
public String get_MaxRwinRcvd()
-
get_Ping
public String get_Ping()
-
get_MaxRTT
public String get_MaxRTT()
-
get_loss
public String get_loss()
-
get_avgrtt
public String get_avgrtt()
-
get_CurRTO
public String get_CurRTO()
-
get_SACKsRcvd
public String get_SACKsRcvd()
-
get_osVer
public String get_osVer()
-
get_pluginVer
public String get_pluginVer()
-
get_host
public String get_host()
-
get_osName
public String get_osName()
-
get_osArch
public String get_osArch()
-
get_mismatch
public String get_mismatch()
-
get_Bad_cable
public String get_Bad_cable()
-
get_congestion
public String get_congestion()
-
get_cwndtime
public String get_cwndtime()
-
get_AccessTech
public String get_AccessTech()
-
get_rcvrLimiting
public String get_rcvrLimiting()
-
get_optimalRcvrBuffer
public String get_optimalRcvrBuffer()
-
get_clientIP
public String get_clientIP()
-
get_natStatus
public String get_natStatus()
-
get_DupAcksOut
public String get_DupAcksOut()
-
get_DupAcksIn
public String get_DupAcksIn()
-
get_TimeStamp
public String get_TimeStamp()
-
get_PcBuffSpdLimit
public String get_PcBuffSpdLimit()
-
get_jitter
public String get_jitter()
-
get_WaitSec
public String get_WaitSec()
-
get_errmsg
public String get_errmsg()
-
get_diagnosis
public String get_diagnosis()
-
get_statistics
public String get_statistics()
-
get_status
public String get_status()
-
get_instSpeed
public String get_instSpeed()
-
getUserAgent
public String getUserAgent()
Set UserAgent String containing browser details.- Returns:
- String UserAgent details set locally
- See Also:
UserAgentTools
-
setUserAgent
public void setUserAgent(String paramStrUserAgent)
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
public void actionPerformed(ActionEvent paramEventObj)
Action handler method called when an associated action is performed- Parameters:
paramEventObj- Event object that prompted the call
-
showStatus
public void showStatus(String msg)
Display current status in Applet window.- Overrides:
showStatusin classJApplet- Parameters:
msg- String value of status
-
getStatus
public String getStatus()
I2P Translated status, not HTML escaped.
-
test_mid
public boolean test_mid(Protocol paramProtoObj) throws IOException
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
public boolean test_sfw(Protocol protocolObj) throws IOException
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
public boolean test_c2s(Protocol paramProtoObj) throws IOException
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
public boolean test_s2c(Protocol paramProtoObj, Socket paramSocketObj) throws IOException
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
public boolean test_meta(Protocol paramProtoObj, String application) throws IOException
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
public void dottcp(StatusPanel sPanel) throws IOException
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
public void testResults(String sTestResParam)
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
public void middleboxResults(String sMidBoxTestResParam)
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
public 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.- Parameters:
sSysvarParam- key name stringdSysvalParam- Value for this key name
-
save_long_values
public 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.- Parameters:
sSysvarParam- key name stringlSysvalParam- Value for this key name
-
save_int_values
public 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.- Parameters:
sSysvarParam- String key nameiSysvalParam- Value for this key name
-
getParameter
public String getParameter(String paramStrName)
Utility method to get parameter value.- Overrides:
getParameterin classJApplet- Parameters:
paramStrName- Key String whose value has to be found- Returns:
- String Value of key requested for
-
getNDTvar
public String getNDTvar(String varName)
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
-
-