Hi Julian,
 
You should got a "internal" (since it doesn't seems to return a error code) 
during the bind operation, since you try to bind your sock to a multicast 
address (which is a wrong idea).
 
If you only need to send mutlicast, you can bind to any addr/port, like this:
 
addr.sin_family = AF_INET;
addr.sin_port = htons(INADDR_ANY);
addr.sin_addr.s_addr = htonl(INADDR_ANY);
 
and next, change the IP address to the multicast group you want.
 
addr.sin_addr.s_addr = htonl( (239<<24)|(255<<16)|(255<<8)|(250)); /* be sure 
of your byte-order */
 
Regards
 
 
  
====================================
Frédéric BERNON 
HYMATOM SA 
Chef de projet informatique 
Microsoft Certified Professional 
Tél. : +33 (0)4-67-87-61-10 
Fax. : +33 (0)4-67-70-85-44 
Email : [EMAIL PROTECTED] 
Web Site : http://www.hymatom.fr <http://www.hymatom.fr/>  
====================================
P Avant d'imprimer, penser à l'environnement
 

        -----Message d'origine-----
        De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Julian 
Gardner [RSD]
        Envoyé : vendredi 20 juillet 2007 14:26
        À : [email protected]
        Objet : [lwip-users] missing something but what
        
        

        I have a small problem and cant work out what i am doing wrong.
        
        I have stripped out the code to this and this hangs in udp_sendto 
waiting on a mbox
        
        int sock;
        int onBool = 1;
        int err;
        struct sockaddr_in addr;
        
                memset(&addr, 0, sizeof(addr));
                addr.sin_family          = AF_INET;
                addr.sin_addr.s_addr = htonl( 
(239<<24)|(255<<16)|(255<<8)|(250));
                addr.sin_port            = 50050;
        
                sock = socket(PF_INET, SOCK_DGRAM, 0);
        //    err = setsockopt( sock, SOL_SOCKET, SO_REUSEADDR, (char *) 
&onBool, sizeof (int));
                err = bind( sock, (struct sockaddr *)&addr, sizeof(struct 
sockaddr));
                err = sendto( sock, "Hello", 5, 0, (struct sockaddr *)&addr, 
sizeof( addr));
                closesocket( sock);
        
        Any ideas, as i get no errors, also port 239.255.255.250 is opened as 
multicast but i am not even getting data to be passed to the ethernet chip.
        
        joolz
        

<<image001.jpg>>

<<image002.jpg>>

BEGIN:VCARD
VERSION:2.1
N:BERNON;Frédéric;;M.
FN:Frédéric BERNON
ORG:HYMATOM SA;Recherche et Développement
TITLE:Chef de projet informatique
TEL;WORK;VOICE:04-67-87-61-10
TEL;WORK;FAX:04-67-70-85-44
ADR;WORK;ENCODING=QUOTED-PRINTABLE:;23;Zone Industrielle=0D=0A175 rue de Massacan;VENDARGUES;;34740;FRANCE;
LABEL;WORK;ENCODING=QUOTED-PRINTABLE:23=0D=0AZone Industrielle=0D=0A175 rue de Massacan=0D=0AVENDARGUES 34740=0D=
=0AFrance
URL;WORK:http://www.hymatom.fr
ROLE:Chef de projet informatique
EMAIL;PREF;INTERNET:[EMAIL PROTECTED]
REV:20020404T083210Z
END:VCARD
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to