Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > bac0ade7c2a196a5b0c23e49ba36a060 > files > 29

sendmail-devel-8.14.4-10.fc14.x86_64.rpm

<HTML>
<HEAD><TITLE>smfi_opensocket</TITLE></HEAD>
<BODY>
<!--
$Id: smfi_opensocket.html,v 1.7 2008/01/31 17:29:33 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,
after calling <TT>smfi_setconn()</TT> and <TT>smfi_register()</TT>,
but 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> or <TT>smfi_register()</TT>
	have not been called.
</UL>
Otherwise, it will return MI_SUCCESS
</TD>
</TR>

</TABLE>

<HR size="1">
<FONT size="-1">
Copyright (c) 2003, 2008 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>