ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/auth.h
(Generate patch)

Comparing:
ircd-hybrid/include/s_auth.h (file contents), Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
ircd-hybrid/trunk/include/auth.h (file contents), Revision 3324 by michael, Tue Apr 15 16:18:07 2014 UTC

# Line 1 | Line 1
1   /*
2 < *  ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 < *  s_auth.h: A header for the ident functions.
2 > *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3   *
4 < *  Copyright (C) 2002 by the past and present ircd coders, and others.
4 > *  Copyright (c) 1997-2014 ircd-hybrid development team
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 18 | Line 17
17   *  along with this program; if not, write to the Free Software
18   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
19   *  USA
21 *
22 *  $Id$
20   */
21  
22 < #ifndef INCLUDED_s_auth_h
23 < #define INCLUDED_s_auth_h
24 <
28 < #include "irc_res.h"
29 < #include "hook.h"
30 <
31 < /* How many auth allocations to allocate in a block. I'm guessing that
32 < * a good number here is 64, because these are temporary and don't live
33 < * as long as clients do.
34 < *     -- adrian
22 > /*! \file auth.h
23 > * \brief A header for the ident functions.
24 > * \version $Id$
25   */
36 #define AUTH_BLOCK_SIZE 64
26  
27 < struct Client;
27 > #ifndef INCLUDED_s_auth_h
28 > #define INCLUDED_s_auth_h
29  
30 < struct AuthRequest
30 > enum
31   {
32 <  dlink_node          dns_node;  /* auth_doing_dns_list */
33 <  dlink_node          ident_node; /* auth_doing_ident_list */
34 <  int                 flags;
45 <  struct Client*      client;    /* pointer to client struct for request */
46 <  fde_t               fd;        /* file descriptor for auth queries */
47 <  time_t              timeout;   /* time when query expires */
48 <  unsigned int        ip6_int;
32 >  AM_IN_AUTH     = 1 << 0,
33 >  AM_DOING_AUTH  = 1 << 1,
34 >  AM_DNS_PENDING = 1 << 2
35   };
36  
37 < /*
38 < * flag values for AuthRequest
39 < * NAMESPACE: AM_xxx - Authentication Module
54 < */
55 < #define AM_DOING_AUTH        1
56 < #define AM_DNS_PENDING       2
57 < #define CRIT_REGION          4
37 > #define SetInAuth(x)         ((x)->flags |= AM_IN_AUTH)
38 > #define ClearInAuth(x)       ((x)->flags &= ~AM_IN_AUTH)
39 > #define IsInAuth(x)          ((x)->flags &  AM_IN_AUTH)
40  
41   #define SetDNSPending(x)     ((x)->flags |= AM_DNS_PENDING)
42   #define ClearDNSPending(x)   ((x)->flags &= ~AM_DNS_PENDING)
# Line 64 | Line 46 | struct AuthRequest
46   #define ClearAuth(x)         ((x)->flags &= ~AM_DOING_AUTH)
47   #define IsDoingAuth(x)       ((x)->flags &  AM_DOING_AUTH)
48  
49 < #define IsCrit(x)            ((x)->flags & CRIT_REGION)
68 < #define SetCrit(x)           ((x)->flags |= CRIT_REGION)
69 < #define ClearCrit(x)         ((x)->flags &= ~CRIT_REGION)
49 > struct Client;
50  
51 < extern struct Callback *auth_cb;
51 > struct AuthRequest
52 > {
53 >  dlink_node     node;  /* auth_doing_list */
54 >  unsigned int   flags;
55 >  struct Client *client;    /* pointer to client struct for request */
56 >  fde_t          fd;        /* file descriptor for auth queries */
57 >  time_t         timeout;   /* time when query expires */
58 > };
59  
60 + extern void auth_init(void);
61 + extern void start_auth(struct Client *);
62   extern void send_auth_query(struct AuthRequest *);
63   extern void remove_auth_request(struct AuthRequest *);
64 < extern struct AuthRequest *FindAuthClient(long);
65 < extern void init_auth(void);
77 < extern void delete_auth(struct Client *);
78 < extern void release_auth_client(struct Client *);
79 <
64 > extern void delete_auth(struct AuthRequest *);
65 > extern void release_auth_client(struct AuthRequest *);
66   #endif /* INCLUDED_s_auth_h */

Comparing:
ircd-hybrid/include/s_auth.h (property svn:keywords), Revision 32 by knight, Sun Oct 2 20:41:23 2005 UTC vs.
ircd-hybrid/trunk/include/auth.h (property svn:keywords), Revision 3324 by michael, Tue Apr 15 16:18:07 2014 UTC

# Line 1 | Line 1
1 < Revision
1 > Id Revision

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)