java.lang.Object
edu.internet2.ndt.NDTConstants

public class NDTConstantsextends Object
Constants for the NDT (Network Diagnostic Tool) client, including protocol values, test type flags, firewall test statuses, data rate indicators, RFC option flags, and unit conversion factors.
  • Field Details

    • META_CLIENT_OS

      public static final String META_CLIENT_OS
      Client OS name key sent in TEST_MSG during META test.
      See Also:
    • META_BROWSER_OS

      public static final String META_BROWSER_OS
      Browser OS name key sent in TEST_MSG during META test.
      See Also:
    • META_CLIENT_KERNEL_VERSION

      public static final String META_CLIENT_KERNEL_VERSION
      Client kernel version key sent in TEST_MSG during META test.
      See Also:
    • META_CLIENT_VERSION

      public static final String META_CLIENT_VERSION
      Client software version key sent in TEST_MSG during META test.
      See Also:
    • META_CLIENT_APPLICATION

      public static final String META_CLIENT_APPLICATION
      Client application name key sent in TEST_MSG during META test.
      See Also:
    • AVGRTT

      public static final String AVGRTT
      Average RTT variable name as sent by the NDT server in TEST_MSG results.
      See Also:
    • CURRWINRCVD

      public static final String CURRWINRCVD
      Current receive window size variable name as sent by the NDT server.
      See Also:
    • MAXRWINRCVD

      public static final String MAXRWINRCVD
      Maximum receive window size variable name as sent by the NDT server.
      See Also:
    • LOSS

      public static final String LOSS
      Packet loss variable name as sent by the NDT server.
      See Also:
    • MINRTT

      public static final String MINRTT
      Minimum RTT variable name as sent by the NDT server.
      See Also:
    • MAXRTT

      public static final String MAXRTT
      Maximum RTT variable name as sent by the NDT server.
      See Also:
    • WAITSEC

      public static final String WAITSEC
      Wait seconds variable name as sent by the NDT server.
      See Also:
    • CURRTO

      public static final String CURRTO
      Current retransmission timeout variable name as sent by the NDT server.
      See Also:
    • SACKSRCVD

      public static final String SACKSRCVD
      SACKs received variable name as sent by the NDT server.
      See Also:
    • MISMATCH

      public static final String MISMATCH
      Mismatch counter variable name as sent by the NDT server.
      See Also:
    • BAD_CABLE

      public static final String BAD_CABLE
      Bad cable detection variable name as sent by the NDT server.
      See Also:
    • CONGESTION

      public static final String CONGESTION
      Congestion detection variable name as sent by the NDT server.
      See Also:
    • CWNDTIME

      public static final String CWNDTIME
      Congestion window time variable name as sent by the NDT server.
      See Also:
    • RWINTIME

      public static final String RWINTIME
      Receive window time variable name as sent by the NDT server.
      See Also:
    • OPTRCVRBUFF

      public static final String OPTRCVRBUFF
      Optimal receiver buffer size variable name as sent by the NDT server.
      See Also:
    • ACCESS_TECH

      public static final String ACCESS_TECH
      Access technology variable name as sent by the NDT server.
      See Also:
    • DUPACKSIN

      public static final String DUPACKSIN
      Duplicate ACKs incoming variable name as sent by the NDT server.
      See Also:
    • VERSION

      public static final String VERSION
      NDT protocol version string sent to server during login.
      See Also:
    • NDT_TITLE_STR

      public static final String NDT_TITLE_STR
      NDT client title bar prefix string.
      See Also:
    • TEST_MID

      public static final byte TEST_MID
      Test type bitmask: middlebox test.
      See Also:
    • TEST_C2S

      public static final byte TEST_C2S
      Test type bitmask: client-to-server bandwidth test.
      See Also:
    • TEST_S2C

      public static final byte TEST_S2C
      Test type bitmask: server-to-client bandwidth test.
      See Also:
    • TEST_SFW

      public static final byte TEST_SFW
      Test type bitmask: simple firewall test.
      See Also:
    • TEST_STATUS

      public static final byte TEST_STATUS
      Test type bitmask: status test.
      See Also:
    • TEST_META

      public static final byte TEST_META
      Test type bitmask: META data exchange test.
      See Also:
    • SFW_NOTTESTED

      public static final int SFW_NOTTESTED
      Simple Firewall test result code: not yet tested.
      See Also:
    • SFW_NOFIREWALL

      public static final int SFW_NOFIREWALL
      Simple Firewall test result code: no firewall detected.
      See Also:
    • SFW_UNKNOWN

      public static final int SFW_UNKNOWN
      Simple Firewall test result code: firewall presence unknown.
      See Also:
    • SFW_POSSIBLE

      public static final int SFW_POSSIBLE
      Simple Firewall test result code: firewall likely present.
      See Also:
    • VIEW_DIFF

      public static final double VIEW_DIFF
      Fractional difference threshold for packet queuing detection.
      See Also:
    • TARGET1

      public static final String TARGET1
      Mailto parameter key name for target URL.
      See Also:
    • TARGET2

      public static final String TARGET2
      Mailto parameter key name for host.
      See Also:
    • CONTROL_PORT_DEFAULT

      public static final int CONTROL_PORT_DEFAULT
      Default NDT control connection port (non-SSL).
      See Also:
    • CONTROL_PORT_SSL

      public static final int CONTROL_PORT_SSL
      Default NDT control connection port (SSL).
      See Also:
    • SRV_QUEUE_TEST_STARTS_NOW

      public static final int SRV_QUEUE_TEST_STARTS_NOW
      SRV_QUEUE message body value: test starts now.
      See Also:
    • SRV_QUEUE_SERVER_FAULT

      public static final int SRV_QUEUE_SERVER_FAULT
      SRV_QUEUE message body value: server fault.
      See Also:
    • SRV_QUEUE_SERVER_BUSY

      public static final int SRV_QUEUE_SERVER_BUSY
      SRV_QUEUE message body value: server busy.
      See Also:
    • SRV_QUEUE_HEARTBEAT

      public static final int SRV_QUEUE_HEARTBEAT
      SRV_QUEUE message body value: heartbeat keepalive.
      See Also:
    • SRV_QUEUE_SERVER_BUSY_60s

      public static final int SRV_QUEUE_SERVER_BUSY_60s
      SRV_QUEUE message body value: server busy, retry after 60s.
      See Also:
    • MIDDLEBOX_PREDEFINED_MSS

      public static final int MIDDLEBOX_PREDEFINED_MSS
      Middlebox test MSS size.
      See Also:
    • ETHERNET_MTU_SIZE

      public static final int ETHERNET_MTU_SIZE
      Standard Ethernet MTU size used for middlebox detection.
      See Also:
    • SFW_PREDEFINED_TEST_MESSAGE

      public static final String SFW_PREDEFINED_TEST_MESSAGE
      Predefined message text for the simple firewall test.
      See Also:
    • _rscBundleMessages

      private static ResourceBundle _rscBundleMessages
      Resource bundle for NDT localized messages.
    • TCPBW100_MSGS

      public static final String TCPBW100_MSGS
      Resource bundle base name for Tcpbw100 message translations.
      See Also:
    • PREDEFINED_BUFFER_SIZE

      public static final int PREDEFINED_BUFFER_SIZE
      Predefined buffer size for data transfers.
      See Also:
    • DATA_RATE_INSUFFICIENT_DATA

      public static final int DATA_RATE_INSUFFICIENT_DATA
      Data rate indicator: insufficient data to determine rate.
      See Also:
    • DATA_RATE_SYSTEM_FAULT

      public static final int DATA_RATE_SYSTEM_FAULT
      Data rate indicator: system fault during rate detection.
      See Also:
    • DATA_RATE_RTT

      public static final int DATA_RATE_RTT
      Data rate indicator: RTT measurement only.
      See Also:
    • DATA_RATE_DIAL_UP

      public static final int DATA_RATE_DIAL_UP
      Data rate indicator: dial-up connection.
      See Also:
    • DATA_RATE_T1

      public static final int DATA_RATE_T1
      Data rate indicator: T1 connection.
      See Also:
    • DATA_RATE_ETHERNET

      public static final int DATA_RATE_ETHERNET
      Data rate indicator: Ethernet connection.
      See Also:
    • DATA_RATE_T3

      public static final int DATA_RATE_T3
      Data rate indicator: T3 connection.
      See Also:
    • DATA_RATE_FAST_ETHERNET

      public static final int DATA_RATE_FAST_ETHERNET
      Data rate indicator: Fast Ethernet connection.
      See Also:
    • DATA_RATE_OC_12

      public static final int DATA_RATE_OC_12
      Data rate indicator: OC-12 connection.
      See Also:
    • DATA_RATE_GIGABIT_ETHERNET

      public static final int DATA_RATE_GIGABIT_ETHERNET
      Data rate indicator: Gigabit Ethernet connection.
      See Also:
    • DATA_RATE_OC_48

      public static final int DATA_RATE_OC_48
      Data rate indicator: OC-48 connection.
      See Also:
    • DATA_RATE_10G_ETHERNET

      public static final int DATA_RATE_10G_ETHERNET
      Data rate indicator: 10 Gigabit Ethernet connection.
      See Also:
    • T1_STR

      public static final String T1_STR
      Human-readable label for T1 data rate.
      See Also:
    • T3_STR

      public static final String T3_STR
      Human-readable label for T3 data rate.
      See Also:
    • ETHERNET_STR

      public static final String ETHERNET_STR
      Human-readable label for Ethernet data rate.
      See Also:
    • FAST_ETHERNET

      public static final String FAST_ETHERNET
      Human-readable label for Fast Ethernet data rate.
      See Also:
    • OC_12_STR

      public static final String OC_12_STR
      Human-readable label for OC-12 data rate.
      See Also:
    • GIGABIT_ETHERNET_STR

      public static final String GIGABIT_ETHERNET_STR
      Human-readable label for Gigabit Ethernet data rate.
      See Also:
    • OC_48_STR

      public static final String OC_48_STR
      Human-readable label for OC-48 data rate.
      See Also:
    • TENGIGABIT_ETHERNET_STR

      public static final String TENGIGABIT_ETHERNET_STR
      Human-readable label for 10 Gigabit Ethernet data rate.
      See Also:
    • RFC_1323_DISABLED

      public static final int RFC_1323_DISABLED
      RFC 1323 window scaling disabled.
      See Also:
    • RFC_1323_ENABLED

      public static final int RFC_1323_ENABLED
      RFC 1323 window scaling enabled.
      See Also:
    • RFC_1323_SELF_DISABLED

      public static final int RFC_1323_SELF_DISABLED
      RFC 1323 window scaling self-disabled by endpoint.
      See Also:
    • RFC_1323_PEER_DISABLED

      public static final int RFC_1323_PEER_DISABLED
      RFC 1323 window scaling peer-disabled by remote.
      See Also:
    • RFC_2018_ENABLED

      public static final int RFC_2018_ENABLED
      RFC 2018 selective acknowledgment enabled.
      See Also:
    • RFC_896_ENABLED

      public static final int RFC_896_ENABLED
      RFC 896 Nagle algorithm enabled.
      See Also:
    • RFC_3168_ENABLED

      public static final int RFC_3168_ENABLED
      RFC 3168 explicit congestion notification enabled.
      See Also:
    • RFC_3168_SELF_DISABLED

      public static final int RFC_3168_SELF_DISABLED
      RFC 3168 ECN self-disabled.
      See Also:
    • RFC_3168_PEER_DISABLED

      public static final int RFC_3168_PEER_DISABLED
      RFC 3168 ECN peer-disabled.
      See Also:
    • BUFFER_LIMITED

      public static final float BUFFER_LIMITED
      Receiver-limited threshold (fraction of time).
      See Also:
    • TCP_MAX_RECV_WIN_SIZE

      public static final int TCP_MAX_RECV_WIN_SIZE
      Maximum TCP receive window size in bytes (16-bit field).
      See Also:
    • KILO

      public static final int KILO
      Base-10 kilo multiplier (1000).
      See Also:
    • KILO_BITS

      public static final int KILO_BITS
      Base-2 kilo multiplier (1024).
      See Also:
    • EIGHT

      public static final double EIGHT
      Conversion factor from bits to bytes (8.0).
      See Also:
    • DUPLEX_OK_INDICATOR

      public static final int DUPLEX_OK_INDICATOR
      Duplex status indicator: OK at both ends.
      See Also:
    • DUPLEX_NOK_INDICATOR

      public static final int DUPLEX_NOK_INDICATOR
      Duplex status indicator: mismatch detected.
      See Also:
    • DUPLEX_SWITCH_FULL_HOST_HALF

      public static final int DUPLEX_SWITCH_FULL_HOST_HALF
      Duplex status indicator: switch full-duplex, host half-duplex.
      See Also:
    • DUPLEX_SWITCH_HALF_HOST_FULL

      public static final int DUPLEX_SWITCH_HALF_HOST_FULL
      Duplex status indicator: switch half-duplex, host full-duplex.
      See Also:
    • DUPLEX_SWITCH_FULL_HOST_HALF_POSS

      public static final int DUPLEX_SWITCH_FULL_HOST_HALF_POSS
      Duplex status indicator: possible switch full, host half.
      See Also:
    • DUPLEX_SWITCH_HALF_HOST_FULL_POSS

      public static final int DUPLEX_SWITCH_HALF_HOST_FULL_POSS
      Duplex status indicator: possible switch half, host full.
      See Also:
    • DUPLEX_SWITCH_HALF_HOST_FULL_WARN

      public static final int DUPLEX_SWITCH_HALF_HOST_FULL_WARN
      Duplex status indicator: warning, switch half, host full.
      See Also:
    • CABLE_STATUS_OK

      public static final int CABLE_STATUS_OK
      Cable status: OK (no fault detected).
      See Also:
    • CABLE_STATUS_BAD

      public static final int CABLE_STATUS_BAD
      Cable status: bad cable detected.
      See Also:
    • CONGESTION_NONE

      public static final int CONGESTION_NONE
      Congestion status: no congestion detected.
      See Also:
    • CONGESTION_FOUND

      public static final int CONGESTION_FOUND
      Congestion status: congestion found.
      See Also:
    • SOCKET_FREE_PORT_INDICATOR

      public static final int SOCKET_FREE_PORT_INDICATOR
      Socket free port indicator (bind to any available port).
      See Also:
    • LOOPBACK_ADDRS_STRING

      public static final String LOOPBACK_ADDRS_STRING
      IPv4 loopback address string.
      See Also:
    • PERCENTAGE

      public static final int PERCENTAGE
      Percentage multiplier (100).
      See Also:
    • PROTOCOL_MSG_READ_SUCCESS

      public static final int PROTOCOL_MSG_READ_SUCCESS
      Returned by Protocol.recv_msg(Message) on success.
      See Also:
  • Constructor Details

    • NDTConstants

      private NDTConstants()
      Prevent instantiation of constants class.
  • Method Details

    • initConstants

      public static void initConstants(Locale paramLocale)
      Load the NDT message resource bundle for the given locale.
      Parameters:
      paramLocale - locale to load
    • initConstants

      public static void initConstants(String paramStrLang, String paramStrCountry)
      Load the NDT message resource bundle for the given language and country.
      Parameters:
      paramStrLang - ISO 639 language code (e.g. "en", "fr")
      paramStrCountry - ISO 3166 country code (e.g. "US", "FR"), may be ignored
    • getMessageString

      public static String getMessageString(String paramStrName)
      Look up a translated string from the NDT message bundle.
      Parameters:
      paramStrName - key name (e.g. "start", "done")
      Returns:
      translated string, or the key itself if not found