freebsd-dev/contrib/sendmail/libmilter/docs/smfi_opensocket.html
2007-04-09 01:38:51 +00:00

79 lines
2.2 KiB
HTML

<HTML>
<HEAD><TITLE>smfi_opensocket</TITLE></HEAD>
<BODY>
<!--
$Id: smfi_opensocket.html,v 1.6 2006/12/21 18:30:35 ca Exp $
-->
<H1>smfi_opensocket</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_opensocket(
bool rmsocket
);
</PRE>
Attempt to create the interface socket MTAs will use to connect to the
filter.
</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>Called only from program mainline, before calling
<TT>smfi_main()</TT>.</TD>
</TR>
<TR align="left" valign=top>
<TH width="80">Effects</TH>
<TD>smfi_opensocket attempts to create the socket specified previously by
a call to <TT>smfi_setconn()</TT> which will be the interface between MTAs
and the filter. This allows the calling application to ensure that the
socket can be created. If this is not called, <TT>smfi_main()</TT> will
do so implicitly. </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>rmsocket</TD>
<TD>A flag indicating whether or not the library should try to
remove any existing UNIX domain socket before trying to create
a new one.
</TD></TR>
</TABLE>
</TD></TR>
<!----------- Return values ---------->
<TR>
<TH valign="top" align=left>RETURN VALUES</TH>
<TD>smfi_opensocket will fail and return MI_FAILURE if:
<UL>
<LI>The interface socket could not be created for any reason.
<LI><TT>rmsocket</TT> was <TT>true</TT>, and either the socket could
not be examined, or exists and could not be removed.
<LI><TT>smfi_setconn()</TT> has not been called.
</UL>
Otherwise, it will return MI_SUCCESS
</TD>
</TR>
</TABLE>
<HR size="1">
<FONT size="-1">
Copyright (c) 2003 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>