unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Scott McPeak <smcpeak@coverity.com>
To: bug-guile@gnu.org
Subject: socket examples say INADDR_LOCALHOST rather than INADDR_LOOPBACK
Date: Tue, 29 Sep 2009 17:30:35 -0700	[thread overview]
Message-ID: <4AC2A6AB.7090105@coverity.com> (raw)

In the documentation for Guile's 'connect' call:

http://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Network-Sockets-and-Communication.html

it gives examples:

   (connect sock AF_INET INADDR_LOCALHOST 23)
   (connect sock (make-socket-address AF_INET INADDR_LOCALHOST 23))

However, the correct address is INADDR_LOOPBACK, not INADDR_LOCALHOST. 
The former is not defined:

guile> (inet-ntoa INADDR_LOOPBACK)
"127.0.0.1"
guile> (inet-ntoa INADDR_LOCALHOST)
[...]
ABORT: (unbound-variable)

-Scott




             reply	other threads:[~2009-09-30  0:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30  0:30 Scott McPeak [this message]
2009-10-01 21:30 ` socket examples say INADDR_LOCALHOST rather than INADDR_LOOPBACK Neil Jerram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AC2A6AB.7090105@coverity.com \
    --to=smcpeak@coverity.com \
    --cc=bug-guile@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).