| java.lang.Object org.apache.commons.net.ntp.NtpUtils
NtpUtils | final public class NtpUtils (Code) | | Common NtpUtils Helper class.
author: Jason Mathews, MITRE Corp version: $Revision: 165675 $ $Date: 2005-05-02 15:09:55 -0500 (Mon, 02 May 2005) $ |
getHostAddress | public static String getHostAddress(int address)(Code) | | Returns 32-bit integer address to IPv4 address string "%d.%d.%d.%d" format.
Parameters: address - the 32-bit address the raw IP address in a string format. |
getModeName | public static String getModeName(int mode)(Code) | | Return human-readable name of message mode type (RFC 1305).
Parameters: mode - mode name |
getRefAddress | public static String getRefAddress(NtpV3Packet packet)(Code) | | Returns NTP packet reference identifier as IP address.
Parameters: packet - NTP packet the packet reference id (as IP address) in "%d.%d.%d.%d" format. |
getReferenceClock | public static String getReferenceClock(NtpV3Packet message)(Code) | | Get refId as reference clock string (e.g. GPS, WWV, LCL). If string is
invalid (non-ASCII character) then returns empty string "".
For details refer to the Comprehensive
List of Clock Drivers.
Parameters: message - reference clock string if primary NTP server |
|
|