VxWorks API Reference : OS Libraries

netShow

NAME

netShow - network information display routines

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 all IP routes (summary information)
hostShow( ) - display the host table
mRouteShow( ) - display all IP routes (verbose information)

DESCRIPTION

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:

The netShowInit( ) routine links the network show facility into the VxWorks system. This is performed automatically if INCLUDE_NET_SHOW is defined. If you want inetstatShow( ) to display TCP socket status, then INCLUDE_TCP_SHOW needs to be included.

SEE ALSO

ifLib, icmpShow, igmpShow, tcpShow, udpShow


OS Libraries : Routines

ifShow( )

NAME

ifShow( ) - display the attached network interfaces

SYNOPSIS

void ifShow
    (
    char * ifName             /* name of the interface to show */
    )

DESCRIPTION

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).

EXAMPLE

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"

RETURNS

N/A

SEE ALSO

netShow, routeShow( ), ifLib


OS Libraries : Routines

inetstatShow( )

NAME

inetstatShow( ) - display all active connections for Internet protocol sockets

SYNOPSIS

void inetstatShow (void)

DESCRIPTION

This routine displays a list of all active Internet protocol sockets in a format similar to the UNIX netstat command.

If you want inetstatShow( ) to display TCP socket status, then INCLUDE_TCP_SHOW needs to be included.

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

ipstatShow( )

NAME

ipstatShow( ) - display IP statistics

SYNOPSIS

void ipstatShow
    (
    BOOL zero                 /* TRUE = reset statistics to 0 */
    )

DESCRIPTION

This routine displays detailed statistics for the IP protocol.

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

netPoolShow( )

NAME

netPoolShow( ) - show pool statistics

SYNOPSIS

void netPoolShow
    (
    NET_POOL_ID pNetPool
    )

DESCRIPTION

This routine displays the distribution of mBlks and clusters in a given network pool ID.

EXAMPLE

void endPoolShow
   (
   char * devName,    /* The inteface name: "dc", "ln" ...*/
   int    unit        /* the unit number: usually 0       */
   )
   {
   END_OBJ * pEnd;

   if ((pEnd = endFindByName (devName, unit)) != NULL)
       netPoolShow (pEnd->pNetPool);
   else
       printf ("Could not find device %s\n", devName);
   return;
   }

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

netStackDataPoolShow( )

NAME

netStackDataPoolShow( ) - show network stack data pool statistics

SYNOPSIS

void netStackDataPoolShow (void)

DESCRIPTION

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.

The "clusters" column indicates the total number of clusters of that size that have been allocated. The "free" column indicates the number of available clusters of that size (the total number of clusters minus those clusters that are in use). The "usage" column indicates the number of times clusters have been allocated (not, as you might expect, the number of clusters currently in use).

RETURNS

N/A

SEE ALSO

netShow, netStackSysPoolShow( ), netBufLib


OS Libraries : Routines

netStackSysPoolShow( )

NAME

netStackSysPoolShow( ) - show network stack system pool statistics

SYNOPSIS

void netStackSysPoolShow (void)

DESCRIPTION

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.

The "clusters" column indicates the total number of clusters of that size that have been allocated. The "free" column indicates the number of available clusters of that size (the total number of clusters minus those clusters that are in use). The "usage" column indicates the number of times clusters have been allocated (not, as you might expect, the number of clusters currently in use).

RETURNS

N/A

SEE ALSO

netShow, netStackDataPoolShow( ), netBufLib


OS Libraries : Routines

mbufShow( )

NAME

mbufShow( ) - report mbuf statistics

SYNOPSIS

void mbufShow (void)

DESCRIPTION

This routine displays the distribution of mbufs in the network.

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

netShowInit( )

NAME

netShowInit( ) - initialize network show routines

SYNOPSIS

void netShowInit (void)

DESCRIPTION

This routine links the network show facility into the VxWorks system. These routines are included automatically if INCLUDE_NET_SHOW is defined.

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

arpShow( )

NAME

arpShow( ) - display entries in the system ARP table

SYNOPSIS

void arpShow (void)

DESCRIPTION

This routine displays the current Internet-to-Ethernet address mappings in the ARP table.

EXAMPLE

    -> arpShow

    LINK LEVEL ARP TABLE
    Destination      LL Address        Flags  Refcnt Use        Interface
    ---------------------------------------------------------------------
    90.0.0.63        08:00:3e:23:79:e7 0x405  0      82         lo0
    ---------------------------------------------------------------------
Some configuration is required when this routine is to be used remotely over the network eg. through a telnet session or through the host shell using WDB_COMM_NETWORK. If more than 5 entries are expected in the table the parameter RT_BUFFERED_DISPLAY should be set to TRUE to prevent a possible deadlock. This requires a buffer whose size can be set with RT_DISPLAY_MEMORY. It will limit the number of entries that can be displayed (each entry requires approx. 70 bytes).

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

arptabShow( )

NAME

arptabShow( ) - display the known ARP entries

SYNOPSIS

void arptabShow (void)

DESCRIPTION

This routine displays current Internet-to-Ethernet address mappings in the ARP table.

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

routestatShow( )

NAME

routestatShow( ) - display routing statistics

SYNOPSIS

void routestatShow (void)

DESCRIPTION

This routine displays routing statistics.

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

routeShow( )

NAME

routeShow( ) - display all IP routes (summary information)

SYNOPSIS

void routeShow (void)

DESCRIPTION

This routine displays the list of destinations in the routing table along with the next-hop gateway and associated interface for each entry. It separates the routes into network routes and host-specific entries, but does not display the netmask for a route since it was created for class-based routes which used predetermined values for that field.

The IP forwarding process will only use the first route entry to a destination. When multiple routes exist to the same destination with the same netmask (which is not shown), the first route entry uses the lowest administrative weight. The remaining entries (listed as additional routes) use the same destination address. One of those entries will replace the primary route if it is deleted.

EXAMPLE

    -> routeShow

    ROUTE NET TABLE
    Destination      Gateway          Flags  Refcnt Use        Interface
    --------------------------------------------------------------------
    90.0.0.0         90.0.0.63        0x1    1      142        enp0
    10.0.0.0         90.0.0.70        0x1    1      142        enp0
      Additional routes to 10.0.0.0:
                     80.0.0.70        0x1    0      120        enp1
    --------------------------------------------------------------------

    ROUTE HOST TABLE
    Destination      Gateway          Flags  Refcnt Use        Interface
    --------------------------------------------------------------------
    127.0.0.1        127.0.0.1        0x101  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:

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
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.

Some configuration is required when this routine is to be used remotely over the network eg. through a telnet session or through the host shell using WDB_COMM_NETWORK. If more than 5 routes are expected in the table the parameter RT_BUFFERED_DISPLAY should be set to TRUE to prevent a possible deadlock. This requires a buffer whose size can be set with RT_DISPLAY_MEMORY. It will limit the number of routes that can be displayed (each route requires approx. 70 bytes).

RETURNS

N/A

SEE ALSO

netShow


OS Libraries : Routines

hostShow( )

NAME

hostShow( ) - display the host table

SYNOPSIS

void hostShow (void)

DESCRIPTION

This routine prints a list of remote hosts, along with their Internet addresses and aliases.

RETURNS

N/A

SEE ALSO

netShow, hostAdd( )


OS Libraries : Routines

mRouteShow( )

NAME

mRouteShow( ) - display all IP routes (verbose information)

SYNOPSIS

void mRouteShow (void)

DESCRIPTION

This routine displays the list of destinations in the routing table along with the next-hop gateway and associated interface. It also displays the netmask for a route (to handle classless routes which use arbitrary values for that field) and the value which indicates the route's creator, as well as any type-of-service information.

When multiple routes exist to the same destination with the same netmask, the IP forwarding process only uses the first route entry with the lowest administrative weight. The remaining entries (listed as additional routes) use the same address and netmask. One of those entries will replace the primary route if it is deleted.

Some configuration is required when this routine is to be used remotely over the network eg. through a telnet session or through the host shell using WDB_COMM_NETWORK. If more than 5 routes are expected in the table the parameter RT_BUFFERED_DISPLAY should be set to TRUE to prevent a possible deadlock. This requires a buffer whose size can be set with RT_DISPLAY_MEMORY. It will limit the number of routes that can be displayed (each route requires approx. 90 bytes).

RETURNS

N/A

SEE ALSO

netShow