lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] FW: Initialization of global variables


From: Evan Hunter
Subject: [lwip-devel] FW: Initialization of global variables
Date: Wed, 14 Mar 2012 07:26:20 +0000

Hi All,

 

I have noticed that many of the global variables used in LwIP are not initialized properly.

 

My link script / crt0  avoids initializing anything that has not been specifically requested to be initialized, and consequently I am seeing pointer errors due to LwIP using pointer that it doesn’t initialize.

 

Some of the offending variables are:

udp_pcbs

netif_list

netif_default

h_errno

current_iphdr_src

current_netif

current_iphdr_dest

current_header

tcp_active_pcbs

tcp_ticks

tcp_listen_pcbs

tcp_tmp_pcb

tcp_bound_pcbs

tcp_tw_pcbs

tcp_input_pcb

 

I suggest that tcp_init(), udp_init() and ip_init() should be changed from a macro to a function to memset the appropriate variables.

The h_errno variable can be set to NULL in its declaration.

The netif variables could be initialized in netif_init().

 

Regards,

 

Evan Hunter

 

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]