]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - sys/contrib/ipfilter/netinet/ip_auth.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / sys / contrib / ipfilter / netinet / ip_auth.h
1 /*      $FreeBSD$       */
2
3 /*
4  * Copyright (C) 2012 by Darren Reed.
5  *
6  * See the IPFILTER.LICENCE file for details on licencing.
7  *
8  * $FreeBSD$
9  * Id: ip_auth.h,v 2.16.2.2 2006/03/16 06:45:49 darrenr Exp $
10  *
11  */
12 #ifndef __IP_AUTH_H__
13 #define __IP_AUTH_H__
14
15 #define FR_NUMAUTH      32
16
17 typedef struct  frauth {
18         int     fra_age;
19         int     fra_len;
20         int     fra_index;
21         u_32_t  fra_pass;
22         fr_info_t       fra_info;
23         char    *fra_buf;
24         u_32_t  fra_flx;
25 #ifdef  MENTAT
26         queue_t *fra_q;
27         mb_t    *fra_m;
28 #endif
29 } frauth_t;
30
31 typedef struct  frauthent  {
32         struct  frentry fae_fr;
33         struct  frauthent       *fae_next;
34         struct  frauthent       **fae_pnext;
35         u_long  fae_age;
36         int     fae_ref;
37 } frauthent_t;
38
39 typedef struct  ipf_authstat {
40         U_QUAD_T        fas_hits;
41         U_QUAD_T        fas_miss;
42         u_long          fas_nospace;
43         u_long          fas_added;
44         u_long          fas_sendfail;
45         u_long          fas_sendok;
46         u_long          fas_queok;
47         u_long          fas_quefail;
48         u_long          fas_expire;
49         frauthent_t     *fas_faelist;
50 } ipf_authstat_t;
51
52
53 extern  frentry_t *ipf_auth_check __P((fr_info_t *, u_32_t *));
54 extern  void    ipf_auth_expire __P((ipf_main_softc_t *));
55 extern  int     ipf_auth_ioctl __P((ipf_main_softc_t *, caddr_t, ioctlcmd_t,
56                                     int, int, void *));
57 extern  int     ipf_auth_init __P((void));
58 extern  int     ipf_auth_main_load __P((void));
59 extern  int     ipf_auth_main_unload __P((void));
60 extern  void    ipf_auth_soft_destroy __P((ipf_main_softc_t *, void *));
61 extern  void    *ipf_auth_soft_create __P((ipf_main_softc_t *));
62 extern  int     ipf_auth_new __P((mb_t *, fr_info_t *));
63 extern  int     ipf_auth_precmd __P((ipf_main_softc_t *, ioctlcmd_t,
64                                      frentry_t *, frentry_t **));
65 extern  void    ipf_auth_unload __P((ipf_main_softc_t *));
66 extern  int     ipf_auth_waiting __P((ipf_main_softc_t *));
67 extern  void    ipf_auth_setlock __P((void *, int));
68 extern  int     ipf_auth_soft_init __P((ipf_main_softc_t *, void *));
69 extern  int     ipf_auth_soft_fini __P((ipf_main_softc_t *, void *));
70 extern  u_32_t  ipf_auth_pre_scanlist __P((ipf_main_softc_t *, fr_info_t *,
71                                            u_32_t));
72 extern  frentry_t **ipf_auth_rulehead __P((ipf_main_softc_t *));
73
74 #endif  /* __IP_AUTH_H__ */