X-Spam-Check-By: sourceware.org Date: Thu, 5 Oct 2006 12:18:20 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Problems with bind and UDP server Message-ID: <20061005101820.GI25401@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/