On Sep 27 17:14, Anonymous wrote: > [...] > I compile and run net-snmp under cygwin (I have net-snmp 5.3.0.1). > The server snmpd by default uses UDP port 161. I now have the most > recent cygwin DLL and the server snmpd seems no longer to work. > > I think I tracked down the problem to the bind command. For a > "very simple test" I used Beej's socket programming examples. > I give the listings at the end of the message. > > http://beej.us/guide/bgnet/output/htmlsingle/bgnet.html#listen > > The listener program works fine on regular Linux and with older > cygwin DLLs ..... but under the latest it returns an error. > Has something changed?
I tried your below example under 1.5.21 and with a more recent developer version of Cygwin and the tests run fine in both cases: $ ./udp-listener.exe $ ./udp-talker.exe localhost blah sent 4 bytes to 127.0.0.1 got packet from 127.0.0.1 packet is 4 bytes long packet contains "blah" If there's a bug, it's not triggered by this test. If it triggers the problem on your machine, I'd assume the influence of some other piece of software (firewall, virus scanner, etc) Corinna > listener.c > ==== > /* > ** listener.c -- a datagram sockets "server" demo > */ > [...] -- 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/