From owner-freebsd-questions Sun May 6 13:10: 7 2001 Delivered-To: freebsd-questions@freebsd.org Received: from karon.dynas.se (karon.dynas.se [192.71.43.4]) by hub.freebsd.org (Postfix) with SMTP id 42E9337B423 for ; Sun, 6 May 2001 13:10:04 -0700 (PDT) (envelope-from mikko@dynas.se) Received: (qmail 84814 invoked from network); 6 May 2001 20:08:44 -0000 Received: from spirit.sto.dynas.se (HELO spirit.dynas.se) (172.16.1.10) by 172.16.1.1 with SMTP; 6 May 2001 20:08:44 -0000 Received: (qmail 20645 invoked from network); 6 May 2001 20:10:08 -0000 Received: from explorer.rsa.com (10.81.217.59) by spirit.dynas.se with SMTP; 6 May 2001 20:10:08 -0000 Received: (from mikko@localhost) by explorer.rsa.com (8.11.3/8.11.1) id f46K8iq77567; Sun, 6 May 2001 13:08:44 -0700 (PDT) (envelope-from mikko) Date: Sun, 6 May 2001 13:08:44 -0700 (PDT) From: Mikko Tyolajarvi Message-Id: <200105062008.f46K8iq77567@explorer.rsa.com> To: william@brainlink.com Cc: questions@freebsd.org Subject: Re: bind() on FreeBSD Newsgroups: local.freebsd.questions References: <20010506130102.A65011@spike.gronim.com> X-Newsreader: NN version 6.5.6 (NOV) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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