X-Spam-Check-By: sourceware.org
From: "Dave Korn" <dave.korn@artimi.com>
To: <cygwin@cygwin.com>
Subject: RE: getsockname problem
Date: Fri, 7 Apr 2006 14:02:33 +0100
Message-ID: <001101c65a43$890d59a0$a501a8c0@CAM.ARTIMI.COM>
MIME-Version: 1.0
Content-Type: text/plain; 	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
In-Reply-To: <Pine.BSI.4.61.0604070121530.9018@malasada.lava.net>
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 07 April 2006 12:38, Antonio Querubin wrote:

> I've run into a problem where getsockname() doesn't work as expected.
> Below is a test program where it fails under cygwin but runs on any other
> Unix/Linux system.  I searched the mail archives for any limitations

  Should have read the man page instead!

>    s = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
>    printf("socket = %d\nlength = %d\n", s, len);
> 
>    rc = getsockname(s, (struct sockaddr *) &sa, &len);


http://www.opengroup.org/onlinepubs/007908799/xns/getsockname.html

"If the socket has not been bound to a local name, the value stored in the
object pointed to by address is unspecified."

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

