[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: RE : RE : [lwip-users] missing something but what
From: |
Julian Gardner [RSD] |
Subject: |
RE: RE : RE : [lwip-users] missing something but what |
Date: |
Fri, 20 Jul 2007 15:14:23 +0100 |
fixed, thanks for making me delve into the code.
I had changed the pbuf.c to be protected by a semaphore but missed the fact
that pbuf_chain called pbuf_cat and pbuf_ret instead of the old non protected
versions
joolz
-----Original Message-----
From: address@hidden on behalf of Frédéric BERNON
Sent: Fri 20/07/2007 14:48
To: Mailing list for lwIP users
Subject: RE : RE : [lwip-users] missing something but what
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 : address@hidden
Web Site : http://www.hymatom.fr
====================================
P Avant d'imprimer, penser à l'environnement
-----Message d'origine-----
De : address@hidden [mailto:address@hidden 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: address@hidden 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 : address@hidden
Web Site : http://www.hymatom.fr <http://www.hymatom.fr/>
====================================
P Avant d'imprimer, penser à l'environnement
-----Message d'origine-----
De : address@hidden [mailto:address@hidden De la part de Julian Gardner
[RSD]
Envoyé : vendredi 20 juillet 2007 14:26
À : address@hidden
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
<<winmail.dat>>