--- a/libpurple/protocols/zephyr/internal.h Tue Dec 01 01:00:55 2020 -0600
+++ b/libpurple/protocols/zephyr/internal.h Tue Dec 01 22:06:48 2020 -0600
@@ -9,12 +9,6 @@
#include <zephyr_internal.h>
@@ -24,6 +18,7 @@
#define ETIMEDOUT WSAETIMEDOUT
#define EADDRINUSE WSAEADDRINUSE
#define MAXHOSTNAMELEN 4096
@@ -42,69 +37,4 @@
#define CLOCK_SKEW 300 /* max time to cache packet ids */
-#define SERVER_SVC_FALLBACK htons((unsigned short) 2103)
-#define HM_SVC_FALLBACK htons((unsigned short) 2104)
-#define HM_SRV_SVC_FALLBACK htons((unsigned short) 2105)
-#define ZAUTH_UNSET (-3) /* Internal to client library. */
-#define Z_MAXFRAGS 500 /* Max number of packet fragments */
-#define Z_MAXNOTICESIZE 400000 /* Max size of incoming notice */
-#define Z_MAXQUEUESIZE 1500000 /* Max size of input queue notices */
-#define Z_FRAGFUDGE 13 /* Room to for multinotice field */
-#define Z_NOTICETIMELIMIT 30 /* Time to wait for fragments */
-#define Z_INITFILTERSIZE 30 /* Starting size of uid filter */
- struct sockaddr_in from;
- GSList *holelist; /* element-type: Z_Hole* */
-extern GQueue Z_input_queue;
-extern ZLocations_t *__locate_list;
-extern int __locate_num;
-extern int __locate_next;
-extern ZSubscription_t *__subscriptions_list;
-extern int __subscriptions_num;
-extern int __subscriptions_next;
-extern int __Zephyr_port; /* Port number */
-extern struct in_addr __My_addr;
-typedef Code_t (*Z_SendProc)(ZNotice_t *, char *, int, int);
-Z_InputQ *Z_GetFirstComplete(void);
-Z_InputQ *Z_GetNextComplete(Z_InputQ *);
-Code_t Z_XmitFragment(ZNotice_t *, char *, int, int);
-void Z_RemQueue(Z_InputQ *);
-Code_t Z_AddNoticeToEntry(Z_InputQ *, ZNotice_t *, int);
-Code_t Z_FormatAuthHeader(ZNotice_t *, char *, int, int *, Z_AuthProc);
-Code_t Z_FormatHeader(ZNotice_t *, char *, int, int *, Z_AuthProc);
-Code_t Z_FormatRawHeader(ZNotice_t *, char *, gsize, int *, char **, char **);
-Code_t Z_ReadEnqueue(void);
-Code_t Z_ReadWait(void);
-Code_t Z_SendLocation(char *, char *, Z_AuthProc, char *);
-Code_t Z_SendFragmentedNotice(ZNotice_t *notice, int len, Z_AuthProc cert_func,
-Code_t Z_WaitForComplete(void);
-Code_t Z_WaitForNotice(ZNotice_t *notice, int (*pred)(ZNotice_t *, void *),
- void *arg, int timeout);
#endif /* PURPLE_ZEPHYR_INTERNAL_H */
--- a/libpurple/protocols/zephyr/zephyr.c Tue Dec 01 01:00:55 2020 -0600
+++ b/libpurple/protocols/zephyr/zephyr.c Tue Dec 01 22:06:48 2020 -0600
@@ -60,8 +60,13 @@
static PurpleProtocol *my_protocol = NULL;
static GSList *cmds = NULL;
+extern char __Zephyr_realm[]; extern Code_t ZGetLocations(ZLocations_t *, int *);
extern Code_t ZGetSubscriptions(ZSubscription_t *, int*);
typedef struct _zframe zframe;
typedef struct _zephyr_triple zephyr_triple;
typedef struct _zephyr_account zephyr_account;
--- a/libpurple/protocols/zephyr/zephyr_internal.h Tue Dec 01 01:00:55 2020 -0600
+++ b/libpurple/protocols/zephyr/zephyr_internal.h Tue Dec 01 22:06:48 2020 -0600
@@ -61,6 +61,18 @@
+#define SERVER_SVC_FALLBACK htons((unsigned short) 2103) +#define HM_SVC_FALLBACK htons((unsigned short) 2104) +#define HM_SRV_SVC_FALLBACK htons((unsigned short) 2105) +#define ZAUTH_UNSET (-3) /* Internal to client library. */ +#define Z_MAXFRAGS 500 /* Max number of packet fragments */ +#define Z_MAXNOTICESIZE 400000 /* Max size of incoming notice */ +#define Z_MAXQUEUESIZE 1500000 /* Max size of input queue notices */ +#define Z_FRAGFUDGE 13 /* Room to for multinotice field */ +#define Z_NOTICETIMELIMIT 30 /* Time to wait for fragments */ +#define Z_INITFILTERSIZE 30 /* Starting size of uid filter */ typedef char ZPacket_t[Z_MAXPKTLEN];
@@ -128,6 +140,27 @@
+ struct sockaddr_in from; + GSList *holelist; /* element-type: Z_Hole* */ int ZCompareUIDPred(ZNotice_t *, void *);
int ZCompareMultiUIDPred(ZNotice_t *, void *);
@@ -197,6 +230,38 @@
Code_t ZReceiveNotice(ZNotice_t *notice, struct sockaddr_in *from);
+typedef Code_t (*Z_SendProc)(ZNotice_t *, char *, int, int); +Z_InputQ *Z_GetFirstComplete(void); +Z_InputQ *Z_GetNextComplete(Z_InputQ *); +Code_t Z_XmitFragment(ZNotice_t *, char *, int, int); +void Z_RemQueue(Z_InputQ *); +Code_t Z_AddNoticeToEntry(Z_InputQ *, ZNotice_t *, int); +Code_t Z_FormatAuthHeader(ZNotice_t *, char *, int, int *, Z_AuthProc); +Code_t Z_FormatHeader(ZNotice_t *, char *, int, int *, Z_AuthProc); +Code_t Z_FormatRawHeader(ZNotice_t *, char *, gsize, int *, char **, char **); +Code_t Z_ReadEnqueue(void); +Code_t Z_ReadWait(void); +Code_t Z_SendLocation(char *, char *, Z_AuthProc, char *); +Code_t Z_SendFragmentedNotice(ZNotice_t *notice, int len, Z_AuthProc cert_func, +Code_t Z_WaitForComplete(void); +Code_t Z_WaitForNotice(ZNotice_t *notice, int (*pred)(ZNotice_t *, void *), + void *arg, int timeout); +extern GQueue Z_input_queue; +extern ZLocations_t *__locate_list; +extern int __locate_num; +extern int __locate_next; +extern ZSubscription_t *__subscriptions_list; +extern int __subscriptions_num; +extern int __subscriptions_next; +extern int __Zephyr_port; /* Port number */ +extern struct in_addr __My_addr; /* Macros to retrieve Zephyr library values. */
extern int __Q_CompleteLength;