xref: /freebsd/contrib/sendmail/libmilter/docs/smfi_setpriv.html (revision 7afb8adff33d47f10a11368ff54bb2eec5b30165)
1<HTML>
2<HEAD><TITLE>smfi_setpriv</TITLE></HEAD>
3<BODY>
4<!--
5$Id: smfi_setpriv.html,v 1.12 2013-11-22 20:51:39 ca Exp $
6-->
7<H1>smfi_setpriv</H1>
8
9<TABLE border="0" cellspacing=4 cellpadding=4>
10<!---------- Synopsis ----------->
11<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
12<PRE>
13#include &lt;libmilter/mfapi.h&gt;
14int smfi_setpriv(
15	SMFICTX *ctx,
16	void *privatedata
17);
18</PRE>
19Set the private data pointer for this connection.
20</TD></TR>
21
22<!----------- Description ---------->
23<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
24<TABLE border="1" cellspacing=1 cellpadding=4>
25<TR align="left" valign=top>
26<TH width="80">Called When</TH>
27<TD>smfi_setpriv may be called in any of the xxfi_* callbacks.</TD>
28</TR>
29<TR align="left" valign=top>
30<TH width="80">Effects</TH>
31<TD>Sets the private data pointer for the context ctx.</TD>
32</TR>
33</TABLE>
34
35<!----------- Arguments ---------->
36<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
37    <TABLE border="1" cellspacing=0>
38    <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
39    <TR valign="top"><TD>ctx</TD>
40	<TD>Opaque context structure.
41	</TD></TR>
42    <TR valign="top"><TD>privatedata</TD>
43	<TD>Pointer to private data.  This value will be returned by subsequent calls to <A href="smfi_getpriv.html">smfi_getpriv</A> using ctx.
44	</TD></TR>
45    </TABLE>
46</TD></TR>
47
48<!----------- Return values ---------->
49<TR>
50<TH valign="top" align=left>RETURN VALUES</TH>
51
52<TD>smfi_setpriv returns MI_FAILURE if ctx is an invalid context.
53Otherwise, it returns MI_SUCCESS.</TD>
54</TR>
55
56<TR>
57<TH valign="top" align=left>NOTES</TH>
58
59<TD>There is only one private data pointer per connection; multiple
60calls to smfi_setpriv with different values will cause previous values
61to be lost.
62<P>
63Before a filter terminates it should release the private data
64and set the pointer to NULL.
65</TD>
66
67</TR>
68
69</TABLE>
70
71<HR size="1">
72<FONT size="-1">
73Copyright (c) 2000-2001, 2003 Proofpoint, Inc. and its suppliers.
74All rights reserved.
75<BR>
76By using this file, you agree to the terms and conditions set
77forth in the LICENSE.
78</FONT>
79</BODY>
80</HTML>
81