[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] calling arp_tmr() from tcp_slowtmr()
From: |
Chris Borrelli |
Subject: |
[lwip-users] Re: [lwip] calling arp_tmr() from tcp_slowtmr() |
Date: |
Wed, 08 Jan 2003 23:14:36 -0000 |
Adam,
I see what you are saying... I will create my own version of the tcp_tmr()
function in the application and implement your suggestion. This way I am not
changing the 'core' TCP implementation files..
Thanks for the suggestion..
-Chris
Adam Dunkels wrote:
> Hi!
>
> On Wednesday 01 May 2002 01.09, Chris Borrelli wrote:
> > I do not want to use the sys_timeout() function at all if possible. I
> > would like to remove the scheduled call to arp_timer in ethernetif.c,
> > and just call the arp_tmr() from tcp_slowtmr() every 20 tcp_ticks.
> >
> > Does anyone have any comments/suggestions..
> >
> > Here is what I am adding to tcp_slowtmr(). I'll have to put ifdefs
> > around it later...
>
> Doing it this way is a perfectly good solution. I wouldn't have done it
> exactly like this, though. I would have put an extra layer of code around the
> timers, something like this:
>
> void timer(void) {
> if(timer & 1) {
> tcp_fasttmr();
> }
> if(timer == 0 || timer == 5) {
> tcp_slowtmr();
> if (tcp_ticks %20 == 0) {
> arp_tmr();
> }
> }
> }
>
> This way, the ARP and TCP code wouldn't be intertwined, but kept separately.
>
> /adam
> --
> Adam Dunkels <address@hidden>
> http://www.sics.se/~adam
>
> [This message was sent through the lwip discussion list.]
[This message was sent through the lwip discussion list.]
- [lwip-users] Re: [lwip] calling arp_tmr() from tcp_slowtmr(),
Chris Borrelli <=