003 File Manager
Current Path:
/usr/src/contrib/ntp/ntpd
usr
/
src
/
contrib
/
ntp
/
ntpd
/
📁
..
📄
Makefile.am
(13.57 KB)
📄
Makefile.in
(78.52 KB)
📄
check_y2k.c
(15.73 KB)
📄
cmd_args.c
(4.25 KB)
📄
complete.conf.in
(3.35 KB)
📄
declcond.h
(793 B)
📄
invoke-ntp.conf.menu
(56 B)
📄
invoke-ntp.conf.texi
(104.37 KB)
📄
invoke-ntp.keys.menu
(56 B)
📄
invoke-ntp.keys.texi
(3.21 KB)
📄
invoke-ntpd.menu
(49 B)
📄
invoke-ntpd.texi
(23.68 KB)
📄
jupiter.h
(9.1 KB)
📄
keyword-gen-utd
(57 B)
📄
keyword-gen.c
(21.99 KB)
📄
ntp.conf.5man
(115.01 KB)
📄
ntp.conf.5mdoc
(101.72 KB)
📄
ntp.conf.def
(100.75 KB)
📄
ntp.conf.html
(126.28 KB)
📄
ntp.conf.man.in
(115.01 KB)
📄
ntp.conf.mdoc.in
(101.71 KB)
📄
ntp.conf.texi
(1.19 KB)
📄
ntp.keys.5man
(3.99 KB)
📄
ntp.keys.5mdoc
(4.25 KB)
📄
ntp.keys.def
(3.65 KB)
📄
ntp.keys.html
(8.37 KB)
📄
ntp.keys.man.in
(3.99 KB)
📄
ntp.keys.mdoc.in
(4.24 KB)
📄
ntp.keys.texi
(1.2 KB)
📄
ntp_config.c
(117.55 KB)
📄
ntp_control.c
(123.14 KB)
📄
ntp_crypto.c
(117.09 KB)
📄
ntp_filegen.c
(13.42 KB)
📄
ntp_io.c
(112.21 KB)
📄
ntp_keyword.h
(73.49 KB)
📄
ntp_leapsec.c
(31.18 KB)
📄
ntp_leapsec.h
(10.95 KB)
📄
ntp_loopfilter.c
(40.05 KB)
📄
ntp_monitor.c
(13.43 KB)
📄
ntp_parser.c
(130.65 KB)
📄
ntp_parser.h
(11.36 KB)
📄
ntp_peer.c
(27.66 KB)
📄
ntp_prio_q.c
(4.54 KB)
📄
ntp_proto.c
(150.76 KB)
📄
ntp_refclock.c
(43.87 KB)
📄
ntp_request.c
(67.25 KB)
📄
ntp_restrict.c
(19.06 KB)
📄
ntp_scanner.c
(20.74 KB)
📄
ntp_scanner.h
(4.43 KB)
📄
ntp_signd.c
(5.24 KB)
📄
ntp_timer.c
(17.69 KB)
📄
ntp_util.c
(22.66 KB)
📄
ntpd-opts.c
(71.91 KB)
📄
ntpd-opts.def
(17.55 KB)
📄
ntpd-opts.h
(14.57 KB)
📄
ntpd.1ntpdman
(32.03 KB)
📄
ntpd.1ntpdmdoc
(29.07 KB)
📄
ntpd.c
(42.16 KB)
📄
ntpd.html
(49.68 KB)
📄
ntpd.man.in
(32.03 KB)
📄
ntpd.mdoc.in
(29.07 KB)
📄
ntpd.texi
(3.25 KB)
📄
ntpdbase-opts.def
(13.21 KB)
📄
ntpsim.c
(17.11 KB)
📄
ppsapi_timepps.h
(497 B)
📄
psl0.conf
(25 B)
📄
psl1.conf
(25 B)
📄
psl2.conf
(37 B)
📄
rc_cmdlength.c
(800 B)
📄
refclock_acts.c
(22.66 KB)
📄
refclock_arbiter.c
(12.15 KB)
📄
refclock_arc.c
(46.85 KB)
📄
refclock_as2201.c
(11.09 KB)
📄
refclock_atom.c
(6.63 KB)
📄
refclock_bancomm.c
(16.11 KB)
📄
refclock_chronolog.c
(7.61 KB)
📄
refclock_chu.c
(45.28 KB)
📄
refclock_conf.c
(7.25 KB)
📄
refclock_datum.c
(22.3 KB)
📄
refclock_dumbclock.c
(8.42 KB)
📄
refclock_fg.c
(6.89 KB)
📄
refclock_gpsdjson.c
(58 KB)
📄
refclock_gpsvme.c
(7.77 KB)
📄
refclock_heath.c
(12.97 KB)
📄
refclock_hopfpci.c
(5.69 KB)
📄
refclock_hopfser.c
(7.41 KB)
📄
refclock_hpgps.c
(16.38 KB)
📄
refclock_irig.c
(30.05 KB)
📄
refclock_jjy.c
(144.27 KB)
📄
refclock_jupiter.c
(25.66 KB)
📄
refclock_leitch.c
(13.27 KB)
📄
refclock_local.c
(5.72 KB)
📄
refclock_msfees.c
(44.66 KB)
📄
refclock_mx4200.c
(41.72 KB)
📄
refclock_neoclock4x.c
(29.08 KB)
📄
refclock_nmea.c
(50.6 KB)
📄
refclock_oncore.c
(121.54 KB)
📄
refclock_palisade.c
(35.15 KB)
📄
refclock_palisade.h
(6.52 KB)
📄
refclock_parse.c
(160.87 KB)
📄
refclock_pcf.c
(4.79 KB)
📄
refclock_pst.c
(8.09 KB)
📄
refclock_ripencc.c
(118.21 KB)
📄
refclock_shm.c
(16.96 KB)
📄
refclock_tpro.c
(4.69 KB)
📄
refclock_true.c
(25.3 KB)
📄
refclock_tsyncpci.c
(28.35 KB)
📄
refclock_tt560.c
(6.12 KB)
📄
refclock_ulink.c
(15.64 KB)
📄
refclock_wwv.c
(79.32 KB)
📄
refclock_wwvb.c
(15.71 KB)
📄
refclock_zyfer.c
(7.38 KB)
Editing: refclock_palisade.h
/* * This software was developed by the Software and Component Technologies * group of Trimble Navigation, Ltd. * * Copyright (c) 1997, 1998, 1999, 2000 Trimble Navigation Ltd. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Trimble Navigation, Ltd. * 4. The name of Trimble Navigation Ltd. may not be used to endorse or * promote products derived from this software without specific prior * written permission. * * THIS SOFTWARE IS PROVIDED BY TRIMBLE NAVIGATION LTD. ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL TRIMBLE NAVIGATION LTD. BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* * refclock_palisade - clock driver for the Trimble Palisade GPS * timing receiver * * For detailed information on this program, please refer to the html * Refclock 29 page accompanying the NTP distribution. * * for questions / bugs / comments, contact: * sven_dietrich@trimble.com * * Sven-Thorsten Dietrich * 645 North Mary Avenue * Post Office Box 3642 * Sunnyvale, CA 94088-3642 * */ #ifndef REFCLOCK_PALISADE_H #define REFCLOCK_PALISADE_H #if defined HAVE_SYS_MODEM_H #include <sys/modem.h> #ifndef __QNXNTO__ #define TIOCMSET MCSETA #define TIOCMGET MCGETA #define TIOCM_RTS MRTS #endif #endif #ifdef HAVE_TERMIOS_H # ifdef TERMIOS_NEEDS__SVID3 # define _SVID3 # endif # include <termios.h> # include <sys/stat.h> # ifdef TERMIOS_NEEDS__SVID3 # undef _SVID3 # endif #endif #ifdef HAVE_SYS_IOCTL_H #include <sys/ioctl.h> #endif #include "ntpd.h" #include "ntp_io.h" #include "ntp_control.h" #include "ntp_refclock.h" #include "ntp_unixtime.h" #include "ntp_calgps.h" #include "ntp_stdlib.h" /* * GPS Definitions */ #define DESCRIPTION "Trimble Palisade GPS" /* Long name */ #define PRECISION (-20) /* precision assumed (about 1 us) */ #define REFID "GPS\0" /* reference ID */ #define TRMB_MINPOLL 4 /* 16 seconds */ #define TRMB_MAXPOLL 5 /* 32 seconds */ /* * I/O Definitions */ #define DEVICE "/dev/palisade%d" /* device name and unit */ #define SPEED232 B9600 /* uart speed (9600 baud) */ #define SPEED232COP B38400 /* uart speed for Copernicus II (38400 baud) */ /* * TSIP Report Definitions */ #define LENCODE_8F0B 74 /* Length of TSIP 8F-0B Packet & header */ #define LENCODE_NTP 22 /* Length of Palisade NTP Packet */ #define LENCODE_8FAC 68 /* Length of Thunderbolt 8F-AC Position Packet*/ #define LENCODE_8FAB 17 /* Length of Thunderbolt Primary Timing Packet*/ #define LENCODE_41 10 /* Length of Copernicus II GPS Time Packet*/ /* Allowed Sub-Packet ID's */ #define PACKET_8F0B 0x0B #define PACKET_NTP 0xAD /* Thunderbolt Packets */ #define PACKET_8FAC 0xAC /* Supplementary Thunderbolt Time Packet */ #define PACKET_8FAB 0xAB /* Primary Thunderbolt Time Packet */ #define PACKET_6D 0x6D /* Supplementary Thunderbolt Tracking Stats */ #define PACKET_41 0x41 /* Thunderbolt I dont know what this packet is, it's not documented on my manual*/ /* Acutime Packets */ #define PACKET_41A 0x41 /* GPS time */ #define PACKET_46 0x46 /* Receiver Health */ #define DLE 0x10 #define ETX 0x03 /* parse states */ #define TSIP_PARSED_EMPTY 0 #define TSIP_PARSED_FULL 1 #define TSIP_PARSED_DLE_1 2 #define TSIP_PARSED_DATA 3 #define TSIP_PARSED_DLE_2 4 /* * Leap-Insert and Leap-Delete are encoded as follows: * PALISADE_UTC_TIME set and PALISADE_LEAP_PENDING set: INSERT leap */ #define PALISADE_LEAP_INPROGRESS 0x08 /* This is the leap flag */ #define PALISADE_LEAP_WARNING 0x04 /* GPS Leap Warning (see ICD-200) */ #define PALISADE_LEAP_PENDING 0x02 /* Leap Pending (24 hours) */ #define PALISADE_UTC_TIME 0x01 /* UTC time available */ #define mb(_X_) (up->rpt_buf[(_X_ + 1)]) /* shortcut for buffer access */ /* Conversion Definitions */ #define GPS_PI (3.1415926535898) #define R2D (180.0/GPS_PI) /* * Structure for build data packets for send (thunderbolt uses it only) * taken from Markus Prosch */ struct packettx { short size; u_char *data; }; /* * Palisade unit control structure. */ struct palisade_unit { short unit; /* NTP refclock unit number */ int polled; /* flag to detect noreplies */ char leap_status; /* leap second flag */ char rpt_status; /* TSIP Parser State */ short rpt_cnt; /* TSIP packet length so far */ char rpt_buf[BMAX]; /* packet assembly buffer */ int type; /* Clock mode type */ int month; /* for LEAP filter */ }; /* * Function prototypes */ static int palisade_start (int, struct peer *); static void palisade_shutdown (int, struct peer *); static void palisade_receive (struct peer *); static void palisade_poll (int, struct peer *); static void palisade_io (struct recvbuf *); int palisade_configure (int, struct peer *); int TSIP_decode (struct peer *); long HW_poll (struct refclockproc *); static double getdbl (u_char *); static short getint (u_char *); static int32 getlong (u_char *); static int32 getsingle (u_char *); static void sendcmd (struct packettx *buffer, int c); static void sendsupercmd (struct packettx *buffer, int c1, int c2); static void sendbyte (struct packettx *buffer, int b); static void sendint (struct packettx *buffer, int a); static int sendetx (struct packettx *buffer, int fd); static void init_thunderbolt (int fd); static void init_acutime (int fd); #endif /* REFCLOCK_PALISADE_H */
Upload File
Create Folder