2 * $Id: prot.h,v 1.9 1999/11/30 18:57:46 bg Exp $
4 * Copyright 1985, 1986, 1987, 1988 by the Massachusetts Institute
7 * For copying and distribution information, please see the file
10 * Include file with authentication protocol information.
18 #define KRB_SERVICE "kerberos-iv"
19 #define KRB_PORT 750 /* PC's don't have
21 #define KRB_PROT_VERSION 4
22 #define MAX_PKT_LEN 1000
23 #define MAX_TXT_LEN 1000
25 /* Routines to create and read packets may be found in prot.c */
27 KTEXT create_auth_reply(char *pname, char *pinst, char *prealm,
28 int32_t time_ws, int n, u_int32_t x_date,
29 int kvno, KTEXT cipher);
31 KTEXT krb_create_death_packet(char *a_name);
34 /* Message types , always leave lsb for byte order */
36 #define AUTH_MSG_KDC_REQUEST (1<<1)
37 #define AUTH_MSG_KDC_REPLY (2<<1)
38 #define AUTH_MSG_APPL_REQUEST (3<<1)
39 #define AUTH_MSG_APPL_REQUEST_MUTUAL (4<<1)
40 #define AUTH_MSG_ERR_REPLY (5<<1)
41 #define AUTH_MSG_PRIVATE (6<<1)
42 #define AUTH_MSG_SAFE (7<<1)
43 #define AUTH_MSG_APPL_ERR (8<<1)
44 #define AUTH_MSG_KDC_FORWARD (9<<1)
45 #define AUTH_MSG_KDC_RENEW (10<<1)
46 #define AUTH_MSG_DIE (63<<1)
48 /* values for kerb error codes */
51 #define KERB_ERR_NAME_EXP 1
52 #define KERB_ERR_SERVICE_EXP 2
53 #define KERB_ERR_AUTH_EXP 3
54 #define KERB_ERR_PKT_VER 4
55 #define KERB_ERR_NAME_MAST_KEY_VER 5
56 #define KERB_ERR_SERV_MAST_KEY_VER 6
57 #define KERB_ERR_BYTE_ORDER 7
58 #define KERB_ERR_PRINCIPAL_UNKNOWN 8
59 #define KERB_ERR_PRINCIPAL_NOT_UNIQUE 9
60 #define KERB_ERR_NULL_KEY 10
61 #define KERB_ERR_TIMEOUT 11
63 /* sendauth - recvauth */
66 * If the protocol changes, you will need to change the version string
67 * be sure to support old versions of krb_sendauth!
70 #define KRB_SENDAUTH_VERS "AUTHV0.1" /* MUST be KRB_SENDAUTH_VLEN chars */
72 #endif /* PROT_DEFS */