1145522Sdarrenr/*	$FreeBSD$	*/
2145522Sdarrenr
353642Sguido/*
480482Sdarrenr * Copyright (C) 1997-2001 by Darren Reed & Guido Van Rooij.
553642Sguido *
680482Sdarrenr * See the IPFILTER.LICENCE file for details on licencing.
753642Sguido *
857126Sguido * $FreeBSD$
9161356Sguido * Id: ip_auth.h,v 2.16.2.2 2006/03/16 06:45:49 darrenr Exp $
1053642Sguido *
1153642Sguido */
1253642Sguido#ifndef	__IP_AUTH_H__
1353642Sguido#define	__IP_AUTH_H__
1453642Sguido
1553642Sguido#define FR_NUMAUTH      32
1653642Sguido
1753642Sguidotypedef struct  frauth {
1853642Sguido	int	fra_age;
19145522Sdarrenr	int	fra_len;
2053642Sguido	int	fra_index;
2153642Sguido	u_32_t	fra_pass;
2253642Sguido	fr_info_t	fra_info;
23145522Sdarrenr	char	*fra_buf;
24145522Sdarrenr#ifdef	MENTAT
2553642Sguido	queue_t	*fra_q;
26161356Sguido	mb_t	*fra_m;
2753642Sguido#endif
2853642Sguido} frauth_t;
2953642Sguido
3053642Sguidotypedef	struct	frauthent  {
3153642Sguido	struct	frentry	fae_fr;
3253642Sguido	struct	frauthent	*fae_next;
33170268Sdarrenr	struct	frauthent	**fae_pnext;
3453642Sguido	u_long	fae_age;
35170268Sdarrenr	int	fae_ref;
3653642Sguido} frauthent_t;
3753642Sguido
3853642Sguidotypedef struct  fr_authstat {
3953642Sguido	U_QUAD_T	fas_hits;
4053642Sguido	U_QUAD_T	fas_miss;
4153642Sguido	u_long		fas_nospace;
4253642Sguido	u_long		fas_added;
4353642Sguido	u_long		fas_sendfail;
4453642Sguido	u_long		fas_sendok;
4553642Sguido	u_long		fas_queok;
4653642Sguido	u_long		fas_quefail;
4753642Sguido	u_long		fas_expire;
4853642Sguido	frauthent_t	*fas_faelist;
4953642Sguido} fr_authstat_t;
5053642Sguido
5153642Sguido
5253642Sguidoextern	frentry_t	*ipauth;
5353642Sguidoextern	struct fr_authstat	fr_authstats;
5453642Sguidoextern	int	fr_defaultauthage;
55145522Sdarrenrextern	int	fr_authstart;
56145522Sdarrenrextern	int	fr_authend;
5753642Sguidoextern	int	fr_authsize;
5853642Sguidoextern	int	fr_authused;
5960850Sdarrenrextern	int	fr_auth_lock;
60145522Sdarrenrextern	frentry_t *fr_checkauth __P((fr_info_t *, u_32_t *));
6153642Sguidoextern	void	fr_authexpire __P((void));
62145522Sdarrenrextern	int	fr_authinit __P((void));
6353642Sguidoextern	void	fr_authunload __P((void));
64145522Sdarrenrextern	int	fr_authflush __P((void));
65145522Sdarrenrextern	mb_t	**fr_authpkts;
66145522Sdarrenrextern	int	fr_newauth __P((mb_t *, fr_info_t *));
67145522Sdarrenrextern	int	fr_preauthcmd __P((ioctlcmd_t, frentry_t *, frentry_t **));
68170268Sdarrenrextern	int	fr_auth_ioctl __P((caddr_t, ioctlcmd_t, int, int, void *));
69161356Sguidoextern	int	fr_auth_waiting __P((void));
70145522Sdarrenr
7153642Sguido#endif	/* __IP_AUTH_H__ */
72