buglwIP - A Lightweight TCP/IP stack - Bugs: bug #19360, stats_display() minor problem

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #19360: stats_display() minor problem

Submitter:  Frédéric Bernon <fbernon>
Submitted:  Tue 20 Mar 2007 04:39:24 PM UTC
   
 
Category:  None Severity:  2 - Minor
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  fbernon
Open/Closed:  Closed Planned Release:  None
lwIP version:  None

Tue 20 Mar 2007 06:13:42 PM UTC, comment #3: 

Commited. Just change the memp_names table, and add a comment in memp.h.

Frédéric Bernon <fbernon>
Group Member
Tue 20 Mar 2007 04:54:10 PM UTC, comment #2: 

char * memp_names[] = {
"PBUF",
"RAW_PCB",
"UDP_PCB",
"TCP_PCB",
"TCP_PCB_LISTEN",
"TCP_SEG",
"NETBUF",
"NETCONN",
"TCPIP_MSG",
#if ARP_QUEUEING
"ARP_QUEUE",
#endif
"SYS_TIMEOUT"
};

And a little remark in memp.h to remember to synchronized memp_names, or a "extern const char* memp_names[MEMP_MAX];" in memp.h, and we move this table in memp.c?

What do you prefer?

Frédéric Bernon <fbernon>
Group Member
Tue 20 Mar 2007 04:43:34 PM UTC, comment #1: 

Well spotted, thanks for taking this on to fix it - should be straightforward by the sound of it.

Kieran Mansley <kieranm>
Group Member
Tue 20 Mar 2007 04:39:24 PM UTC, original submission:  

Hi,

the stats_display use a char* table to get memp's names. But it doesn't to be "synchronised" with memp.h :

memp.h>
typedef enum {
  MEMP_PBUF,
  MEMP_RAW_PCB,
  MEMP_UDP_PCB,
  MEMP_TCP_PCB,
  MEMP_TCP_PCB_LISTEN,
  MEMP_TCP_SEG,

  MEMP_NETBUF,
  MEMP_NETCONN,
  MEMP_TCPIP_MSG,
#if ARP_QUEUEING
  MEMP_ARP_QUEUE,
#endif
  MEMP_SYS_TIMEOUT,
 
  MEMP_MAX
} memp_t;


stats.c>
void
stats_display(void)
{
  s16_t i;
  char * memp_names[] = {"PBUF", "RAW_PCB", "UDP_PCB", "TCP_PCB", "TCP_PCB_LISTEN", "TCP_SEG", "NETBUF", "NETCONN", "API_MSG", "TCP_MSG", "TIMEOUT"};
  stats_display_proto(&lwip_stats.link, "LINK");
  stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG");
  stats_display_proto(&lwip_stats.ip, "IP");
  stats_display_proto(&lwip_stats.icmp, "ICMP");
  stats_display_proto(&lwip_stats.udp, "UDP");
  stats_display_proto(&lwip_stats.tcp, "TCP");
  stats_display_pbuf(&lwip_stats.pbuf);
  stats_display_mem(&lwip_stats.mem, "HEAP");
  for (i = 0; i < MEMP_MAX; i++) {
    stats_display_mem(&lwip_stats.memp[i], memp_names[i]);
  }
 
}

So, stats_display() didn't display "good" names, and more, if ARP_QUEUEING is set to 1.


Frédéric Bernon <fbernon>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kieranm (Posted a comment)
  • -email is unavailable- added by fbernon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-03-20 fbernon StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code