| /freebsd-10-stable/contrib/ntp/sntp/tests/ |
| D | utilities.c | 122 expected.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_SetLiVnMode1() 130 TEST_ASSERT_EQUAL(expected.li_vn_mode, actual.li_vn_mode); in test_SetLiVnMode1() 137 expected.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC, in test_SetLiVnMode2() 145 TEST_ASSERT_EQUAL(expected.li_vn_mode, actual.li_vn_mode); in test_SetLiVnMode2() 157 testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_PktOutput()
|
| D | packetProcessing.c | 113 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION, in setUp() 281 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_ServerVersionTooOld() 284 TEST_ASSERT_TRUE(PKT_VERSION(testpkt.p.li_vn_mode) < NTP_OLDVERSION); in test_ServerVersionTooOld() 299 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_ServerVersionTooNew() 302 TEST_ASSERT_TRUE(PKT_VERSION(testpkt.p.li_vn_mode) > NTP_VERSION); in test_ServerVersionTooNew() 317 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_NonWantedMode() 364 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC, in test_RejectUnsyncedServer() 399 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_AcceptNoSentPacketBroadcastMode()
|
| D | packetHandling.c | 59 TEST_ASSERT_EQUAL(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode)); in test_GenerateUnauthenticatedPacket() 60 TEST_ASSERT_EQUAL(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode)); in test_GenerateUnauthenticatedPacket() 61 TEST_ASSERT_EQUAL(MODE_CLIENT, PKT_MODE(testpkt.li_vn_mode)); in test_GenerateUnauthenticatedPacket() 96 TEST_ASSERT_EQUAL(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode)); in test_GenerateAuthenticatedPacket() 97 TEST_ASSERT_EQUAL(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode)); in test_GenerateAuthenticatedPacket() 98 TEST_ASSERT_EQUAL(MODE_CLIENT, PKT_MODE(testpkt.li_vn_mode)); in test_GenerateAuthenticatedPacket()
|
| /freebsd-10-stable/contrib/ntp/sntp/ |
| D | networking.c | 226 if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION || in process_pkt() 227 PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) { in process_pkt() 230 func_name, PKT_VERSION(rpkt->li_vn_mode)); in process_pkt() 234 if (PKT_MODE(rpkt->li_vn_mode) != mode && in process_pkt() 235 PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE) { in process_pkt() 238 PKT_MODE(rpkt->li_vn_mode), rpkt->stratum); in process_pkt() 265 if (LEAP_NOTINSYNC == PKT_LEAP(rpkt->li_vn_mode)) { in process_pkt()
|
| D | main.c | 1270 switch (PKT_LEAP(rpkt->li_vn_mode)) { in handle_pkt() 1435 spkt->li_vn_mode = leap << 6; in set_li_vn_mode() 1436 spkt->li_vn_mode |= version << 3; in set_li_vn_mode() 1437 spkt->li_vn_mode |= mode; in set_li_vn_mode()
|
| /freebsd-10-stable/contrib/ntp/scripts/monitoring/ |
| D | ntp.pl | 359 local($li_vn_mode,$r_e_m_op,$seq,$status,$associd,$offset,$count,$data); 370 ($li_vn_mode,$r_e_m_op,$seq,$status,$associd,$offset,$count,$data) = 382 if (&pkt_VN($li_vn_mode) != $NTP_version) 385 return ("ERROR","version ".&pkt_VN($li_vn_mode)."packet ignored"); 388 if (&pkt_MODE($li_vn_mode) != $ctrl_mode) 391 return ("ERROR", "mode ".&pkt_MODE($li_vn_mode)." packet ignored");
|
| /freebsd-10-stable/contrib/ntp/include/ |
| D | ntp.h | 544 u_char li_vn_mode; /* peer leap indicator */ member 591 #define PKT_MODE(li_vn_mode) ((u_char)((li_vn_mode) & 0x7)) argument 592 #define PKT_VERSION(li_vn_mode) ((u_char)(((li_vn_mode) >> 3) & 0x7)) argument 593 #define PKT_LEAP(li_vn_mode) ((u_char)(((li_vn_mode) >> 6) & 0x3)) argument
|
| D | ntp_control.h | 13 u_char li_vn_mode; /* leap, version, mode */ member
|
| /freebsd-10-stable/contrib/ntp/ntpdate/ |
| D | ntpdate.c | 689 xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC, in transmit() 772 if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION || in receive() 773 PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) { in receive() 777 if ((PKT_MODE(rpkt->li_vn_mode) != MODE_SERVER in receive() 778 && PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE) in receive() 782 PKT_MODE(rpkt->li_vn_mode), rpkt->stratum); in receive() 836 if (LEAP_NOTINSYNC == PKT_LEAP(rpkt->li_vn_mode) && in receive() 849 server->leap = PKT_LEAP(rpkt->li_vn_mode); in receive()
|
| /freebsd-10-stable/contrib/ntp/ntpd/ |
| D | ntp_proto.c | 654 hisversion = PKT_VERSION(pkt->li_vn_mode); in receive() 655 hisleap = PKT_LEAP(pkt->li_vn_mode); in receive() 656 hismode = (int)PKT_MODE(pkt->li_vn_mode); in receive() 1240 PKT_LEAP(pkt->li_vn_mode), in receive() 1241 PKT_VERSION(pkt->li_vn_mode), in receive() 1242 PKT_MODE(pkt->li_vn_mode), in receive() 1310 PKT_LEAP(pkt->li_vn_mode), in receive() 1311 PKT_VERSION(pkt->li_vn_mode), in receive() 1312 PKT_MODE(pkt->li_vn_mode), in receive() 2440 pmode = PKT_MODE(pkt->li_vn_mode); in process_packet() [all …]
|
| D | ntp_monitor.c | 335 mode = PKT_MODE(pkt->li_vn_mode); in ntp_monitor() 336 version = PKT_VERSION(pkt->li_vn_mode); in ntp_monitor()
|
| D | ntpsim.c | 298 xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION, in simulate_server()
|
| D | ntp_io.c | 3224 PKT_MODE(pkt->li_vn_mode), 3225 PKT_VERSION(pkt->li_vn_mode), 3226 PKT_LEAP(pkt->li_vn_mode),
|
| D | ntp_control.c | 1209 res_version = PKT_VERSION(pkt->li_vn_mode); in process_control() 1221 rpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, res_version, in process_control() 1427 rpkt.li_vn_mode = in ctl_flushpkt()
|
| D | ntp_crypto.c | 463 hismode = (int)PKT_MODE((&rbufp->recv_pkt)->li_vn_mode); in crypto_recv()
|
| /freebsd-10-stable/contrib/ntp/ntpq/ |
| D | ntpq.c | 1041 if (PKT_VERSION(rpkt.li_vn_mode) > NTP_VERSION in getresponse() 1042 || PKT_VERSION(rpkt.li_vn_mode) < NTP_OLDVERSION) { in getresponse() 1045 PKT_VERSION(rpkt.li_vn_mode)); in getresponse() 1048 if (PKT_MODE(rpkt.li_vn_mode) != MODE_CONTROL) { in getresponse() 1051 PKT_MODE(rpkt.li_vn_mode)); in getresponse() 1311 qpkt.li_vn_mode = PKT_LI_VN_MODE(0, pktversion, MODE_CONTROL); in sendrequest()
|