Windows global stuff:
[krb5.git] / src / include / krb5 / hostaddr.h
1 /*
2  * include/krb5/hostaddr.h
3  *
4  * Copyright 1989,1991 by the Massachusetts Institute of Technology.
5  * All Rights Reserved.
6  *
7  * Export of this software from the United States of America may
8  *   require a specific license from the United States Government.
9  *   It is the responsibility of any person or organization contemplating
10  *   export to obtain such a license before exporting.
11  * 
12  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13  * distribute this software and its documentation for any purpose and
14  * without fee is hereby granted, provided that the above copyright
15  * notice appear in all copies and that both that copyright notice and
16  * this permission notice appear in supporting documentation, and that
17  * the name of M.I.T. not be used in advertising or publicity pertaining
18  * to distribution of the software without specific, written prior
19  * permission.  M.I.T. makes no representations about the suitability of
20  * this software for any purpose.  It is provided "as is" without express
21  * or implied warranty.
22  * 
23  *
24  * hostaddr definitions for Kerberos version 5.
25  */
26
27 #ifndef KRB5_HOSTADDR__
28 #define KRB5_HOSTADDR__
29
30 /* structure for address */
31 typedef struct _krb5_address {
32     krb5_magic magic;
33     krb5_addrtype addrtype;
34     int length;
35     krb5_octet FAR *contents;
36 } krb5_address;
37
38 /* per Kerberos v5 protocol spec */
39 #define ADDRTYPE_INET   0x0002
40 #define ADDRTYPE_CHAOS  0x0005
41 #define ADDRTYPE_XNS    0x0006
42 #define ADDRTYPE_ISO    0x0007
43 #define ADDRTYPE_DDP    0x0010
44 /* not yet in the spec... */
45 #define ADDRTYPE_ADDRPORT       0x0100
46 #define ADDRTYPE_IPPORT         0x0101
47
48 /* macros to determine if a type is a local type */
49 #define ADDRTYPE_IS_LOCAL(addrtype) (addrtype & 0x8000)
50
51 /* implementation-specific stuff: */
52 typedef struct _krb5_fulladdr {
53     krb5_address FAR *address;
54     unsigned long port;                 /* port, for some address types.
55                                            large enough for most protos? */
56 } krb5_fulladdr;
57
58 #endif /* KRB5_HOSTADDR__ */
59
60