5
/* write MSG_STATS structure to stream
7
/* #include <msg_stats.h>
9
/* int msg_stats_print(print_fn, stream, flags, ptr)
10
/* ATTR_PRINT_MASTER_FN print_fn;
15
/* msg_stats_print() writes an MSG_STATS structure to the named
16
/* stream using the specified attribute print routine.
17
/* msg_stats_print() is meant to be passed as a call-back to
18
/* attr_print(), thusly:
20
/* ... ATTR_PRINT_FUNC, msg_stats_print, (void *) stats, ...
22
/* Fatal: out of memory.
26
/* The Secure Mailer license must be distributed with this software.
29
/* IBM T.J. Watson Research
31
/* Yorktown Heights, NY 10598, USA
38
/* Utility library. */
44
#include <mail_proto.h>
45
#include <msg_stats.h>
47
/* msg_stats_print - write MSG_STATS to stream */
49
int msg_stats_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
55
* Send the entire structure. This is not only simpler but also likely to
56
* be quicker than having the sender figure out what fields need to be
57
* sent, converting numbers to string and back, and having the receiver
58
* initialize the unused fields by hand.
60
ret = print_fn(fp, flags | ATTR_FLAG_MORE,
61
ATTR_TYPE_DATA, MAIL_ATTR_TIME, sizeof(MSG_STATS), ptr,