all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mario Lang <mlang@delysid.org>
Cc: emacs-devel@gnu.org
Subject: Re: Local interface used for outbound network connections
Date: Wed, 08 Jan 2003 15:49:16 +0100	[thread overview]
Message-ID: <87u1gjzogj.fsf@lexx.delysid.org> (raw)
In-Reply-To: <5xof6rhncz.fsf@kfs2.cua.dk> (storm@cua.dk's message of "08 Jan 2003 12:50:20 +0100")

storm@cua.dk (Kim F. Storm) writes:

> Mario Lang <mlang@delysid.org> writes:
>
>> For IRC DCC connection, we need a reliable way to optain the IP
>> address we're reachable via.  Normally, IRC clients do this by calling
>> getsockname on the connection they have to the IRC server.  This
>> returns the interface used + port number.
>
> I definitely intended make-network-process to make this info
> available, but I forgot to implement it.  Thanks for reminding me :-)
>
> I have just committed the following changes to CVS:

Thanks a lot!  Tested, and works here.

(defun erc-dcc-get-host (proc)
  (let ((sockaddr (plist-get (process-contact erc-process t) :local)))
    (when sockaddr
        (mapconcat #'number-to-string (subseq sockaddr 0 4) "."))))

-- 
CYa,
  Mario | Debian Developer <URL:http://debian.org/>
        | Get my public key via finger mlang@db.debian.org
        | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44

  reply	other threads:[~2003-01-08 14:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-07 22:43 Local interface used for outbound network connections Mario Lang
2003-01-08 11:50 ` Kim F. Storm
2003-01-08 14:49   ` Mario Lang [this message]
2003-01-08 16:39     ` Kim F. Storm
2003-01-08 16:54       ` Kim F. Storm
2003-01-09  7:28 ` Richard Stallman
2003-01-09 15:27   ` Mario Lang

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

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

  git send-email \
    --in-reply-to=87u1gjzogj.fsf@lexx.delysid.org \
    --to=mlang@delysid.org \
    --cc=emacs-devel@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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.