ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/include/sasl.h
Revision: 1.3
Committed: Tue Aug 28 17:08:07 2007 UTC (16 years, 9 months ago) by pippijn
Content type: text/plain
Branch: MAIN
Changes since 1.2: +14 -6 lines
Log Message:
- changed name
- updated the example config to the new system
- added more documentation
- enhanced documentation generators
- added a link to the pdf to the website
- added an RSS feed generator
- transitioned hooks to c++ callbacks
- did various merges with upstream along the way
- added const where appropriate
- removed the old block allocator
- fixed most memory leaks
- transitioned some dictionaries to std::map
- transitioned some lists to std::vector
- made some free functions members where appropriate
- renamed string to dynstr and added a static string ststr
- use NOW instead of time (NULL) if possible
- completely reworked database backends, crypto handlers and protocol handlers
  to use an object factory
- removed the old module system. ermyth does not do any dynamic loading anymore
- fixed most of the build system
- reworked how protocol commands work

File Contents

# Content
1 /*
2 * Copyright © 2006 Atheme Development Group
3 * Rights to this code are as documented in doc/pod/license.pod.
4 *
5 * Data structures for SASL plugin use.
6 *
7 * $Id: sasl.h,v 1.2 2007-07-21 01:29:07 pippijn Exp $
8 */
9
10 #ifndef SASL_H
11 #define SASL_H
12
13 struct sasl_mechanism_t;
14
15 struct sasl_session_t : zero_initialised
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 : zero_initialised
28 {
29 char *uid;
30 char mode;
31 char *buf;
32 };
33
34 struct sasl_mechanism_t : zero_initialised
35 {
36 char const *name;
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 sasl_mechanism_t (char const * const mechname,
42 int (*start) (sasl_session_t *sptr, char **buffer, int *buflen),
43 int (*step) (sasl_session_t *sptr, char *message, int length, char **buffer, int *buflen),
44 void (*finish) (sasl_session_t *sptr))
45 : name (mechname), mech_start (start), mech_step (step), mech_finish (finish)
46 {
47 }
48 };
49
50 #define ASASL_FAIL 0 /* client supplied invalid credentials / screwed up their formatting */
51 #define ASASL_MORE 1 /* everything looks good so far, but we're not done yet */
52 #define ASASL_DONE 2 /* client successfully authenticated */
53
54 #define ASASL_MARKED_FOR_DELETION 1 /* see delete_stale() in saslserv/main.c */
55 #define ASASL_NEED_LOG 2 /* user auth success needs to be logged still */
56
57 #endif