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 */ 9 #ifndef __IP_AUTH_H__ 10 #define __IP_AUTH_H__ 11 12 #define FR_NUMAUTH 32 13 14 typedef struct frauth { 15 int fra_age; 16 int fra_len; 17 int fra_index; 18 u_32_t fra_pass; 19 fr_info_t fra_info; 20 char *fra_buf; 21 #ifdef MENTAT 22 queue_t *fra_q; 23 #endif 24 } frauth_t; 25 26 typedef struct frauthent { 27 struct frentry fae_fr; 28 struct frauthent *fae_next; 29 u_long fae_age; 30 } frauthent_t; 31 32 typedef struct fr_authstat { 33 U_QUAD_T fas_hits; 34 U_QUAD_T fas_miss; 35 u_long fas_nospace; 36 u_long fas_added; 37 u_long fas_sendfail; 38 u_long fas_sendok; 39 u_long fas_queok; 40 u_long fas_quefail; 41 u_long fas_expire; 42 frauthent_t *fas_faelist; 43 } fr_authstat_t; 44 45 46 extern frentry_t *ipauth; 47 extern struct fr_authstat fr_authstats; 48 extern int fr_defaultauthage; 49 extern int fr_authstart; 50 extern int fr_authend; 51 extern int fr_authsize; 52 extern int fr_authused; 53 extern int fr_auth_lock; 54 extern frentry_t *fr_checkauth __P((fr_info_t *, u_32_t *)); 55 extern void fr_authexpire __P((void)); 56 extern int fr_authinit __P((void)); 57 extern void fr_authunload __P((void)); 58 extern int fr_authflush __P((void)); 59 extern mb_t **fr_authpkts; 60 extern int fr_newauth __P((mb_t *, fr_info_t *)); 61 extern int fr_preauthcmd __P((ioctlcmd_t, frentry_t *, frentry_t **)); 62 extern int fr_auth_ioctl __P((caddr_t, ioctlcmd_t, int)); 63 64 #endif /* __IP_AUTH_H__ */ 65