aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-06 15:00:38 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-06 15:00:38 +0300
commit7f8de787946b883cc791bf6c0bcb514496caf074 (patch)
tree8c828243de051ba25ed3806d2a4fca9eaf3cae83 /src/main.h
parenta3c3fb96d13f2cbfc5ab984c1886441ec0e9b47b (diff)
downloadrspamd-7f8de787946b883cc791bf6c0bcb514496caf074.tar.gz
rspamd-7f8de787946b883cc791bf6c0bcb514496caf074.zip
* Make doxygen happy about structures members
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h159
1 files changed, 80 insertions, 79 deletions
diff --git a/src/main.h b/src/main.h
index 4bab0072d..10f9ef215 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,10 +1,11 @@
-#ifndef RSPAMD_MAIN_H
-#define RSPAMD_MAIN_H
-
/**
+ * @file main.h
* Definitions for main rspamd structures
*/
+#ifndef RSPAMD_MAIN_H
+#define RSPAMD_MAIN_H
+
#include "config.h"
#include <sys/types.h>
@@ -70,26 +71,26 @@ enum script_type {
* Logic expression
*/
struct expression {
- enum { EXPR_OPERAND, EXPR_OPERATION } type; /** < expression type */
+ enum { EXPR_OPERAND, EXPR_OPERATION } type; /**< expression type */
union {
void *operand;
char operation;
- } content; /** < union for storing operand or operation code */
- struct expression *next; /** < chain link */
+ } content; /**< union for storing operand or operation code */
+ struct expression *next; /**< chain link */
};
/**
* Worker process structure
*/
struct rspamd_worker {
- pid_t pid; /** < pid of worker */
- char is_initialized; /** < is initialized */
- char is_dying; /** < if worker is going to shutdown */
- struct rspamd_main *srv; /** < pointer to server structure */
- enum process_type type; /** < process type */
- struct event sig_ev; /** < signals event */
- struct event bind_ev; /** < socket events */
- TAILQ_ENTRY (rspamd_worker) next; /** < chain link to next worker */
+ pid_t pid; /**< pid of worker */
+ char is_initialized; /**< is initialized */
+ char is_dying; /**< if worker is going to shutdown */
+ struct rspamd_main *srv; /**< pointer to server structure */
+ enum process_type type; /**< process type */
+ struct event sig_ev; /**< signals event */
+ struct event bind_ev; /**< socket events */
+ TAILQ_ENTRY (rspamd_worker) next; /**< chain link to next worker */
};
struct pidfh;
@@ -102,73 +103,73 @@ struct mime_part;
* Server statistics
*/
struct rspamd_stat {
- unsigned int messages_scanned; /** < total number of messages scanned */
- unsigned int messages_spam; /** < messages treated as spam */
- unsigned int messages_ham; /** < messages treated as ham */
- unsigned int connections_count; /** < total connections count */
- unsigned int control_connections_count; /** < connections count to control interface */
- unsigned int messages_learned; /** < messages learned */
+ unsigned int messages_scanned; /**< total number of messages scanned */
+ unsigned int messages_spam; /**< messages treated as spam */
+ unsigned int messages_ham; /**< messages treated as ham */
+ unsigned int connections_count; /**< total connections count */
+ unsigned int control_connections_count; /**< connections count to control interface */
+ unsigned int messages_learned; /**< messages learned */
};
/**
* Struct that determine main server object (for logging purposes)
*/
struct rspamd_main {
- struct config_file *cfg; /** < pointer to config structure */
- pid_t pid; /** < main pid */
+ struct config_file *cfg; /**< pointer to config structure */
+ pid_t pid; /**< main pid */
/* Pid file structure */
- struct pidfh *pfh; /** < struct pidfh for pidfile */
- enum process_type type; /** < process type */
- unsigned int ev_initialized; /** < is event system is initialized */
- struct rspamd_stat *stat; /** < pointer to statistics */
+ struct pidfh *pfh; /**< struct pidfh for pidfile */
+ enum process_type type; /**< process type */
+ unsigned int ev_initialized; /**< is event system is initialized */
+ struct rspamd_stat *stat; /**< pointer to statistics */
- memory_pool_t *server_pool; /** < server's memory pool */
- statfile_pool_t *statfile_pool; /** < shared statfiles pool */
+ memory_pool_t *server_pool; /**< server's memory pool */
+ statfile_pool_t *statfile_pool; /**< shared statfiles pool */
- TAILQ_HEAD (workq, rspamd_worker) workers; /** < linked list of workers */
+ TAILQ_HEAD (workq, rspamd_worker) workers; /**< linked list of workers */
};
/**
* Save point object for delayed filters processing
*/
struct save_point {
- void *entry; /** < pointer to C function or perl function name */
- enum script_type type; /** < where we did stop */
- unsigned int saved; /** < how much time we have delayed processing */
+ void *entry; /**< pointer to C function or perl function name */
+ enum script_type type; /**< where we did stop */
+ unsigned int saved; /**< how much time we have delayed processing */
};
/**
* Control session object
*/
struct controller_session {
- struct rspamd_worker *worker; /** < pointer to worker structure (controller in fact) */
+ struct rspamd_worker *worker; /**< pointer to worker structure (controller in fact) */
enum {
STATE_COMMAND,
STATE_LEARN,
STATE_REPLY,
STATE_QUIT,
- } state; /** < current session state */
- int sock; /** < socket descriptor */
+ } state; /**< current session state */
+ int sock; /**< socket descriptor */
/* Access to authorized commands */
- int authorized; /** < whether this session is authorized */
- memory_pool_t *session_pool; /** < memory pool for session */
- struct bufferevent *bev; /** < buffered event for IO */
- struct config_file *cfg; /** < pointer to config file */
- char *learn_rcpt; /** < recipient for learning */
- char *learn_from; /** < from address for learning */
- struct tokenizer *learn_tokenizer; /** < tokenizer for learning */
- struct classifier *learn_classifier; /** < classifier for learning */
- char *learn_filename; /** < real filename for learning */
- f_str_buf_t *learn_buf; /** < learn input */
- GList *parts; /** < extracted mime parts */
- int in_class; /** < positive or negative learn */
+ int authorized; /**< whether this session is authorized */
+ memory_pool_t *session_pool; /**< memory pool for session */
+ struct bufferevent *bev; /**< buffered event for IO */
+ struct config_file *cfg; /**< pointer to config file */
+ char *learn_rcpt; /**< recipient for learning */
+ char *learn_from; /**< from address for learning */
+ struct tokenizer *learn_tokenizer; /**< tokenizer for learning */
+ struct classifier *learn_classifier; /**< classifier for learning */
+ char *learn_filename; /**< real filename for learning */
+ f_str_buf_t *learn_buf; /**< learn input */
+ GList *parts; /**< extracted mime parts */
+ int in_class; /**< positive or negative learn */
};
/**
* Worker task structure
*/
struct worker_task {
- struct rspamd_worker *worker; /** < pointer to worker object */
+ struct rspamd_worker *worker; /**< pointer to worker object */
enum {
READ_COMMAND,
READ_HEADER,
@@ -177,50 +178,50 @@ struct worker_task {
WRITE_ERROR,
WAIT_FILTER,
CLOSING_CONNECTION,
- } state; /** < current session state */
- size_t content_length; /** < length of user's input */
- enum rspamd_protocol proto; /** < protocol (rspamc or spamc) */
- enum rspamd_command cmd; /** < command */
- int sock; /** < socket descriptor */
- char *helo; /** < helo header value */
- char *from; /** < frmo header value */
- GList *rcpt; /** < recipients list */
- unsigned int nrcpt; /** < number of recipients */
- struct in_addr from_addr; /** < client addr in numeric form */
- f_str_buf_t *msg; /** < message buffer */
- struct bufferevent *bev; /** < buffered event for IO */
- memcached_ctx_t *memc_ctx; /** < memcached context associated with task */
- unsigned memc_busy:1; /** < is memcached connection is busy XXX: fix this */
- int parts_count; /** < mime parts count */
- GMimeMessage *message; /** < message, parsed with GMime */
- GList *parts; /** < list of parsed parts */
- TAILQ_HEAD (uriq, uri) urls; /** < list of parsed urls */
- GHashTable *results; /** < hash table of metric_result indexed by
+ } state; /**< current session state */
+ size_t content_length; /**< length of user's input */
+ enum rspamd_protocol proto; /**< protocol (rspamc or spamc) */
+ enum rspamd_command cmd; /**< command */
+ int sock; /**< socket descriptor */
+ char *helo; /**< helo header value */
+ char *from; /**< from header value */
+ GList *rcpt; /**< recipients list */
+ unsigned int nrcpt; /**< number of recipients */
+ struct in_addr from_addr; /**< client addr in numeric form */
+ f_str_buf_t *msg; /**< message buffer */
+ struct bufferevent *bev; /**< buffered event for IO */
+ memcached_ctx_t *memc_ctx; /**< memcached context associated with task */
+ unsigned memc_busy:1; /**< is memcached connection is busy XXX: fix this */
+ int parts_count; /**< mime parts count */
+ GMimeMessage *message; /**< message, parsed with GMime */
+ GList *parts; /**< list of parsed parts */
+ TAILQ_HEAD (uriq, uri) urls; /**< list of parsed urls */
+ GHashTable *results; /**< hash table of metric_result indexed by
* metric's name */
- struct config_file *cfg; /** < pointer to config object */
- struct save_point save; /** < save point for delayed processing */
- char *last_error; /** < last error */
- int error_code; /** < code of last error */
- memory_pool_t *task_pool; /** < memory pool for task */
+ struct config_file *cfg; /**< pointer to config object */
+ struct save_point save; /**< save point for delayed processing */
+ char *last_error; /**< last error */
+ int error_code; /**< code of last error */
+ memory_pool_t *task_pool; /**< memory pool for task */
};
/**
* Common structure representing C module context
*/
struct module_ctx {
- int (*header_filter)(struct worker_task *task); /** < pointer to headers process function */
- int (*mime_filter)(struct worker_task *task); /** < pointer to mime parts process function */
- int (*message_filter)(struct worker_task *task); /** < pointer to the whole message process function */
- int (*url_filter)(struct worker_task *task); /** < pointer to urls process function */
+ int (*header_filter)(struct worker_task *task); /**< pointer to headers process function */
+ int (*mime_filter)(struct worker_task *task); /**< pointer to mime parts process function */
+ int (*message_filter)(struct worker_task *task); /**< pointer to the whole message process function */
+ int (*url_filter)(struct worker_task *task); /**< pointer to urls process function */
};
/**
* Common structure for C module
*/
struct c_module {
- const char *name; /** < name */
- struct module_ctx *ctx; /** < pointer to context */
- LIST_ENTRY (c_module) next; /** < linked list */
+ const char *name; /**< name */
+ struct module_ctx *ctx; /**< pointer to context */
+ LIST_ENTRY (c_module) next; /**< linked list */
};
void start_worker (struct rspamd_worker *worker, int listen_sock);