2 * Copyright (c) 1999-2002 Sendmail, Inc. and its suppliers.
5 * By using this file, you agree to the terms and conditions set
6 * forth in the LICENSE file which can be found at the top level of
7 * the sendmail distribution.
10 * $Id: milter.h,v 8.37.2.1 2002/12/19 02:10:09 ca Exp $
14 ** MILTER.H -- Global definitions for mail filter.
17 #ifndef _LIBMILTER_MILTER_H
18 # define _LIBMILTER_MILTER_H 1
21 #include "libmilter/mfapi.h"
23 /* socket and thread portability */
25 typedef pthread_t sthread_t
;
28 # define MAX_MACROS_ENTRIES 4 /* max size of macro pointer array */
32 ** implementation hint:
33 ** macros are stored in mac_buf[] as sequence of:
34 ** macro_name \0 macro_value
35 ** (just as read from the MTA)
36 ** mac_ptr is a list of pointers into mac_buf to the beginning of each
37 ** entry, i.e., macro_name, macro_value, ...
42 sthread_t ctx_id
; /* thread id */
43 socket_t ctx_sd
; /* socket descriptor */
44 int ctx_dbg
; /* debug level */
45 time_t ctx_timeout
; /* timeout */
46 int ctx_state
; /* state */
47 smfiDesc_ptr ctx_smfi
; /* filter description */
48 unsigned long ctx_pflags
; /* protocol flags */
49 char **ctx_mac_ptr
[MAX_MACROS_ENTRIES
];
50 char *ctx_mac_buf
[MAX_MACROS_ENTRIES
];
51 char *ctx_reply
; /* reply code */
52 void *ctx_privdata
; /* private data */
55 #endif /* ! _LIBMILTER_MILTER_H */