xref: /illumos-gate/usr/src/uts/common/inet/ipf/netinet/ip_auth.h (revision dd72704bd9e794056c558153663c739e2012d721)
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 #ifndef	__IP_AUTH_H__
13 #define	__IP_AUTH_H__
14 
15 #define FR_NUMAUTH      32
16 
17 typedef struct  frauth {
18 	int	fra_age;
19 	int	fra_len;
20 	int	fra_index;
21 	u_32_t	fra_pass;
22 	fr_info_t	fra_info;
23 	char	*fra_buf;
24 #ifdef	MENTAT
25 	queue_t	*fra_q;
26 #endif
27 } frauth_t;
28 
29 typedef	struct	frauthent  {
30 	struct	frentry	fae_fr;
31 	struct	frauthent	*fae_next;
32 	u_long	fae_age;
33 	int	fae_ref;
34 } frauthent_t;
35 
36 typedef struct  fr_authstat {
37 	U_QUAD_T	fas_hits;
38 	U_QUAD_T	fas_miss;
39 	u_long		fas_nospace;
40 	u_long		fas_added;
41 	u_long		fas_sendfail;
42 	u_long		fas_sendok;
43 	u_long		fas_queok;
44 	u_long		fas_quefail;
45 	u_long		fas_expire;
46 	frauthent_t	*fas_faelist;
47 } fr_authstat_t;
48 
49 
50 extern	frentry_t *fr_checkauth __P((fr_info_t *, u_32_t *));
51 extern	void	fr_authexpire __P((ipf_stack_t *));
52 extern	int	fr_authinit __P((ipf_stack_t *));
53 extern	void	fr_authunload __P((ipf_stack_t *));
54 extern	int	fr_authflush __P((ipf_stack_t *));
55 extern	int	fr_newauth __P((mb_t *, fr_info_t *));
56 extern	int	fr_preauthcmd __P((ioctlcmd_t, frentry_t *, frentry_t **, ipf_stack_t *));
57 extern	int	fr_auth_ioctl __P((caddr_t, int, int, int, void *, ipf_stack_t *));
58 
59 #endif	/* __IP_AUTH_H__ */
60