Re: sockets APIs extensions for Host Identity Protocol

Tony Finch <dot@dotat.at> Mon, 14 May 2007 16:28 UTC

Return-path: <discuss-bounces@apps.ietf.org>
Received: from [127.0.0.1] (helo=stiedprmman1.va.neustar.com) by megatron.ietf.org with esmtp (Exim 4.43) id 1HndPV-0007cb-6e; Mon, 14 May 2007 12:28:33 -0400
Received: from discuss by megatron.ietf.org with local (Exim 4.43) id 1HndPT-0007cP-OY for discuss-confirm+ok@megatron.ietf.org; Mon, 14 May 2007 12:28:31 -0400
Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1HndPT-0007cH-Ej for discuss@apps.ietf.org; Mon, 14 May 2007 12:28:31 -0400
Received: from ppsw-0.csi.cam.ac.uk ([131.111.8.130]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1HndPR-00052J-1N for discuss@apps.ietf.org; Mon, 14 May 2007 12:28:31 -0400
X-Cam-SpamDetails: Not scanned
X-Cam-AntiVirus: No virus found
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:52340) by ppsw-0.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.150]:25) with esmtpa (EXTERNAL:fanf2) id 1HndPL-0002ne-1a (Exim 4.63) (return-path <fanf2@hermes.cam.ac.uk>); Mon, 14 May 2007 17:28:23 +0100
Received: from fanf2 (helo=localhost) by hermes-1.csi.cam.ac.uk (hermes.cam.ac.uk) with local-esmtp id 1HndPL-0006SN-Et (Exim 4.54) (return-path <fanf2@hermes.cam.ac.uk>); Mon, 14 May 2007 17:28:23 +0100
Date: Mon, 14 May 2007 17:28:23 +0100
From: Tony Finch <dot@dotat.at>
X-X-Sender: fanf2@hermes-1.csi.cam.ac.uk
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
Subject: Re: sockets APIs extensions for Host Identity Protocol
In-Reply-To: <200705141552.LAA02624@Sparkle.Rodents.Montreal.QC.CA>
Message-ID: <Pine.LNX.4.64.0705141727240.26169@hermes-1.csi.cam.ac.uk>
References: <Pine.SOL.4.64.0705041801060.14418@kekkonen.cs.hut.fi> <31BC7A8C1A51004A84E08DEF@[10.1.110.5]> <200705072216.SAA06179@Sparkle.Rodents.Montreal.QC.CA> <Pine.SOL.4.64.0705090046320.18946@kekkonen.cs.hut.fi> <200705141552.LAA02624@Sparkle.Rodents.Montreal.QC.CA>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset="US-ASCII"
X-Spam-Score: 0.0 (/)
X-Scan-Signature: de4f315c9369b71d7dd5909b42224370
Cc: discuss@apps.ietf.org
X-BeenThere: discuss@apps.ietf.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: general discussion of application-layer protocols <discuss.apps.ietf.org>
List-Unsubscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=unsubscribe>
List-Post: <mailto:discuss@apps.ietf.org>
List-Help: <mailto:discuss-request@apps.ietf.org?subject=help>
List-Subscribe: <https://www1.ietf.org/mailman/listinfo/discuss>, <mailto:discuss-request@apps.ietf.org?subject=subscribe>
Errors-To: discuss-bounces@apps.ietf.org

On Mon, 14 May 2007, der Mouse wrote:
>
> The major annoyance it has for me is the requirement that, to quote the
> manpage for the version I use, "[i]n this hints structure all members
> other than ai_flags, ai_family, ai_socktype, and ai_protocol must be
> zero or a NULL pointer".  This requires the app to either have a static
> struct addrinfo around or to know the complete list of members of the
> struct - and it's completely unnecessary as far as I can see.

You should be able to just memset() it to 0. (I believe POSIX gives you
more guarantees than C in this respect.)

Tony.
-- 
f.a.n.finch  <dot@dotat.at>  http://dotat.at/
FORTIES: NORTHWESTERLY 5 TO 7, BECOMING CYCLONIC FOR A TIME, DECREASING 4
LATER. MODERATE OCCASIONALLY ROUGH AT FIRST. SHOWERS. MODERATE OR GOOD.