mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-28 12:48:01 +00:00
postfix-3.6-20200610
This commit is contained in:
parent
119d6abed9
commit
c22bee85a2
@ -24839,3 +24839,31 @@ Apologies for any names omitted.
|
||||
agent visible, where it would otherwise have remained
|
||||
invisible, which would complicate troubleshooting. File:
|
||||
global/deliver_pass.c.
|
||||
|
||||
20200610
|
||||
|
||||
Respectful code: replace 'slave' in internal identifiers
|
||||
and comments, and make the master(5) description more
|
||||
consistent with that in master(8). Postfix does not have a
|
||||
master/slave architecture, and these identifiers and comments
|
||||
were just poorly worded. Files: conf/postmulti-script,
|
||||
html/master.5.html, man/man5/master.5, proto/master,
|
||||
global/dsb_scan.c, global/dsb_scan.h, global/dsn_print.c,
|
||||
global/dsn_print.h, global/msg_stats.h, global/msg_stats_print.c,
|
||||
global/msg_stats_scan.c, global/rcpt_buf.c, global/rcpt_buf.h,
|
||||
global/rcpt_print.c, global/rcpt_print.h, milter/milter.h,
|
||||
milter/milter_macros.c, tls/tls_proxy.h,
|
||||
tls/tls_proxy_client_print.c, tls/tls_proxy_client_scan.c,
|
||||
tls/tls_proxy_context_print.c, tls/tls_proxy_context_scan.c,
|
||||
tls/tls_proxy_server_print.c, tls/tls_proxy_server_scan.c,
|
||||
util/argv_attr.h, util/argv_attr_print.c, util/argv_attr_scan.c,
|
||||
util/attr.h, util/attr_print0.c, util/attr_print64.c,
|
||||
util/attr_print_plain.c, util/attr_scan0.c, util/attr_scan64.c,
|
||||
util/attr_scan_plain.c.
|
||||
|
||||
Bugfix (introduced: Postfix 3.4): in the Postfix SMTP server,
|
||||
the SNI callback reported an error when it was called a
|
||||
second time. This happened after the server-side TLS engine
|
||||
sent a TLSv1.3 HelloRetryRequest (HRR) to a remote SMTP
|
||||
client. Reported by Ján Máté, fixed by Viktor Dukhovni.
|
||||
File: tls/tls_misc.c.
|
||||
|
@ -219,7 +219,7 @@ create|import)
|
||||
# and drop from alternate_config_directories
|
||||
#
|
||||
# XXX: Must happen before set-permissions below, otherwise instance
|
||||
# is treated as a non-slave instance by post-install via postfix(1).
|
||||
# is treated as an independent instance by post-install via postfix(1).
|
||||
#
|
||||
update_cfdirs del $config_directory || exit 1
|
||||
|
||||
@ -227,7 +227,7 @@ create|import)
|
||||
# queue_directory and data_directory, ...
|
||||
#
|
||||
# XXX: Must happen after instance list updates above, otherwise instance
|
||||
# is treated as a non-slave instance by post-install via postfix(1).
|
||||
# is treated as an independent instance by post-install via postfix(1).
|
||||
#
|
||||
postfix -c $config_directory set-permissions || exit 1
|
||||
;;
|
||||
|
@ -15,16 +15,16 @@ MASTER(5) MASTER(5)
|
||||
services that run in the background.
|
||||
|
||||
Postfix services are implemented by daemon processes. These run in the
|
||||
background under control of the <a href="master.8.html"><b>master</b>(8)</a> process. The <a href="master.5.html">master.cf</a> con-
|
||||
figuration file defines how a client program connects to a service, and
|
||||
what daemon program runs when a service is requested. Most daemon pro-
|
||||
cesses are short-lived and terminate voluntarily after serving <b><a href="postconf.5.html#max_use">max_use</a></b>
|
||||
clients, or after inactivity for <b><a href="postconf.5.html#max_idle">max_idle</a></b> or more units of time.
|
||||
background, started on-demand by the <a href="master.8.html"><b>master</b>(8)</a> process. The <a href="master.5.html">master.cf</a>
|
||||
configuration file defines how a client program connects to a service,
|
||||
and what daemon program runs when a service is requested. Most daemon
|
||||
processes are short-lived and terminate voluntarily after serving
|
||||
<b><a href="postconf.5.html#max_use">max_use</a></b> clients, or after inactivity for <b><a href="postconf.5.html#max_idle">max_idle</a></b> or more units of
|
||||
time.
|
||||
|
||||
All daemons specified here must speak a Postfix-internal protocol. In
|
||||
order to execute non-Postfix software use the <a href="local.8.html"><b>local</b>(8)</a>, <a href="pipe.8.html"><b>pipe</b>(8)</a> or
|
||||
<a href="spawn.8.html"><b>spawn</b>(8)</a> services, or run the server under control by <b>inetd</b>(8) or
|
||||
equivalent.
|
||||
<a href="spawn.8.html"><b>spawn</b>(8)</a> services, or execute the software with <b>inetd</b>(8) or equivalent.
|
||||
|
||||
After changing <a href="master.5.html">master.cf</a> you must execute "<b>postfix reload</b>" to reload
|
||||
the configuration.
|
||||
|
@ -13,7 +13,7 @@ The Postfix mail system is implemented by small number of
|
||||
a larger number of services that run in the background.
|
||||
|
||||
Postfix services are implemented by daemon processes. These
|
||||
run in the background under control of the \fBmaster\fR(8)
|
||||
run in the background, started on\-demand by the \fBmaster\fR(8)
|
||||
process. The master.cf configuration file defines how a
|
||||
client program connects to a service, and what daemon
|
||||
program runs when a service is requested. Most daemon
|
||||
@ -24,7 +24,7 @@ serving \fBmax_use\fR clients, or after inactivity for
|
||||
All daemons specified here must speak a Postfix\-internal
|
||||
protocol. In order to execute non\-Postfix software use the
|
||||
\fBlocal\fR(8), \fBpipe\fR(8) or \fBspawn\fR(8) services, or
|
||||
run the server under control by \fBinetd\fR(8) or equivalent.
|
||||
execute the software with \fBinetd\fR(8) or equivalent.
|
||||
.PP
|
||||
After changing master.cf you must execute "\fBpostfix reload\fR"
|
||||
to reload the configuration.
|
||||
|
@ -9,7 +9,7 @@
|
||||
# a larger number of services that run in the background.
|
||||
#
|
||||
# Postfix services are implemented by daemon processes. These
|
||||
# run in the background under control of the \fBmaster\fR(8)
|
||||
# run in the background, started on-demand by the \fBmaster\fR(8)
|
||||
# process. The master.cf configuration file defines how a
|
||||
# client program connects to a service, and what daemon
|
||||
# program runs when a service is requested. Most daemon
|
||||
@ -20,7 +20,7 @@
|
||||
# All daemons specified here must speak a Postfix-internal
|
||||
# protocol. In order to execute non-Postfix software use the
|
||||
# \fBlocal\fR(8), \fBpipe\fR(8) or \fBspawn\fR(8) services, or
|
||||
# run the server under control by \fBinetd\fR(8) or equivalent.
|
||||
# execute the software with \fBinetd\fR(8) or equivalent.
|
||||
# .PP
|
||||
# After changing master.cf you must execute "\fBpostfix reload\fR"
|
||||
# to reload the configuration.
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <dsb_scan.h>
|
||||
/*
|
||||
/* int dsb_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
/* dsb_scan - read DSN_BUF from stream */
|
||||
|
||||
int dsb_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int dsb_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
DSN_BUF *dsb = (DSN_BUF *) ptr;
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* External interface.
|
||||
*/
|
||||
extern int dsb_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int dsb_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <dsn_print.h>
|
||||
/*
|
||||
/* int dsn_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -45,7 +45,7 @@
|
||||
|
||||
/* dsn_print - write DSN to stream */
|
||||
|
||||
int dsn_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int dsn_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
DSN *dsn = (DSN *) ptr;
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* External interface.
|
||||
*/
|
||||
extern int dsn_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int dsn_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
|
@ -20,7 +20,7 @@
|
||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||
* patchlevel; they change the release date only.
|
||||
*/
|
||||
#define MAIL_RELEASE_DATE "20200531"
|
||||
#define MAIL_RELEASE_DATE "20200610"
|
||||
#define MAIL_VERSION_NUMBER "3.6"
|
||||
|
||||
#ifdef SNAPSHOT
|
||||
|
@ -82,8 +82,8 @@ typedef struct {
|
||||
(st) \
|
||||
)
|
||||
|
||||
extern int msg_stats_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int msg_stats_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int msg_stats_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern int msg_stats_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <msg_stats.h>
|
||||
/*
|
||||
/* int msg_stats_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -46,7 +46,7 @@
|
||||
|
||||
/* msg_stats_print - write MSG_STATS to stream */
|
||||
|
||||
int msg_stats_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int msg_stats_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
int ret;
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <msg_stats.h>
|
||||
/*
|
||||
/* int msg_stats_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
/* msg_stats_scan - read MSG_STATS from stream */
|
||||
|
||||
int msg_stats_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int msg_stats_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
MSG_STATS *stats = (MSG_STATS *) ptr;
|
||||
|
@ -29,7 +29,7 @@
|
||||
/* RCPT_BUF *rcpb;
|
||||
/*
|
||||
/* int rcpb_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -115,7 +115,7 @@ void rcpb_free(RCPT_BUF *rcpt)
|
||||
|
||||
/* rcpb_scan - receive recipient buffer */
|
||||
|
||||
int rcpb_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int rcpb_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
RCPT_BUF *rcpt = (RCPT_BUF *) ptr;
|
||||
|
@ -38,7 +38,7 @@ typedef struct {
|
||||
extern RCPT_BUF *rcpb_create(void);
|
||||
extern void rcpb_reset(RCPT_BUF *);
|
||||
extern void rcpb_free(RCPT_BUF *);
|
||||
extern int rcpb_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int rcpb_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
#define RECIPIENT_FROM_RCPT_BUF(buf) \
|
||||
((buf)->rcpt.address = vstring_str((buf)->address), \
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <rcpt_print.h>
|
||||
/*
|
||||
/* int rcpt_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
/* rcpt_print - write recipient to stream */
|
||||
|
||||
int rcpt_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int rcpt_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
RECIPIENT *rcpt = (RECIPIENT *) ptr;
|
||||
|
@ -25,7 +25,7 @@
|
||||
/*
|
||||
* External interface.
|
||||
*/
|
||||
extern int rcpt_print(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int rcpt_print(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
|
@ -79,8 +79,8 @@ extern MILTER_MACROS *milter_macros_create(const char *, const char *,
|
||||
const char *, const char *);
|
||||
extern MILTER_MACROS *milter_macros_alloc(int);
|
||||
extern void milter_macros_free(MILTER_MACROS *);
|
||||
extern int milter_macros_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int milter_macros_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int milter_macros_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern int milter_macros_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
#define MILTER_MACROS_ALLOC_ZERO 1 /* null pointer */
|
||||
#define MILTER_MACROS_ALLOC_EMPTY 2 /* mystrdup(""); */
|
||||
|
@ -26,13 +26,13 @@
|
||||
/* MILTER_MACROS *mp;
|
||||
/*
|
||||
/* int milter_macros_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
/*
|
||||
/* int milter_macros_scan(scan_fn, fp, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *fp;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -130,7 +130,7 @@
|
||||
|
||||
/* milter_macros_print - write macros structure to stream */
|
||||
|
||||
int milter_macros_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int milter_macros_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
MILTER_MACROS *mp = (MILTER_MACROS *) ptr;
|
||||
@ -155,7 +155,7 @@ int milter_macros_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
|
||||
/* milter_macros_scan - receive macros structure from stream */
|
||||
|
||||
int milter_macros_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int milter_macros_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
MILTER_MACROS *mp = (MILTER_MACROS *) ptr;
|
||||
|
@ -686,6 +686,27 @@ static int server_sni_callback(SSL *ssl, int *alert, void *arg)
|
||||
TLScontext->namaddr, sni);
|
||||
return SSL_TLSEXT_ERR_NOACK;
|
||||
}
|
||||
|
||||
/*
|
||||
* With TLS 1.3, when the client's proposed key share is not supported by
|
||||
* the server, the server may issue a HelloRetryRequest (HRR), and the
|
||||
* client will then retry with a new key share on a curve supported by
|
||||
* the server. This results in the SNI callback running twice for the
|
||||
* same connection.
|
||||
*
|
||||
* When that happens, The client MUST send the essentially the same hello
|
||||
* message, including the SNI name, and since we've already loaded our
|
||||
* certificate chain, we don't need to do it again! Therefore, if we've
|
||||
* already recorded the peer SNI name, just check that it has not
|
||||
* changed, and return success.
|
||||
*/
|
||||
if (TLScontext->peer_sni) {
|
||||
if (strcmp(sni, TLScontext->peer_sni) == 0)
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
msg_warn("TLS SNI changed from %s initially %s, %s after hello retry",
|
||||
TLScontext->namaddr, TLScontext->peer_sni, sni);
|
||||
return SSL_TLSEXT_ERR_NOACK;
|
||||
}
|
||||
do {
|
||||
/* Don't silently skip maps opened with the wrong flags. */
|
||||
pem = maps_file_find(tls_server_sni_maps, cp, 0);
|
||||
|
@ -79,9 +79,9 @@ typedef struct TLS_CLIENT_PARAMS {
|
||||
extern TLS_CLIENT_PARAMS *tls_proxy_client_param_from_config(TLS_CLIENT_PARAMS *);
|
||||
extern char *tls_proxy_client_param_to_string(VSTRING *, TLS_CLIENT_PARAMS *);
|
||||
extern char *tls_proxy_client_param_with_names_to_string(VSTRING *, TLS_CLIENT_PARAMS *);
|
||||
extern int tls_proxy_client_param_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_client_param_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern void tls_proxy_client_param_free(TLS_CLIENT_PARAMS *);
|
||||
extern int tls_proxy_client_param_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_client_param_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
/*
|
||||
* Functions that handle TLS_XXX_INIT_PROPS and TLS_XXX_START_PROPS. These
|
||||
@ -114,25 +114,25 @@ extern VSTREAM *tls_proxy_open(const char *, int, VSTREAM *, const char *,
|
||||
|
||||
extern TLS_SESS_STATE *tls_proxy_context_receive(VSTREAM *);
|
||||
extern void tls_proxy_context_free(TLS_SESS_STATE *);
|
||||
extern int tls_proxy_context_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_context_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_context_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_context_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
extern int tls_proxy_client_init_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_client_init_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_client_init_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_client_init_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern void tls_proxy_client_init_free(TLS_CLIENT_INIT_PROPS *);
|
||||
extern char *tls_proxy_client_init_to_string(VSTRING *, TLS_CLIENT_INIT_PROPS *);
|
||||
extern char *tls_proxy_client_init_with_names_to_string(VSTRING *, TLS_CLIENT_INIT_PROPS *);
|
||||
|
||||
extern int tls_proxy_client_start_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_client_start_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_client_start_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_client_start_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern void tls_proxy_client_start_free(TLS_CLIENT_START_PROPS *);
|
||||
|
||||
extern int tls_proxy_server_init_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_server_init_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_server_init_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_server_init_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern void tls_proxy_server_init_free(TLS_SERVER_INIT_PROPS *);
|
||||
|
||||
extern int tls_proxy_server_start_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_server_start_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_server_start_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern int tls_proxy_server_start_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
extern void tls_proxy_server_start_free(TLS_SERVER_START_PROPS *);
|
||||
|
||||
|
@ -7,19 +7,19 @@
|
||||
/* #include <tls_proxy.h>
|
||||
/*
|
||||
/* int tls_proxy_client_param_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
/*
|
||||
/* int tls_proxy_client_init_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
/*
|
||||
/* int tls_proxy_client_start_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
/* tls_proxy_client_param_print - send TLS_CLIENT_PARAMS over stream */
|
||||
|
||||
int tls_proxy_client_param_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int tls_proxy_client_param_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_CLIENT_PARAMS *params = (TLS_CLIENT_PARAMS *) ptr;
|
||||
@ -134,7 +134,7 @@ int tls_proxy_client_param_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
|
||||
/* tls_proxy_client_init_print - send TLS_CLIENT_INIT_PROPS over stream */
|
||||
|
||||
int tls_proxy_client_init_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int tls_proxy_client_init_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_CLIENT_INIT_PROPS *props = (TLS_CLIENT_INIT_PROPS *) ptr;
|
||||
@ -182,7 +182,7 @@ int tls_proxy_client_init_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
|
||||
/* tls_proxy_client_certs_print - send x509 certificates over stream */
|
||||
|
||||
static int tls_proxy_client_certs_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
static int tls_proxy_client_certs_print(ATTR_PRINT_COMMON_FN print_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
TLS_CERTS *tls_certs = (TLS_CERTS *) ptr;
|
||||
@ -227,7 +227,7 @@ static int tls_proxy_client_certs_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
|
||||
/* tls_proxy_client_pkeys_print - send public keys over stream */
|
||||
|
||||
static int tls_proxy_client_pkeys_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
static int tls_proxy_client_pkeys_print(ATTR_PRINT_COMMON_FN print_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
TLS_PKEYS *tls_pkeys = (TLS_PKEYS *) ptr;
|
||||
@ -272,7 +272,7 @@ static int tls_proxy_client_pkeys_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
|
||||
/* tls_proxy_client_tlsa_print - send TLS_TLSA over stream */
|
||||
|
||||
static int tls_proxy_client_tlsa_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
static int tls_proxy_client_tlsa_print(ATTR_PRINT_COMMON_FN print_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
TLS_TLSA *tls_tlsa = (TLS_TLSA *) ptr;
|
||||
@ -310,7 +310,7 @@ static int tls_proxy_client_tlsa_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
|
||||
/* tls_proxy_client_dane_print - send TLS_DANE over stream */
|
||||
|
||||
static int tls_proxy_client_dane_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
static int tls_proxy_client_dane_print(ATTR_PRINT_COMMON_FN print_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
TLS_DANE *dane = (TLS_DANE *) ptr;
|
||||
@ -346,7 +346,7 @@ static int tls_proxy_client_dane_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
|
||||
/* tls_proxy_client_start_print - send TLS_CLIENT_START_PROPS over stream */
|
||||
|
||||
int tls_proxy_client_start_print(ATTR_PRINT_MASTER_FN print_fn,
|
||||
int tls_proxy_client_start_print(ATTR_PRINT_COMMON_FN print_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
TLS_CLIENT_START_PROPS *props = (TLS_CLIENT_START_PROPS *) ptr;
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <tls_proxy.h>
|
||||
/*
|
||||
/* int tls_proxy_client_param_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -16,7 +16,7 @@
|
||||
/* TLS_CLIENT_PARAMS *params;
|
||||
/*
|
||||
/* int tls_proxy_client_init_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -25,7 +25,7 @@
|
||||
/* TLS_CLIENT_INIT_PROPS *init_props;
|
||||
/*
|
||||
/* int tls_proxy_client_start_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -138,7 +138,7 @@ void tls_proxy_client_param_free(TLS_CLIENT_PARAMS *params)
|
||||
|
||||
/* tls_proxy_client_param_scan - receive TLS_CLIENT_PARAMS from stream */
|
||||
|
||||
int tls_proxy_client_param_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int tls_proxy_client_param_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_CLIENT_PARAMS *params
|
||||
@ -238,7 +238,7 @@ void tls_proxy_client_init_free(TLS_CLIENT_INIT_PROPS *props)
|
||||
|
||||
/* tls_proxy_client_init_scan - receive TLS_CLIENT_INIT_PROPS from stream */
|
||||
|
||||
int tls_proxy_client_init_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int tls_proxy_client_init_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_CLIENT_INIT_PROPS *props
|
||||
@ -382,7 +382,7 @@ void tls_proxy_client_start_free(TLS_CLIENT_START_PROPS *props)
|
||||
|
||||
/* tls_proxy_client_certs_scan - receive TLS_CERTS from stream */
|
||||
|
||||
static int tls_proxy_client_certs_scan(ATTR_SCAN_MASTER_FN scan_fn,
|
||||
static int tls_proxy_client_certs_scan(ATTR_SCAN_COMMON_FN scan_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
int ret;
|
||||
@ -441,7 +441,7 @@ static int tls_proxy_client_certs_scan(ATTR_SCAN_MASTER_FN scan_fn,
|
||||
|
||||
/* tls_proxy_client_pkeys_scan - receive TLS_PKEYS from stream */
|
||||
|
||||
static int tls_proxy_client_pkeys_scan(ATTR_SCAN_MASTER_FN scan_fn,
|
||||
static int tls_proxy_client_pkeys_scan(ATTR_SCAN_COMMON_FN scan_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
int ret;
|
||||
@ -500,7 +500,7 @@ static int tls_proxy_client_pkeys_scan(ATTR_SCAN_MASTER_FN scan_fn,
|
||||
|
||||
/* tls_proxy_client_tlsa_scan - receive TLS_TLSA from stream */
|
||||
|
||||
static int tls_proxy_client_tlsa_scan(ATTR_SCAN_MASTER_FN scan_fn,
|
||||
static int tls_proxy_client_tlsa_scan(ATTR_SCAN_COMMON_FN scan_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
int ret;
|
||||
@ -549,7 +549,7 @@ static int tls_proxy_client_tlsa_scan(ATTR_SCAN_MASTER_FN scan_fn,
|
||||
|
||||
/* tls_proxy_client_dane_scan - receive TLS_DANE from stream */
|
||||
|
||||
static int tls_proxy_client_dane_scan(ATTR_SCAN_MASTER_FN scan_fn,
|
||||
static int tls_proxy_client_dane_scan(ATTR_SCAN_COMMON_FN scan_fn,
|
||||
VSTREAM *fp, int flags, void *ptr)
|
||||
{
|
||||
TLS_DANE *dane = 0;
|
||||
@ -610,7 +610,7 @@ static int tls_proxy_client_dane_scan(ATTR_SCAN_MASTER_FN scan_fn,
|
||||
|
||||
/* tls_proxy_client_start_scan - receive TLS_CLIENT_START_PROPS from stream */
|
||||
|
||||
int tls_proxy_client_start_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int tls_proxy_client_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_CLIENT_START_PROPS *props
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <tls_proxy.h>
|
||||
/*
|
||||
/* int tls_proxy_context_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -53,7 +53,7 @@
|
||||
|
||||
/* tls_proxy_context_print - send TLS session state over stream */
|
||||
|
||||
int tls_proxy_context_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int tls_proxy_context_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_SESS_STATE *tp = (TLS_SESS_STATE *) ptr;
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <tls_proxy.h>
|
||||
/*
|
||||
/* int tls_proxy_context_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
/* tls_proxy_context_scan - receive TLS session state from stream */
|
||||
|
||||
int tls_proxy_context_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int tls_proxy_context_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_SESS_STATE *tls_context
|
||||
|
@ -7,13 +7,13 @@
|
||||
/* #include <tls_proxy.h>
|
||||
/*
|
||||
/* int tls_proxy_server_init_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
/*
|
||||
/* int tls_proxy_server_start_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -61,7 +61,7 @@
|
||||
|
||||
/* tls_proxy_server_init_print - send TLS_SERVER_INIT_PROPS over stream */
|
||||
|
||||
int tls_proxy_server_init_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int tls_proxy_server_init_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_SERVER_INIT_PROPS *props = (TLS_SERVER_INIT_PROPS *) ptr;
|
||||
@ -114,7 +114,7 @@ int tls_proxy_server_init_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
|
||||
/* tls_proxy_server_start_print - send TLS_SERVER_START_PROPS over stream */
|
||||
|
||||
int tls_proxy_server_start_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int tls_proxy_server_start_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_SERVER_START_PROPS *props = (TLS_SERVER_START_PROPS *) ptr;
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <tls_proxy.h>
|
||||
/*
|
||||
/* int tls_proxy_server_init_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -16,7 +16,7 @@
|
||||
/* TLS_SERVER_INIT_PROPS *init_props;
|
||||
/*
|
||||
/* int tls_proxy_server_start_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -83,7 +83,7 @@
|
||||
|
||||
/* tls_proxy_server_init_scan - receive TLS_SERVER_INIT_PROPS from stream */
|
||||
|
||||
int tls_proxy_server_init_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int tls_proxy_server_init_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_SERVER_INIT_PROPS *props
|
||||
@ -186,7 +186,7 @@ void tls_proxy_server_init_free(TLS_SERVER_INIT_PROPS *props)
|
||||
|
||||
/* tls_proxy_server_start_scan - receive TLS_SERVER_START_PROPS from stream */
|
||||
|
||||
int tls_proxy_server_start_scan(ATTR_SCAN_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int tls_proxy_server_start_scan(ATTR_SCAN_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
TLS_SERVER_START_PROPS *props
|
||||
|
@ -26,8 +26,8 @@
|
||||
#define ARGV_ATTR_VALUE "argv_value"
|
||||
#define ARGV_ATTR_MAX 1024
|
||||
|
||||
extern int argv_attr_print(ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int argv_attr_scan(ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
extern int argv_attr_print(ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
extern int argv_attr_scan(ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
/* LICENSE
|
||||
/* .ad
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <argv_attr.h>
|
||||
/*
|
||||
/* int argv_attr_print(print_fn, stream, flags, ptr)
|
||||
/* ATTR_PRINT_MASTER_FN print_fn;
|
||||
/* ATTR_PRINT_COMMON_FN print_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -49,7 +49,7 @@
|
||||
|
||||
/* argv_attr_print - write ARGV to stream */
|
||||
|
||||
int argv_attr_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp,
|
||||
int argv_attr_print(ATTR_PRINT_COMMON_FN print_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
ARGV *argv = (ARGV *) ptr;
|
||||
|
@ -7,7 +7,7 @@
|
||||
/* #include <argv_attr.h>
|
||||
/*
|
||||
/* int argv_attr_scan(scan_fn, stream, flags, ptr)
|
||||
/* ATTR_SCAN_MASTER_FN scan_fn;
|
||||
/* ATTR_SCAN_COMMON_FN scan_fn;
|
||||
/* VSTREAM *stream;
|
||||
/* int flags;
|
||||
/* void *ptr;
|
||||
@ -56,7 +56,7 @@
|
||||
|
||||
/* argv_attr_scan - write ARGV to stream */
|
||||
|
||||
int argv_attr_scan(ATTR_PRINT_MASTER_FN scan_fn, VSTREAM *fp,
|
||||
int argv_attr_scan(ATTR_PRINT_COMMON_FN scan_fn, VSTREAM *fp,
|
||||
int flags, void *ptr)
|
||||
{
|
||||
ARGV *argv = 0;
|
||||
|
@ -28,10 +28,10 @@
|
||||
/*
|
||||
* Delegation for better data abstraction.
|
||||
*/
|
||||
typedef int (*ATTR_SCAN_MASTER_FN) (VSTREAM *, int,...);
|
||||
typedef int (*ATTR_SCAN_SLAVE_FN) (ATTR_SCAN_MASTER_FN, VSTREAM *, int, void *);
|
||||
typedef int (*ATTR_PRINT_MASTER_FN) (VSTREAM *, int,...);
|
||||
typedef int (*ATTR_PRINT_SLAVE_FN) (ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *);
|
||||
typedef int (*ATTR_SCAN_COMMON_FN) (VSTREAM *, int,...);
|
||||
typedef int (*ATTR_SCAN_CUSTOM_FN) (ATTR_SCAN_COMMON_FN, VSTREAM *, int, void *);
|
||||
typedef int (*ATTR_PRINT_COMMON_FN) (VSTREAM *, int,...);
|
||||
typedef int (*ATTR_PRINT_CUSTOM_FN) (ATTR_PRINT_COMMON_FN, VSTREAM *, int, void *);
|
||||
|
||||
/*
|
||||
* Attribute types. See attr_scan(3) for documentation.
|
||||
@ -66,7 +66,7 @@ typedef int (*ATTR_PRINT_SLAVE_FN) (ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *
|
||||
#define SEND_ATTR_NV(val) ATTR_TYPE_NV, CHECK_CPTR(ATTR, NVTABLE, (val))
|
||||
#define SEND_ATTR_LONG(name, val) ATTR_TYPE_LONG, CHECK_CPTR(ATTR, char, (name)), CHECK_VAL(ATTR, long, (val))
|
||||
#define SEND_ATTR_DATA(name, len, val) ATTR_TYPE_DATA, CHECK_CPTR(ATTR, char, (name)), CHECK_VAL(ATTR, ssize_t, (len)), CHECK_CPTR(ATTR, void, (val))
|
||||
#define SEND_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_PRINT_SLAVE_FN, (func)), CHECK_CPTR(ATTR, void, (val))
|
||||
#define SEND_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_PRINT_CUSTOM_FN, (func)), CHECK_CPTR(ATTR, void, (val))
|
||||
|
||||
#define RECV_ATTR_INT(name, val) ATTR_TYPE_INT, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, int, (val))
|
||||
#define RECV_ATTR_STR(name, val) ATTR_TYPE_STR, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, VSTRING, (val))
|
||||
@ -74,7 +74,7 @@ typedef int (*ATTR_PRINT_SLAVE_FN) (ATTR_PRINT_MASTER_FN, VSTREAM *, int, void *
|
||||
#define RECV_ATTR_NV(val) ATTR_TYPE_NV, CHECK_PTR(ATTR, NVTABLE, (val))
|
||||
#define RECV_ATTR_LONG(name, val) ATTR_TYPE_LONG, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, long, (val))
|
||||
#define RECV_ATTR_DATA(name, val) ATTR_TYPE_DATA, CHECK_CPTR(ATTR, char, (name)), CHECK_PTR(ATTR, VSTRING, (val))
|
||||
#define RECV_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_SCAN_SLAVE_FN, (func)), CHECK_PTR(ATTR, void, (val))
|
||||
#define RECV_ATTR_FUNC(func, val) ATTR_TYPE_FUNC, CHECK_VAL(ATTR, ATTR_SCAN_CUSTOM_FN, (func)), CHECK_PTR(ATTR, void, (val))
|
||||
|
||||
CHECK_VAL_HELPER_DCL(ATTR, ssize_t);
|
||||
CHECK_VAL_HELPER_DCL(ATTR, long);
|
||||
@ -89,8 +89,8 @@ CHECK_CPTR_HELPER_DCL(ATTR, void);
|
||||
CHECK_CPTR_HELPER_DCL(ATTR, char);
|
||||
CHECK_CPTR_HELPER_DCL(ATTR, NVTABLE);
|
||||
CHECK_CPTR_HELPER_DCL(ATTR, HTABLE);
|
||||
CHECK_VAL_HELPER_DCL(ATTR, ATTR_PRINT_SLAVE_FN);
|
||||
CHECK_VAL_HELPER_DCL(ATTR, ATTR_SCAN_SLAVE_FN);
|
||||
CHECK_VAL_HELPER_DCL(ATTR, ATTR_PRINT_CUSTOM_FN);
|
||||
CHECK_VAL_HELPER_DCL(ATTR, ATTR_SCAN_CUSTOM_FN);
|
||||
|
||||
/*
|
||||
* Flags that control processing. See attr_scan(3) for documentation.
|
||||
|
@ -53,7 +53,7 @@
|
||||
/* .IP "SEND_ATTR_DATA(const char *name, ssize_t len, const void *value)"
|
||||
/* The arguments are an attribute name, an attribute value
|
||||
/* length, and an attribute value pointer.
|
||||
/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_SLAVE_FN, const void *value)"
|
||||
/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_CUSTOM_FN, const void *value)"
|
||||
/* The arguments are a function pointer and generic data
|
||||
/* pointer. The caller-specified function returns whatever the
|
||||
/* specified attribute printing function returns.
|
||||
@ -119,7 +119,7 @@ int attr_vprint0(VSTREAM *fp, int flags, va_list ap)
|
||||
HTABLE_INFO **ht;
|
||||
ssize_t len_val;
|
||||
static VSTRING *base64_buf;
|
||||
ATTR_PRINT_SLAVE_FN print_fn;
|
||||
ATTR_PRINT_CUSTOM_FN print_fn;
|
||||
void *print_arg;
|
||||
|
||||
/*
|
||||
@ -174,7 +174,7 @@ int attr_vprint0(VSTREAM *fp, int flags, va_list ap)
|
||||
attr_name, (long) len_val);
|
||||
break;
|
||||
case ATTR_TYPE_FUNC:
|
||||
print_fn = va_arg(ap, ATTR_PRINT_SLAVE_FN);
|
||||
print_fn = va_arg(ap, ATTR_PRINT_CUSTOM_FN);
|
||||
print_arg = va_arg(ap, void *);
|
||||
print_fn(attr_print0, fp, flags | ATTR_FLAG_MORE, print_arg);
|
||||
break;
|
||||
|
@ -53,7 +53,7 @@
|
||||
/* .IP "SEND_ATTR_DATA(const char *name, ssize_t len, const void *value)"
|
||||
/* The arguments are an attribute name, an attribute value
|
||||
/* length, and an attribute value pointer.
|
||||
/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_SLAVE_FN, const void *value)"
|
||||
/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_CUSTOM_FN, const void *value)"
|
||||
/* The arguments are a function pointer and generic data
|
||||
/* pointer. The caller-specified function returns whatever the
|
||||
/* specified attribute printing function returns.
|
||||
@ -153,7 +153,7 @@ int attr_vprint64(VSTREAM *fp, int flags, va_list ap)
|
||||
HTABLE_INFO **ht_info_list;
|
||||
HTABLE_INFO **ht;
|
||||
ssize_t len_val;
|
||||
ATTR_PRINT_SLAVE_FN print_fn;
|
||||
ATTR_PRINT_CUSTOM_FN print_fn;
|
||||
void *print_arg;
|
||||
|
||||
/*
|
||||
@ -211,7 +211,7 @@ int attr_vprint64(VSTREAM *fp, int flags, va_list ap)
|
||||
attr_name, (long) len_val);
|
||||
break;
|
||||
case ATTR_TYPE_FUNC:
|
||||
print_fn = va_arg(ap, ATTR_PRINT_SLAVE_FN);
|
||||
print_fn = va_arg(ap, ATTR_PRINT_CUSTOM_FN);
|
||||
print_arg = va_arg(ap, void *);
|
||||
print_fn(attr_print64, fp, flags | ATTR_FLAG_MORE, print_arg);
|
||||
break;
|
||||
|
@ -53,7 +53,7 @@
|
||||
/* .IP "SEND_ATTR_DATA(const char *name, ssize_t len, const void *value)"
|
||||
/* The arguments are an attribute name, an attribute value
|
||||
/* length, and an attribute value pointer.
|
||||
/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_SLAVE_FN, const void *value)"
|
||||
/* .IP "SEND_ATTR_FUNC(ATTR_PRINT_CUSTOM_FN, const void *value)"
|
||||
/* The arguments are a function pointer and generic data
|
||||
/* pointer. The caller-specified function returns whatever the
|
||||
/* specified attribute printing function returns.
|
||||
@ -120,7 +120,7 @@ int attr_vprint_plain(VSTREAM *fp, int flags, va_list ap)
|
||||
HTABLE_INFO **ht;
|
||||
static VSTRING *base64_buf;
|
||||
ssize_t len_val;
|
||||
ATTR_PRINT_SLAVE_FN print_fn;
|
||||
ATTR_PRINT_CUSTOM_FN print_fn;
|
||||
void *print_arg;
|
||||
|
||||
/*
|
||||
@ -169,7 +169,7 @@ int attr_vprint_plain(VSTREAM *fp, int flags, va_list ap)
|
||||
attr_name, (long) len_val);
|
||||
break;
|
||||
case ATTR_TYPE_FUNC:
|
||||
print_fn = va_arg(ap, ATTR_PRINT_SLAVE_FN);
|
||||
print_fn = va_arg(ap, ATTR_PRINT_CUSTOM_FN);
|
||||
print_arg = va_arg(ap, void *);
|
||||
print_fn(attr_print_plain, fp, flags | ATTR_FLAG_MORE, print_arg);
|
||||
break;
|
||||
|
@ -102,7 +102,7 @@
|
||||
/* This argument is followed by an attribute name and a VSTRING pointer.
|
||||
/* .IP "RECV_ATTR_DATA(const char *name, VSTRING *vp)"
|
||||
/* This argument is followed by an attribute name and a VSTRING pointer.
|
||||
/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_SLAVE_FN, void *data)"
|
||||
/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_CUSTOM_FN, void *data)"
|
||||
/* This argument is followed by a function pointer and a generic data
|
||||
/* pointer. The caller-specified function returns < 0 in case of
|
||||
/* error.
|
||||
@ -276,7 +276,7 @@ int attr_vscan0(VSTREAM *fp, int flags, va_list ap)
|
||||
HTABLE *hash_table;
|
||||
int ch;
|
||||
int conversions;
|
||||
ATTR_SCAN_SLAVE_FN scan_fn;
|
||||
ATTR_SCAN_CUSTOM_FN scan_fn;
|
||||
void *scan_arg;
|
||||
|
||||
/*
|
||||
@ -416,7 +416,7 @@ int attr_vscan0(VSTREAM *fp, int flags, va_list ap)
|
||||
return (-1);
|
||||
break;
|
||||
case ATTR_TYPE_FUNC:
|
||||
scan_fn = va_arg(ap, ATTR_SCAN_SLAVE_FN);
|
||||
scan_fn = va_arg(ap, ATTR_SCAN_CUSTOM_FN);
|
||||
scan_arg = va_arg(ap, void *);
|
||||
if (scan_fn(attr_scan0, fp, flags | ATTR_FLAG_MORE, scan_arg) < 0)
|
||||
return (-1);
|
||||
|
@ -104,7 +104,7 @@
|
||||
/* This argument is followed by an attribute name and a VSTRING pointer.
|
||||
/* .IP "RECV_ATTR_DATA(const char *name, VSTRING *vp)"
|
||||
/* This argument is followed by an attribute name and a VSTRING pointer.
|
||||
/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_SLAVE_FN, void *data)"
|
||||
/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_CUSTOM_FN, void *data)"
|
||||
/* This argument is followed by a function pointer and a generic data
|
||||
/* pointer. The caller-specified function returns < 0 in case of
|
||||
/* error.
|
||||
@ -279,7 +279,7 @@ int attr_vscan64(VSTREAM *fp, int flags, va_list ap)
|
||||
HTABLE *hash_table;
|
||||
int ch;
|
||||
int conversions;
|
||||
ATTR_SCAN_SLAVE_FN scan_fn;
|
||||
ATTR_SCAN_CUSTOM_FN scan_fn;
|
||||
void *scan_arg;
|
||||
|
||||
/*
|
||||
@ -465,7 +465,7 @@ int attr_vscan64(VSTREAM *fp, int flags, va_list ap)
|
||||
}
|
||||
break;
|
||||
case ATTR_TYPE_FUNC:
|
||||
scan_fn = va_arg(ap, ATTR_SCAN_SLAVE_FN);
|
||||
scan_fn = va_arg(ap, ATTR_SCAN_CUSTOM_FN);
|
||||
scan_arg = va_arg(ap, void *);
|
||||
if (scan_fn(attr_scan64, fp, flags | ATTR_FLAG_MORE, scan_arg) < 0)
|
||||
return (-1);
|
||||
|
@ -102,7 +102,7 @@
|
||||
/* This argument is followed by an attribute name and a VSTRING pointer.
|
||||
/* .IP "RECV_ATTR_DATA(const char *name, VSTRING *vp)"
|
||||
/* This argument is followed by an attribute name and a VSTRING pointer.
|
||||
/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_SLAVE_FN, void *data)"
|
||||
/* .IP "RECV_ATTR_FUNC(ATTR_SCAN_CUSTOM_FN, void *data)"
|
||||
/* This argument is followed by a function pointer and a generic data
|
||||
/* pointer. The caller-specified function returns < 0 in case of
|
||||
/* error.
|
||||
@ -292,7 +292,7 @@ int attr_vscan_plain(VSTREAM *fp, int flags, va_list ap)
|
||||
HTABLE *hash_table;
|
||||
int ch;
|
||||
int conversions;
|
||||
ATTR_SCAN_SLAVE_FN scan_fn;
|
||||
ATTR_SCAN_CUSTOM_FN scan_fn;
|
||||
void *scan_arg;
|
||||
|
||||
/*
|
||||
@ -453,7 +453,7 @@ int attr_vscan_plain(VSTREAM *fp, int flags, va_list ap)
|
||||
return (-1);
|
||||
break;
|
||||
case ATTR_TYPE_FUNC:
|
||||
scan_fn = va_arg(ap, ATTR_SCAN_SLAVE_FN);
|
||||
scan_fn = va_arg(ap, ATTR_SCAN_CUSTOM_FN);
|
||||
scan_arg = va_arg(ap, void *);
|
||||
if (scan_fn(attr_scan_plain, fp, flags | ATTR_FLAG_MORE, scan_arg) < 0)
|
||||
return (-1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user