source: trunk/athena/bin/lert/lert.h @ 14080

Revision 14080, 2.8 KB checked in by danw, 25 years ago (diff)
add definition of ERR_FILE
Line 
1/*
2   file: lert.h
3   mike barker
4   Dec. 2, 1994
5 */
6
7/*
8  highly likely to need changing
9 */
10
11/* for /etc/services lookup */
12#define LERT_SERVED  "lert"
13#define LERT_PROTO   "udp"
14
15/* for hesiod resolution */
16#define LERT_SERVER  "lert"
17#define LERT_TYPE    "sloc"
18
19/* and when all else fails, hardcode! */
20#define LERT_HOME    "minos"
21
22#define LERT_PORT     3717
23#define LERT_SERVICE "daemon"
24
25/* where the data base and log are */
26#define LERTS_DATA   "/var/ops/lert/lertdata"
27#define LERTS_LOG    "/var/ops/lert/lertlog"
28#define LERTS_SRVTAB    "/var/ops/lert/srvtab"
29
30/* the base name of the displayed files */
31#define LERTS_MSG_FILES   "/afs/athena/system/config/lert/lert"
32#define LERTS_MSG_SUBJECT   "/afs/athena/system/config/lert/lertsub"
33#define LERTS_DEF_SUBJECT  "Message from Lert"
34
35/* how many times should we send it */
36#define RETRIES      5
37#define LERT_TIMEOUT  1
38
39/* should the server produce a message every time a user hits it? */
40#define LOGGING      3
41
42/*
43  not as likely to need changing
44 */
45
46/* for various types of delivery */
47#define LERT_CAT      0
48#define LERT_Z        1
49#define LERT_MAIL     2
50#define LERT_HANDLE   3
51
52#define LERT_VERSION '1'
53#define LERT_ASKS    '0'
54
55/* various categories of response from server
56   bad means something strange in instance, realm, etc...
57   free means you aren't in the database!
58   msg means lert is going to pinch you
59   and sick means lert doesn't understand her data...
60 */
61
62#define LERT_BAD     '0'
63#define LERT_FREE    '1'
64#define LERT_MSG     '2'
65#define LERT_SICK    '3'
66
67#define LERT_GOTCHA     0
68#define LERT_NO_DB     -1
69#define LERT_NOT_IN_DB -2
70
71/*
72  conceivably a future version might use more bytes
73  currently:
74  client -> server
75  [0] version
76  [1] stop msgs flag 0 or 1
77  [2] reserved for future
78  [3] reserved for future
79  [4 on] authentication, etc.
80 */
81
82#define LERT_LENGTH   4
83
84/*
85  currently:
86  server->client
87  [0] LERT_VERSION
88  [1] code response
89  [2 on] data
90 */
91
92#define LERT_CHECK 2
93
94/* bombout codes */
95#define ERR_KERB_PHOST    1
96#define ERR_HOSTNAME      2
97#define ERR_SOCKET        3
98#define ERR_CONNECT       4
99#define ERR_SEND          5
100#define ERR_RCV           6
101#define ERR_VERSION       7
102#define ERR_SERVER        8
103#define ERR_KERB_REALM    9
104#define ERR_KERB_FAKE     10
105#define ERR_KERB_CRED     11
106#define ERR_FILE          12
107
108#define ERR_KERB_AUTH   109
109#define ERR_TIMEOUT     110
110
111#define ERR_USER        201
112#define LERT_NO_SOCK     202
113
114#define NO_PROCS        301
115#define ERR_MEMORY      302
116#define ERR_SERVED      303
117
118/* for ease of use */
119#ifndef FALSE
120#define FALSE  0
121#endif
122#ifndef TRUE
123#define TRUE  1
124#endif
125
126#if defined (HAVE_DB_H) && !defined (HAVE_NDBM_H)
127#define DB_DBM_HSEARCH 1
128#include <db.h>
129#elif defined (HAVE_NDBM_H)
130#include <ndbm.h>
131#else
132#error Cannot find a suitable database header
133#endif
Note: See TracBrowser for help on using the repository browser.