OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [packages/] [io/] [eth/] [current/] [include/] [eth_drv_stats.h] - Blame information for rev 786

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#ifndef CYGONCE_IO_ETH_ETH_DRV_STATS_H
2
#define CYGONCE_IO_ETH_ETH_DRV_STATS_H
3
//==========================================================================
4
//
5
//      include/cyg/io/eth/eth_drv_stats.h
6
//
7
//      High level networking driver interfaces - statistics gathering
8
//
9
//==========================================================================
10
// ####ECOSGPLCOPYRIGHTBEGIN####                                            
11
// -------------------------------------------                              
12
// This file is part of eCos, the Embedded Configurable Operating System.   
13
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
14
//
15
// eCos is free software; you can redistribute it and/or modify it under    
16
// the terms of the GNU General Public License as published by the Free     
17
// Software Foundation; either version 2 or (at your option) any later      
18
// version.                                                                 
19
//
20
// eCos is distributed in the hope that it will be useful, but WITHOUT      
21
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or    
22
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License    
23
// for more details.                                                        
24
//
25
// You should have received a copy of the GNU General Public License        
26
// along with eCos; if not, write to the Free Software Foundation, Inc.,    
27
// 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.            
28
//
29
// As a special exception, if other files instantiate templates or use      
30
// macros or inline functions from this file, or you compile this file      
31
// and link it with other works to produce a work based on this file,       
32
// this file does not by itself cause the resulting work to be covered by   
33
// the GNU General Public License. However the source code for this file    
34
// must still be made available in accordance with section (3) of the GNU   
35
// General Public License v2.                                               
36
//
37
// This exception does not invalidate any other reasons why a work based    
38
// on this file might be covered by the GNU General Public License.         
39
// -------------------------------------------                              
40
// ####ECOSGPLCOPYRIGHTEND####                                              
41
//==========================================================================
42
//#####DESCRIPTIONBEGIN####
43
//
44
// Author(s):    hmt
45
// Contributors: hmt
46
// Date:         2000-08-23
47
// Purpose:      
48
// Description:  High level networking driver interfaces - stats gathering
49
//              
50
//
51
//####DESCRIPTIONEND####
52
//
53
//==========================================================================
54
 
55
#include <pkgconf/system.h>
56
 
57
#ifdef CYGPKG_NET
58
#include <sys/param.h>
59
#include <sys/socket.h>
60
 
61
#include <net/if.h>
62
 
63
// This information is oriented towards SNMP's needs.
64
 
65
#define DESC_LEN (48)
66
#define SNMP_CHIPSET_LEN (20)
67
 
68
struct ether_drv_stats {
69
    struct ifreq ifreq;                 // tell ioctl() which interface.
70
 
71
    char description[ DESC_LEN ];       // Textual description of hardware
72
    unsigned char snmp_chipset[ SNMP_CHIPSET_LEN ];
73
                                        // SNMP ID of chipset
74
    unsigned char duplex;               // 1 = UNKNOWN, 2 = SIMPLEX, 3 = DUPLEX
75
    unsigned char operational;          // 1 = UNKNOWN, 2 = DOWN, 3 = UP
76
    // These are general status information:
77
    unsigned int speed;                 // 10,000,000 or 100,000,000
78
                                        //     to infinity and beyond?
79
 
80
    // These are typically kept by device hardware - and there may be some
81
    // cost for getting up to date values:
82
 
83
    unsigned int supports_dot3;  /* Boolean value if the device supports dot3*/
84
    unsigned int tx_good;
85
    unsigned int tx_max_collisions;
86
    unsigned int tx_late_collisions;
87
    unsigned int tx_underrun;
88
    unsigned int tx_carrier_loss;
89
    unsigned int tx_deferred;
90
    unsigned int tx_sqetesterrors;
91
    unsigned int tx_single_collisions;
92
    unsigned int tx_mult_collisions;
93
    unsigned int tx_total_collisions;
94
    unsigned int rx_good;
95
    unsigned int rx_crc_errors;
96
    unsigned int rx_align_errors;
97
    unsigned int rx_resource_errors;
98
    unsigned int rx_overrun_errors;
99
    unsigned int rx_collisions;
100
    unsigned int rx_short_frames;
101
    unsigned int rx_too_long_frames;
102
    unsigned int rx_symbol_errors;
103
 
104
    // These are typically kept by driver software:
105
    unsigned int interrupts;
106
    unsigned int rx_count;
107
    unsigned int rx_deliver;
108
    unsigned int rx_resource;
109
    unsigned int rx_restart;
110
    unsigned int tx_queue_len;
111
    unsigned int tx_count;
112
    unsigned int tx_complete;
113
    unsigned int tx_dropped;
114
 
115
    // Add any others here...
116
 
117
};
118
#endif // CYGPKG_NET
119
#endif // CYGONCE_IO_ETH_ETH_DRV_STATS_H
120
 
121
// EOF include/cyg/io/eth/eth_drv_stats.h

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.