xref: /freebsd/contrib/sendmail/libmilter/docs/smfi_version.html (revision e2c0e292e8a7ca00ba99bcfccc9e637f45c3e8b1)
1d0cef73dSGregory Neil Shapiro<HTML>
2d0cef73dSGregory Neil Shapiro<HEAD><TITLE>smfi_version()</TITLE></HEAD>
3d0cef73dSGregory Neil Shapiro<BODY>
4d0cef73dSGregory Neil Shapiro<!--
54313cc83SGregory Neil Shapiro$Id: smfi_version.html,v 1.7 2013-11-22 20:51:39 ca Exp $
6d0cef73dSGregory Neil Shapiro-->
7d0cef73dSGregory Neil Shapiro<H1>smfi_version()</H1>
8d0cef73dSGregory Neil Shapiro
9d0cef73dSGregory Neil Shapiro<TABLE BORDER="0" CELLSPACING=4 CELLPADDING=4>
10d0cef73dSGregory Neil Shapiro<!---------- Synopsis ----------->
11d0cef73dSGregory Neil Shapiro<TR><TH VALIGN="TOP" ALIGN=LEFT WIDTH=100>SYNOPSIS</TH><TD>
12d0cef73dSGregory Neil Shapiro<PRE>
13d0cef73dSGregory Neil Shapiro#include &lt;libmilter/mfapi.h&gt;
14d0cef73dSGregory Neil Shapiroint smfi_version(
15d0cef73dSGregory Neil Shapiro	unsigned int *pmajor,
16d0cef73dSGregory Neil Shapiro	unsigned int *pminor,
17d0cef73dSGregory Neil Shapiro	unsigned int *ppl
18d0cef73dSGregory Neil Shapiro);
19d0cef73dSGregory Neil Shapiro</PRE>
20d0cef73dSGregory Neil ShapiroGet the (runtime) version of libmilter.
21d0cef73dSGregory Neil Shapiro</TD></TR>
22d0cef73dSGregory Neil Shapiro
23d0cef73dSGregory Neil Shapiro<!----------- Description ---------->
24d0cef73dSGregory Neil Shapiro<TR><TH VALIGN="TOP" ALIGN=LEFT>DESCRIPTION</TH><TD>
25d0cef73dSGregory Neil Shapiro<TABLE BORDER="1" CELLSPACING=1 CELLPADDING=4>
26d0cef73dSGregory Neil Shapiro<TR ALIGN="LEFT" VALIGN=TOP>
27d0cef73dSGregory Neil Shapiro<TH WIDTH="80">Called When</TH>
28d0cef73dSGregory Neil Shapiro<TD>smfi_version may be called at any time.</TD>
29d0cef73dSGregory Neil Shapiro</TR>
30d0cef73dSGregory Neil Shapiro<TR ALIGN="LEFT" VALIGN=TOP>
31d0cef73dSGregory Neil Shapiro<TH WIDTH="80">Effects</TH>
32d0cef73dSGregory Neil Shapiro<TD>None.</TD>
33d0cef73dSGregory Neil Shapiro</TR>
34d0cef73dSGregory Neil Shapiro</TABLE>
35*5b0945b5SGregory Neil Shapiro</TD></TR>
36d0cef73dSGregory Neil Shapiro
37d0cef73dSGregory Neil Shapiro<!----------- Arguments ---------->
38d0cef73dSGregory Neil Shapiro<TR><TH VALIGN="TOP" ALIGN=LEFT>ARGUMENTS</TH><TD>
39d0cef73dSGregory Neil Shapiro    <TABLE BORDER="1" CELLSPACING=0>
40d0cef73dSGregory Neil Shapiro    <TR BGCOLOR="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
41d0cef73dSGregory Neil Shapiro    <TR VALIGN="TOP"><TD>pmajor</TD>
42d0cef73dSGregory Neil Shapiro	<TD>Pointer to an unsigned int variable to store major version number.
43d0cef73dSGregory Neil Shapiro	</TD></TR>
44d0cef73dSGregory Neil Shapiro    <TR VALIGN="TOP"><TD>pminor</TD>
45d0cef73dSGregory Neil Shapiro	<TD>Pointer to an unsigned int variable to store minor version number.
46d0cef73dSGregory Neil Shapiro	</TD></TR>
47d0cef73dSGregory Neil Shapiro    <TR VALIGN="TOP"><TD>ppl</TD>
48d0cef73dSGregory Neil Shapiro	<TD>Pointer to an unsigned int variable to store patch level number.
49d0cef73dSGregory Neil Shapiro	</TD></TR>
50d0cef73dSGregory Neil Shapiro    </TABLE>
51d0cef73dSGregory Neil Shapiro</TD></TR>
52d0cef73dSGregory Neil Shapiro
53d0cef73dSGregory Neil Shapiro<!----------- Return values ---------->
54d0cef73dSGregory Neil Shapiro<TR>
55d0cef73dSGregory Neil Shapiro<TH VALIGN="TOP" ALIGN=LEFT>RETURN VALUES</TH>
56d0cef73dSGregory Neil Shapiro<TD>smfi_version returns MI_SUCCESS.</TD>
57d0cef73dSGregory Neil Shapiro</TR>
58d0cef73dSGregory Neil Shapiro
59d0cef73dSGregory Neil Shapiro</TABLE>
60d0cef73dSGregory Neil Shapiro
61d0cef73dSGregory Neil ShapiroNote: the compile time version of libmilter is available in the macro
62d0cef73dSGregory Neil Shapiro<CODE>SMFI_VERSION</CODE>.
63d0cef73dSGregory Neil ShapiroTo extract the major and minor version as well as the current patch level
64d0cef73dSGregory Neil Shapirofrom this macro, the macros
65d0cef73dSGregory Neil Shapiro<CODE>SM_LM_VRS_MAJOR(v)</CODE>,
66d0cef73dSGregory Neil Shapiro<CODE>SM_LM_VRS_MINOR(v)</CODE>, and
67d0cef73dSGregory Neil Shapiro<CODE>SM_LM_VRS_PLVL(v)</CODE>
68d0cef73dSGregory Neil Shapirocan be used, respectively.
69e3793f76SGregory Neil ShapiroA milter can check the
70e3793f76SGregory Neil Shapiro<CODE>SMFI_VERSION</CODE>
71e3793f76SGregory Neil Shapiromacro to determine which functions to use
72e3793f76SGregory Neil Shapiro(at compile time via C preprocessor statements).
73e3793f76SGregory Neil ShapiroUsing this macro and the
74e3793f76SGregory Neil Shapiro<CODE>smfi_version()</CODE>
75e3793f76SGregory Neil Shapirofunction,
76e3793f76SGregory Neil Shapiroa milter can determine at runtime whether it has been (dynamically)
77e3793f76SGregory Neil Shapirolinked against the expected libmilter version.
78e3793f76SGregory Neil ShapiroSuch a function should only compare the major and minor version,
79e3793f76SGregory Neil Shapironot the patch level,
80e3793f76SGregory Neil Shapiroi.e., the libmilter library will be compatible despite
81e3793f76SGregory Neil Shapirodifferent patch levels.
82d0cef73dSGregory Neil Shapiro
83d0cef73dSGregory Neil Shapiro
84d0cef73dSGregory Neil Shapiro<HR SIZE="1">
85d0cef73dSGregory Neil Shapiro<FONT SIZE="-1">
865dd76dd0SGregory Neil ShapiroCopyright (c) 2006-2008 Proofpoint, Inc. and its suppliers.
87d0cef73dSGregory Neil ShapiroAll rights reserved.
88d0cef73dSGregory Neil Shapiro<BR>
89d0cef73dSGregory Neil ShapiroBy using this file, you agree to the terms and conditions set
90d0cef73dSGregory Neil Shapiroforth in the LICENSE.
91d0cef73dSGregory Neil Shapiro</FONT>
92d0cef73dSGregory Neil Shapiro</BODY>
93d0cef73dSGregory Neil Shapiro</HTML>
94