/[anubis]/anubis/src/headers.h
ViewVC logotype

Diff of /anubis/src/headers.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by gray, Thu Feb 20 09:14:04 2003 UTC revision 1.14 by gray, Wed Feb 26 16:51:17 2003 UTC
# Line 129  Line 129 
129    
130  #include "mem.h" /* xfree(), xfree_pptr() */  #include "mem.h" /* xfree(), xfree_pptr() */
131    
132    #include "list.h"
133    
134  #ifdef ENABLE_NLS  #ifdef ENABLE_NLS
135  # include <libintl.h>  # include <libintl.h>
136  # define _(String) gettext(String)  # define _(String) gettext(String)
# Line 179  Line 181 
181  #define NIL    -1  #define NIL    -1
182  #define COMMAND 0  #define COMMAND 0
183  #define HEADER  1  #define HEADER  1
184    #define BODY    2
185    
186  /* Tunnel methods */  /* Tunnel methods */
187  #define CLIENT 0  #define CLIENT 0
# Line 236  Line 239 
239  #define T_RELAX_PERM_CHECK  0x04000000  #define T_RELAX_PERM_CHECK  0x04000000
240  #define T_ENTIRE_BODY       0x08000000  #define T_ENTIRE_BODY       0x08000000
241    
242  /* bit values for mopt */  /* Regular expression flags */
 #define M_GPG_ENCRYPT       0x00000001  
 #define M_GPG_SIGN          0x00000002  
 #define M_GPG_PASSPHRASE    0x00000004  
 #define M_RM                0x00000008  
 #define M_RMRRT             0x00000010  
 #define M_RMPOST            0x00000020  
 #define M_RMHEADER          0x00000040  
 #define M_RMLT              0x00000080  
 #define M_RMRLT             0x00000100  
 #define M_RMGPG             0x00000200  
 #define M_BODYAPPEND        0x00000400  
 #define M_BODYCLEARAPPEND   0x00000800  
 #define M_SIGNATURE         0x00001000  
 #define M_ROT13S            0x00002000  
 #define M_ROT13B            0x00004000  
 #define M_EXTBODYPROC       0x00008000  
   
 /* bit values for ropt */  
243  #define R_BASIC             0x00000001  #define R_BASIC             0x00000001
244  #define R_PERLRE            0x00000002  #define R_PERLRE            0x00000002
245  #define R_SCASE             0x00000004  #define R_SCASE             0x00000004
246    
247    /* A special header used by Anubis to implement rules. */
248    #define X_ANUBIS_RULE_HEADER "\nRULE\n"
249    
250  #define safe_strcpy(s, ct) \  #define safe_strcpy(s, ct) \
251   (s[sizeof(s) - 1] = '\0', strncpy((char *)s, (char *)ct, sizeof(s) - 1))   (s[sizeof(s) - 1] = '\0', strncpy((char *)s, (char *)ct, sizeof(s) - 1))
252    
253  struct rc_regex;  struct rc_regex;
254  typedef struct rc_regex RC_REGEX;  typedef struct rc_regex RC_REGEX;
255    
256    typedef struct assoc ASSOC;
257    struct assoc {
258            char *key;
259            char *value;
260    };
261    
262    typedef struct message_struct MESSAGE;
263    struct message_struct {
264            struct list *commands; /* Associative list of SMTP commands */
265            struct list *header;   /* Associative list of RFC822 headers */
266            struct list *mime_hdr; /* List of lines before the first boundary
267                                      marker */
268            char *body;            /* Message body */
269            /* Additional data */
270            char *boundary;
271    };
272    
273    
274  /* main.c */  /* main.c */
275    
276  void anubis(char *arg);  void anubis(char *arg);
# Line 331  void translate_section_init(); Line 337  void translate_section_init();
337    
338  /* tunnel.c */  /* tunnel.c */
339  void smtp_session(void *, void *);  void smtp_session(void *, void *);
340    void message_add_header(MESSAGE *msg, char *hdr);
341    void message_remove_headers(MESSAGE *msg, char *arg);
342    void message_modify_headers(MESSAGE *msg, char *arg, char *modify);
343    void message_external_proc(MESSAGE *msg, char *name);
344    
345  /* exec.c */  /* exec.c */
346  char **gen_execargs(const char *);  char **gen_execargs(const char *);
# Line 341  char *external_program(int *, char *, ch Line 351  char *external_program(int *, char *, ch
351  void esmtp_auth(void *, char *);  void esmtp_auth(void *, char *);
352    
353  /* misc.c */  /* misc.c */
354  struct list *new_element(struct list *, struct list **, char *);  void assoc_free(ASSOC *asc);
355  void destroy_list(struct list **);  ASSOC *header_assoc(char *line);
356    void destroy_assoc_list(struct list **plist);
357    void destroy_string_list(struct list **plist);
358  void parse_mtaport(char *, char *, unsigned int *);  void parse_mtaport(char *, char *, unsigned int *);
359  void parse_mtahost(char *, char *, unsigned int *);  void parse_mtahost(char *, char *, unsigned int *);
360  void remline(char *, char *);  void remline(char *, char *);
# Line 365  int anubis_regex_refcnt(RC_REGEX *re); Line 377  int anubis_regex_refcnt(RC_REGEX *re);
377  void rc_system_init();  void rc_system_init();
378  void open_rcfile(int);  void open_rcfile(int);
379  void process_rcfile(int method);  void process_rcfile(int method);
380  void rcfile_process_section(int method, char *name, void *data);  void rcfile_process_section(int method, char *name, void *data, MESSAGE *msg);
 void rcfile_process_cond(char *name, int method, char *line);  
381    
382  /* help.c */  /* help.c */
383  void print_version(void);  void print_version(void);
# Line 414  void guile_postprocess_proc(char *procna Line 425  void guile_postprocess_proc(char *procna
425  void guile_section_init();  void guile_section_init();
426  #endif /* WITH_GUILE */  #endif /* WITH_GUILE */
427    
428    
429  /* EOF */  /* EOF */
430    

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26