1 package org.apache.commons.net.ntp; 2 17 18 import java.net.DatagramPacket ; 19 20 28 public interface NtpV3Packet 29 { 30 31 34 public static final int NTP_PORT = 123; 35 36 public static final int LI_NO_WARNING = 0; 37 public static final int LI_LAST_MINUTE_HAS_61_SECONDS = 1; 38 public static final int LI_LAST_MINUTE_HAS_59_SECONDS = 2; 39 public static final int LI_ALARM_CONDITION = 3; 40 41 42 public static final int MODE_RESERVED = 0; 43 public static final int MODE_SYMMETRIC_ACTIVE = 1; 44 public static final int MODE_SYMMETRIC_PASSIVE = 2; 45 public static final int MODE_CLIENT = 3; 46 public static final int MODE_SERVER = 4; 47 public static final int MODE_BROADCAST = 5; 48 public static final int MODE_CONTROL_MESSAGE = 6; 49 public static final int MODE_PRIVATE = 7; 50 51 public static final int NTP_MINPOLL = 4; public static final int NTP_MAXPOLL = 14; 54 public static final int NTP_MINCLOCK = 1; 55 public static final int NTP_MAXCLOCK = 10; 56 57 public static final int VERSION_3 = 3; 58 public static final int VERSION_4 = 4; 59 60 63 public static final String TYPE_NTP = "NTP"; public static final String TYPE_ICMP = "ICMP"; public static final String TYPE_TIME = "TIME"; public static final String TYPE_DAYTIME = "DAYTIME"; 68 71 public DatagramPacket getDatagramPacket(); 72 73 76 public void setDatagramPacket(DatagramPacket dp); 77 78 81 public int getLeapIndicator(); 82 83 87 public void setLeapIndicator(int li); 88 89 92 public int getMode(); 93 94 97 public String getModeName(); 98 99 102 public void setMode(int mode); 103 104 108 public int getPoll(); 109 110 114 public void setPoll(int poll); 115 116 119 public int getPrecision(); 120 121 124 public int getRootDelay(); 125 126 129 public double getRootDelayInMillisDouble(); 130 131 134 public int getRootDispersion(); 135 136 139 public long getRootDispersionInMillis(); 140 141 144 public double getRootDispersionInMillisDouble(); 145 146 149 public int getVersion(); 150 151 154 public void setVersion(int mode); 155 156 159 public int getStratum(); 160 161 164 public void setStratum(int stratum); 165 166 169 public String getReferenceIdString(); 170 171 174 public int getReferenceId(); 175 176 180 public void setReferenceId(int refId); 181 182 185 public TimeStamp getTransmitTimeStamp(); 186 187 190 public TimeStamp getReferenceTimeStamp(); 191 192 195 public TimeStamp getOriginateTimeStamp(); 196 197 200 public TimeStamp getReceiveTimeStamp(); 201 202 206 public void setTransmitTime(TimeStamp ts); 207 208 212 public void setReferenceTime(TimeStamp ts); 213 214 218 public void setOriginateTimeStamp(TimeStamp ts); 219 220 224 public void setReceiveTimeStamp(TimeStamp ts); 225 226 232 public String getType(); 233 234 } 235 | Popular Tags |