Send lwip-users mailing list submissions to
address@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.nongnu.org/mailman/listinfo/lwip-usersor,
via email, send a message with subject or body 'help' to
address@hidden
You can reach the person managing the list at
address@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of lwip-users digest..."
Today's Topics:
1. Re: tcp_output_segment() "silly window avoidance" shrinking
the window is "strongly discouraged" and "SHOULD NOT"?
(Kieran Mansley)
2. New in lwIP (Angel Sanchez)
3. RE: [Virtex II Pro] pbuf / DHCP / lwIP upgrade to 1.2.0 in
EDK / upgrade to EDK 9.1i (Louis Filasky)
----------------------------------------------------------------------
Message: 1
Date: Fri, 15 Jun 2007
09:41:34 +0100
From: Kieran Mansley <address@hidden>
Subject: Re: [lwip-users] tcp_output_segment() "silly window
avoidance" shrinking the window is "strongly discouraged" and "SHOULD
NOT"?
To: Mailing list for lwIP users <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain
On Fri, 2007-06-15 at 18:17 +1000, Tom Evans wrote:
> This may be a bug. I'd be interested in other opinions. If anyone has a
> copy of "TCP Illustrated" it may be worth checking this in there.
> The window should only shrink "naturally" (because of incoming data).
> SWS Avoidance delays the window OPENING until it can be opened EITHER to
> the MSS or to half of the receive buffer size. The lwIP code is only
> performing the former comparison.
Looks like a bug to
me. Could you file a bug report on savannah?
> The second (obvious) problem would happen if someone did the following
> in lwipopts.h while trying to save memory or buffers:
>
> /* TCP Maximum segment size. */
> #define TCP_MSS 512
> /* TCP receive window. */
> #define TCP_WND 500
I'd call that a mis-configuration. It should probably be documented
however.
Kieran
------------------------------
Message: 2
Date: Fri, 15 Jun 2007 13:21:29 +0200
From: "Angel Sanchez" <address@hidden>
Subject: [lwip-users] New in lwIP
To:
<address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"
I am new in the lwIP. After read the doccumentation, I dont understand the use of threads in lwIP.
As i can see, there are a trhead used by the internal messages dispatcher, so, I assume that openning several sockets i can spect to receive
ans send the messages concurrently (of course I have a thread in my application for the maintenance of each socket)
I thinks that this is corret, so. In what scenario i need open more thread associates to lwIP (with 'sys_thread_create')
Thanks in advance for your help
Best regards
Angel Sanchez Pelegrin
AUMAT SL
Tlf/Fax: 91 359 02 27
Movil: 676 965 960
Colombia 53 Local
28016 MADRID
address@hidden
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.gnu.org/pipermail/lwip-users/attachments/20070615/8e91c74c/attachment.html------------------------------
Message: 3
Date: Fri, 15 Jun 2007 17:53:17 +0200
From: Louis Filasky <address@hidden>
Subject: RE: [lwip-users] [Virtex II Pro] pbuf / DHCP / lwIP upgrade
to 1.2.0 in EDK / upgrade to EDK 9.1i
To: <address@hidden>
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"
>Hi!>>you say > >3/ Our main interrest with LwIP was to use DHCP. By reading the dhcp.cfi>le, it says the following things: > - change LWIP_DHCP to 1 in lwipopts.h which is in the port>directory. > - change value of DHCP_COARSE_TMR and another one so that the first>one is
called every 60s and the other 500ms.> - then call the respective functions for these values and call>dhcp_start(struct netif); >>that sounds that somehow your dhcp code isn't built or something>similar. I had the same problem, but in may case it was the LWIP_DHCP>define. Are you sure you "updated" your projekt so that after a change>in your projekt all c files are recompiled with the different define in>the .h files? with GCC you have to do a make clean that such changes are>done..>Or maybe you forgot to add the dhcp.c file to your Makefile or what is>the equivalent in your compiler?> >Dominik
Thank you dominik for your answer. Actually I solved this, I had missed a couple of makefiles, I thought I got them all but it was not the case.
Now, everything is compiliing fine but then the dhcp is not working.
I will copy paste my code where I start the initialization of the dhcp using dhcp_start()
if you could tell me if that is correct. Then also, my timer if somehow how you can call these dhcp_finetmr or dhcp_coarse function every 60s or 500ms because I played a lot with the timer and could't figure out
how to do it precisely.
Thank you very much again,
struct ip_addr ipaddr;
struct ip_addr netmask;
struct ip_addr gw;
struct netif *netif = NULL;
//Set the MAC address:
xemacliteif_setmac(0, (u8_t *)mac);
//Set IP address, Network mask and gateway:
IP4_ADDR(&ipaddr, ip[0], ip[1], ip[2], ip[3]);
IP4_ADDR(&netmask, subnet[0], subnet[1], subnet[2], subnet[3]);
IP4_ADDR(&gw, gateway[0], gateway[1], gateway[2], gateway[3]);
//Allocate memory for the netif strycture:
netif = mem_malloc(sizeof(struct netif));
if(NULL == netif) {
print("mem_alloc(): echec.\n\r");
return NULL;
}
//Instanciate the new netif structure with given parameters:
netif = netif_add(netif, &ipaddr, &netmask,
&gw, &XEmacLiteIf_ConfigTable[EMAC], xemacliteif_init, ip_input);
if(NULL == netif) {
print("netif_add(): failed.\n\r");
return NULL;
}
//Set the new netif as default netif:
netif_set_default(netif);
dhcp_start(netif);
As for the timer(very rough for now):
I know dhcp_fine_tmr is said to be called every 5ms but in the xilinx doc, they say they call should be called
every 200ms and 500ms and in theyre tmr function of the echo example (which is my basis), they say there are
called every 2ms and 5ms:
void my_tmr(void)
{
++my_timer;
++my_timer2;
if(my_timer == 10) {
my_timer = 0;
}
if(my_timer2 >= 200) {
dhcp_coarse_tmr();
}
if(my_timer & 1) {
/* Call tcp_fasttmr() every 2 ms, i.e.,
* every other timer my_tmr() is called. */
tcp_fasttmr();
}
if(my_timer == 0 || my_timer == 5) {
/* Call tcp_slowtmr() every 5 ms, i.e.,
* every fifth timer my_tmr() is called.
*/
tcp_slowtmr();
dhcp_fine_tmr();
if (tcp_ticks%2000 == 0)
/* Call etharp_tmr() every 20th call to tcp_slowtmr().
* tcp_ticks is a global var defined in core/tcp.c */
etharp_tmr();
}
}
Antoine.
_________________________________________________________________
Windows Live Messenger vous offre 30 nouvelles émoticônes gratuites, installées directement dans votre Messenger !
http://www.emoticones-messenger.fr/-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.gnu.org/pipermail/lwip-users/attachments/20070615/708b0816/attachment.html------------------------------
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-usersEnd of lwip-users Digest, Vol 46, Issue 20
******************************************