VxWorks Reference Manual : Libraries
netShow - network information display routines
ifShow( ) - display the attached network interfaces
inetstatShow( ) - display all active connections for Internet protocol sockets
ipstatShow( ) - display IP statistics
netPoolShow( ) - show pool statistics
netStackDataPoolShow( ) - show network stack data pool statistics
netStackSysPoolShow( ) - show network stack system pool statistics
mbufShow( ) - report mbuf statistics
netShowInit( ) - initialize network show routines
arpShow( ) - display entries in the system ARP table
arptabShow( ) - display the known ARP entries
routestatShow( ) - display routing statistics
routeShow( ) - display host and network routing tables
hostShow( ) - display the host table
mRouteShow( ) - print the entries of the routing table
This library provides routines to show various network-related statistics, such as configuration parameters for network interfaces, protocol statistics, socket statistics, and so on.
Interpreting these statistics requires detailed knowledge of Internet network protocols. Information on these protocols can be found in the following books:
- Internetworking with TCP/IP Volume III, by Douglas Comer and David Stevens
- UNIX Network Programming, by Richard Stevens
- The Design and Implementation of the 4.3 BSD UNIX Operating System, by Leffler, McKusick, Karels and Quarterman
The netShowInit( ) routine links the network show facility into the VxWorks system. This is performed automatically if INCLUDE_NET_SHOW is defined in configAll.h.
netShow, ifLib, icmpShow, igmpShow, tcpShow, udpShow VxWorks Programmer's Guide: Network
ifShow( ) - display the attached network interfaces
void ifShow ( char * ifName /* name of the interface to show */ )
This routine displays the attached network interfaces for debugging and diagnostic purposes. If ifName is given, only the interfaces belonging to that group are displayed. If ifName is omitted, all attached interfaces are displayed.
For each interface selected, the following are shown: Internet address, point-to-point peer address (if using SLIP), broadcast address, netmask, subnet mask, Ethernet address, route metric, maximum transfer unit, number of packets sent and received on this interface, number of input and output errors, and flags (such as loopback, point-to-point, broadcast, promiscuous, ARP, running, and debug).
The following call displays all interfaces whose names begin with "ln", (such as "ln0", "ln1", and "ln2"):
-> ifShow "ln"The following call displays just the interface "ln0":-> ifShow "ln0"
N/A
inetstatShow( ) - display all active connections for Internet protocol sockets
void inetstatShow (void)
This routine displays a list of all active Internet protocol sockets in a format similar to the UNIX netstat command.
N/A
ipstatShow( ) - display IP statistics
void ipstatShow ( BOOL zero /* TRUE = reset statistics to 0 */ )
This routine displays detailed statistics for the IP protocol.
N/A
netPoolShow( ) - show pool statistics
void netPoolShow ( NET_POOL_ID pNetPool )
This routine displays the distribution of mBlks and clusters in a given network pool ID.
N/A
netStackDataPoolShow( ) - show network stack data pool statistics
void netStackDataPoolShow (void)
This routine displays the distribution of mBlks and clusters in a the network data pool. The network data pool is used only for data transfer through the network stack.
N/A
netShow, netStackSysPoolShow( ), netBufLib
netStackSysPoolShow( ) - show network stack system pool statistics
void netStackSysPoolShow (void)
This routine displays the distribution of mBlks and clusters in a the network system pool. The network system pool is used only for system structures such as sockets, routes, interface addresses, protocol control blocks, multicast addresses, and multicast route entries.
N/A
netShow, netStackDataPoolShow( ), netBufLib
mbufShow( ) - report mbuf statistics
void mbufShow (void)
This routine displays the distribution of mbufs in the network.
N/A
netShowInit( ) - initialize network show routines
void netShowInit (void)
This routine links the network show facility into the VxWorks system. These routines are included automatically if INCLUDE_NET_SHOW is defined in configAll.h.
N/A
arpShow( ) - display entries in the system ARP table
void arpShow (void)
This routine displays the current Internet-to-Ethernet address mappings in the ARP table.
-> arpShow LINK LEVEL ARP TABLE destination gateway flags Refcnt Use Interface ----------------------------------------------------------------------- 90.0.0.63 08:00:3e:23:79:e7 405 0 82 lo0 -----------------------------------------------------------------------
N/A
arptabShow( ) - display the known ARP entries
void arptabShow (void)
This routine displays current Internet-to-Ethernet address mappings in the ARP table.
N/A
routestatShow( ) - display routing statistics
void routestatShow (void)
This routine displays routing statistics.
N/A
routeShow( ) - display host and network routing tables
void routeShow (void)
This routine displays the current routing information contained in the routing table.
-> routeShow ROUTE NET TABLE destination gateway flags Refcnt Use Interface ------------------------------------------------------------------ 90.0.0.0 90.0.0.63 1 1 142 enp0 ------------------------------------------------------------------ ROUTE HOST TABLE destination gateway flags Refcnt Use Interface ------------------------------------------------------------------ 127.0.0.1 127.0.0.1 5 0 82 lo0 ------------------------------------------------------------------The flags field represents a decimal value of the flags specified for a given route. The following is a list of currently available flag values:
In the above display example, the entry in the ROUTE NET TABLE has a flag value of 1, which indicates that this route is "up" and usable and network specific (the 0x4 bit is turned off). The entry in the ROUTE HOST TABLE has a flag value of 5 (0x1 OR'ed with 0x4), which indicates that this route is "up" and usable and host-specific.
0x1 - route is usable (that is, "up") 0x2 - destination is a gateway 0x4 - host specific routing entry 0x8 - host or net unreachable 0x10 - created dynamically (by redirect) 0x20 - modified dynamically (by redirect) 0x40 - message confirmed 0x80 - subnet mask present 0x100 - generate new routes on use 0x200 - external daemon resolves name 0x400 - generated by ARP 0x800 - manually added (static) 0x1000 - just discard packets (during updates) 0x2000 - modified by management protocol 0x4000 - protocol specific routing flag 0x8000 - protocol specific routing flag
N/A
hostShow( ) - display the host table
void hostShow (void)
This routine prints a list of remote hosts, along with their Internet addresses and aliases.
N/A
mRouteShow( ) - print the entries of the routing table
void mRouteShow ( )
This routine prints the route entries in the routing table.
N/A