]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - libmilter/docs/smfi_version.html
Import sendmail 8.16.1
[FreeBSD/FreeBSD.git] / libmilter / docs / smfi_version.html
1 <HTML>
2 <HEAD><TITLE>smfi_version()</TITLE></HEAD>
3 <BODY>
4 <!--
5 $Id: smfi_version.html,v 1.7 2013-11-22 20:51:39 ca Exp $
6 -->
7 <H1>smfi_version()</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;
14 int smfi_version(
15         unsigned int *pmajor,
16         unsigned int *pminor,
17         unsigned int *ppl
18 );
19 </PRE>
20 Get the (runtime) version of libmilter.
21 </TD></TR>
22
23 <!----------- Description ---------->
24 <TR><TH VALIGN="TOP" ALIGN=LEFT>DESCRIPTION</TH><TD>
25 <TABLE BORDER="1" CELLSPACING=1 CELLPADDING=4>
26 <TR ALIGN="LEFT" VALIGN=TOP>
27 <TH WIDTH="80">Called When</TH>
28 <TD>smfi_version may be called at any time.</TD>
29 </TR>
30 <TR ALIGN="LEFT" VALIGN=TOP>
31 <TH WIDTH="80">Effects</TH>
32 <TD>None.</TD>
33 </TR>
34 </TABLE>
35 </TD></TR>
36
37 <!----------- Arguments ---------->
38 <TR><TH VALIGN="TOP" ALIGN=LEFT>ARGUMENTS</TH><TD>
39     <TABLE BORDER="1" CELLSPACING=0>
40     <TR BGCOLOR="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
41     <TR VALIGN="TOP"><TD>pmajor</TD>
42         <TD>Pointer to an unsigned int variable to store major version number.
43         </TD></TR>
44     <TR VALIGN="TOP"><TD>pminor</TD>
45         <TD>Pointer to an unsigned int variable to store minor version number.
46         </TD></TR>
47     <TR VALIGN="TOP"><TD>ppl</TD>
48         <TD>Pointer to an unsigned int variable to store patch level number.
49         </TD></TR>
50     </TABLE>
51 </TD></TR>
52
53 <!----------- Return values ---------->
54 <TR>
55 <TH VALIGN="TOP" ALIGN=LEFT>RETURN VALUES</TH>
56 <TD>smfi_version returns MI_SUCCESS.</TD>
57 </TR>
58
59 </TABLE>
60
61 Note: the compile time version of libmilter is available in the macro
62 <CODE>SMFI_VERSION</CODE>.
63 To extract the major and minor version as well as the current patch level
64 from this macro, the macros
65 <CODE>SM_LM_VRS_MAJOR(v)</CODE>,
66 <CODE>SM_LM_VRS_MINOR(v)</CODE>, and
67 <CODE>SM_LM_VRS_PLVL(v)</CODE>
68 can be used, respectively.
69 A milter can check the
70 <CODE>SMFI_VERSION</CODE>
71 macro to determine which functions to use
72 (at compile time via C preprocessor statements).
73 Using this macro and the
74 <CODE>smfi_version()</CODE>
75 function,
76 a milter can determine at runtime whether it has been (dynamically)
77 linked against the expected libmilter version.
78 Such a function should only compare the major and minor version,
79 not the patch level,
80 i.e., the libmilter library will be compatible despite
81 different patch levels.
82
83
84 <HR SIZE="1">
85 <FONT SIZE="-1">
86 Copyright (c) 2006-2008 Proofpoint, Inc. and its suppliers.
87 All rights reserved.
88 <BR>
89 By using this file, you agree to the terms and conditions set
90 forth in the LICENSE.
91 </FONT>
92 </BODY>
93 </HTML>