xref: /freebsd/contrib/tcpdump/rpc_auth.h (revision ee67461e56828dd1f8de165947ba83f6d9148a87)
11de50e9fSSam Leffler /*
21de50e9fSSam Leffler  * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
31de50e9fSSam Leffler  * unrestricted use provided that this legend is included on all tape
41de50e9fSSam Leffler  * media and as a part of the software program in whole or part.  Users
51de50e9fSSam Leffler  * may copy or modify Sun RPC without charge, but are not authorized
61de50e9fSSam Leffler  * to license or distribute it to anyone else except as part of a product or
71de50e9fSSam Leffler  * program developed by the user.
81de50e9fSSam Leffler  *
91de50e9fSSam Leffler  * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
101de50e9fSSam Leffler  * WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
111de50e9fSSam Leffler  * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
121de50e9fSSam Leffler  *
131de50e9fSSam Leffler  * Sun RPC is provided with no support and without any obligation on the
141de50e9fSSam Leffler  * part of Sun Microsystems, Inc. to assist in its use, correction,
151de50e9fSSam Leffler  * modification or enhancement.
161de50e9fSSam Leffler  *
171de50e9fSSam Leffler  * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
181de50e9fSSam Leffler  * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
191de50e9fSSam Leffler  * OR ANY PART THEREOF.
201de50e9fSSam Leffler  *
211de50e9fSSam Leffler  * In no event will Sun Microsystems, Inc. be liable for any lost revenue
221de50e9fSSam Leffler  * or profits or other special, indirect and consequential damages, even if
231de50e9fSSam Leffler  * Sun has been advised of the possibility of such damages.
241de50e9fSSam Leffler  *
251de50e9fSSam Leffler  * Sun Microsystems, Inc.
261de50e9fSSam Leffler  * 2550 Garcia Avenue
271de50e9fSSam Leffler  * Mountain View, California  94043
281de50e9fSSam Leffler  *
291de50e9fSSam Leffler  *	from: @(#)auth.h 1.17 88/02/08 SMI
301de50e9fSSam Leffler  *	from: @(#)auth.h	2.3 88/08/07 4.0 RPCSRC
3171fe94fdSDimitry Andric  * $FreeBSD: projects/clang400-import/contrib/tcpdump/rpc_auth.h 276788 2015-01-07 19:55:18Z delphij $
321de50e9fSSam Leffler  */
331de50e9fSSam Leffler 
341de50e9fSSam Leffler /*
351de50e9fSSam Leffler  * auth.h, Authentication interface.
361de50e9fSSam Leffler  *
371de50e9fSSam Leffler  * Copyright (C) 1984, Sun Microsystems, Inc.
381de50e9fSSam Leffler  *
391de50e9fSSam Leffler  * The data structures are completely opaque to the client.  The client
401de50e9fSSam Leffler  * is required to pass a AUTH * to routines that create rpc
411de50e9fSSam Leffler  * "sessions".
421de50e9fSSam Leffler  */
431de50e9fSSam Leffler 
441de50e9fSSam Leffler /*
451de50e9fSSam Leffler  * Status returned from authentication check
461de50e9fSSam Leffler  */
471de50e9fSSam Leffler enum sunrpc_auth_stat {
481de50e9fSSam Leffler 	SUNRPC_AUTH_OK=0,
491de50e9fSSam Leffler 	/*
501de50e9fSSam Leffler 	 * failed at remote end
511de50e9fSSam Leffler 	 */
521de50e9fSSam Leffler 	SUNRPC_AUTH_BADCRED=1,		/* bogus credentials (seal broken) */
531de50e9fSSam Leffler 	SUNRPC_AUTH_REJECTEDCRED=2,	/* client should begin new session */
541de50e9fSSam Leffler 	SUNRPC_AUTH_BADVERF=3,		/* bogus verifier (seal broken) */
551de50e9fSSam Leffler 	SUNRPC_AUTH_REJECTEDVERF=4,	/* verifier expired or was replayed */
561de50e9fSSam Leffler 	SUNRPC_AUTH_TOOWEAK=5,		/* rejected due to security reasons */
571de50e9fSSam Leffler 	/*
581de50e9fSSam Leffler 	 * failed locally
591de50e9fSSam Leffler 	*/
601de50e9fSSam Leffler 	SUNRPC_AUTH_INVALIDRESP=6,	/* bogus response verifier */
611de50e9fSSam Leffler 	SUNRPC_AUTH_FAILED=7		/* some unknown reason */
621de50e9fSSam Leffler };
631de50e9fSSam Leffler 
641de50e9fSSam Leffler /*
651de50e9fSSam Leffler  * Authentication info.  Opaque to client.
661de50e9fSSam Leffler  */
671de50e9fSSam Leffler struct sunrpc_opaque_auth {
68*ee67461eSJoseph Mingrone 	nd_uint32_t oa_flavor;		/* flavor of auth */
69*ee67461eSJoseph Mingrone 	nd_uint32_t oa_len;		/* length of opaque body */
701de50e9fSSam Leffler 	/* zero or more bytes of body */
711de50e9fSSam Leffler };
72