Home | History | Annotate | Line # | Download | only in netinet
ip_auth.h revision 1.1.1.2
      1      1.1  christos /*	$NetBSD: ip_auth.h,v 1.1.1.2 2012/07/22 13:45:08 darrenr Exp $	*/
      2      1.1  christos 
      3      1.1  christos /*
      4  1.1.1.2   darrenr  * Copyright (C) 2012 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.1.1.2   darrenr  * $Id: ip_auth.h,v 1.1.1.2 2012/07/22 13:45:08 darrenr Exp $
      9      1.1  christos  *
     10      1.1  christos  */
     11      1.1  christos #ifndef	__IP_AUTH_H__
     12      1.1  christos #define	__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.1  christos extern	frentry_t *ipf_auth_check __P((fr_info_t *, u_32_t *));
     53      1.1  christos extern	void	ipf_auth_expire __P((ipf_main_softc_t *));
     54      1.1  christos extern	int	ipf_auth_ioctl __P((ipf_main_softc_t *, caddr_t, ioctlcmd_t,
     55      1.1  christos 				    int, int, void *));
     56      1.1  christos extern	int	ipf_auth_init __P((void));
     57      1.1  christos extern	int	ipf_auth_main_load __P((void));
     58      1.1  christos extern	int	ipf_auth_main_unload __P((void));
     59      1.1  christos extern	void	ipf_auth_soft_destroy __P((ipf_main_softc_t *, void *));
     60      1.1  christos extern	void	*ipf_auth_soft_create __P((ipf_main_softc_t *));
     61      1.1  christos extern	int	ipf_auth_new __P((mb_t *, fr_info_t *));
     62      1.1  christos extern	int	ipf_auth_precmd __P((ipf_main_softc_t *, ioctlcmd_t,
     63      1.1  christos 				     frentry_t *, frentry_t **));
     64      1.1  christos extern	void	ipf_auth_unload __P((ipf_main_softc_t *));
     65      1.1  christos extern	int	ipf_auth_waiting __P((ipf_main_softc_t *));
     66      1.1  christos extern	void	ipf_auth_setlock __P((void *, int));
     67      1.1  christos extern	int	ipf_auth_soft_init __P((ipf_main_softc_t *, void *));
     68      1.1  christos extern	int	ipf_auth_soft_fini __P((ipf_main_softc_t *, void *));
     69      1.1  christos extern	u_32_t	ipf_auth_pre_scanlist __P((ipf_main_softc_t *, fr_info_t *,
     70      1.1  christos 					   u_32_t));
     71      1.1  christos extern	frentry_t **ipf_auth_rulehead __P((ipf_main_softc_t *));
     72      1.1  christos 
     73      1.1  christos #endif	/* __IP_AUTH_H__ */
     74