]> andersk Git - moira.git/blame - include/prot.h
Bump GDB_MAX_CONNECTIONS from 25 to 40
[moira.git] / include / prot.h
CommitLineData
3d8d4b36 1/*
2 * $Source$
3 * $Author$
4 * $Locker$
5 *
6 * Copyright 1985,1986 by the Massachusetts Institute of Technology
7 *
8 */
9
10
11#define KRB_PORT 750 /* PC's don't have /etc/services */
12#define KRB_PROT_VERSION 4
13#define MAX_PKT_LEN 1000
14#define MAX_TXT_LEN 1000
15#define TICKET_GRANTING_TICKET "krbtgt"
16
17/* Macro's to obtain various fields from a packet */
18
19#define pkt_version(packet) (unsigned int) *(packet->dat)
20#define pkt_msg_type(packet) (unsigned int) *(packet->dat+1)
21#define pkt_a_name(packet) (packet->dat+2)
22#define pkt_a_inst(packet) (packet->dat+3+strlen(pkt_a_name(packet)))
23#define pkt_a_realm(packet) (pkt_a_inst(packet)+1+strlen(pkt_a_inst(packet)))
24
25
26/* Macro to obtain realm from application request */
27#define apreq_realm(auth) (auth->dat + 3)
28
29
30/* If there are long alignment problems, these */
31/* will have to be rewritten */
32
33#define pkt_time_ws(packet) (unsigned long *) \
34 (packet->dat+5+strlen(pkt_a_name(packet))+strlen(pkt_a_inst(packet)) \
35 +strlen(pkt_a_realm(packet)))
36#define pkt_no_req(packet) (unsigned short) \
37 *(packet->dat+9+strlen(pkt_a_name(packet))+ \
38 strlen(pkt_a_inst(packet))+strlen(pkt_a_realm(packet)))
39
40#define pkt_x_date(packet) (unsigned long *) \
41 (packet->dat+10+strlen(pkt_a_name(packet))+strlen(pkt_a_inst(packet)) \
42 +strlen(pkt_a_realm(packet)))
43
44#define pkt_err_code(packet) ( (unsigned long *) \
45 (packet->dat+9+strlen(pkt_a_name(packet))+strlen(pkt_a_inst(packet)) \
46 +strlen(pkt_a_realm(packet))))
47#define pkt_err_text(packet) \
48 (packet->dat+13+strlen(pkt_a_name(packet))+ \
49 strlen(pkt_a_inst(packet))+strlen(pkt_a_realm(packet)))
50
51/* Routines to create and read packets may be found in prot.c */
52
53struct ktext *create_packet_to_kdc();
54struct ktext *create_auth_reply();
55struct ktext *create_death_packet();
56struct ktext *pkt_cipher();
57
58/* Message types , always leave lsb for byte order */
59
60#define AUTH_MSG_KDC_REQUEST 1<<1
61#define AUTH_MSG_KDC_REPLY 2<<1
62#define AUTH_MSG_APPL_REQUEST 3<<1
63#define AUTH_MSG_APPL_REQUEST_MUTUAL 4<<1
64#define AUTH_MSG_ERR_REPLY 5<<1
65#define AUTH_MSG_PRIVATE 6<<1
66#define AUTH_MSG_SAFE 7<<1
67#define AUTH_MSG_APPL_ERR 8<<1
68#define AUTH_MSG_DIE 63<<1
69
70/* values for kerb error codes */
71#define KERB_ERR_OK 0
72#define KERB_ERR_NAME_EXP 1
73#define KERB_ERR_SERVICE_EXP 2
74#define KERB_ERR_AUTH_EXP 3
75#define KERB_ERR_PKT_VER 4
76#define KERB_ERR_NAME_MAST_KEY_VER 5
77#define KERB_ERR_SERV_MAST_KEY_VER 6
78#define KERB_ERR_BYTE_ORDER 7
79#define KERB_ERR_PRINCIPAL_UNKNOWN 8
80#define KERB_ERR_PRINCIPAL_NOT_UNIQUE 9
81#define KERB_ERR_NULL_KEY 10
82
83/* Byte ordering */
84static int ONE = 1;
85#define HOST_BYTE_ORDER (* (char *) &ONE)
86#define MSB_FIRST 0 /* 68000 */
87#define LSB_FIRST 1 /* Vax, PC8086 */
This page took 0.056014 seconds and 5 git commands to generate.