mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-10-05 13:17:52 +00:00
NET: Move statistcs from uip.h to new netstats.h to remove nasty circular inclusion problem.
This commit is contained in:
parent
6348f1c79a
commit
9009a21fd9
2 changed files with 30 additions and 29 deletions
|
|
@ -40,6 +40,7 @@
|
|||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include <nuttx/net/netstats.h>
|
||||
#include <apps/netutils/httpd.h>
|
||||
|
||||
#include "cgi.h"
|
||||
|
|
@ -70,9 +71,9 @@ static void net_stats(struct httpd_state *pstate, char *ptr)
|
|||
char buffer[16];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(uip_stat) / sizeof(uip_stats_t); i++)
|
||||
for (i = 0; i < sizeof(g_netstats) / sizeof(net_stats_t); i++)
|
||||
{
|
||||
snprintf(buffer, 16, "%5u\n", ((uip_stats_t *)&uip_stat)[i]);
|
||||
snprintf(buffer, 16, "%5u\n", ((net_stats_t *)&g_netstats)[i]);
|
||||
send(pstate->ht_sockfd, buffer, strlen(buffer), 0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue