* mtr under cygwin @ 2009-01-22 3:30 David Arnstein 2009-01-22 11:43 ` Corinna Vinschen 2010-03-10 23:36 ` Brian Minton 0 siblings, 2 replies; 4+ messages in thread From: David Arnstein @ 2009-01-22 3:30 UTC (permalink / raw) To: cygwin 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? -- 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/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mtr under cygwin 2009-01-22 3:30 mtr under cygwin David Arnstein @ 2009-01-22 11:43 ` Corinna Vinschen 2010-03-10 23:36 ` Brian Minton 1 sibling, 0 replies; 4+ messages in thread From: Corinna Vinschen @ 2009-01-22 11:43 UTC (permalink / raw) To: cygwin On Jan 21 17:55, 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? Debugging might help. getsockname usually works fine. If you're not using AF_LOCAL sockets, it's a more or less thin shim for the Winsock getsockname function. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/ ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mtr under cygwin 2009-01-22 3:30 mtr under cygwin David Arnstein 2009-01-22 11:43 ` Corinna Vinschen @ 2010-03-10 23:36 ` Brian Minton 2010-03-11 10:20 ` Corinna Vinschen 1 sibling, 1 reply; 4+ messages in thread From: Brian Minton @ 2010-03-10 23:36 UTC (permalink / raw) To: cygwin 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 <arnstein@panix.com> 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? > > -- > 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/ > > -- 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: mtr under cygwin 2010-03-10 23:36 ` Brian Minton @ 2010-03-11 10:20 ` Corinna Vinschen 0 siblings, 0 replies; 4+ messages in thread From: Corinna Vinschen @ 2010-03-11 10:20 UTC (permalink / raw) To: cygwin 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 <arnstein@panix.com> 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 <<EOF #include <stdio.h> #include <string.h> #include <errno.h> #include <sys/socket.h> 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-11 10:04 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-01-22 3:30 mtr under cygwin David Arnstein 2009-01-22 11:43 ` Corinna Vinschen 2010-03-10 23:36 ` Brian Minton 2010-03-11 10:20 ` Corinna Vinschen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).