Except the SO_REUSEADDR you should remove (this option is not supported by the
stack), I don't see any problem. You should try :
addr.sin_addr.s_addr = inet_addr("239.255.255.250");
addr.sin_port = htons(1900);
Are you sure that nothing is sent from your device during this call? (do you
have check with a network capture?)
====================================
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
====================================
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 15:00
À : Mailing list for lwIP users
Objet : RE: RE : [lwip-users] missing something but what
Thanks but same problem with code changed
int sock;
int onBool = 1;
int err;
struct sockaddr_in addr;
BREAKPOINT;
sock = socket(PF_INET, SOCK_DGRAM, 0);
err = setsockopt( sock, SOL_SOCKET, SO_REUSEADDR, (char *) &onBool, sizeof
(int));
memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
addr.sin_port = 0;
err = bind( sock, (struct sockaddr *)&addr, sizeof(struct sockaddr));
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 = 1900;
err = sendto( sock, "Hello", 5, 0, (struct sockaddr *)&addr, sizeof(
addr));
closesocket( sock);
Now the other thing to let you know i that the stack is STABLE, i have a data
transmitter (udp) which sends around 24Mbits of data per second throught a
SMC9117 and there are no problems at all, also running is a HTTP server and
that is fine.
joolz
-----Original Message-----
From: [EMAIL PROTECTED] on behalf of Frédéric BERNON
Sent: Fri 20/07/2007 13:37
To: Mailing list for lwIP users
Subject: RE : [lwip-users] missing something but what
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
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