heinbali01 wrote on Friday, March 06, 2015:
Hi Andy,
Appreciate your feedback.
The classical idea about the netmask is: if an IP address is outside the netmask, it is a strange address and it is assumed to go through a router.
As you can read somewhere in the documentation, ipconfigARP_STORES_REMOTE_ADDRESSES
was introduced to remember the MAC-address of all packets, also from devices that are outside the netmask (maybe from the Internet).
Modern networks can have many different routers / gateways, not just one.
Glad to hear that defining ipconfigARP_STORES_REMOTE_ADDRESSES = 1
helps to solve your problem.
Actually I thing we should solve the kind of problem you’re facing by adding routing rules.
Just curious: why isn’t your laptop on the same netmask as your embedded devices? Aren’t they both using the same DHCP server?
I have rewritten vTCPNetStat() to take a buffer pointer as a parameter
I’m sure Richard will like that too. It is much more in-line with the listings of tasks (uxTaskGetSystemState
), that also works by providing a buffer and a buffer length.
All of my embedded projects have logging, and also the output of FreeRTOS_printf() will be added to that logging. The logging can be seen by making a telnet connection. Every logging-line is preceded by a time-stamp and a task number.
Here is an example of the ‘netstat’ command:
321.682.673 [1]: netstat
321.682.773 [5]: Prot Port IP-Remote : Port R/T Status Alive tmout Child
321.682.905 [5]: TCP 8001 0.0.0.0 : 0 0/0 eTCP_LISTEN 317646 0 0/12
321.683.041 [5]: TCP 8000 0.0.0.0 : 0 0/0 eTCP_LISTEN 317646 0 0/12
321.683.122 [5]: TCP 21 0.0.0.0 : 0 0/0 eTCP_LISTEN 317647 0 3/12
321.683.254 [5]: TCP 8021 0.0.0.0 : 0 0/0 eTCP_LISTEN 317646 0 0/12
321.683.387 [5]: TCP 2402 192.168.2.3 : 2800 1/1 eESTABLISHED 1 20000
321.683.515 [5]: TCP 23 0.0.0.0 : 0 0/0 eTCP_LISTEN 317642 0 0/3
321.683.651 [5]: TCP 80 0.0.0.0 : 0 0/0 eTCP_LISTEN 317241 0 13/16
321.683.783 [5]: TCP 8080 0.0.0.0 : 0 0/0 eTCP_LISTEN 317241 0 0/16
321.683.917 [5]: TCP 80 192.168.2.3 : 2817 1/1 eESTABLISHED 3450 16532
321.684.049 [5]: TCP 80 192.168.2.3 : 2820 1/1 eESTABLISHED 4108 15858
321.684.124 [5]: TCP 21 192.168.2.3 : 2840 1/1 eESTABLISHED 5350 17058
321.684.251 [5]: TCP 21 192.168.2.3 : 2845 1/1 eESTABLISHED 2654 19836
321.684.384 [5]: TCP 21 192.168.2.3 : 2846 1/1 eESTABLISHED 2825 19664
321.684.511 [5]: TCP 80 192.168.2.3 : 3017 1/1 eESTABLISHED 4232 15732
321.684.639 [5]: TCP 80 192.168.2.3 : 3018 1/1 eESTABLISHED 3373 16611
321.684.772 [5]: TCP 80 192.168.2.3 : 3019 1/1 eESTABLISHED 3369 16615
321.684.898 [5]: TCP 80 192.168.2.3 : 3020 1/1 eESTABLISHED 142 62
321.685.123 [5]: TCP 80 192.168.2.3 : 3037 1/1 eESTABLISHED 106 96
321.685.250 [5]: TCP 80 192.168.2.3 : 3038 1/1 eESTABLISHED 3498 16585
321.685.382 [5]: TCP 80 192.168.2.3 : 3039 1/1 eESTABLISHED 3593 16481
321.685.510 [5]: TCP 80 192.168.2.3 : 3040 1/1 eESTABLISHED 4255 15904
321.685.643 [5]: TCP 80 192.168.2.3 : 3041 1/1 eESTABLISHED 3428 16755
321.685.771 [5]: TCP 80 192.168.2.3 : 3042 1/1 eESTABLISHED 3421 16763
321.685.903 [5]: TCP 80 192.168.2.3 : 3043 1/1 eESTABLISHED 3501 16983
321.685.938 [5]: UDP Port 30718
321.685.969 [5]: UDP Port 2000
321.686.005 [5]: UDP Port 30717
321.686.026 [5]: UDP Port 123
Keep in mind that the resulting string of the ‘netstat’ command may become quite large.
Regards