securproto.h revision 17ca54c3
1/*
2Copyright 1996, 1998  The Open Group
3
4Permission to use, copy, modify, distribute, and sell this software and its
5documentation for any purpose is hereby granted without fee, provided that
6the above copyright notice appear in all copies and that both that
7copyright notice and this permission notice appear in supporting
8documentation.
9
10The above copyright notice and this permission notice shall be included
11in all copies or substantial portions of the Software.
12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
14OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
15MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
16IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
17OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
18ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
19OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall
22not be used in advertising or otherwise to promote the sale, use or
23other dealings in this Software without prior written authorization
24from The Open Group.
25*/
26
27#ifndef _SECURPROTO_H
28#define _SECURPROTO_H
29
30#include <X11/extensions/secur.h>
31
32#define X_SecurityQueryVersion		0
33#define X_SecurityGenerateAuthorization 1
34#define X_SecurityRevokeAuthorization   2
35
36typedef struct {
37    CARD8       reqType;
38    CARD8       securityReqType;
39    CARD16      length B16;
40    CARD16      majorVersion B16;
41    CARD16      minorVersion B16;
42} xSecurityQueryVersionReq;
43#define sz_xSecurityQueryVersionReq 	8
44
45typedef struct {
46    CARD8   type;
47    CARD8   pad0;
48    CARD16  sequenceNumber B16;
49    CARD32  length	 B32;
50    CARD16  majorVersion B16;
51    CARD16  minorVersion B16;
52    CARD32  pad1	 B32;
53    CARD32  pad2	 B32;
54    CARD32  pad3	 B32;
55    CARD32  pad4	 B32;
56    CARD32  pad5	 B32;
57 } xSecurityQueryVersionReply;
58#define sz_xSecurityQueryVersionReply  	32
59
60typedef struct {
61    CARD8       reqType;
62    CARD8       securityReqType;
63    CARD16      length B16;
64    CARD16	nbytesAuthProto B16;
65    CARD16	nbytesAuthData B16;
66    CARD32	valueMask B32;
67    /* auth protocol name padded to 4 bytes */
68    /* auth protocol data padded to 4 bytes */
69    /* list of CARD32 values, if any */
70} xSecurityGenerateAuthorizationReq;
71#define sz_xSecurityGenerateAuthorizationReq 12
72
73typedef struct {
74    CARD8   type;
75    CARD8   pad0;
76    CARD16  sequenceNumber B16;
77    CARD32  length	 B32;
78    CARD32  authId	 B32;
79    CARD16  dataLength   B16;
80    CARD16  pad1	 B16;
81    CARD32  pad2	 B32;
82    CARD32  pad3	 B32;
83    CARD32  pad4	 B32;
84    CARD32  pad5	 B32;
85 } xSecurityGenerateAuthorizationReply;
86#define sz_xSecurityGenerateAuthorizationReply  	32
87
88typedef struct {
89    CARD8       reqType;
90    CARD8       securityReqType;
91    CARD16      length B16;
92    CARD32	authId B32;
93} xSecurityRevokeAuthorizationReq;
94#define sz_xSecurityRevokeAuthorizationReq 8
95
96typedef struct _xSecurityAuthorizationRevokedEvent {
97    BYTE	type;
98    BYTE	detail;
99    CARD16	sequenceNumber B16;
100    CARD32	authId B32;
101    CARD32	pad0	 B32;
102    CARD32	pad1	 B32;
103    CARD32	pad2	 B32;
104    CARD32	pad3	 B32;
105    CARD32	pad4	 B32;
106    CARD32	pad5	 B32;
107} xSecurityAuthorizationRevokedEvent;
108#define sz_xSecurityAuthorizationRevokedEvent 32
109
110#endif /* _SECURPROTO_H */
111