6 #include <zephyr/zephyr.h>
19 #define REALM_SZ MAXHOSTNAMELEN
20 #define INST_SZ 0 /* no instances w/o Kerberos */
21 #define ANAME_SZ 9 /* size of a username + null */
22 #define CLOCK_SKEW 300 /* max time to cache packet ids */
25 #define SERVER_SVC_FALLBACK htons((unsigned short) 2103)
26 #define HM_SVC_FALLBACK htons((unsigned short) 2104)
27 #define HM_SRV_SVC_FALLBACK htons((unsigned short) 2105)
29 #define ZAUTH_UNSET (-3) /* Internal to client library. */
30 #define Z_MAXFRAGS 500 /* Max number of packet fragments */
31 #define Z_MAXNOTICESIZE 400000 /* Max size of incoming notice */
32 #define Z_MAXQUEUESIZE 1500000 /* Max size of input queue notices */
33 #define Z_FRAGFUDGE 13 /* Room to for multinotice field */
34 #define Z_NOTICETIMELIMIT 30 /* Time to wait for fragments */
35 #define Z_INITFILTERSIZE 30 /* Starting size of uid filter */
44 struct _Z_InputQ *next;
45 struct _Z_InputQ *prev;
47 unsigned ZEPHYR_INT32 timep;
51 struct sockaddr_in from;
52 struct _Z_Hole *holelist;
61 extern struct _Z_InputQ *__Q_Head, *__Q_Tail;
63 extern int __Zephyr_open; /* 0 if FD opened, 1 otherwise */
64 extern int __HM_set; /* 0 if dest addr set, 1 otherwise */
65 extern int __Zephyr_server; /* 0 if normal client, 1 if server or zhm */
67 extern ZLocations_t *__locate_list;
68 extern int __locate_num;
69 extern int __locate_next;
71 extern ZSubscription_t *__subscriptions_list;
72 extern int __subscriptions_num;
73 extern int __subscriptions_next;
75 extern int __Zephyr_port; /* Port number */
76 extern struct in_addr __My_addr;
78 typedef Code_t (*Z_SendProc) __P((ZNotice_t *, char *, int, int));
80 struct _Z_InputQ *Z_GetFirstComplete __P((void));
81 struct _Z_InputQ *Z_GetNextComplete __P((struct _Z_InputQ *));
82 Code_t Z_XmitFragment __P((ZNotice_t*, char *,int,int));
83 void Z_RemQueue __P((struct _Z_InputQ *));
84 Code_t Z_AddNoticeToEntry __P((struct _Z_InputQ*, ZNotice_t*, int));
85 Code_t Z_FormatAuthHeader __P((ZNotice_t *, char *, int, int *, Z_AuthProc));
86 Code_t Z_FormatHeader __P((ZNotice_t *, char *, int, int *, Z_AuthProc));
87 Code_t Z_FormatRawHeader __P((ZNotice_t *, char*, int,
88 int*, char **, char **));
89 Code_t Z_ReadEnqueue __P((void));
90 Code_t Z_ReadWait __P((void));
91 Code_t Z_SendLocation __P((char*, char*, Z_AuthProc, char*));
92 Code_t Z_SendFragmentedNotice __P((ZNotice_t *notice, int len,
94 Z_SendProc send_func));
95 Code_t Z_WaitForComplete __P((void));
96 Code_t Z_WaitForNotice __P((ZNotice_t *notice,
97 int (*pred) __P((ZNotice_t *, void *)), void *arg,
100 void Z_gettimeofday(struct _ZTimeval *ztv, struct timezone *tz);
101 #endif /* __INTERNAL_H__ */