summaryrefslogtreecommitdiffstats
path: root/contrib/sendmail/libmilter/docs/smfi_setpriv.html
blob: 1c287ebb10d658d1e4a5a00791e48d64df1afd9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<HTML>
<HEAD><TITLE>smfi_setpriv</TITLE></HEAD>
<BODY>
<!--
$Id: smfi_setpriv.html,v 1.11 2006/12/21 18:30:35 ca Exp $
-->
<H1>smfi_setpriv</H1>

<TABLE border="0" cellspacing=4 cellpadding=4>
<!---------- Synopsis ----------->
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
<PRE>
#include &lt;libmilter/mfapi.h&gt;
int smfi_setpriv(
	SMFICTX *ctx,
	void *privatedata
);
</PRE>
Set the private data pointer for this connection.
</TD></TR>

<!----------- Description ---------->
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
<TABLE border="1" cellspacing=1 cellpadding=4>
<TR align="left" valign=top>
<TH width="80">Called When</TH>
<TD>smfi_setpriv may be called in any of the xxfi_* callbacks.</TD>
</TR>
<TR align="left" valign=top>
<TH width="80">Effects</TH>
<TD>Sets the private data pointer for the context ctx.</TD>
</TR>
</TABLE>

<!----------- Arguments ---------->
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
    <TABLE border="1" cellspacing=0>
    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
    <TR valign="top"><TD>ctx</TD>
	<TD>Opaque context structure.
	</TD></TR>
    <TR valign="top"><TD>privatedata</TD>
	<TD>Pointer to private data.  This value will be returned by subsequent calls to <A href="smfi_getpriv.html">smfi_getpriv</A> using ctx.
	</TD></TR>
    </TABLE>
</TD></TR>

<!----------- Return values ---------->
<TR>
<TH valign="top" align=left>RETURN VALUES</TH> 

<TD>smfi_setpriv returns MI_FAILURE if ctx is an invalid context.
Otherwise, it returns MI_SUCCESS.</TD>
</TR>

<TR>
<TH valign="top" align=left>NOTES</TH> 

<TD>There is only one private data pointer per connection; multiple
calls to smfi_setpriv with different values will cause previous values
to be lost.
<P>
Before a filter terminates it should release the private data
and set the pointer to NULL.
</TD>

</TR>

</TABLE>

<HR size="1">
<FONT size="-1">
Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
All rights reserved.
<BR>
By using this file, you agree to the terms and conditions set
forth in the LICENSE.
</FONT>
</BODY>
</HTML>
OpenPOWER on IntegriCloud