xref: /FreeRTOS-Plus-TCP-v4.0.0/tools/tcp_utilities/tcp_netstat.md (revision 13bf59f3fae70e2c2fb9c6e53ef8dd9e36362dce)
1tcp_netstat.c : it introduces the following function:
2
3    `BaseType_t vGetMetrics( MetricsType_t * pxMetrics )`
4
5It collects information: all port numbers in use, all UDP sockets, all TCP sockets and their connections.
6
7Make sure that your FreeRTOSIPConfig.h includes tools/tcp_utilities/include/tcp_netstat.h:
8
9    `@include "tcp_netstat.h"`
10
11because it will define 2 important macro's:
12
13    #define iptraceNETWORK_INTERFACE_INPUT( uxDataLength, pucEthernetBuffer )
14
15    #define iptraceNETWORK_INTERFACE_OUTPUT( uxDataLength, pucEthernetBuffer )
16
17These macro's will be called when an Ethernet packet has been received or sent.
18
19When collecting socket and port information, it will iterate through the list of sockets, filling arrays of structures.
20