Postfix3.3.1
rcpt_buf.h
[詳解]
1 #ifndef _RCPT_BUF_H_INCLUDED_
2 #define _RCPT_BUF_H_INCLUDED_
3 
4 /*++
5 /* NAME
6 /* rcpt_buf 3h
7 /* SUMMARY
8 /* recipient buffer manager
9 /* SYNOPSIS
10 /* #include <rcpt_buf.h>
11 /* DESCRIPTION
12 /* .nf
13 
14  /*
15  * Utility library.
16  */
17 #include <vstream.h>
18 #include <vstring.h>
19 #include <attr.h>
20 
21  /*
22  * Global library.
23  */
24 #include <recipient_list.h>
25 
26  /*
27  * External interface.
28  */
29 typedef struct {
30  RECIPIENT rcpt; /* convenience */
31  VSTRING *address; /* final recipient */
32  VSTRING *orig_addr; /* original recipient */
33  VSTRING *dsn_orcpt; /* dsn original recipient */
34  int dsn_notify; /* DSN notify flags */
35  long offset; /* REC_TYPE_RCPT byte */
36 } RCPT_BUF;
37 
38 extern RCPT_BUF *rcpb_create(void);
39 extern void rcpb_reset(RCPT_BUF *);
40 extern void rcpb_free(RCPT_BUF *);
41 extern int rcpb_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
42 
43 #define RECIPIENT_FROM_RCPT_BUF(buf) \
44  ((buf)->rcpt.address = vstring_str((buf)->address), \
45  (buf)->rcpt.orig_addr = vstring_str((buf)->orig_addr), \
46  (buf)->rcpt.dsn_orcpt = vstring_str((buf)->dsn_orcpt), \
47  (buf)->rcpt.dsn_notify = (buf)->dsn_notify, \
48  (buf)->rcpt.offset = (buf)->offset, \
49  &(buf)->rcpt)
50 
51 /* LICENSE
52 /* .ad
53 /* .fi
54 /* The Secure Mailer license must be distributed with this software.
55 /* AUTHOR(S)
56 /* Wietse Venema
57 /* IBM T.J. Watson Research
58 /* P.O. Box 704
59 /* Yorktown Heights, NY 10598, USA
60 /*--*/
61 
62 #endif
VSTRING * dsn_orcpt
Definition: rcpt_buf.h:33
void rcpb_reset(RCPT_BUF *)
Definition: rcpt_buf.c:95
RECIPIENT rcpt
Definition: rcpt_buf.h:30
int dsn_notify
Definition: rcpt_buf.h:34
int(* ATTR_SCAN_MASTER_FN)(VSTREAM *, int,...)
Definition: attr.h:31
VSTRING * address
Definition: rcpt_buf.h:31
RCPT_BUF * rcpb_create(void)
Definition: rcpt_buf.c:80
int rcpb_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *)
Definition: rcpt_buf.c:118
VSTRING * orig_addr
Definition: rcpt_buf.h:32
long offset
Definition: rcpt_buf.h:35
void rcpb_free(RCPT_BUF *)
Definition: rcpt_buf.c:108