Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2001 13:25:10 +0000
From:      solo <solo@tt.luth.se>
To:        questions@freebsd.org
Cc:        net@freebsd.org
Subject:   Bug in libsock++ ?
Message-ID:  <01030613251009.06484@toffe2.tt.luth.se>

next in thread | raw e-mail | index | archive | help
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-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?01030613251009.06484>