3 ** Here be values used for communicating with the server once it is
9 #endif /* __cplusplus */
11 /* The header for the ICC protocol is a one-byte protocol version followed
12 by a 2 byte messages length*/
13 #define HEADER_SIZE (sizeof (ICC_PROTOCOLTYPE) + sizeof (ICC_MSGLENTYPE))
15 typedef unsigned short ICC_MSGLENTYPE; /* Length code to prefix commands to
17 typedef char ICC_PROTOCOLTYPE ;
19 /* Values for the protocol version field of the message. 8 bits wide. */
20 #define ICC_PROTOCOL_1 'a'
25 #define SC_MAXFIELDS 6
27 #define SC_ADDHIST 'a'
31 #define SC_CHANGEGROUP 'u'
32 #define SC_CHECKFILE 'd'
34 #define SC_FEEDINFO 'F'
37 #define SC_FLUSHLOGS 'g'
40 #define SC_LOGMODE 'E'
41 #define SC_LOWMARK 'L'
44 #define SC_NEWGROUP 'k'
49 #define SC_READERS 'v'
52 #define SC_RENUMBER 'n'
53 #define SC_RESERVE 'z'
54 #define SC_RMGROUP 'p'
56 #define SC_SHUTDOWN 'q'
57 #define SC_STATHIST 'H'
60 #define SC_THROTTLE 'r'
66 /* Yes, we don't want anyone to use this. */
67 #define SC_FIRSTFREE G
69 #define MAX_REASON_LEN 80
72 extern void ICCsettimeout(int i);
73 extern int ICCopen(void);
74 extern int ICCclose(void);
75 extern int ICCcommand(char cmd, const char *argv[], char **replyp);
76 extern int ICCcancel(const char *msgid);
77 extern int ICCgo(const char *why);
78 extern int ICCpause(const char *why);
79 extern int ICCreserve(const char *why);
81 extern const char *ICCfailure;
83 /* Use a read or recv call to read a descriptor. */
84 #ifdef HAVE_UNIX_DOMAIN_SOCKETS
85 # define RECVorREAD(fd, p, s) recv((fd), (p), (s), 0)
87 # define RECVorREAD(fd, p, s) read((fd), (p), (s))
92 #endif /* __cplusplus */