| delorie.com/archives/browse.cgi | search |
| X-Spam-Check-By: | sourceware.org |
| Date: | Thu, 17 Aug 2006 11:29:19 -0500 |
| From: | Brian Ford <Brian DOT Ford AT FlightSafety DOT com> |
| Reply-To: | cygwin AT cygwin DOT com |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: Cygwin 1.5.18: Problem using setsockopt() for multicast |
| In-Reply-To: | <20060817142909.GI20467@calimero.vinschen.de> |
| Message-ID: | <Pine.CYG.4.58.0608171127481.2408@PC1163-8460-XP.flightsafety.com> |
| References: | <00cf01c6c203$da04b5b0$a501a8c0 AT CAM DOT ARTIMI DOT COM> <Pine DOT CYG DOT 4 DOT 58 DOT 0608170853330 DOT 2408 AT PC1163-8460-XP DOT flightsafety DOT com> <20060817142909 DOT GI20467 AT calimero DOT vinschen DOT de> |
| MIME-Version: | 1.0 |
| X-IsSubscribed: | yes |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| 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 Thu, 17 Aug 2006, Corinna Vinschen wrote:
> On Aug 17 09:06, Brian Ford wrote:
> > Oh yeah, you must call the setsockopt below after the bind on windows.
> > Search MSDN for why.
>
> P.S.: Do you know the MSDN articel off-hand, maybe?
http://support.microsoft.com/default.aspx?scid=kb;en-us;131978
Excerpt:
For example:
#define RECV_IP_ADDR "225.6.7.8" // arbitrary multicast address
mreq.imr_multiaddr.s_addr = inet_addr(RECV_IP_ADDR);
mreq.imr_interface.s_addr = INADDR_ANY;
err = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP,
(char*)&mreq, sizeof(mreq))
Note that it is necessary to bind to an address before calling the
setsockopt() function.
--
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained crew...
.
--
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |