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: ntp_scanner.h
/* ntp_scanner.h * * The header file for a simple lexical analyzer. * * Written By: Sachin Kamboj * University of Delaware * Newark, DE 19711 * Copyright (c) 2006 */ #ifndef NTP_SCANNER_H #define NTP_SCANNER_H #include "ntp_config.h" /* * ntp.conf syntax is slightly irregular in that some tokens such as * hostnames do not require quoting even if they might otherwise be * recognized as T_ terminal tokens. This hand-crafted lexical scanner * uses a "followed by" value associated with each keyword to indicate * normal scanning of the next token, forced scanning of the next token * alone as a T_String, or forced scanning of all tokens to the end of * the command as T_String. * In the past the identifiers for this functionality ended in _ARG: * * NO_ARG -> FOLLBY_TOKEN * SINGLE_ARG -> FOLLBY_STRING * MULTIPLE_ARG -> FOLLBY_STRINGS_TO_EOC * * Note that some tokens use FOLLBY_TOKEN even though they sometimes * are followed by strings. FOLLBY_STRING is used only when needed to * avoid the keyword scanner matching a token where a string is needed. * * FOLLBY_NON_ACCEPT is an overloading of this field to distinguish * non-accepting states (where the state number does not match a T_ * value). */ typedef enum { FOLLBY_TOKEN = 0, FOLLBY_STRING, FOLLBY_STRINGS_TO_EOC, FOLLBY_NON_ACCEPTING } follby; #define MAXLINE 1024 /* maximum length of line */ #define MAXINCLUDELEVEL 5 /* maximum include file levels */ /* STRUCTURES * ---------- */ /* * Define a structure to hold the FSA for the keywords. * The structure is actually a trie. * * To save space, a single u_int32 encodes four fields, and a fifth * (the token completed for terminal states) is implied by the index of * the rule within the scan state array, taking advantage of the fact * there are more scan states than the highest T_ token number. * * The lowest 8 bits hold the character the state matches on. * Bits 8 and 9 hold the followedby value (0 - 3). For non-accepting * states (which do not match a completed token) the followedby * value 3 (FOLLBY_NONACCEPTING) denotes that fact. For accepting * states, values 0 - 2 control whether the scanner forces the * following token(s) to strings. * Bits 10 through 20 hold the next state to check not matching * this state's character. * Bits 21 through 31 hold the next state to check matching the char. */ #define S_ST(ch, fb, match_n, other_n) ( \ (u_char)((ch) & 0xff) | \ ((u_int32)(fb) << 8) | \ ((u_int32)(match_n) << 10) | \ ((u_int32)(other_n) << 21) \ ) #define SS_CH(ss) ((char)(u_char)((ss) & 0xff)) #define SS_FB(ss) (((u_int)(ss) >> 8) & 0x3) #define SS_MATCH_N(ss) (((u_int)(ss) >> 10) & 0x7ff) #define SS_OTHER_N(ss) (((u_int)(ss) >> 21) & 0x7ff) typedef u_int32 scan_state; struct LCPOS { int nline; int ncol; }; /* Structure to hold a filename, file pointer and positional info. * Instances are dynamically allocated, and the file name is copied by * value into a dynamic extension of the 'fname' array. (Which *must* be * the last field for that reason!) */ struct FILE_INFO { struct FILE_INFO * st_next; /* next on stack */ FILE * fpi; /* File Descriptor */ int force_eof; /* locked or not */ int backch; /* ungetch buffer */ struct LCPOS curpos; /* current scan position */ struct LCPOS bakpos; /* last line end for ungetc */ struct LCPOS tokpos; /* current token position */ struct LCPOS errpos; /* error position */ char fname[1]; /* (formal only) buffered name */ }; /* SCANNER GLOBAL VARIABLES * ------------------------ */ extern config_tree cfgt; /* Parser output stored here */ /* VARIOUS EXTERNAL DECLARATIONS * ----------------------------- */ extern int old_config_style; /* VARIOUS SUBROUTINE DECLARATIONS * ------------------------------- */ extern const char *keyword(int token); extern char *quote_if_needed(char *str); int yylex(void); /* managing the input source stack itself */ extern int/*BOOL*/ lex_init_stack(const char * path, const char * mode); extern void lex_drop_stack(void); extern int/*BOOL*/ lex_flush_stack(void); /* add/remove a nested input source */ extern int/*BOOL*/ lex_push_file(const char * path, const char * mode); extern int/*BOOL*/ lex_pop_file(void); /* input stack state query functions */ extern size_t lex_level(void); extern int/*BOOL*/ lex_from_file(void); extern struct FILE_INFO * lex_current(void); #endif /* NTP_SCANNER_H */
Upload File
Create Folder