[7779] | 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 */ |
---|
[23703] | 26 | #define LERTS_DATA "/var/lib/lert/lertdata" |
---|
| 27 | #define LERTS_LOG "/var/lib/lert/lertlog" |
---|
| 28 | #define LERTS_SRVTAB "/etc/srvtab" |
---|
| 29 | #define LERTS_KEYTAB "/etc/krb5.keytab" |
---|
[7779] | 30 | |
---|
| 31 | /* the base name of the displayed files */ |
---|
| 32 | #define LERTS_MSG_FILES "/afs/athena/system/config/lert/lert" |
---|
| 33 | #define LERTS_MSG_SUBJECT "/afs/athena/system/config/lert/lertsub" |
---|
| 34 | #define LERTS_DEF_SUBJECT "Message from Lert" |
---|
| 35 | |
---|
| 36 | /* how many times should we send it */ |
---|
| 37 | #define RETRIES 5 |
---|
| 38 | #define LERT_TIMEOUT 1 |
---|
| 39 | |
---|
| 40 | /* should the server produce a message every time a user hits it? */ |
---|
| 41 | #define LOGGING 3 |
---|
| 42 | |
---|
| 43 | /* |
---|
| 44 | not as likely to need changing |
---|
| 45 | */ |
---|
| 46 | |
---|
| 47 | /* for various types of delivery */ |
---|
| 48 | #define LERT_CAT 0 |
---|
| 49 | #define LERT_Z 1 |
---|
| 50 | #define LERT_MAIL 2 |
---|
| 51 | #define LERT_HANDLE 3 |
---|
| 52 | |
---|
[17860] | 53 | #define LERT_VERSION '2' |
---|
[7779] | 54 | #define LERT_ASKS '0' |
---|
| 55 | |
---|
| 56 | /* various categories of response from server |
---|
| 57 | bad means something strange in instance, realm, etc... |
---|
| 58 | free means you aren't in the database! |
---|
| 59 | msg means lert is going to pinch you |
---|
| 60 | and sick means lert doesn't understand her data... |
---|
| 61 | */ |
---|
| 62 | |
---|
| 63 | #define LERT_BAD '0' |
---|
| 64 | #define LERT_FREE '1' |
---|
| 65 | #define LERT_MSG '2' |
---|
| 66 | #define LERT_SICK '3' |
---|
| 67 | |
---|
| 68 | #define LERT_GOTCHA 0 |
---|
| 69 | #define LERT_NO_DB -1 |
---|
| 70 | #define LERT_NOT_IN_DB -2 |
---|
| 71 | |
---|
| 72 | /* |
---|
| 73 | conceivably a future version might use more bytes |
---|
| 74 | currently: |
---|
| 75 | client -> server |
---|
| 76 | [0] version |
---|
| 77 | [1] stop msgs flag 0 or 1 |
---|
| 78 | [2] reserved for future |
---|
| 79 | [3] reserved for future |
---|
| 80 | [4 on] authentication, etc. |
---|
| 81 | */ |
---|
| 82 | |
---|
| 83 | #define LERT_LENGTH 4 |
---|
| 84 | |
---|
| 85 | /* |
---|
| 86 | currently: |
---|
| 87 | server->client |
---|
| 88 | [0] LERT_VERSION |
---|
| 89 | [1] code response |
---|
| 90 | [2 on] data |
---|
| 91 | */ |
---|
| 92 | |
---|
| 93 | #define LERT_CHECK 2 |
---|
| 94 | |
---|
| 95 | /* bombout codes */ |
---|
| 96 | #define ERR_KERB_PHOST 1 |
---|
| 97 | #define ERR_HOSTNAME 2 |
---|
| 98 | #define ERR_SOCKET 3 |
---|
| 99 | #define ERR_CONNECT 4 |
---|
| 100 | #define ERR_SEND 5 |
---|
| 101 | #define ERR_RCV 6 |
---|
| 102 | #define ERR_VERSION 7 |
---|
| 103 | #define ERR_SERVER 8 |
---|
| 104 | #define ERR_KERB_REALM 9 |
---|
| 105 | #define ERR_KERB_FAKE 10 |
---|
| 106 | #define ERR_KERB_CRED 11 |
---|
[14080] | 107 | #define ERR_FILE 12 |
---|
[7779] | 108 | |
---|
| 109 | #define ERR_KERB_AUTH 109 |
---|
| 110 | #define ERR_TIMEOUT 110 |
---|
| 111 | |
---|
| 112 | #define ERR_USER 201 |
---|
| 113 | #define LERT_NO_SOCK 202 |
---|
| 114 | |
---|
| 115 | #define NO_PROCS 301 |
---|
| 116 | #define ERR_MEMORY 302 |
---|
| 117 | #define ERR_SERVED 303 |
---|
| 118 | |
---|
| 119 | /* for ease of use */ |
---|
| 120 | #ifndef FALSE |
---|
| 121 | #define FALSE 0 |
---|
| 122 | #endif |
---|
| 123 | #ifndef TRUE |
---|
| 124 | #define TRUE 1 |
---|
| 125 | #endif |
---|
[13853] | 126 | |
---|
| 127 | #if defined (HAVE_DB_H) && !defined (HAVE_NDBM_H) |
---|
| 128 | #define DB_DBM_HSEARCH 1 |
---|
| 129 | #include <db.h> |
---|
| 130 | #elif defined (HAVE_NDBM_H) |
---|
| 131 | #include <ndbm.h> |
---|
| 132 | #else |
---|
| 133 | #error Cannot find a suitable database header |
---|
| 134 | #endif |
---|