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.
  • 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

      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
    • 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(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:
    • setUserAgent

      public void setUserAgent(String paramStrUserAgent)
      Set UserAgent String.
      Parameters:
      paramStrUserAgent - UserAgent String to be set locally
      See Also:
    • 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:
      showStatus in class JApplet
      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:
    • 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:
    • 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:
    • 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 messages
      paramSocketObj - 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:
    • 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:
    • 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:
    • 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 string
      dSysvalParam - 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 string
      lSysvalParam - 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 name
      iSysvalParam - Value for this key name
    • getParameter

      public String getParameter(String paramStrName)
      Utility method to get parameter value.
      Overrides:
      getParameter in class JApplet
      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