1 | /* |
---|
2 | * ntp_stdlib.h - Prototypes for XNTP lib. |
---|
3 | */ |
---|
4 | #include <sys/types.h> |
---|
5 | |
---|
6 | #include "ntp_types.h" |
---|
7 | #include "ntp_string.h" |
---|
8 | #include "l_stdlib.h" |
---|
9 | |
---|
10 | #if defined(__STDC__) |
---|
11 | extern void msyslog P((int, const char *, ...)); |
---|
12 | #else |
---|
13 | extern void msyslog P(()); |
---|
14 | #endif |
---|
15 | |
---|
16 | #if 0 /* HMS: These seem to be unused now */ |
---|
17 | extern void auth_des P((u_long *, u_char *)); |
---|
18 | extern int auth_parity P((u_long *)); |
---|
19 | extern void auth_setkey P((u_long, u_long *)); |
---|
20 | extern void auth_subkeys P((u_long *, u_char *, u_char *)); |
---|
21 | |
---|
22 | extern void auth_delkeys P((void)); |
---|
23 | |
---|
24 | #endif |
---|
25 | |
---|
26 | extern void auth1crypt P((u_int32, u_int32 *, int)); |
---|
27 | extern int auth2crypt P((u_int32, u_int32 *, int)); |
---|
28 | extern void auth_delkeys P((void)); |
---|
29 | extern int auth_havekey P((u_int32)); |
---|
30 | extern int authdecrypt P((u_int32, u_int32 *, int)); |
---|
31 | extern int authencrypt P((u_int32, u_int32 *, int)); |
---|
32 | extern int authhavekey P((u_int32)); |
---|
33 | extern int authistrusted P((u_int32)); |
---|
34 | extern int authreadkeys P((const char *)); |
---|
35 | extern void authtrust P((u_int32, int)); |
---|
36 | extern int authusekey P((u_int32, int, const char *)); |
---|
37 | |
---|
38 | extern void calleapwhen P((u_long, u_long *, u_long *)); |
---|
39 | extern u_long calyearstart P((u_long)); |
---|
40 | extern const char *clockname P((int)); |
---|
41 | extern int clocktime P((int, int, int, int, int, u_long, u_long *, u_int32 *)); |
---|
42 | extern char * emalloc P((u_int)); |
---|
43 | extern int ntp_getopt P((int, char **, char *)); |
---|
44 | extern void init_auth P((void)); |
---|
45 | extern void init_lib P((void)); |
---|
46 | extern void init_random P((void)); |
---|
47 | extern struct savekey *auth_findkey P((u_int32)); |
---|
48 | extern int auth_moremem P((void)); |
---|
49 | |
---|
50 | #ifdef DES |
---|
51 | extern void DESauth1crypt P((u_int32, u_int32 *, int)); |
---|
52 | extern int DESauth2crypt P((u_int32, u_int32 *, int)); |
---|
53 | extern int DESauthdecrypt P((u_int32, const u_int32 *, int)); |
---|
54 | extern int DESauthencrypt P((u_int32, u_int32 *, int)); |
---|
55 | extern void DESauth_setkey P((u_int32, const u_int32 *)); |
---|
56 | extern void DESauth_subkeys P((const u_int32 *, u_char *, u_char *)); |
---|
57 | extern void DESauth_des P((u_int32 *, u_char *)); |
---|
58 | extern int DESauth_parity P((u_int32 *)); |
---|
59 | #endif /* DES */ |
---|
60 | |
---|
61 | #ifdef MD5 |
---|
62 | extern void MD5auth1crypt P((u_int32, u_int32 *, int)); |
---|
63 | extern int MD5auth2crypt P((u_int32, u_int32 *, int)); |
---|
64 | extern int MD5authdecrypt P((u_int32, const u_int32 *, int)); |
---|
65 | extern int MD5authencrypt P((u_int32, u_int32 *, int)); |
---|
66 | extern void MD5auth_setkey P((u_int32, const u_int32 *)); |
---|
67 | #endif /* MD5 */ |
---|
68 | |
---|
69 | extern int atoint P((const char *, long *)); |
---|
70 | extern int atouint P((const char *, u_long *)); |
---|
71 | extern int hextoint P((const char *, u_long *)); |
---|
72 | extern char * humandate P((u_long)); |
---|
73 | extern char * inttoa P((long)); |
---|
74 | extern char * mfptoa P((u_long, u_long, int)); |
---|
75 | extern char * mfptoms P((u_long, u_long, int)); |
---|
76 | extern const char * modetoa P((int)); |
---|
77 | extern const char * eventstr P((int)); |
---|
78 | extern const char * ceventstr P((int)); |
---|
79 | extern char * statustoa P((int, int)); |
---|
80 | extern const char * sysstatstr P((int)); |
---|
81 | extern const char * peerstatstr P((int)); |
---|
82 | extern const char * clockstatstr P((int)); |
---|
83 | extern u_int32 netof P((u_int32)); |
---|
84 | extern char * numtoa P((u_int32)); |
---|
85 | extern char * numtohost P((u_int32)); |
---|
86 | extern int octtoint P((const char *, u_long *)); |
---|
87 | extern u_long ranp2 P((int)); |
---|
88 | extern char * refnumtoa P((u_int32)); |
---|
89 | extern int tsftomsu P((u_long, int)); |
---|
90 | extern char * uinttoa P((u_long)); |
---|
91 | |
---|
92 | extern int decodenetnum P((const char *, u_int32 *)); |
---|
93 | |
---|
94 | extern char * FindConfig P((char *)); |
---|
95 | |
---|
96 | extern void signal_no_reset P((int, RETSIGTYPE (*func)(int))); |
---|