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