]> git.saurik.com Git - apple/xnu.git/blame_incremental - iokit/IOKit/network/IONetworkStats.h
xnu-123.5.tar.gz
[apple/xnu.git] / iokit / IOKit / network / IONetworkStats.h
... / ...
CommitLineData
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 * IONetworkStats.h
26 *
27 * HISTORY
28 */
29
30#ifndef _IONETWORKSTATS_H
31#define _IONETWORKSTATS_H
32
33/*! @header IONetworkStats.h
34 @discussion Generic network statistics. */
35
36//------------------------------------------------------------------------
37// Generic network statistics. Common to all network interfaces.
38//
39// WARNING: This structure must match the statistics field in
40// ifnet->if_data. This structure will overlay a portion of ifnet.
41
42/*! @typedef IONetworkStats
43 @discussion Generic network statistics structure.
44 @field inputPackets count input packets.
45 @field inputErrors count input errors.
46 @field outputPackets count output packets.
47 @field outputErrors count output errors.
48 @field collisions count collisions on CDMA networks. */
49
50typedef struct {
51 UInt32 inputPackets;
52 UInt32 inputErrors;
53 UInt32 outputPackets;
54 UInt32 outputErrors;
55 UInt32 collisions;
56} IONetworkStats;
57
58/*! @defined kIONetworkStatsKey
59 @discussion Defines the name of an IONetworkData that contains
60 an IONetworkStats. */
61
62#define kIONetworkStatsKey "IONetworkStatsKey"
63
64//------------------------------------------------------------------------
65// Output queue statistics.
66
67/*! @typedef IOOutputQueueStats
68 @discussion Statistics recorded by IOOutputQueue objects.
69 @field capacity queue capacity.
70 @field size current size of the queue.
71 @field peakSize peak size of the queue.
72 @field dropCount number of packets dropped.
73 @field outputCount number of output packets.
74 @field retryCount number of retries.
75 @field stallCount number of queue stalls. */
76
77typedef struct {
78 UInt32 capacity;
79 UInt32 size;
80 UInt32 peakSize;
81 UInt32 dropCount;
82 UInt32 outputCount;
83 UInt32 retryCount;
84 UInt32 stallCount;
85 UInt32 reserved[4];
86} IOOutputQueueStats;
87
88/*! @defined kIOOutputQueueStatsKey
89 @discussion Defines the name of an IONetworkData that contains
90 an IOOutputQueueStats. */
91
92#define kIOOutputQueueStatsKey "IOOutputQueueStatsKey"
93
94#endif /* !_IONETWORKSTATS_H */