XuNeo opened a new pull request, #14899: URL: https://github.com/apache/nuttx/pull/14899
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary Add network related tool, contributed by @wengzhe `netstat`: networks statistics. ## Impact New feature. ## Testing Tested with qemu. 1. Compile: ``` tools/configure.sh lm3s6965-ek:qemu-flat ``` Make sure `+CONFIG_DEBUG_SYMBOLS_LEVEL="-g3"` is changed to level3. 2. Run ``` qemu-system-arm -semihosting \ -M lm3s6965evb \ -device loader,file=nuttx.bin,addr=0x00000000 \ -nic user,id=user0,hostfwd=tcp::10023-:23 \ -serial mon:stdio -nographic -s ``` 3. Connect from GDB ``` gdb-multiarch nuttx -ex "tar rem:1234" -ex "source tools/gdb/__init__.py" ``` 4. Test Connect to telnetd in qemu from host: `telnet localhost 10023`. Run `netstats` from gdb. ``` (gdb) netstats IOB: size ntotal nfree nwait nthrottle 196 24 0 0 0 Packets: IPv4 IPv6 TCP UDP ICMP ICMPv6 Received 33 - 24 9 0 - Dropped 0 - 0 0 0 - VHL 0 - - - - - Frag 0 - - - - - Chksum 0 - 0 0 - - Type - - - - 0 - Proto 0 - - - - - Sent 33 - 23 10 0 - Rexmit - - 0 - - - TCP Conn: st flg ref tmr uack nrt txbuf rxbuf+ofo local_address remote_address 0 4 40 1 0 0 0 0/-1 0/-1 +0 10.0.2.15:23 10.0.2.2:37502 UDP Conn: flg txbuf rxbuf local_address remote_address (gdb) ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org