Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > c362b39f6304963d30df07fcc9cd5958 > files > 54

sendmail-devel-8.14.2-3mdv2008.1.x86_64.rpm

<HTML>
<HEAD><TITLE>smfi_version()</TITLE></HEAD>
<BODY>
<!--
$Id: smfi_version.html,v 1.5 2007/03/22 17:30:57 ca Exp $
-->
<H1>smfi_version()</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_version(
	unsigned int *pmajor,
	unsigned int *pminor,
	unsigned int *ppl
);
</PRE>
Get the (runtime) version of libmilter.
</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_version may be called at any time.</TD>
</TR>
<TR ALIGN="LEFT" VALIGN=TOP>
<TH WIDTH="80">Effects</TH>
<TD>None.</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>pmajor</TD>
	<TD>Pointer to an unsigned int variable to store major version number.
	</TD></TR>
    <TR VALIGN="TOP"><TD>pminor</TD>
	<TD>Pointer to an unsigned int variable to store minor version number.
	</TD></TR>
    <TR VALIGN="TOP"><TD>ppl</TD>
	<TD>Pointer to an unsigned int variable to store patch level number.
	</TD></TR>
    </TABLE>
</TD></TR>

<!----------- Return values ---------->
<TR>
<TH VALIGN="TOP" ALIGN=LEFT>RETURN VALUES</TH>
<TD>smfi_version returns MI_SUCCESS.</TD>
</TR>

</TABLE>

Note: the compile time version of libmilter is available in the macro
<CODE>SMFI_VERSION</CODE>.
A milter can check this macro to determine which functions to use
(at compile time via C preprocessor statements).
Using this macro and the
<CODE>smfi_version()</CODE>
function,
a milter can determine at runtime whether it has been (dynamically)
linked against the expected libmilter version.
To extract the major and minor version as well as the current patch level
from this macro, the macros
<CODE>SM_LM_VRS_MAJOR(v)</CODE>,
<CODE>SM_LM_VRS_MINOR(v)</CODE>, and
<CODE>SM_LM_VRS_PLVL(v)</CODE>
can be used, respectively.


<HR SIZE="1">
<FONT SIZE="-1">
Copyright (c) 2006, 2007 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>