Merge from vendor branch GDB:
[dragonfly.git] / contrib / sendmail-8.13.4 / libmilter / docs / smfi_opensocket.html
1 <html>
2 <head><title>smfi_opensocket</title></head>
3 <body>
4 <!--
5 $Id: smfi_opensocket.html,v 1.4 2003/10/20 22:28:57 msk 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=150>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, before calling
28 <tt>smfi_main()</tt>.</td>
29 </tr>
30 <tr align="left" valign=top>
31 <th width="80">Effects</th>
32 <td>smfi_opensocket attempts to create the socket specified previously by
33 a call to <tt>smfi_setconn()</tt> which will be the interface between MTAs
34 and the filter.  This allows the calling application to ensure that the
35 socket can be created.  If this is not called, <tt>smfi_main()</tt> will
36 do so implicitly.  </td>
37 </tr>
38 </table>
39
40 <!----------- Arguments ---------->
41 <tr><th valign="top" align=left>ARGUMENTS</th><td>
42     <table border="1" cellspacing=0>
43     <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
44     <tr valign="top"><td>rmsocket</td>
45         <td>A flag indicating whether or not the library should try to
46         remove any existing UNIX domain socket before trying to create
47         a new one.
48         </td></tr>
49     </table>
50 </td></tr>
51
52 <!----------- Return values ---------->
53 <tr>
54 <th valign="top" align=left>RETURN VALUES</th> 
55
56 <td>smfi_opensocket will fail and return MI_FAILURE if:
57 <ul>
58     <li>The interface socket could not be created for any reason.
59     <li><tt>rmsocket</tt> was <tt>true</tt>, and either the socket could
60         not be examined, or exists and could not be removed.
61     <li><tt>smfi_setconn()</tt> has not been called.
62 </ul>
63 Otherwise, it will return MI_SUCCESS
64 </td>
65 </tr>
66
67 </table>
68
69 <hr size="1">
70 <font size="-1">
71 Copyright (c) 2003 Sendmail, Inc. and its suppliers.
72 All rights reserved.
73 <br>
74 By using this file, you agree to the terms and conditions set
75 forth in the LICENSE.
76 </font>
77 </body>
78 </html>