From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31180 invoked by alias); 11 Mar 2010 10:04:10 -0000 Received: (qmail 30967 invoked by uid 22791); 11 Mar 2010 10:04:08 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Thu, 11 Mar 2010 10:04:04 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 31B7F6D435B; Thu, 11 Mar 2010 11:04:02 +0100 (CET) Date: Thu, 11 Mar 2010 10:20:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: mtr under cygwin Message-ID: <20100311100402.GF6505@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20090121225543.GA28241@panix.com> <81aa6b5a1003101524i30177381te6906ea8cccfe386@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <81aa6b5a1003101524i30177381te6906ea8cccfe386@mail.gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2010-03/txt/msg00364.txt.bz2 On Mar 10 18:24, Brian Minton wrote: > I'm having the same issue. I just tried it with mtr 0.75 under cygwin > 1.7.1 and it is still not working. > > On Wed, Jan 21, 2009 at 5:55 PM, David Arnstein wrote: > > I am able to compile mtr 0.75 under Cygwin, see > > http://www.bitwizard.nl/mtr/. > > > > But mtr is not working. Using ddd, I see that the call > >        getsockname (recvsock, name, &len); > > > > does not seem to be filling in name correctly, when recvsock=3. It > > fills in name->sa_family = 0. > > > > Any suggestions? Did socket creation succeed? mtr uses raw sockets and those can only be created by admin users since XP. Since Vista, you must also run the application in an elevated shell. I just tested to create such a socket and getsockname works fine for me: bash$ cat > sockname.c < #include #include #include int main (int argc, char **argv) { int fd; int ret; int val; socklen_t siz; struct sockaddr sa; fd = socket(AF_INET, SOCK_RAW, 0); if (fd >= 0) { ret = getsockname (fd, &sa, (siz = sizeof sa, &siz)); if (!ret) printf ("family: %d\n", sa.sa_family); else printf ("errno: %d (%s)\n", errno, strerror (errno)); close (fd); } return 0; } EOF bash$ gcc -o sockname sockname.c bash$ ./sockname family: 2 Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple