1 /* $Xorg: Xauth.h,v 1.4 2001/02/09 02:03:42 xorgcvs Exp $ */
5 Copyright 1988, 1998 The Open Group
7 Permission to use, copy, modify, distribute, and sell this software and its
8 documentation for any purpose is hereby granted without fee, provided that
9 the above copyright notice appear in all copies and that both that
10 copyright notice and this permission notice appear in supporting
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 Except as contained in this notice, the name of The Open Group shall not be
24 used in advertising or otherwise to promote the sale, use or other dealings
25 in this Software without prior written authorization from The Open Group.
29 /* $XFree86: xc/lib/Xau/Xauth.h,v 1.5 2001/12/14 19:54:36 dawes Exp $ */
34 typedef struct xauth
{
35 unsigned short family
;
36 unsigned short address_length
;
38 unsigned short number_length
;
40 unsigned short name_length
;
42 unsigned short data_length
;
46 #ifndef _XAUTH_STRUCT_ONLY
48 # include <X11/Xfuncproto.h>
49 # include <X11/Xfuncs.h>
53 # define FamilyLocal (256) /* not part of X standard (i.e. X.h) */
54 # define FamilyWild (65535)
55 # define FamilyNetname (254) /* not part of X standard */
56 # define FamilyKrb5Principal (253) /* Kerberos 5 principal name */
57 # define FamilyLocalHost (252) /* for local non-net authentication */
62 char *XauFileName(void);
69 _Xconst
char* /* file_name */,
76 _Xconst
char* /* file_name */
80 FILE* /* auth_file */,
84 Xauth
*XauGetAuthByAddr(
85 #if NeedWidePrototypes
86 unsigned int /* family */,
87 unsigned int /* address_length */,
89 unsigned short /* family */,
90 unsigned short /* address_length */,
92 _Xconst
char* /* address */,
93 #if NeedWidePrototypes
94 unsigned int /* number_length */,
96 unsigned short /* number_length */,
98 _Xconst
char* /* number */,
99 #if NeedWidePrototypes
100 unsigned int /* name_length */,
102 unsigned short /* name_length */,
104 _Xconst
char* /* name */
107 Xauth
*XauGetBestAuthByAddr(
108 #if NeedWidePrototypes
109 unsigned int /* family */,
110 unsigned int /* address_length */,
112 unsigned short /* family */,
113 unsigned short /* address_length */,
115 _Xconst
char* /* address */,
116 #if NeedWidePrototypes
117 unsigned int /* number_length */,
119 unsigned short /* number_length */,
121 _Xconst
char* /* number */,
122 int /* types_length */,
123 char** /* type_names */,
124 _Xconst
int* /* type_lengths */
132 #include <krb5/krb5.h>
133 /* 9/93: krb5.h leaks some symbols */
138 krb5_principal
/* princ */,
139 krb5_data
* /* outbuf */
143 krb5_data
/* inbuf */,
144 krb5_principal
* /* princ */
150 /* Return values from XauLockAuth */
152 # define LOCK_SUCCESS 0 /* lock succeeded */
153 # define LOCK_ERROR 1 /* lock unexpectely failed, check errno */
154 # define LOCK_TIMEOUT 2 /* lock failed, timeouts expired */
156 #endif /* _XAUTH_STRUCT_ONLY */
158 #endif /* _Xauth_h */