| /netbsd/src/external/bsd/ntp/dist/sntp/tests/ |
| D | utilities.c | 121 expected.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_SetLiVnMode1() 129 TEST_ASSERT_EQUAL(expected.li_vn_mode, actual.li_vn_mode); in test_SetLiVnMode1() 136 expected.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC, in test_SetLiVnMode2() 144 TEST_ASSERT_EQUAL(expected.li_vn_mode, actual.li_vn_mode); in test_SetLiVnMode2() 156 testpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_PktOutput()
|
| D | packetProcessing.c | 106 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION, in setUp() 288 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_ServerVersionTooOld() 291 TEST_ASSERT_TRUE(PKT_VERSION(testpkt.p.li_vn_mode) < NTP_OLDVERSION); in test_ServerVersionTooOld() 306 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_ServerVersionTooNew() 309 TEST_ASSERT_TRUE(PKT_VERSION(testpkt.p.li_vn_mode) > NTP_VERSION); in test_ServerVersionTooNew() 324 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_NonWantedMode() 371 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC, in test_RejectUnsyncedServer() 406 testpkt.p.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, in test_AcceptNoSentPacketBroadcastMode()
|
| D | packetHandling.c | 61 TEST_ASSERT_EQUAL(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode)); in test_GenerateUnauthenticatedPacket() 62 TEST_ASSERT_EQUAL(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode)); in test_GenerateUnauthenticatedPacket() 63 TEST_ASSERT_EQUAL(MODE_CLIENT, PKT_MODE(testpkt.li_vn_mode)); in test_GenerateUnauthenticatedPacket() 108 TEST_ASSERT_EQUAL(LEAP_NOTINSYNC, PKT_LEAP(testpkt.li_vn_mode)); in test_GenerateAuthenticatedPacket() 109 TEST_ASSERT_EQUAL(NTP_VERSION, PKT_VERSION(testpkt.li_vn_mode)); in test_GenerateAuthenticatedPacket() 110 TEST_ASSERT_EQUAL(MODE_CLIENT, PKT_MODE(testpkt.li_vn_mode)); in test_GenerateAuthenticatedPacket()
|
| /netbsd/src/external/bsd/ntp/dist/sntp/ |
| D | networking.c | 229 if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION || in process_pkt() 230 PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) { in process_pkt() 233 func_name, PKT_VERSION(rpkt->li_vn_mode)); in process_pkt() 237 if (PKT_MODE(rpkt->li_vn_mode) != mode && in process_pkt() 238 PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE) { in process_pkt() 241 PKT_MODE(rpkt->li_vn_mode), rpkt->stratum); in process_pkt() 268 if (LEAP_NOTINSYNC == PKT_LEAP(rpkt->li_vn_mode)) { in process_pkt()
|
| D | main.c | 1277 switch (PKT_LEAP(rpkt->li_vn_mode)) { in handle_pkt() 1442 spkt->li_vn_mode = leap << 6; in set_li_vn_mode() 1443 spkt->li_vn_mode |= version << 3; in set_li_vn_mode() 1444 spkt->li_vn_mode |= mode; in set_li_vn_mode()
|
| /netbsd/src/external/bsd/ntp/dist/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");
|
| /netbsd/src/external/bsd/ntp/dist/include/ |
| D | ntp.h | 553 u_char li_vn_mode; /* peer leap indicator */ member 606 #define PKT_MODE(li_vn_mode) ((u_char)((li_vn_mode) & 0x7)) argument 607 #define PKT_VERSION(li_vn_mode) ((u_char)(((li_vn_mode) >> 3) & 0x7)) argument 608 #define PKT_LEAP(li_vn_mode) ((u_char)(((li_vn_mode) >> 6) & 0x3)) argument
|
| D | ntp_control.h | 17 u_char li_vn_mode; /* leap, version, mode */ member
|
| /netbsd/src/external/bsd/ntp/dist/ntpdate/ |
| D | ntpdate.c | 696 xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOTINSYNC, in transmit() 779 if (PKT_VERSION(rpkt->li_vn_mode) < NTP_OLDVERSION || in receive() 780 PKT_VERSION(rpkt->li_vn_mode) > NTP_VERSION) { in receive() 784 if ((PKT_MODE(rpkt->li_vn_mode) != MODE_SERVER in receive() 785 && PKT_MODE(rpkt->li_vn_mode) != MODE_PASSIVE) in receive() 789 PKT_MODE(rpkt->li_vn_mode), rpkt->stratum); in receive() 843 if (LEAP_NOTINSYNC == PKT_LEAP(rpkt->li_vn_mode) && in receive() 856 server->leap = PKT_LEAP(rpkt->li_vn_mode); in receive()
|
| /netbsd/src/external/bsd/ntp/dist/ntpd/ |
| D | ntp_proto.c | 697 hisversion = PKT_VERSION(pkt->li_vn_mode); in receive() 698 hismode = (int)PKT_MODE(pkt->li_vn_mode); in receive() 740 hisleap = PKT_LEAP(pkt->li_vn_mode); in receive() 1324 PKT_LEAP(pkt->li_vn_mode), in receive() 1325 PKT_VERSION(pkt->li_vn_mode), in receive() 1326 PKT_MODE(pkt->li_vn_mode), in receive() 1413 PKT_LEAP(pkt->li_vn_mode), in receive() 1414 PKT_VERSION(pkt->li_vn_mode), in receive() 1415 PKT_MODE(pkt->li_vn_mode), in receive() 2587 pmode = PKT_MODE(pkt->li_vn_mode); in process_packet() [all …]
|
| D | ntp_monitor.c | 339 mode = PKT_MODE(pkt->li_vn_mode); in ntp_monitor() 340 version = PKT_VERSION(pkt->li_vn_mode); in ntp_monitor()
|
| D | ntpsim.c | 300 xpkt.li_vn_mode = PKT_LI_VN_MODE(LEAP_NOWARNING, NTP_VERSION, in simulate_server()
|
| D | ntp_io.c | 3280 PKT_LEAP(pkt->li_vn_mode), 3281 PKT_VERSION(pkt->li_vn_mode), 3282 PKT_MODE(pkt->li_vn_mode),
|
| D | ntp_control.c | 1223 res_version = PKT_VERSION(pkt->li_vn_mode); in process_control() 1235 rpkt.li_vn_mode = PKT_LI_VN_MODE(sys_leap, res_version, in process_control() 1441 rpkt.li_vn_mode = in ctl_flushpkt()
|
| D | ntp_crypto.c | 457 hismode = (int)PKT_MODE((&rbufp->recv_pkt)->li_vn_mode); in crypto_recv()
|
| /netbsd/src/external/bsd/ntp/dist/ntpq/ |
| D | ntpq.c | 1076 if (PKT_VERSION(rpkt.li_vn_mode) > NTP_VERSION in getresponse() 1077 || PKT_VERSION(rpkt.li_vn_mode) < NTP_OLDVERSION) { in getresponse() 1080 PKT_VERSION(rpkt.li_vn_mode)); in getresponse() 1083 if (PKT_MODE(rpkt.li_vn_mode) != MODE_CONTROL) { in getresponse() 1086 PKT_MODE(rpkt.li_vn_mode)); in getresponse() 1346 qpkt.li_vn_mode = PKT_LI_VN_MODE(0, pktversion, MODE_CONTROL); in sendrequest()
|