xref: /illumos-gate/usr/src/uts/common/inet/ipf/netinet/ip_auth.h (revision 002c70ff32f5df6f93c15f88d351ce26443e6ee7)
1 /*
2  * Copyright (C) 1997-2001 by Darren Reed & Guido Van Rooij.
3  *
4  * See the IPFILTER.LICENCE file for details on licencing.
5  *
6  * $Id: ip_auth.h,v 2.16 2003/07/25 12:29:56 darrenr Exp $
7  *
8  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
9  * Use is subject to license terms.
10  */
11 
12 #pragma ident	"%Z%%M%	%I%	%E% SMI"
13 
14 #ifndef	__IP_AUTH_H__
15 #define	__IP_AUTH_H__
16 
17 #define FR_NUMAUTH      32
18 
19 typedef struct  frauth {
20 	int	fra_age;
21 	int	fra_len;
22 	int	fra_index;
23 	u_32_t	fra_pass;
24 	fr_info_t	fra_info;
25 	char	*fra_buf;
26 #ifdef	MENTAT
27 	queue_t	*fra_q;
28 #endif
29 } frauth_t;
30 
31 typedef	struct	frauthent  {
32 	struct	frentry	fae_fr;
33 	struct	frauthent	*fae_next;
34 	u_long	fae_age;
35 	int	fae_ref;
36 } frauthent_t;
37 
38 typedef struct  fr_authstat {
39 	U_QUAD_T	fas_hits;
40 	U_QUAD_T	fas_miss;
41 	u_long		fas_nospace;
42 	u_long		fas_added;
43 	u_long		fas_sendfail;
44 	u_long		fas_sendok;
45 	u_long		fas_queok;
46 	u_long		fas_quefail;
47 	u_long		fas_expire;
48 	frauthent_t	*fas_faelist;
49 } fr_authstat_t;
50 
51 
52 extern	frentry_t *fr_checkauth __P((fr_info_t *, u_32_t *));
53 extern	void	fr_authexpire __P((ipf_stack_t *));
54 extern	int	fr_authinit __P((ipf_stack_t *));
55 extern	void	fr_authunload __P((ipf_stack_t *));
56 extern	int	fr_authflush __P((ipf_stack_t *));
57 extern	int	fr_newauth __P((mb_t *, fr_info_t *));
58 extern	int	fr_preauthcmd __P((ioctlcmd_t, frentry_t *, frentry_t **, ipf_stack_t *));
59 extern	int	fr_auth_ioctl __P((caddr_t, int, int, int, void *, ipf_stack_t *));
60 
61 #endif	/* __IP_AUTH_H__ */
62