18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  linux/net/sunrpc/gss_rpc_upcall.h
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci *  Copyright (C) 2012 Simo Sorce <simo@redhat.com>
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef _GSS_RPC_UPCALL_H
98c2ecf20Sopenharmony_ci#define _GSS_RPC_UPCALL_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <linux/sunrpc/gss_api.h>
128c2ecf20Sopenharmony_ci#include <linux/sunrpc/auth_gss.h>
138c2ecf20Sopenharmony_ci#include "gss_rpc_xdr.h"
148c2ecf20Sopenharmony_ci#include "../netns.h"
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_cistruct gssp_upcall_data {
178c2ecf20Sopenharmony_ci	struct xdr_netobj in_handle;
188c2ecf20Sopenharmony_ci	struct gssp_in_token in_token;
198c2ecf20Sopenharmony_ci	struct xdr_netobj out_handle;
208c2ecf20Sopenharmony_ci	struct xdr_netobj out_token;
218c2ecf20Sopenharmony_ci	struct rpcsec_gss_oid mech_oid;
228c2ecf20Sopenharmony_ci	struct svc_cred creds;
238c2ecf20Sopenharmony_ci	int found_creds;
248c2ecf20Sopenharmony_ci	int major_status;
258c2ecf20Sopenharmony_ci	int minor_status;
268c2ecf20Sopenharmony_ci};
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciint gssp_accept_sec_context_upcall(struct net *net,
298c2ecf20Sopenharmony_ci				struct gssp_upcall_data *data);
308c2ecf20Sopenharmony_civoid gssp_free_upcall_data(struct gssp_upcall_data *data);
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_civoid init_gssp_clnt(struct sunrpc_net *);
338c2ecf20Sopenharmony_ciint set_gssp_clnt(struct net *);
348c2ecf20Sopenharmony_civoid clear_gssp_clnt(struct sunrpc_net *);
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci#endif /* _GSS_RPC_UPCALL_H */
37