1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef _LINUX_SUNRPC_AUTH_GSS_H
14 #define _LINUX_SUNRPC_AUTH_GSS_H
15
16 #ifdef __KERNEL__
17 #include <linux/refcount.h>
18 #include <linux/sunrpc/auth.h>
19 #include <linux/sunrpc/svc.h>
20 #include <linux/sunrpc/gss_api.h>
21
22 #define RPC_GSS_VERSION 1
23
24 #define MAXSEQ 0x80000000
25
26 enum rpc_gss_proc {
27 RPC_GSS_PROC_DATA = 0,
28 RPC_GSS_PROC_INIT = 1,
29 RPC_GSS_PROC_CONTINUE_INIT = 2,
30 RPC_GSS_PROC_DESTROY = 3
31 };
32
33 enum rpc_gss_svc {
34 RPC_GSS_SVC_NONE = 1,
35 RPC_GSS_SVC_INTEGRITY = 2,
36 RPC_GSS_SVC_PRIVACY = 3
37 };
38
39
40 struct rpc_gss_wire_cred {
41 u32 gc_v;
42 u32 gc_proc;
43 u32 gc_seq;
44 u32 gc_svc;
45 struct xdr_netobj gc_ctx;
46 };
47
48
49 struct rpc_gss_wire_verf {
50 u32 gv_flavor;
51 struct xdr_netobj gv_verf;
52 };
53
54
55 struct rpc_gss_init_res {
56 struct xdr_netobj gr_ctx;
57 u32 gr_major;
58 u32 gr_minor;
59 u32 gr_win;
60 struct xdr_netobj gr_token;
61 };
62
63
64
65
66
67
68
69 struct gss_cl_ctx {
70 refcount_t count;
71 enum rpc_gss_proc gc_proc;
72 u32 gc_seq;
73 u32 gc_seq_xmit;
74 spinlock_t gc_seq_lock;
75 struct gss_ctx *gc_gss_ctx;
76 struct xdr_netobj gc_wire_ctx;
77 struct xdr_netobj gc_acceptor;
78 u32 gc_win;
79 unsigned long gc_expiry;
80 struct rcu_head gc_rcu;
81 };
82
83 struct gss_upcall_msg;
84 struct gss_cred {
85 struct rpc_cred gc_base;
86 enum rpc_gss_svc gc_service;
87 struct gss_cl_ctx __rcu *gc_ctx;
88 struct gss_upcall_msg *gc_upcall;
89 const char *gc_principal;
90 unsigned long gc_upcall_timestamp;
91 };
92
93 #endif
94 #endif
95