From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mario Lang Newsgroups: gmane.emacs.devel Subject: Re: Local interface used for outbound network connections Date: Wed, 08 Jan 2003 15:49:16 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87u1gjzogj.fsf@lexx.delysid.org> References: <87ptr81sye.fsf@lexx.delysid.org> <5xof6rhncz.fsf@kfs2.cua.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042037539 14032 80.91.224.249 (8 Jan 2003 14:52:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 8 Jan 2003 14:52:19 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18WHZ2-0003du-00 for ; Wed, 08 Jan 2003 15:52:16 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18WHe7-0005U7-00 for ; Wed, 08 Jan 2003 15:57:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WHY4-0004eZ-00 for emacs-devel@quimby.gnus.org; Wed, 08 Jan 2003 09:51:16 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18WHXb-00041A-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 09:50:47 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18WHWz-0002lE-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 09:50:41 -0500 Original-Received: from [80.109.223.66] (helo=lexx.delysid.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18WHWG-0001qd-00 for emacs-devel@gnu.org; Wed, 08 Jan 2003 09:49:24 -0500 Original-Received: from mlang by lexx.delysid.org with local (Exim 3.36 #1 (Debian)) id 18WHW8-0007Bu-00; Wed, 08 Jan 2003 15:49:16 +0100 Original-To: storm@cua.dk (Kim F. Storm) In-Reply-To: <5xof6rhncz.fsf@kfs2.cua.dk> (storm@cua.dk's message of "08 Jan 2003 12:50:20 +0100") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10581 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10581 storm@cua.dk (Kim F. Storm) writes: > Mario Lang 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 | Get my public key via finger mlang@db.debian.org | 1024D/7FC1A0854909BCCDBE6C102DDFFC022A6B113E44