Date: Thu, 14 Nov 2002 20:55:44 +0100 From: Michael Bretterklieber <mbretter@inode.at> To: Garrett Wollman <wollman@lcs.mit.edu> Cc: freebsd-net@FreeBSD.ORG Subject: Re: struct sockaddr_in - question Message-ID: <3DD3FFC0.1040008@inode.at> In-Reply-To: <3DD1FAAC.6060707@inode.at> References: <3DD1FAAC.6060707@inode.at> <200211131943.gADJhAeF066433@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DD3FFC0.1040008>