From owner-freebsd-arch Fri Sep 7 12:43:34 2001 Delivered-To: freebsd-arch@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id BAC9937B401 for ; Fri, 7 Sep 2001 12:43:31 -0700 (PDT) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id f87JhbL78871; Fri, 7 Sep 2001 14:43:37 -0500 (CDT) (envelope-from jlemon) Date: Fri, 7 Sep 2001 14:43:37 -0500 From: Jonathan Lemon To: Terry Lambert Cc: Bill Fenner , arch@FreeBSD.ORG Subject: Re: Causing to depend on Message-ID: <20010907144337.Z20137@prism.flugsvamp.com> References: <200109071748.KAA21991@windsor.research.att.com> <3B991BF8.5BF2E5E2@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <3B991BF8.5BF2E5E2@mindspring.com> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Sep 07, 2001 at 12:11:52PM -0700, Terry Lambert wrote: > Bill Fenner wrote: > > > > Er, I think I take back my own objection. IEEE Std 1003.1-200x says > > > > SYNOPSIS > > #include > > ... > > Inclusion of the header may also make > > visible all symbols from and . > > ... and it MAY not. > > You should just include both yourself, and be done with it. > > By forcing inclusion of socket.h, you break the layering > abstraction. No. already knows about socket addresses, just in a slightly different form. These are called 'struct sockaddr_in'. > If this is done with pointers, rather than instances or > member references, in the API code, just forward declare > the structure, and use it as an opaque type, e.g.: Uhm. Please go look at the definition of sockaddr_storage in . See RFC 2553 for more information. Not speaking for Bill, but my guess he needs to use this to allocate storage in a protocol-independent fashion. The other alternative may be to create 'sockaddr_storage46' in , but that probably is equally yucky. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message