Go to the documentation of this file.
34 #ifndef _LINUX_SUNRPC_GSS_ERR_H
35 #define _LINUX_SUNRPC_GSS_ERR_H
39 typedef unsigned int OM_uint32;
44 #define GSS_C_DELEG_FLAG 1
45 #define GSS_C_MUTUAL_FLAG 2
46 #define GSS_C_REPLAY_FLAG 4
47 #define GSS_C_SEQUENCE_FLAG 8
48 #define GSS_C_CONF_FLAG 16
49 #define GSS_C_INTEG_FLAG 32
50 #define GSS_C_ANON_FLAG 64
51 #define GSS_C_PROT_READY_FLAG 128
52 #define GSS_C_TRANS_FLAG 256
58 #define GSS_C_INITIATE 1
59 #define GSS_C_ACCEPT 2
64 #define GSS_C_GSS_CODE 1
65 #define GSS_C_MECH_CODE 2
72 #define GSS_C_INDEFINITE ((OM_uint32) 0xfffffffful)
77 #define GSS_S_COMPLETE 0
82 #define GSS_C_CALLING_ERROR_OFFSET 24
83 #define GSS_C_ROUTINE_ERROR_OFFSET 16
84 #define GSS_C_SUPPLEMENTARY_OFFSET 0
85 #define GSS_C_CALLING_ERROR_MASK ((OM_uint32) 0377ul)
86 #define GSS_C_ROUTINE_ERROR_MASK ((OM_uint32) 0377ul)
87 #define GSS_C_SUPPLEMENTARY_MASK ((OM_uint32) 0177777ul)
94 #define GSS_CALLING_ERROR(x) \
95 ((x) & (GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET))
96 #define GSS_ROUTINE_ERROR(x) \
97 ((x) & (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET))
98 #define GSS_SUPPLEMENTARY_INFO(x) \
99 ((x) & (GSS_C_SUPPLEMENTARY_MASK << GSS_C_SUPPLEMENTARY_OFFSET))
100 #define GSS_ERROR(x) \
101 ((x) & ((GSS_C_CALLING_ERROR_MASK << GSS_C_CALLING_ERROR_OFFSET) | \
102 (GSS_C_ROUTINE_ERROR_MASK << GSS_C_ROUTINE_ERROR_OFFSET)))
111 #define GSS_S_CALL_INACCESSIBLE_READ \
112 (((OM_uint32) 1ul) << GSS_C_CALLING_ERROR_OFFSET)
113 #define GSS_S_CALL_INACCESSIBLE_WRITE \
114 (((OM_uint32) 2ul) << GSS_C_CALLING_ERROR_OFFSET)
115 #define GSS_S_CALL_BAD_STRUCTURE \
116 (((OM_uint32) 3ul) << GSS_C_CALLING_ERROR_OFFSET)
121 #define GSS_S_BAD_MECH (((OM_uint32) 1ul) << GSS_C_ROUTINE_ERROR_OFFSET)
122 #define GSS_S_BAD_NAME (((OM_uint32) 2ul) << GSS_C_ROUTINE_ERROR_OFFSET)
123 #define GSS_S_BAD_NAMETYPE (((OM_uint32) 3ul) << GSS_C_ROUTINE_ERROR_OFFSET)
124 #define GSS_S_BAD_BINDINGS (((OM_uint32) 4ul) << GSS_C_ROUTINE_ERROR_OFFSET)
125 #define GSS_S_BAD_STATUS (((OM_uint32) 5ul) << GSS_C_ROUTINE_ERROR_OFFSET)
126 #define GSS_S_BAD_SIG (((OM_uint32) 6ul) << GSS_C_ROUTINE_ERROR_OFFSET)
127 #define GSS_S_NO_CRED (((OM_uint32) 7ul) << GSS_C_ROUTINE_ERROR_OFFSET)
128 #define GSS_S_NO_CONTEXT (((OM_uint32) 8ul) << GSS_C_ROUTINE_ERROR_OFFSET)
129 #define GSS_S_DEFECTIVE_TOKEN (((OM_uint32) 9ul) << GSS_C_ROUTINE_ERROR_OFFSET)
130 #define GSS_S_DEFECTIVE_CREDENTIAL \
131 (((OM_uint32) 10ul) << GSS_C_ROUTINE_ERROR_OFFSET)
132 #define GSS_S_CREDENTIALS_EXPIRED \
133 (((OM_uint32) 11ul) << GSS_C_ROUTINE_ERROR_OFFSET)
134 #define GSS_S_CONTEXT_EXPIRED \
135 (((OM_uint32) 12ul) << GSS_C_ROUTINE_ERROR_OFFSET)
136 #define GSS_S_FAILURE (((OM_uint32) 13ul) << GSS_C_ROUTINE_ERROR_OFFSET)
137 #define GSS_S_BAD_QOP (((OM_uint32) 14ul) << GSS_C_ROUTINE_ERROR_OFFSET)
138 #define GSS_S_UNAUTHORIZED (((OM_uint32) 15ul) << GSS_C_ROUTINE_ERROR_OFFSET)
139 #define GSS_S_UNAVAILABLE (((OM_uint32) 16ul) << GSS_C_ROUTINE_ERROR_OFFSET)
140 #define GSS_S_DUPLICATE_ELEMENT \
141 (((OM_uint32) 17ul) << GSS_C_ROUTINE_ERROR_OFFSET)
142 #define GSS_S_NAME_NOT_MN \
143 (((OM_uint32) 18ul) << GSS_C_ROUTINE_ERROR_OFFSET)
148 #define GSS_S_CONTINUE_NEEDED (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 0))
149 #define GSS_S_DUPLICATE_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 1))
150 #define GSS_S_OLD_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 2))
151 #define GSS_S_UNSEQ_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 3))
152 #define GSS_S_GAP_TOKEN (1 << (GSS_C_SUPPLEMENTARY_OFFSET + 4))
156 #define GSS_CALLING_ERROR_FIELD(x) \
157 (((x) >> GSS_C_CALLING_ERROR_OFFSET) & GSS_C_CALLING_ERROR_MASK)
158 #define GSS_ROUTINE_ERROR_FIELD(x) \
159 (((x) >> GSS_C_ROUTINE_ERROR_OFFSET) & GSS_C_ROUTINE_ERROR_MASK)
160 #define GSS_SUPPLEMENTARY_INFO_FIELD(x) \
161 (((x) >> GSS_C_SUPPLEMENTARY_OFFSET) & GSS_C_SUPPLEMENTARY_MASK)
164 #define GSS_S_CRED_UNAVAIL GSS_S_FAILURE