2008-03-29 Chris Johns <chrisj@rtems.org>

* networking/testing.t: Patch from Ian Caddy to document the
	routes debug information.
This commit is contained in:
Chris Johns
2008-03-29 04:39:56 +00:00
parent a408b33a53
commit 52053579d6
2 changed files with 104 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2008-03-29 Chris Johns <chrisj@rtems.org>
* networking/testing.t: Patch from Ian Caddy to document the
routes debug information.
2008-03-11 Joel Sherrill <joel.sherrill@oarcorp.com> 2008-03-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* user/clock.t: Refactored rtems_clock_get into 5 methods which * user/clock.t: Refactored rtems_clock_get into 5 methods which

View File

@@ -93,6 +93,105 @@ will also be printed to the console.
@end itemize @end itemize
@section Monitor Commands
There are a number of command available in the shell / monitor
to aid in tracing the behavior of the network stack. The following
is a list of them:
@itemize @bullet
@item @code{inet}
This command shows the current routing information for the TCP/IP stack. Following is an
example showing the output of this command.
@code{Destination Gateway/Mask/Hw Flags Refs Use Expire Interface
10.0.0.0 255.0.0.0 U 0 0 17 smc1
127.0.0.1 127.0.0.1 UH 0 0 0 lo0}
In this example, there is only one network interface with an IP address of 10.8.1.1. This
link is currently not up.
Two routes that are shown are the default routes for the Ethernet interface (10.0.0.0) and the
loopback interface (127.0.0.1).
Since the stack comes from BSD, this command is very similar to the netstat command. For more
details on the network routing please look the following
URL: (@code{http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-routing.html})
For a quick reference to the flags, see the table below:
U Up: The route is active.
H Host: The route destination is a single host.
G Gateway: Send anything for this destination on to this remote
system, which will figure out from there where to send it.
S Static: This route was configured manually, not automatically
generated by the system.
C Clone: Generates a new route based upon this route for machines
we connect to. This type of route is normally used for local
networks.
W WasCloned: Indicated a route that was auto-configured based upon
a local area network (Clone) route.
L Link: Route involves references to Ethernet hardware.
@item @code{mbuf}
This command shows the current MBUF statistics. An example of the command is shown below:
@code{************ MBUF STATISTICS ************
mbufs:4096 clusters: 256 free: 241
drops: 0 waits: 0 drains: 0
free:4080 data:16 header:0 socket:0
pcb:0 rtable:0 htable:0 atable:0
soname:0 soopts:0 ftable:0 rights:0
ifaddr:0 control:0 oobdata:0
}
@item @code{if}
This command shows the current statistics for your Ethernet driver as long as the ioctl hook
@code{SIO_RTEMS_SHOW_STATS} has been implemented. Below is an example:
@code{************ INTERFACE STATISTICS ************
***** smc1 *****
Ethernet Address: 00:12:76:43:34:25
Address:10.8.1.1 Broadcast Address:10.255.255.255 Net mask:255.0.0.0
Flags: Up Broadcast Running Simplex
Send queue limit:50 length:0 Dropped:0
SMC91C111 RTEMS driver A0.01 11/03/2002 Ian Caddy (ianc@microsol.iinet.net.au)
Rx Interrupts:0 Not First:0 Not Last:0
Giant:0 Runt:0 Non-octet:0
Bad CRC:0 Overrun:0 Collision:0
Tx Interrupts:2 Deferred:0 Missed Hearbeat:0
No Carrier:0 Retransmit Limit:0 Late Collision:0
Underrun:0 Raw output wait:0 Coalesced:0
Coalesce failed:0 Retries:0
***** lo0 *****
Address:127.0.0.1 Net mask:255.0.0.0
Flags: Up Loopback Running Multicast
Send queue limit:50 length:0 Dropped:0
}
@item @code{ip}
This command show the IP statistics for the currently configured interfaces.
@item @code{icmp}
This command show the ICMP statistics for the currently configured interfaces.
@item @code{tcp}
This command show the TCP statistics for the currently configured interfaces.
@item @code{udp}
This command show the UDP statistics for the currently configured interfaces.
@end itemize
@section Driver basic operation @section Driver basic operation
The network demonstration program @code{netdemo} may be used for these tests. The network demonstration program @code{netdemo} may be used for these tests.