Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

HAL, LWIP and fragmentation support

Altera_Forum
Honored Contributor II
1,158 Views

Dear all, 

 

I'm taking a look to the LWIP source code, and in particular to the web server example for the Altera HAL distributed in the Forum . 

 

In particular, I'm looking to the ip_reass_timer() function, called inside main(). 

 

here is the main loop: 

 

    while(1)     { //0.6.4  lan91c111if_service(netif);  lan91c111if_service(&netif);    now = get_milliseconds();  if (now - lasttime > TCP_TMR_INTERVAL) {      lasttime = now;      tcp_tmr();      if (++i==50) {    //etharp_tmr();    i=0;      }      } # if IP_REASSEMBLY      if (++j==1000) {        ip_reass_timer();        j=0;      }    # endif       } 

 

The reassembly timer is here (see src/core/ipv4/ip_frag.c): 

 

void ip_reass_timer(void *arg) {  (void)arg;  if (ip_reasstmr > 1) {    ip_reasstmr--;    sys_timeout(IP_REASS_TMO, ip_reass_timer, NULL);  } else if (ip_reasstmr == 1)  ip_reasstmr = 0; } 

 

it seems to me that the reassembly timer should be called once a second (IP_REASS_TMO is 1000). 

 

Is that right? 

 

PJ
0 Kudos
0 Replies
Reply