From owner-freebsd-net Thu Nov 14 11:59: 4 2002 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 7D8BA37B401 for ; Thu, 14 Nov 2002 11:59:02 -0800 (PST) Received: from smtp.inode.at (smtp-02.inode.at [62.99.194.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BF2A43E7B for ; Thu, 14 Nov 2002 11:58:55 -0800 (PST) (envelope-from mbretter@inode.at) Received: from line-c-129.adsl-dynamic.inode.at ([62.99.151.129]:1049 helo=inode.at) by smtp.inode.at with esmtp (Exim 4.10) id 18CQ8N-0003Tb-00; Thu, 14 Nov 2002 20:58:39 +0100 Message-ID: <3DD3FFC0.1040008@inode.at> Date: Thu, 14 Nov 2002 20:55:44 +0100 From: Michael Bretterklieber User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2b) Gecko/20021016 X-Accept-Language: de-at, de-de, de, en, en-us MIME-Version: 1.0 To: Garrett Wollman Cc: freebsd-net@FreeBSD.ORG Subject: Re: struct sockaddr_in - question References: <3DD1FAAC.6060707@inode.at> <200211131943.gADJhAeF066433@khavrinen.lcs.mit.edu> In-Reply-To: <3DD1FAAC.6060707@inode.at> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hi, Garrett Wollman wrote: > < said: > > > >My question is do I realy need to fill this? Or is it there just for > >future use? > > > That depends on what you will be using the length for. Some > interfaces require that it be present; other interfaces (e.g., those > system calls which already take a separate length argument) do not. thanx, I got already this answer: here's basically what steven's ``UNIX Network Programming, Vol. 1, 2nd edition'' says: - the length field was added in 4.3BSD-Reno when OSI protocol support was added. makes it easier in handling of variable-length socket address structures. says not all vendors support it and it's not required by posix.1g. and the following is verbatim: - even if the length field is present, we need never set it and need never examine it, unless we're dealing with routing sockets. it is used within the kernel by the routine that deal with socket address structures from various protocol families. bye, -- ------------------------------- ---------------------------------- Michael Bretterklieber - Michael.Bretterklieber@jawa.at JAWA Management Software GmbH - http://www.jawa.at Liebenauer Hauptstr. 200 -------------- privat ------------ A-8041 GRAZ GSM: ++43-(0)676-93 96 698 Tel: ++43-(0)316-403274-12 E-mail: mbretter@inode.at Fax: ++43-(0)316-403274-10 http://www.inode.at/mbretter ------------------------------- ---------------------------------- "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message