Date: Sun, 21 May 2006 15:53:32 +1000 From: Peter Jeremy <peterjeremy@optushome.com.au> To: David Xu <davidxu@freebsd.org> Cc: current@freebsd.org Subject: Re: couldn't bind to local address Message-ID: <20060521055332.GE1587@turion.vk2pj.dyndns.org> In-Reply-To: <200605211204.10259.davidxu@freebsd.org> References: <200605211204.10259.davidxu@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2006-May-21 12:04:10 +0800, David Xu wrote: > struct sockaddr_in addr; ... > > addr.sin_family = AF_INET; > addr.sin_port = htons(9000); > addr.sin_addr.s_addr = inet_addr("127.0.0.1"); It's a good idea to assign sin_len as well. And, ideally, you would bzero the structure first. On Sun, 2006-May-21 12:34:30 +0800, David Xu wrote: >I am trying it on -CURRENT, and found lo0 does not have an address, what can >cause this ? There should be an ifconfig_lo0 in /etc/defaults/rc.conf which causes lo0 to be initialised via /etc/rc.d/netif and /etc/network.subr. Do you get any errors during boot? -- Peter Jeremy
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060521055332.GE1587>