DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ifstats(D4)


ifstats -- networking interface statistics structure

Synopsis

   #include <net/if.h>
   #include <sys/ddi.h>

Description

DLPI-based networking drivers record statistics relating to each interface in the ifstats structure.

Usage

Structure definitions

The ifstats structure is defined as type ifstats_t and contains the following members:
   char	*ifs_name;
   short	ifs_unit;
   short	ifs_active;
   short	ifs_mtu;
   int	ifs_ipackets;
   int	ifs_ierrors;
   int	ifs_opackets;
   int	ifs_oerrors;
   int	ifs_collisions;
   int	ifs_type;
   int	ifspeed;
   unsigned long	ifinoctets;
   unsigned long	ifinucastpkts;
   unsigned long	ifinnucastpkts;
   unsigned long	ifindiscards;
   unsigned long	ifinunkprotos;
   unsigned long	ifoutoctets;
   unsigned long	ifoutucastpkts;
   unsigned long	ifoutnucastpkts;
   unsigned long	ifoutdiscards;

ifs_name
points to a (sixteen octet maximum) character array that holds the name of this interface. If the name is less than 16 octets long it must be NULL terminated.

ifs_unit
unit number of this interface.

ifs_active
set to a non-zero value if this interface is running (up), and zero otherwise.

ifs_mtu
maximum transmission unit size.

ifs_ipackets
number of packets received.

ifs_ierrors
number of input errors encountered.

ifs_opackets
number of packets transmitted.

ifs_oerrors
number of output errors encountered.

ifs_collisions
collisions encountered for CSMA (Carrier Sense Multiple Access) interfaces.

iftype
type of interface. Valid interface types are:


IFOTHER
An interface other than one of the following types.

IFDDN_X25
A DDN X25 interface.

IFRFC877_X25
An RFC-877 compliant X25 interface.

IFETHERNET_CSMACD
An ethernet interface.

IFISO88023_CSMACD
An 802.3 interface.

IFISO88025_TOKENRING
A Token Ring interface.

IFPPP
A Point-to-Point Protocol interface.

IFLOOPBACK
A software loopback interface.

IFSLIP
A Serial Line Internet Protocol interface.


ifspeed
estimate of the current bandwidth in bits per second. If no variation in bandwidth occurs, or if no accurate estimation can be made, the normal bandwidth should be recorded.

ifinoctets
total number of octets received. This includes framing characters (if any).

ifinucastpkts
number of unicast packets delivered to higher-level protocols.

ifinnucastpkts
number of non-unicast packets delivered to higher-level protocols.

ifindiscards
number of error-free input packets that were discarded. A possible reason for discarding a packet that could otherwise be delivered to higher-level protocols might be to free up buffer space due to a low memory condition.

ifinunkprotos
number of input packets discarded due to either an unsupported protocol.

ifoutoctets
total number of octets transmitted. This includes framing characters (if any).

ifoutucastpkts
number of unicast packets received from higher-level protocols for transmission, including packets that were discarded or not sent for any reason.

ifoutnucastpkts
number of non-unicast packets received from higher-level protocols for transmission, including packets that were discarded or not sent for any reason.

ifoutdiscards
number of error-free packets received from higher-level protocols for transmission that were discarded. A possible reason for discarding a packet that could otherwise be transmitted might be to free up buffer space due to a low memory condition.

Applicable hardware

All

Version applicability

ddi: 6, 6mp, 7, 7mp, 7.1, 7.1mp

Differences betwen versions

MDI provides a more powerful statistics gathering mechanism based on media-specific structures. See ``Metrics'' in HDK Technical Reference.

References

ifstats_attach(D3), ifstats_detach(D3)

MACIOC_GETSTAT, MACIOC_SETSTAT, MACIOC_CLRSTAT

``Metrics'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005