Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 May 2001 13:08:44 -0700 (PDT)
From:      Mikko Tyolajarvi <mikko@dynas.se>
To:        william@brainlink.com
Cc:        questions@freebsd.org
Subject:   Re: bind() on FreeBSD
Message-ID:  <200105062008.f46K8iq77567@explorer.rsa.com>
References:  <20010506130102.A65011@spike.gronim.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In local.freebsd.questions you write:

>	The attached code snippet works correctly on Linux but not FreeBSD. On
>a FreeBSD system with a configured lo0, it says 'Can't assign requested
>address'. 'man errno' says that EADDRNOTAVAIL "Normally results from an
>attempt to create a socket with an address on on this machine." Can anybody
>help me diagnose this? Please CC directly to me, as I am not subscribed to the
>list. Thank you. 

[...]

>int main() {
>	int ret, listenfd;
>	struct sockaddr_in sai;
>	

	memset(&sai, 0, sizeof(sai));

>        sai.sin_family = AF_INET;
>	inet_aton("127.0.0.1",&sai.sin_addr);
>	sai.sin_port = htons(7697);

[...]

    $.02,
    /Mikko
-- 
 Mikko Työläjärvi_______________________________________mikko@rsasecurity.com
 RSA Security

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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