Home | History | Annotate | Line # | Download | only in netinet
ip_auth.h revision 1.1.1.1
      1 /*	$NetBSD: ip_auth.h,v 1.1.1.1 2012/03/23 20:36:52 christos Exp $	*/
      2 
      3 /*
      4  * Copyright (C) 2008 by Darren Reed.
      5  *
      6  * See the IPFILTER.LICENCE file for details on licencing.
      7  *
      8  * Id
      9  *
     10  */
     11 #ifndef	__IP_AUTH_H__
     12 #define	__IP_AUTH_H__
     13 
     14 #define FR_NUMAUTH      32
     15 
     16 typedef struct  frauth {
     17 	int	fra_age;
     18 	int	fra_len;
     19 	int	fra_index;
     20 	u_32_t	fra_pass;
     21 	fr_info_t	fra_info;
     22 	char	*fra_buf;
     23 	u_32_t	fra_flx;
     24 #ifdef	MENTAT
     25 	queue_t	*fra_q;
     26 	mb_t	*fra_m;
     27 #endif
     28 } frauth_t;
     29 
     30 typedef	struct	frauthent  {
     31 	struct	frentry	fae_fr;
     32 	struct	frauthent	*fae_next;
     33 	struct	frauthent	**fae_pnext;
     34 	u_long	fae_age;
     35 	int	fae_ref;
     36 } frauthent_t;
     37 
     38 typedef struct  ipf_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 } ipf_authstat_t;
     50 
     51 
     52 extern	frentry_t *ipf_auth_check __P((fr_info_t *, u_32_t *));
     53 extern	void	ipf_auth_expire __P((ipf_main_softc_t *));
     54 extern	int	ipf_auth_ioctl __P((ipf_main_softc_t *, caddr_t, ioctlcmd_t,
     55 				    int, int, void *));
     56 extern	int	ipf_auth_init __P((void));
     57 extern	int	ipf_auth_main_load __P((void));
     58 extern	int	ipf_auth_main_unload __P((void));
     59 extern	void	ipf_auth_soft_destroy __P((ipf_main_softc_t *, void *));
     60 extern	void	*ipf_auth_soft_create __P((ipf_main_softc_t *));
     61 extern	int	ipf_auth_new __P((mb_t *, fr_info_t *));
     62 extern	int	ipf_auth_precmd __P((ipf_main_softc_t *, ioctlcmd_t,
     63 				     frentry_t *, frentry_t **));
     64 extern	void	ipf_auth_unload __P((ipf_main_softc_t *));
     65 extern	int	ipf_auth_waiting __P((ipf_main_softc_t *));
     66 extern	void	ipf_auth_setlock __P((void *, int));
     67 extern	int	ipf_auth_soft_init __P((ipf_main_softc_t *, void *));
     68 extern	int	ipf_auth_soft_fini __P((ipf_main_softc_t *, void *));
     69 extern	u_32_t	ipf_auth_pre_scanlist __P((ipf_main_softc_t *, fr_info_t *,
     70 					   u_32_t));
     71 extern	frentry_t **ipf_auth_rulehead __P((ipf_main_softc_t *));
     72 
     73 #endif	/* __IP_AUTH_H__ */
     74