1/*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License").  You may not use this file except in compliance with the
9 * License.  Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22/*
23 * Copyright (c) 1999 Apple Computer, Inc.  All rights reserved.
24 *
25 * IOFWStats.h - Ethernet MIB statistics definitions.
26 *
27 * HISTORY
28 */
29
30#ifndef _IOFWSTATS_H
31#define _IOFWSTATS_H
32
33/*! @header IOFWStats.h
34    @discussion Ethernet statistics. */
35
36//---------------------------------------------------------------------------
37// Ethernet-like statistics group.
38
39/*! @typedef IODot3StatsEntry
40    @discussion Ethernet MIB statistics structure.
41    @field alignmentErrors            dot3StatsAlignmentErrors.
42    @field fcsErrors                  dot3StatsFCSErrors.
43    @field singleCollisionFrames      dot3StatsSingleCollisionFrames.
44    @field multipleCollisionFrames    dot3StatsMultipleCollisionFrames.
45    @field sqeTestErrors              dot3StatsSQETestErrors.
46    @field deferredTransmissions      dot3StatsDeferredTransmissions.
47    @field lateCollisions             dot3StatsLateCollisions.
48    @field excessiveCollisions        dot3StatsExcessiveCollisions.
49    @field internalMacTransmitErrors  dot3StatsInternalMacTransmitErrors.
50    @field carrierSenseErrors         dot3StatsCarrierSenseErrors.
51    @field frameTooLongs              dot3StatsFrameTooLongs.
52    @field internalMacReceiveErrors   dot3StatsInternalMacReceiveErrors.
53    @field etherChipSet               dot3StatsEtherChipSet.
54    @field missedFrames               dot3StatsMissedFrames (not in RFC1650).
55    */
56
57typedef struct {
58    UInt32 alignmentErrors;
59    UInt32 fcsErrors;
60    UInt32 singleCollisionFrames;
61    UInt32 multipleCollisionFrames;
62    UInt32 sqeTestErrors;
63    UInt32 deferredTransmissions;
64    UInt32 lateCollisions;
65    UInt32 excessiveCollisions;
66    UInt32 internalMacTransmitErrors;
67    UInt32 carrierSenseErrors;
68    UInt32 frameTooLongs;
69    UInt32 internalMacReceiveErrors;
70    UInt32 etherChipSet;
71    UInt32 missedFrames;
72} IODot3StatsEntry;
73
74//---------------------------------------------------------------------------
75// Ethernet-like collision statistics group (optional).
76
77/*! @typedef IODot3CollEntry
78    @discussion Collision statistics structure.
79    @field collFrequencies            dot3StatsCollFrequencies. */
80
81typedef struct {
82    UInt32 collFrequencies[16];
83} IODot3CollEntry;
84
85//---------------------------------------------------------------------------
86// Receiver extra statistics group (not defined by RFC 1650).
87
88/*! @typedef IODot3RxExtraEntry
89    @discussion Extra receiver statistics not defined by RFC1650.
90    @field overruns            receiver overruns.
91    @field watchdogTimeouts    watchdog timer expirations.
92    @field frameTooShorts      runt frames.
93    @field collisionErrors     frames damages by late collision.
94    @field phyErrors           PHY receive errors.
95    @field timeouts            receiver timeouts.
96    @field interrupts          receiver interrupts.
97    @field resets              receiver resets.
98    @field resourceErrors      receiver resource shortages.
99    */
100
101typedef struct {
102    UInt32 overruns;
103    UInt32 watchdogTimeouts;
104    UInt32 frameTooShorts;
105    UInt32 collisionErrors;
106    UInt32 phyErrors;
107    UInt32 timeouts;
108    UInt32 interrupts;
109    UInt32 resets;
110    UInt32 resourceErrors;
111    UInt32 reserved[4];
112} IODot3RxExtraEntry;
113
114//---------------------------------------------------------------------------
115// Transmitter extra statistics group (not defined by RFC 1650).
116
117/*! @typedef IODot3TxExtraEntry
118    @discussion Extra transmitter statistics not defined by RFC1650.
119    @field underruns           transmit underruns.
120    @field jabbers             jabber events.
121    @field phyErrors           PHY transmit errors.
122    @field timeouts            transmitter timeouts.
123    @field interrupts          transmitter interrupts.
124    @field resets              transmitter resets.
125    @field resourceErrors      transmitter resource shortages.
126    */
127
128typedef struct {
129    UInt32 underruns;
130    UInt32 jabbers;
131    UInt32 phyErrors;
132    UInt32 timeouts;
133    UInt32 interrupts;
134    UInt32 resets;
135    UInt32 resourceErrors;
136    UInt32 reserved[4];
137} IODot3TxExtraEntry;
138
139//---------------------------------------------------------------------------
140// Aggregate Ethernet statistics.
141
142/*! @typedef IOFWStats
143    @discussion Aggregate Ethernet statistics structure.
144    @field dot3StatsEntry      IODot3StatsEntry statistics group.
145    @field dot3CollEntry       IODot3CollEntry statistics group.
146    @field dot3RxExtraEntry    IODot3RxExtraEntry statistics group.
147    @field dot3TxExtraEntry    IODot3TxExtraEntry statistics group.
148    */
149
150typedef struct {
151    IODot3StatsEntry    dot3StatsEntry;
152    IODot3CollEntry     dot3CollEntry;
153    IODot3RxExtraEntry  dot3RxExtraEntry;
154    IODot3TxExtraEntry  dot3TxExtraEntry;
155} IOFWStats;
156
157/*! @defined kIOFWStatsKey
158    @discussion Defines the name of an IONetworkData that contains
159    an IOFWStats. */
160
161#define kIOFWStatsKey             "IOFWStatsKey"
162
163#endif /* !_IOFWSTATS_H */
164