sane-project-website/old-archive/2000-06/0050.html

134 wiersze
5.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: saned doesn't find sane service...</TITLE>
<META NAME="Author" CONTENT="Martin Heinen (mheinen0@wiesbaden-online.de)">
<META NAME="Subject" CONTENT="Re: saned doesn't find sane service...">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: saned doesn't find sane service...</H1>
<!-- received="Tue Jun 6 19:11:48 2000" -->
<!-- isoreceived="20000607021148" -->
<!-- sent="Wed, 7 Jun 2000 00:26:22 +0200" -->
<!-- isosent="20000606222622" -->
<!-- name="Martin Heinen" -->
<!-- email="mheinen0@wiesbaden-online.de" -->
<!-- subject="Re: saned doesn't find sane service..." -->
<!-- id="20000607002621.A55411@Moses.earth.sol" -->
<!-- inreplyto="200006061527.XAA26220@localhost.localdomain" -->
<STRONG>From:</STRONG> Martin Heinen (<A HREF="mailto:mheinen0@wiesbaden-online.de?Subject=Re:%20saned%20doesn't%20find%20sane%20service...&In-Reply-To=&lt;20000607002621.A55411@Moses.earth.sol&gt;"><EM>mheinen0@wiesbaden-online.de</EM></A>)<BR>
<STRONG>Date:</STRONG> Tue Jun 06 2000 - 15:26:22 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0051.html">Dave Hill: "Re: digital camera drivers"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0049.html">khk@khk.net: "Re: Latest sane CVS, Epson GT7000 and xsane"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0044.html">Petter Reinholdtsen: "Re: saned doesn't find sane service..."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0103.html">Jochen Eisinger: "Re: saned doesn't find sane service..."</A>
<LI><STRONG>Next in thread:</STRONG> <A HREF="0053.html">Jochen Eisinger: "Re: saned doesn't find sane service..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0103.html">Jochen Eisinger: "Re: saned doesn't find sane service..."</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#50">[ date ]</A>
<A HREF="index.html#50">[ thread ]</A>
<A HREF="subject.html#50">[ subject ]</A>
<A HREF="author.html#50">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
<EM>&gt; &gt; But there is the apropriate line in /etc/services... however the man
</EM><BR>
<EM>&gt; &gt; page for getservbyname() says that setservent(int) has to be callen
</EM><BR>
<EM>&gt; &gt; before getservbyname() which is used to determine the port
</EM><BR>
<EM>&gt; &gt; number. When I'm surrounding the getservbyname() call with
</EM><BR>
<EM>&gt; &gt; setservent(int) and endservent(), everything works fine. It looks
</EM><BR>
<EM>&gt; &gt; something like:
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; Which platform is this? I noticed similar, but totaly clear,
</EM><BR>
<EM>&gt; information in the Linux RedHat 6.2 man page. This is the first time
</EM><BR>
<EM>&gt; I hear about the setservent() and endservent() functions. Do they
</EM><BR>
<EM>&gt; exist on all platforms?
</EM><BR>
<P>I re-read my 3.4R FreeBSD manual pages and the functions appeared
<BR>
in 4.2BSD. The manual pages only state that the database files
<BR>
(e.g. /etc/services) will stay open when setservent() was called
<BR>
with a non-zero argument. They _do_not_ state that you
<BR>
have to open the databse with setservent() when
<BR>
using getservbyname().
<BR>
<P><EM>&gt; If anyone can verify this, I'll add it to the CVS repository. I find
</EM><BR>
<EM>&gt; this very strange, as I know this have been working earlier.
</EM><BR>
<P>According to the GNU C Library Reference Manual (2.00 beta)
<BR>
one should use setservent() / endservent() when querying the
<BR>
Services Database with getservent().
<BR>
There is no reason to call the two functions when
<BR>
using getservbyname() to retrieve records. Also Stevens in
<BR>
his book 'UNIX Network Programming' didn't use the two
<BR>
functions to surround getservbyname().
<BR>
<P>HTH
<BR>
Martin
<BR>
<P><PRE>
--
use Perl;
<P>--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20saned%20doesn't%20find%20sane%20service...&In-Reply-To=&lt;20000607002621.A55411@Moses.earth.sol&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0051.html">Dave Hill: "Re: digital camera drivers"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0049.html">khk@khk.net: "Re: Latest sane CVS, Epson GT7000 and xsane"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0044.html">Petter Reinholdtsen: "Re: saned doesn't find sane service..."</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0103.html">Jochen Eisinger: "Re: saned doesn't find sane service..."</A>
<LI><STRONG>Next in thread:</STRONG> <A HREF="0053.html">Jochen Eisinger: "Re: saned doesn't find sane service..."</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0103.html">Jochen Eisinger: "Re: saned doesn't find sane service..."</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#50">[ date ]</A>
<A HREF="index.html#50">[ thread ]</A>
<A HREF="subject.html#50">[ subject ]</A>
<A HREF="author.html#50">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Tue Jun 06 2000 - 19:13:23 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>