annotate libpurple/protocols/zephyr/zephyr_internal.h @ 27673:19d283331b9d

Fix a small leak and remove a duplicate xmlnode_set_attrib.
author Paul Aurich <paul@darkrain42.org>
date Wed, 22 Jul 2009 19:48:51 +0000
parents 047c56435f1e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23172
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
1 /* This file is part of the Project Athena Zephyr Notification System.
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
2 * It contains global definitions
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
3 *
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
4 * Created by: Robert French
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
5 *
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
6 * Copyright (c) 1987,1988,1991 by the Massachusetts Institute of
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
7 * Technology. For copying and distribution information, see the
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
8 * file "mit-copyright.h".
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
9 */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
10
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
11 #ifndef __ZEPHYR_H__
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
12 #define __ZEPHYR_H__
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
13
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
14 #include <config.h>
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
15
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
16 #include <glib.h>
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
17
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
18 #include <sys/types.h>
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
19 #include <sys/time.h>
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
20
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
21 #include <zephyr_err.h>
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
22
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
23 #ifndef IPPROTO_MAX /* Make sure not already included */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
24 #ifndef WIN32
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
25 #include <netinet/in.h>
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
26 #endif
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
27 #endif
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
28
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
29 /* Use __STDC__ to guess whether we can use stdarg, prototypes, and const.
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
30 * This is a public header file, so autoconf can't help us here. */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
31 #ifdef __STDC__
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
32 # include <stdarg.h>
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
33 # define ZP(x) x
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
34 # define ZCONST const
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
35 #else
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
36 # define ZP(x) ()
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
37 # define ZCONST
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
38 #endif
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
39
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
40 #ifdef WIN32
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
41 /* this really should be uint32_t */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
42 /*typedef unsigned int in_addr_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
43 struct in_addr
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
44 {
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
45 in_addr_t s_addr;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
46 }; */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
47 #include <winsock2.h>
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
48 #endif
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
49
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
50 /* Service names */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
51 #define HM_SVCNAME "zephyr-hm"
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
52 #define HM_SRV_SVCNAME "zephyr-hm-srv"
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
53 #define SERVER_SVCNAME "zephyr-clt"
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
54 #define SERVER_SERVICE "zephyr"
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
55 #define SERVER_INSTANCE "zephyr"
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
56
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
57 #define ZVERSIONHDR "ZEPH"
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
58 #define ZVERSIONMAJOR 0
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
59 #define ZVERSIONMINOR 2
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
60
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
61 #define Z_MAXPKTLEN 1024
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
62 #define Z_MAXHEADERLEN 800
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
63 #define Z_MAXOTHERFIELDS 10 /* Max unknown fields in ZNotice_t */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
64 #define Z_NUMFIELDS 17
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
65
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
66 /* Authentication levels returned by ZCheckAuthentication */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
67 #define ZAUTH_FAILED (-1)
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
68 #define ZAUTH_YES 1
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
69 #define ZAUTH_NO 0
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
70
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
71 typedef char ZPacket_t[Z_MAXPKTLEN];
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
72
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
73 /* Packet type */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
74 typedef enum {
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
75 UNSAFE, UNACKED, ACKED, HMACK, HMCTL, SERVACK, SERVNAK, CLIENTACK, STAT
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
76 } ZNotice_Kind_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
77 extern ZCONST char *ZNoticeKinds[9];
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
78
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
79 /* Unique ID format */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
80 typedef struct _ZUnique_Id_t {
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
81 struct in_addr zuid_addr;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
82 struct timeval tv;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
83 } ZUnique_Id_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
84
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
85 /* Checksum */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
86 typedef unsigned long ZChecksum_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
87
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
88 /* Notice definition */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
89 typedef struct _ZNotice_t {
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
90 char *z_packet;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
91 char *z_version;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
92 ZNotice_Kind_t z_kind;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
93 ZUnique_Id_t z_uid;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
94 #define z_sender_addr z_uid.zuid_addr
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
95 struct timeval z_time;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
96 unsigned short z_port;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
97 int z_auth;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
98 int z_checked_auth;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
99 int z_authent_len;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
100 char *z_ascii_authent;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
101 char *z_class;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
102 const char *z_class_inst;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
103 char *z_opcode;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
104 char *z_sender;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
105 const char *z_recipient;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
106 char *z_default_format;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
107 char *z_multinotice;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
108 ZUnique_Id_t z_multiuid;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
109 ZChecksum_t z_checksum;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
110 int z_num_other_fields;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
111 char *z_other_fields[Z_MAXOTHERFIELDS];
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
112 caddr_t z_message;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
113 int z_message_len;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
114 } ZNotice_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
115
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
116 /* Subscription structure */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
117 typedef struct _ZSubscriptions_t {
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
118 char *zsub_recipient;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
119 char *zsub_class;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
120 char *zsub_classinst;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
121 } ZSubscription_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
122
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
123 /* Function return code */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
124 typedef int Code_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
125
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
126 /* Locations structure */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
127 typedef struct _ZLocations_t {
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
128 char *host;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
129 char *time;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
130 char *tty;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
131 } ZLocations_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
132
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
133 typedef struct _ZAsyncLocateData_t {
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
134 char *user;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
135 ZUnique_Id_t uid;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
136 char *version;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
137 } ZAsyncLocateData_t;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
138
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
139 /* for ZSetDebug */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
140 #ifdef Z_DEBUG
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
141 void (*__Z_debug_print) ZP((ZCONST char *fmt, va_list args, void *closure));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
142 void *__Z_debug_print_closure;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
143 #endif
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
144
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
145 int ZCompareUIDPred ZP((ZNotice_t *, void *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
146 int ZCompareMultiUIDPred ZP((ZNotice_t *, void *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
147
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
148 /* Defines for ZFormatNotice, et al. */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
149 typedef Code_t (*Z_AuthProc) ZP((ZNotice_t*, char *, int, int *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
150 Code_t ZMakeAuthentication ZP((ZNotice_t*, char *,int, int*));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
151
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
152 char *ZGetSender ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
153 char *ZGetVariable ZP((char *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
154 Code_t ZSetVariable ZP((char *var, char *value));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
155 Code_t ZUnsetVariable ZP((char *var));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
156 int ZGetWGPort ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
157 Code_t ZSetDestAddr ZP((struct sockaddr_in *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
158 Code_t ZFormatNoticeList ZP((ZNotice_t*, char**, int,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
159 char **, int*, Z_AuthProc));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
160 Code_t ZParseNotice ZP((char*, int, ZNotice_t *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
161 Code_t ZReadAscii ZP((char*, int, unsigned char*, int));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
162 Code_t ZReadAscii32 ZP((char *, int, unsigned long *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
163 Code_t ZReadAscii16 ZP((char *, int, unsigned short *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
164 Code_t ZSendPacket ZP((char*, int, int));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
165 Code_t ZSendList ZP((ZNotice_t*, char *[], int, Z_AuthProc));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
166 Code_t ZSrvSendList ZP((ZNotice_t*, char*[], int, Z_AuthProc, Code_t (*)()));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
167 Code_t ZSendNotice ZP((ZNotice_t *, Z_AuthProc));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
168 Code_t ZSrvSendNotice ZP((ZNotice_t*, Z_AuthProc, Code_t (*)()));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
169 Code_t ZFormatNotice ZP((ZNotice_t*, char**, int*, Z_AuthProc));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
170 Code_t ZFormatSmallNotice ZP((ZNotice_t*, ZPacket_t, int*, Z_AuthProc));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
171 Code_t ZFormatRawNoticeList ZP((ZNotice_t *notice, char *list[], int nitems,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
172 char **buffer, int *ret_len));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
173 Code_t ZLocateUser ZP((char *, int *, Z_AuthProc));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
174 Code_t ZRequestLocations ZP((const char *, ZAsyncLocateData_t *,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
175 ZNotice_Kind_t, Z_AuthProc));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
176 Code_t ZhmStat ZP((struct in_addr *, ZNotice_t *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
177 Code_t ZInitialize ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
178 Code_t ZSetServerState ZP((int));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
179 Code_t ZSetFD ZP((int));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
180 Code_t ZFormatSmallRawNotice ZP((ZNotice_t*, ZPacket_t, int*));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
181 int ZCompareUID ZP((ZUnique_Id_t*, ZUnique_Id_t*));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
182 Code_t ZMakeAscii ZP((char*, int, unsigned char*, int));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
183 Code_t ZMakeAscii32 ZP((char *, int, unsigned long));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
184 Code_t ZMakeAscii16 ZP((char *, int, unsigned int));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
185 Code_t ZReceivePacket ZP((ZPacket_t, int*, struct sockaddr_in*));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
186 Code_t ZCheckAuthentication ZP((ZNotice_t*, struct sockaddr_in*));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
187 Code_t ZSetLocation ZP((char *exposure));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
188 Code_t ZUnsetLocation ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
189 Code_t ZFlushMyLocations ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
190 Code_t ZFormatRawNotice ZP((ZNotice_t *, char**, int *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
191 Code_t ZRetrieveSubscriptions ZP((unsigned short, int*));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
192 Code_t ZOpenPort ZP((unsigned short *port));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
193 Code_t ZClosePort ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
194 Code_t ZFlushLocations ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
195 Code_t ZFlushSubscriptions ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
196 Code_t ZFreeNotice ZP((ZNotice_t *notice));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
197 Code_t ZParseLocations ZP((register ZNotice_t *notice,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
198 register ZAsyncLocateData_t *zald, int *nlocs,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
199 char **user));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
200 int ZCompareALDPred ZP((ZNotice_t *notice, void *zald));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
201 void ZFreeALD ZP((register ZAsyncLocateData_t *zald));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
202 Code_t ZCheckIfNotice ZP((ZNotice_t *notice, struct sockaddr_in *from,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
203 register int (*predicate) ZP((ZNotice_t *,void *)),
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
204 void *args));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
205 Code_t ZPeekPacket ZP((char **buffer, int *ret_len,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
206 struct sockaddr_in *from));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
207 Code_t ZPeekNotice ZP((ZNotice_t *notice, struct sockaddr_in *from));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
208 Code_t ZIfNotice ZP((ZNotice_t *notice, struct sockaddr_in *from,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
209 int (*predicate) ZP((ZNotice_t *, void *)), void *args));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
210 Code_t ZSubscribeTo ZP((ZSubscription_t *sublist, int nitems,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
211 unsigned int port));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
212 Code_t ZSubscribeToSansDefaults ZP((ZSubscription_t *sublist, int nitems,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
213 unsigned int port));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
214 Code_t ZUnsubscribeTo ZP((ZSubscription_t *sublist, int nitems,
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
215 unsigned int port));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
216 Code_t ZCancelSubscriptions ZP((unsigned int port));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
217 int ZPending ZP((void));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
218 Code_t ZReceiveNotice ZP((ZNotice_t *notice, struct sockaddr_in *from));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
219 #ifdef Z_DEBUG
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
220 void Z_debug ZP((ZCONST char *, ...));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
221 #endif
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
222
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
223 #undef ZP
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
224
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
225 /* Compatibility */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
226 #define ZNewLocateUser ZLocateUser
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
227
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
228 /* Macros to retrieve Zephyr library values. */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
229 extern int __Zephyr_fd;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
230 extern int __Q_CompleteLength;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
231 extern struct sockaddr_in __HM_addr;
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
232 extern char __Zephyr_realm[];
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
233 #define ZGetFD() __Zephyr_fd
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
234 #define ZQLength() __Q_CompleteLength
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
235 #define ZGetDestAddr() __HM_addr
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
236 #define ZGetRealm() __Zephyr_realm
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
237
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
238 #ifdef Z_DEBUG
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
239 void ZSetDebug ZP((void (*)(ZCONST char *, va_list, void *), void *));
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
240 #define ZSetDebug(proc,closure) (__Z_debug_print=(proc), \
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
241 __Z_debug_print_closure=(closure), \
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
242 (void) 0)
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
243 #else
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
244 #define ZSetDebug(proc,closure)
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
245 #endif
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
246
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
247 /* Maximum queue length */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
248 #define Z_MAXQLEN 30
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
249
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
250 /* Successful function return */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
251 #define ZERR_NONE 0
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
252
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
253 /* Hostmanager wait time (in secs) */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
254 #define HM_TIMEOUT 1
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
255
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
256 /* Server wait time (in secs) */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
257 #define SRV_TIMEOUT 30
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
258
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
259 #define ZAUTH (ZMakeAuthentication)
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
260 #define ZNOAUTH ((Z_AuthProc)0)
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
261
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
262 /* Packet strings */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
263 #define ZSRVACK_SENT "SENT" /* SERVACK codes */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
264 #define ZSRVACK_NOTSENT "LOST"
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
265 #define ZSRVACK_FAIL "FAIL"
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
266
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
267 /* Server internal class */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
268 #define ZEPHYR_ADMIN_CLASS "ZEPHYR_ADMIN" /* Class */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
269
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
270 /* Control codes sent to a server */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
271 #define ZEPHYR_CTL_CLASS "ZEPHYR_CTL" /* Class */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
272
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
273 #define ZEPHYR_CTL_CLIENT "CLIENT" /* Inst: From client */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
274 #define CLIENT_SUBSCRIBE "SUBSCRIBE" /* Opcode: Subscribe */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
275 #define CLIENT_SUBSCRIBE_NODEFS "SUBSCRIBE_NODEFS" /* Opcode: Subscribe */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
276 #define CLIENT_UNSUBSCRIBE "UNSUBSCRIBE" /* Opcode: Unsubsubscribe */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
277 #define CLIENT_CANCELSUB "CLEARSUB" /* Opcode: Clear all subs */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
278 #define CLIENT_GIMMESUBS "GIMME" /* Opcode: Give me subs */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
279 #define CLIENT_GIMMEDEFS "GIMMEDEFS" /* Opcode: Give me default
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
280 * subscriptions */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
281
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
282 #define ZEPHYR_CTL_HM "HM" /* Inst: From HM */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
283 #define HM_BOOT "BOOT" /* Opcode: Boot msg */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
284 #define HM_FLUSH "FLUSH" /* Opcode: Flush me */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
285 #define HM_DETACH "DETACH" /* Opcode: Detach me */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
286 #define HM_ATTACH "ATTACH" /* Opcode: Attach me */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
287
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
288 /* Control codes send to a HostManager */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
289 #define HM_CTL_CLASS "HM_CTL" /* Class */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
290
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
291 #define HM_CTL_SERVER "SERVER" /* Inst: From server */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
292 #define SERVER_SHUTDOWN "SHUTDOWN" /* Opcode: Server shutdown */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
293 #define SERVER_PING "PING" /* Opcode: PING */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
294
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
295 #define HM_CTL_CLIENT "CLIENT" /* Inst: From client */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
296 #define CLIENT_FLUSH "FLUSH" /* Opcode: Send flush to srv */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
297 #define CLIENT_NEW_SERVER "NEWSERV" /* Opcode: Find new server */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
298
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
299 /* HM Statistics */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
300 #define HM_STAT_CLASS "HM_STAT" /* Class */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
301
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
302 #define HM_STAT_CLIENT "HMST_CLIENT" /* Inst: From client */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
303 #define HM_GIMMESTATS "GIMMESTATS" /* Opcode: get stats */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
304
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
305 /* Login class messages */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
306 #define LOGIN_CLASS "LOGIN" /* Class */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
307
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
308 /* Class Instance is principal of user who is logging in or logging out */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
309
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
310 #define EXPOSE_NONE "NONE" /* Opcode: Not visible */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
311 #define EXPOSE_OPSTAFF "OPSTAFF" /* Opcode: Opstaff visible */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
312 #define EXPOSE_REALMVIS "REALM-VISIBLE" /* Opcode: Realm visible */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
313 #define EXPOSE_REALMANN "REALM-ANNOUNCED"/* Opcode: Realm announced */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
314 #define EXPOSE_NETVIS "NET-VISIBLE" /* Opcode: Net visible */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
315 #define EXPOSE_NETANN "NET-ANNOUNCED" /* Opcode: Net announced */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
316 #define LOGIN_USER_LOGIN "USER_LOGIN" /* Opcode: user login
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
317 (from server) */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
318 #define LOGIN_USER_LOGOUT "USER_LOGOUT" /* Opcode: User logout */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
319 #define LOGIN_USER_FLUSH "USER_FLUSH" /* Opcode: flush all locs */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
320
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
321 /* Locate class messages */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
322 #define LOCATE_CLASS "USER_LOCATE" /* Class */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
323
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
324 #define LOCATE_HIDE "USER_HIDE" /* Opcode: Hide me */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
325 #define LOCATE_UNHIDE "USER_UNHIDE" /* Opcode: Unhide me */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
326
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
327 /* Class Instance is principal of user to locate */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
328 #define LOCATE_LOCATE "LOCATE" /* Opcode: Locate user */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
329
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
330 /* WG_CTL class messages */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
331 #define WG_CTL_CLASS "WG_CTL" /* Class */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
332
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
333 #define WG_CTL_USER "USER" /* Inst: User request */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
334 #define USER_REREAD "REREAD" /* Opcode: Reread desc file */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
335 #define USER_SHUTDOWN "SHUTDOWN" /* Opcode: Go catatonic */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
336 #define USER_STARTUP "STARTUP" /* Opcode: Come out of it */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
337 #define USER_EXIT "EXIT" /* Opcode: Exit the client */
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
338
047c56435f1e When compiling against an external libzephyr, we need to use its zephyr.h,
Richard Laager <rlaager@wiktel.com>
parents:
diff changeset
339 #endif /* __ZEPHYR_H__ */