From owner-freebsd-net@FreeBSD.ORG Mon Jan 19 12:44:47 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6682916A4CE for ; Mon, 19 Jan 2004 12:44:47 -0800 (PST) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9F2243D1D for ; Mon, 19 Jan 2004 12:44:45 -0800 (PST) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id 2CD251FF91D; Mon, 19 Jan 2004 21:44:44 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id 740661FF90C; Mon, 19 Jan 2004 21:44:42 +0100 (CET) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 246FE153CA; Mon, 19 Jan 2004 20:44:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 19D4815380; Mon, 19 Jan 2004 20:44:34 +0000 (UTC) Date: Mon, 19 Jan 2004 20:44:34 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Poul-Henning Kamp In-Reply-To: <98296.1074542746@critter.freebsd.dk> Message-ID: References: <98296.1074542746@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: net@FreeBSD.ORG cc: Garrett Wollman Subject: Re: Multihomed UDP server X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2004 20:44:47 -0000 On Mon, 19 Jan 2004, Poul-Henning Kamp wrote: > In message <200401192002.i0JK2SJZ058752@khavrinen.lcs.mit.edu>, Garrett Wollman > writes: > >< said: > > > >> I'm considering ways to make sendmsg(2)/recvmsg(2) DTRT, and my > >> current candidate is give them a flag bit which says "msg_name has > >> both addresses". > > > >Um, they already do the right thing. That's what the IP_RECVDESTADDR actually it is IP_RECVDSTADDR (no E). > >option (and its dual whose name I forget right now) is all about. > > Yeah, I found that out. Now, where on the earth is that documented ? You mean for FreeBSD or in ISBN 0-13-490012-X ? For FreeBSD it is man 4 ip: --- cite --- If the IP_RECVDSTADDR option is enabled on a SOCK_DGRAM socket, the recvmsg(2) call will return the destination IP address for a UDP data- gram. The msg_control field in the msghdr structure points to a buffer that contains a cmsghdr structure followed by the IP address. The cmsghdr fields have the following values: --- cite --- -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/