Postfix3.3.1
総合概要
データ構造
ファイル
ファイル一覧
大域各種
postfix-3.3.1
src
global
msg_stats_print.c
[詳解]
1
/*++
2
/* NAME
3
/* msg_stats_print
4
/* SUMMARY
5
/* write MSG_STATS structure to stream
6
/* SYNOPSIS
7
/* #include <msg_stats.h>
8
/*
9
/* int msg_stats_print(print_fn, stream, flags, ptr)
10
/* ATTR_PRINT_MASTER_FN print_fn;
11
/* VSTREAM *stream;
12
/* int flags;
13
/* void *ptr;
14
/* DESCRIPTION
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:
19
/*
20
/* ... SEND_ATTR_FUNC(msg_stats_print, (void *) stats), ...
21
/* DIAGNOSTICS
22
/* Fatal: out of memory.
23
/* LICENSE
24
/* .ad
25
/* .fi
26
/* The Secure Mailer license must be distributed with this software.
27
/* AUTHOR(S)
28
/* Wietse Venema
29
/* IBM T.J. Watson Research
30
/* P.O. Box 704
31
/* Yorktown Heights, NY 10598, USA
32
/*--*/
33
34
/* System library. */
35
36
#include <
sys_defs.h
>
37
38
/* Utility library. */
39
40
#include <
attr.h
>
41
42
/* Global library. */
43
44
#include <
mail_proto.h
>
45
#include <
msg_stats.h
>
46
47
/* msg_stats_print - write MSG_STATS to stream */
48
49
int
msg_stats_print
(
ATTR_PRINT_MASTER_FN
print_fn,
VSTREAM
*fp,
50
int
flags,
void
*ptr)
51
{
52
int
ret;
53
54
/*
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.
59
*/
60
ret = print_fn(fp, flags |
ATTR_FLAG_MORE
,
61
SEND_ATTR_DATA
(
MAIL_ATTR_TIME
,
sizeof
(
MSG_STATS
), ptr),
62
ATTR_TYPE_END
);
63
return
(ret);
64
}
mail_proto.h
ATTR_PRINT_MASTER_FN
int(* ATTR_PRINT_MASTER_FN)(VSTREAM *, int,...)
Definition:
attr.h:33
VSTREAM
Definition:
vstream.h:43
ATTR_TYPE_END
#define ATTR_TYPE_END
Definition:
attr.h:39
attr.h
MAIL_ATTR_TIME
#define MAIL_ATTR_TIME
Definition:
mail_proto.h:142
MSG_STATS
Definition:
msg_stats.h:55
sys_defs.h
msg_stats_print
int msg_stats_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp, int flags, void *ptr)
Definition:
msg_stats_print.c:49
msg_stats.h
ATTR_FLAG_MORE
#define ATTR_FLAG_MORE
Definition:
attr.h:101
SEND_ATTR_DATA
#define SEND_ATTR_DATA(name, len, val)
Definition:
attr.h:68
2018年11月10日(土) 18時59分38秒作成 - Postfix3.3.1 / 構成:
1.8.9.1