ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/ermyth/include/sasl.h
Revision: 1.1
Committed: Thu Jul 19 08:24:50 2007 UTC (19 years, 3 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Log Message:
initial import. the most important changes since Atheme are:
- fixed many memory leaks
- fixed many bugs
- converted to C++ and use more STL containers
- added a (not very enhanced yet) perl module
- greatly improved XML-RPC speed
- added a JSON-RPC module with code from json-cpp
- added a valgrind memcheck module to operserv
- added a more object oriented base64 implementation
- added a specialised unit test framework
- improved stability
- use gettimeofday() if available
- reworked adding/removing commands
- MemoServ IGNORE DEL can now remove indices

File Contents

# User Rev Content
1 pippijn 1.1 /*
2     * Copyright © 2006 Atheme Development Group
3     * Rights to this code are as documented in doc/LICENSE.
4     *
5     * Data structures for SASL plugin use.
6     *
7     * $Id: sasl.h 8243 2007-05-10 20:18:42Z jilles $
8     */
9    
10     #ifndef SASL_H
11     #define SASL_H
12    
13     struct sasl_mechanism_t;
14    
15     struct sasl_session_t
16     {
17     char uid[IDLEN];
18     char *buf, *p;
19     int len, flags;
20    
21     sasl_mechanism_t *mechptr;
22     void *mechdata;
23    
24     char *username;
25     };
26    
27     struct sasl_message_t
28     {
29     char *uid;
30     char mode;
31     char *buf;
32     };
33    
34     struct sasl_mechanism_t
35     {
36     char name[21];
37     int (*mech_start) (sasl_session_t *sptr, char **buffer, int *buflen);
38     int (*mech_step) (sasl_session_t *sptr, char *message, int length, char **buffer, int *buflen);
39     void (*mech_finish) (sasl_session_t *sptr);
40     };
41    
42     #define ASASL_FAIL 0 /* client supplied invalid credentials / screwed up their formatting */
43     #define ASASL_MORE 1 /* everything looks good so far, but we're not done yet */
44     #define ASASL_DONE 2 /* client successfully authenticated */
45    
46     #define ASASL_MARKED_FOR_DELETION 1 /* see delete_stale() in saslserv/main.c */
47     #define ASASL_NEED_LOG 2 /* user auth success needs to be logged still */
48    
49     #endif