6 #include <zephyr/zephyr.h>
23 #define REALM_SZ MAXHOSTNAMELEN
24 #define INST_SZ 0 /* no instances w/o Kerberos */
25 #define ANAME_SZ 9 /* size of a username + null */
26 #define CLOCK_SKEW 300 /* max time to cache packet ids */
29 #define SERVER_SVC_FALLBACK htons((unsigned short) 2103)
30 #define HM_SVC_FALLBACK htons((unsigned short) 2104)
31 #define HM_SRV_SVC_FALLBACK htons((unsigned short) 2105)
33 #define ZAUTH_UNSET (-3) /* Internal to client library. */
34 #define Z_MAXFRAGS 500 /* Max number of packet fragments */
35 #define Z_MAXNOTICESIZE 400000 /* Max size of incoming notice */
36 #define Z_MAXQUEUESIZE 1500000 /* Max size of input queue notices */
37 #define Z_FRAGFUDGE 13 /* Room to for multinotice field */
38 #define Z_NOTICETIMELIMIT 30 /* Time to wait for fragments */
39 #define Z_INITFILTERSIZE 30 /* Starting size of uid filter */
41 #define Z_AUTHMODE_NONE 0 /* no authentication */
42 #define Z_AUTHMODE_KRB4 1 /* authenticate using Kerberos V4 */
43 #define Z_AUTHMODE_KRB5 2 /* authenticate using Kerberos V5 */
45 #define Z_KEYUSAGE_CLT_CKSUM 1027 /* client->server notice checksum */
46 #define Z_KEYUSAGE_SRV_CKSUM 1029 /* server->client notice checksum */
55 struct _Z_InputQ *next;
56 struct _Z_InputQ *prev;
58 unsigned ZEPHYR_INT32 timep;
62 struct sockaddr_in from;
63 struct _Z_Hole *holelist;
72 extern struct _Z_InputQ *__Q_Head, *__Q_Tail;
74 extern int __Zephyr_open; /* 0 if FD opened, 1 otherwise */
75 extern int __HM_set; /* 0 if dest addr set, 1 otherwise */
76 extern int __Zephyr_server; /* 0 if normal client, 1 if server or zhm */
79 extern krb5_context Z_krb5_ctx;
80 Code_t Z_krb5_lookup_cksumtype(krb5_enctype, krb5_cksumtype *);
83 extern ZLocations_t *__locate_list;
84 extern int __locate_num;
85 extern int __locate_next;
87 extern ZSubscription_t *__subscriptions_list;
88 extern int __subscriptions_num;
89 extern int __subscriptions_next;
91 extern int __Zephyr_port; /* Port number */
92 extern struct in_addr __My_addr;
94 typedef Code_t (*Z_SendProc) __P((ZNotice_t *, char *, int, int));
96 struct _Z_InputQ *Z_GetFirstComplete __P((void));
97 struct _Z_InputQ *Z_GetNextComplete __P((struct _Z_InputQ *));
98 Code_t Z_XmitFragment __P((ZNotice_t*, char *,int,int));
99 void Z_RemQueue __P((struct _Z_InputQ *));
100 Code_t Z_AddNoticeToEntry __P((struct _Z_InputQ*, ZNotice_t*, int));
101 Code_t Z_FormatAuthHeader __P((ZNotice_t *, char *, int, int *, Z_AuthProc));
102 Code_t Z_FormatHeader __P((ZNotice_t *, char *, int, int *, Z_AuthProc));
103 Code_t Z_FormatRawHeader __P((ZNotice_t *, char*, int,
104 int*, char **, char **));
105 Code_t Z_ReadEnqueue __P((void));
106 Code_t Z_ReadWait __P((void));
107 Code_t Z_SendLocation __P((char*, char*, Z_AuthProc, char*));
108 Code_t Z_SendFragmentedNotice __P((ZNotice_t *notice, int len,
109 Z_AuthProc cert_func,
110 Z_SendProc send_func));
111 Code_t Z_WaitForComplete __P((void));
112 Code_t Z_WaitForNotice __P((ZNotice_t *notice,
113 int (*pred) __P((ZNotice_t *, void *)), void *arg,
116 void Z_gettimeofday(struct _ZTimeval *ztv, struct timezone *tz);
117 #endif /* __INTERNAL_H__ */