亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ntpmessage.java

?? ntp服務(wù)器測(cè)試代碼,采用Java實(shí)現(xiàn)!內(nèi)含兩個(gè)實(shí)例代碼
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/** *//**
 * This class represents a NTP message, as specified in RFC 2030.  The message
 * format is compatible with all versions of NTP and SNTP.  ToDo: Is this true?
 *
 * This class does not support the optional authentication protocol, and
 * ignores the key ID and message digest fields.
 * 
 * For convenience, this class exposes message values as native Java types, not
 * the NTP-specified data formats.  For example, timestamps are
 * stored as doubles (as opposed to the NTP unsigned 64-bit fixed point
 * format).
 * 
 * However, the contructor NtpMessage(byte[]) and the method toByteArray()
 * allow the import and export of the raw NTP message format.
 * 
 * 
 * Usage example
 * 
 * // Send message
 * DatagramSocket socket = new DatagramSocket();
 * InetAddress address = InetAddress.getByName("ntp.cais.rnp.br");
 * byte[] buf = new NtpMessage().toByteArray();
 * DatagramPacket packet = new DatagramPacket(buf, buf.length, address, 123);
 * socket.send(packet);
 * 
 * // Get response
 * socket.receive(packet);
 * System.out.println(msg.toString());
 * 
 *  
 * This code is copyright (c) Adam Buckley 2004
 *
 * This program is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU General Public License as published by the Free 
 * Software Foundation; either version 2 of the License, or (at your option) 
 * any later version.  A HTML version of the GNU General Public License can be
 * seen at http://www.gnu.org/licenses/gpl.html
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT 
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 
 * more details.
 * 
 * 
 * Comments for member variables are taken from RFC2030 by David Mills,
 * University of Delaware.
 * 
 * Number format conversion code in NtpMessage(byte[] array) and toByteArray()
 * inspired by http://www.pps.jussieu.fr/~jch/enseignement/reseaux/
 * NTPMessage.java which is copyright (c) 2003 by Juliusz Chroboczek
 * 
 * @author Adam Buckley
 */


import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

public class NtpMessage {
    /** *//**
     * This is a two-bit code warning of an impending leap second to be
     * inserted/deleted in the last minute of the current day. It's values may
     * be as follows:
     * 
     * Value Meaning ----- ------- 0 no warning 1 last minute has 61 seconds 2
     * last minute has 59 seconds) 3 alarm condition (clock not synchronized)
     */
    public byte leapIndicator = 0;

    /** *//**
     * This value indicates the NTP/SNTP version number. The version number is 3
     * for Version 3 (IPv4 only) and 4 for Version 4 (IPv4, IPv6 and OSI). If
     * necessary to distinguish between IPv4, IPv6 and OSI, the encapsulating
     * context must be inspected.
     */
    public byte version = 3;

    /** *//**
     * This value indicates the mode, with values defined as follows:
     * 
     * Mode Meaning ---- ------- 0 reserved 1 symmetric active 2 symmetric
     * passive 3 client 4 server 5 broadcast 6 reserved for NTP control message
     * 7 reserved for private use
     * 
     * In unicast and anycast modes, the client sets this field to 3 (client) in
     * the request and the server sets it to 4 (server) in the reply. In
     * multicast mode, the server sets this field to 5 (broadcast).
     */
    public byte mode = 0;

    /** *//**
     * This value indicates the stratum level of the local clock, with values
     * defined as follows:
     * 
     * Stratum Meaning ---------------------------------------------- 0
     * unspecified or unavailable 1 primary reference (e.g., radio clock) 2-15
     * secondary reference (via NTP or SNTP) 16-255 reserved
     */
    public short stratum = 0;

    /** *//**
     * This value indicates the maximum interval between successive messages, in
     * seconds to the nearest power of two. The values that can appear in this
     * field presently range from 4 (16 s) to 14 (16284 s); however, most
     * applications use only the sub-range 6 (64 s) to 10 (1024 s).
     */
    public byte pollInterval = 0;

    /** *//**
     * This value indicates the precision of the local clock, in seconds to the
     * nearest power of two. The values that normally appear in this field
     * range from -6 for mains-frequency clocks to -20 for microsecond clocks
     * found in some workstations.
     */
    public byte precision = 0;

    /** *//**
     * This value indicates the total roundtrip delay to the primary reference
     * source, in seconds. Note that this variable can take on both positive and
     * negative values, depending on the relative time and frequency offsets.
     * The values that normally appear in this field range from negative values
     * of a few milliseconds to positive values of several hundred milliseconds.
     */
    public double rootDelay = 0;

    /** *//**
     * This value indicates the nominal error relative to the primary reference
     * source, in seconds. The values that normally appear in this field range
     * from 0 to several hundred milliseconds.
     */
    public double rootDispersion = 0;

    /** *//**
     * This is a 4-byte array identifying the particular reference source. In
     * the case of NTP Version 3 or Version 4 stratum-0 (unspecified) or
     * stratum-1 (primary) servers, this is a four-character ASCII string, left
     * justified and zero padded to 32 bits. In NTP Version 3 secondary servers,
     * this is the 32-bit IPv4 address of the reference source. In NTP Version 4
     * secondary servers, this is the low order 32 bits of the latest transmit
     * timestamp of the reference source. NTP primary (stratum 1) servers should
     * set this field to a code identifying the external reference source
     * according to the following list. If the external reference is one of
     * those listed, the associated code should be used. Codes for sources not
     * listed can be contrived as appropriate.
     * 
     * Code External Reference Source ---- ------------------------- LOCL
     * uncalibrated local clock used as a primary reference for a subnet without
     * external means of synchronization PPS atomic clock or other
     * pulse-per-second source individually calibrated to national standards
     * ACTS NIST dialup modem service USNO USNO modem service PTB PTB (Germany)
     * modem service TDF Allouis (France) Radio 164 kHz DCF Mainflingen
     * (Germany) Radio 77.5 kHz MSF Rugby (UK) Radio 60 kHz WWV Ft. Collins (US)
     * Radio 2.5, 5, 10, 15, 20 MHz WWVB Boulder (US) Radio 60 kHz WWVH Kaui
     * Hawaii (US) Radio 2.5, 5, 10, 15 MHz CHU Ottawa (Canada) Radio 3330,
     * 7335, 14670 kHz LORC LORAN-C radionavigation system OMEG OMEGA
     * radionavigation system GPS Global Positioning Service GOES Geostationary
     * Orbit Environment Satellite
     */
    public byte[] referenceIdentifier = { 0, 0, 0, 0 };

    /** *//**
     * This is the time at which the local clock was last set or corrected, in
     * seconds since 00:00 1-Jan-1900.
     */
    public double referenceTimestamp = 0;

    /** *//**
     * This is the time at which the request departed the client for the server,
     * in seconds since 00:00 1-Jan-1900.
     */
    public double originateTimestamp = 0;

    /** *//**
     * This is the time at which the request arrived at the server, in seconds
     * since 00:00 1-Jan-1900.
     */
    public double receiveTimestamp = 0;

    /** *//**
     * This is the time at which the reply departed the server for the client,
     * in seconds since 00:00 1-Jan-1900.
     */
    public double transmitTimestamp = 0;

    /** *//**
     * Constructs a new NtpMessage from an array of bytes.
     */
    public NtpMessage(byte[] array) {
        // See the packet format diagram in RFC 2030 for details
        leapIndicator = (byte) ((array[0] >> 6) & 0x3);
        version = (byte) ((array[0] >> 3) & 0x7);
        mode = (byte) (array[0] & 0x7);
        stratum = unsignedByteToShort(array[1]);
        pollInterval = array[2];
        precision = array[3];

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日本视频免费一区| 国产乱码一区二区三区| 欧美国产精品一区| 欧美伦理影视网| 成人性色生活片免费看爆迷你毛片| 亚洲一区二区影院| 欧美极品美女视频| 欧美tickling挠脚心丨vk| 91国产丝袜在线播放| 高清视频一区二区| 久久成人久久爱| 亚洲成va人在线观看| 国产精品久久久久久久久久久免费看| 欧美一级欧美一级在线播放| 色婷婷久久久久swag精品 | 成人av免费在线播放| 久久狠狠亚洲综合| 偷拍亚洲欧洲综合| 一区二区三区.www| 国产精品入口麻豆原神| 久久久久国产精品人| 欧美一区2区视频在线观看| 欧美亚洲图片小说| 91福利精品第一导航| a亚洲天堂av| 成人一区二区视频| 欧美日韩国产免费一区二区| 91一区一区三区| av在线一区二区三区| 国产a精品视频| 国产精品一区久久久久| 国产在线一区观看| 国产乱码精品一区二区三| 精品亚洲aⅴ乱码一区二区三区| 日韩成人av影视| 日韩av午夜在线观看| 喷水一区二区三区| 久久99精品久久久久婷婷| 蜜臀av一区二区| 玖玖九九国产精品| 精品无人区卡一卡二卡三乱码免费卡| 免费观看在线综合| 看电视剧不卡顿的网站| 麻豆视频观看网址久久| 美国毛片一区二区| 日韩极品在线观看| 久久精品噜噜噜成人av农村| 久久99精品久久久久久国产越南 | 精品国产乱码久久| 精品福利视频一区二区三区| 国产日韩成人精品| 中文字幕一区二区三区精华液 | 色天天综合色天天久久| 欧美影院午夜播放| 欧美区在线观看| 日韩免费观看2025年上映的电影| 精品国内二区三区| 久久综合久久综合亚洲| 国产精品美女久久久久av爽李琼| 亚洲人精品一区| 亚洲二区在线视频| 欧美bbbbb| 国产福利精品导航| 99re热视频精品| 欧美午夜片在线看| 精品欧美一区二区久久| 日本一区二区成人在线| 亚洲人成亚洲人成在线观看图片| 亚洲福利一区二区| 黑人巨大精品欧美黑白配亚洲| 懂色中文一区二区在线播放| 91免费看片在线观看| 欧美日韩你懂得| 久久综合九色综合欧美就去吻| 国产精品女上位| 丝袜国产日韩另类美女| 欧美视频一区二区三区四区| 欧美成人video| 亚洲日本欧美天堂| 日本成人在线视频网站| 国产69精品久久久久777| 欧美亚洲丝袜传媒另类| 久久网站热最新地址| 亚洲最新视频在线观看| 国产乱一区二区| 91福利小视频| 国产亚洲精久久久久久| 亚洲一区在线观看免费| 国产成人精品免费看| 欧美日韩久久一区| 国产精品三级电影| 久久国产尿小便嘘嘘尿| 欧美性色黄大片| 国产精品狼人久久影院观看方式| 丝袜亚洲另类丝袜在线| 97se狠狠狠综合亚洲狠狠| 日韩欧美久久久| 亚洲国产精品影院| 成人aa视频在线观看| 日韩免费观看高清完整版在线观看| 亚洲丝袜另类动漫二区| 久久97超碰色| 欧美精品aⅴ在线视频| 国产精品高潮久久久久无| 久久99国产精品免费| 欧美日韩www| 一区二区三区四区乱视频| 国产黄人亚洲片| 精品少妇一区二区三区视频免付费| 亚洲亚洲精品在线观看| 92精品国产成人观看免费| 久久久精品国产免大香伊| 蜜桃精品视频在线| 欧美另类久久久品| 亚洲在线视频一区| 日本韩国精品在线| 1024成人网| 粉嫩在线一区二区三区视频| 久久亚洲一区二区三区明星换脸 | 一二三四区精品视频| 国产精品一区二区不卡| 久久综合999| 久久精品国产**网站演员| 欧美人动与zoxxxx乱| 亚洲成人动漫在线观看| 欧美性色黄大片手机版| 亚洲综合免费观看高清在线观看| 一本色道久久综合亚洲aⅴ蜜桃| 国产精品久久福利| 成人激情校园春色| 国产欧美久久久精品影院| 国产福利电影一区二区三区| 国产欧美日韩另类一区| 高清在线不卡av| 国产精品美女久久久久久久久久久| 岛国av在线一区| 国产精品色噜噜| 99re8在线精品视频免费播放| 成人免费在线视频| 日本高清不卡在线观看| 一区二区三区四区蜜桃| 国产精品色婷婷| 蜜臀av亚洲一区中文字幕| 4438成人网| 视频一区国产视频| 日韩欧美不卡一区| 激情偷乱视频一区二区三区| 欧美精品一区二区三区高清aⅴ| 韩国av一区二区| 欧美电影免费观看高清完整版 | 日韩午夜电影在线观看| 日本亚洲天堂网| 欧美mv日韩mv亚洲| 粉嫩av一区二区三区粉嫩| 国产精品久久久久久久久快鸭 | 亚洲va欧美va人人爽| 91精品国产综合久久蜜臀| 美女网站色91| 欧美国产欧美亚州国产日韩mv天天看完整| 国产99久久久国产精品潘金网站| 亚洲女女做受ⅹxx高潮| 欧美日韩成人综合| 激情五月激情综合网| 中文字幕一区不卡| 777xxx欧美| 成人一区二区三区视频| 亚洲综合一区二区| 日韩一区二区三区免费看 | 国内成人精品2018免费看| 国产精品久久久久永久免费观看| 在线一区二区视频| 免费观看在线综合| 国产精品水嫩水嫩| 欧美日韩美少妇| 国产精品亚洲午夜一区二区三区 | 国产婷婷一区二区| 91传媒视频在线播放| 久久99久久精品| ㊣最新国产の精品bt伙计久久| 欧美日韩高清一区二区不卡| 美女久久久精品| 综合自拍亚洲综合图不卡区| 欧美精品777| 97久久久精品综合88久久| 蜜臀av一区二区| 亚洲裸体xxx| 久久久久久久久久久黄色| 欧美视频中文一区二区三区在线观看| 国产一二精品视频| 亚洲mv在线观看| 成人免费视频在线观看| 欧美videossexotv100| 99亚偷拍自图区亚洲| 蜜桃久久久久久久| 亚洲精品中文字幕乱码三区| 久久先锋资源网| 91精品国产欧美一区二区| 97久久久精品综合88久久| 国产精品资源站在线| 免费看欧美美女黄的网站|