]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/sendmail/libmilter/docs/smfi_opensocket.html
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / sendmail / libmilter / docs / smfi_opensocket.html
1 <HTML>
2 <HEAD><TITLE>smfi_opensocket</TITLE></HEAD>
3 <BODY>
4 <!--
5 $Id: smfi_opensocket.html,v 1.7 2008/01/31 17:29:33 ca Exp $
6 -->
7 <H1>smfi_opensocket</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_opensocket(
15         bool rmsocket
16 );
17 </PRE>
18 Attempt to create the interface socket MTAs will use to connect to the
19 filter.
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>Called only from program mainline,
28 after calling <TT>smfi_setconn()</TT> and <TT>smfi_register()</TT>,
29 but before calling <TT>smfi_main()</TT>.
30 </TD>
31 </TR>
32 <TR align="left" valign=top>
33 <TH width="80">Effects</TH>
34 <TD>smfi_opensocket attempts to create the socket specified previously by
35 a call to <TT>smfi_setconn()</TT> which will be the interface between MTAs
36 and the filter.
37 This allows the calling application to ensure that the
38 socket can be created.
39 If this is not called,
40 <TT>smfi_main()</TT> will do so implicitly.
41 </TD>
42 </TR>
43 </TABLE>
44
45 <!----------- Arguments ---------->
46 <TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
47     <TABLE border="1" cellspacing=0>
48     <TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
49     <TR valign="top"><TD>rmsocket</TD>
50         <TD>A flag indicating whether or not the library should try to
51         remove any existing UNIX domain socket before trying to create
52         a new one.
53         </TD></TR>
54     </TABLE>
55 </TD></TR>
56
57 <!----------- Return values ---------->
58 <TR>
59 <TH valign="top" align=left>RETURN VALUES</TH> 
60
61 <TD>smfi_opensocket will fail and return MI_FAILURE if:
62 <UL>
63     <LI>The interface socket could not be created for any reason.
64     <LI><TT>rmsocket</TT> was <TT>true</TT>, and either the socket could
65         not be examined, or exists and could not be removed.
66     <LI><TT>smfi_setconn()</TT> or <TT>smfi_register()</TT>
67         have not been called.
68 </UL>
69 Otherwise, it will return MI_SUCCESS
70 </TD>
71 </TR>
72
73 </TABLE>
74
75 <HR size="1">
76 <FONT size="-1">
77 Copyright (c) 2003, 2008 Sendmail, Inc. and its suppliers.
78 All rights reserved.
79 <BR>
80 By using this file, you agree to the terms and conditions set
81 forth in the LICENSE.
82 </FONT>
83 </BODY>
84 </HTML>