From owner-freebsd-questions Tue Mar 6 4:23:56 2001 Delivered-To: freebsd-questions@freebsd.org Received: from pinus.tt.luth.se (pinus.tt.luth.se [130.240.136.128]) by hub.freebsd.org (Postfix) with ESMTP id 0607837B718; Tue, 6 Mar 2001 04:23:49 -0800 (PST) (envelope-from solo@tt.luth.se) Received: from toffe2.tt.luth.se (toffe2.tt.luth.se [130.240.136.217]) by pinus.tt.luth.se (8.8.8/8.8.8) with SMTP id NAA08621; Tue, 6 Mar 2001 13:27:29 +0100 (MET) Content-Type: text/plain; charset="iso-8859-1" From: solo Reply-To: solo@tt.luth.se Organization: LTU To: questions@freebsd.org Subject: Bug in libsock++ ? Date: Tue, 6 Mar 2001 13:25:10 +0000 X-Mailer: KMail [version 1.2] Cc: net@freebsd.org MIME-Version: 1.0 Message-Id: <01030613251009.06484@toffe2.tt.luth.se> Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I'm wondering if anyone have used libsocket 1.10 ? I've got a problem it looks like this: --- snip --- sockinetbuf si(sockbuf::sock_stream); cout << "bind: " << si.bind("127.0.0.1",5150) << endl; --- snip --- The problem is that bind is returning: EADDRNOTAVAIL Host is set correctly, but port is set to 0. If I use bind() it works! I've discovered the bug(?) in the constructor of socketinetaddr the sockaddr_in is not "zeroed", so bind fails. I've "patched" (?) the source file so it uses ::bzero((void*)(sock_addr_in*)this, sizeof(sockaddr_in)); in the constructor. Q1) Is this a bug? Q2) If it is a bug? Q2.1) How do I submit the source and to whom (is it neccesary)? Q2.2) Since this is rather obvious? Aren't thery any using this lib, and what should (I) use instead (some suggestions of a object oriented socket framework? please :-)? Many Regards and Thanks in Advance Mario Toffia mario.toffia@tt.luth.se (please cc: mario.toffia@telia.com) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message