From owner-freebsd-arch@FreeBSD.ORG Mon Apr 6 10:48:30 2009 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90E6D106567B for ; Mon, 6 Apr 2009 10:48:30 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 69ADD8FC13 for ; Mon, 6 Apr 2009 10:48:30 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 0568D46B8D; Mon, 6 Apr 2009 06:48:30 -0400 (EDT) Date: Mon, 6 Apr 2009 11:48:29 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <49D98461.4000002@elischer.org> Message-ID: References: <49D98461.4000002@elischer.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Rick Macklem , freebsd-arch@freebsd.org Subject: Re: getting a callback ip address for nfsv4 client X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 10:48:31 -0000 On Sun, 5 Apr 2009, Julian Elischer wrote: >> One possibility is to connect() a socket to the server address, then call >> getsockaddr() to query what address the network stack is using. If the >> connection completed, then the address could at least send packets to the >> server, even if it isn't reachable from the server. >> >> (Obviously, kernel versions of the above...) > > we ended up with him doing "whatever the connect code would have done" since > as he is in fact inside the kernel, he can just do the same.. I figured that if the RPC layer was going to make a connection anyway, we could just query the RPC layer and ask it what address it had used. However, if the decision needs to be made earlier than that, then that doesn't make as much sense. This would mean NFS could avoid knowing about routes and interfaces, and just know about sockets and addresses. Robert N M Watson Computer Laboratory University of Cambridge