* [PATCH 0/2] Sysfs net class .
[not found] ` <200305141443.57169.dsteklof@us.ibm.com>
@ 2003-05-15 23:27 ` Stephen Hemminger
2003-05-19 19:46 ` Jamal Hadi
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2003-05-15 23:27 UTC (permalink / raw)
To: David S. Miller, Patrick Mochel
Cc: netdev, greg, mochel, jkenisto, lkessler, Daniel Stekloff
Starting with work by Pat and Daniel Stekoff , I created a sysfs network interface.
There are two parts, one is the core network device piece to create
sysfs entries during init and register. The other is changing the device
drivers so that during registration the appropriate symlinks back to the
pci physical devices gets made.
All this is under a config option in case embedded or other systems
don't need it. The files are in sysfs standard format with one value per
file. Most are read-only, although some like flags, mtu, can be set.
The sysfs tree layout is:
class/net
|-- eth0
| |-- addr_len
| |-- address
| |-- broadcast
| |-- device -> ../../../devices/pci0/00:1e.0/04:04.0
| |-- driver -> ../../../bus/pci/drivers/e100
| |-- features
| |-- flags
| |-- if_port
| |-- ifindex
| |-- mtu
| |-- statistics
| | |-- collisions
| | |-- multicast
| | |-- rx_bytes
| | |-- rx_compressed
| | |-- rx_crc_errors
| | |-- rx_dropped
| | |-- rx_errors
| | |-- rx_fifo_errors
| | |-- rx_frame_errors
| | |-- rx_length_errors
| | |-- rx_missed_errors
| | |-- rx_over_errors
| | |-- rx_packets
| | |-- tx_aborted_errors
| | |-- tx_bytes
| | |-- tx_carrier_errors
| | |-- tx_compressed
| | |-- tx_dropped
| | |-- tx_errors
| | |-- tx_fifo_errors
| | |-- tx_heartbeat_errors
| | |-- tx_packets
| | `-- tx_window_errors
| |-- tx_queue_len
| `-- type
`-- lo
|-- addr_len
|-- address
|-- broadcast
|-- features
|-- flags
|-- if_port
|-- ifindex
|-- mtu
|-- statistics
| |-- collisions
| |-- multicast
| |-- rx_bytes
| |-- rx_compressed
| |-- rx_crc_errors
| |-- rx_dropped
| |-- rx_errors
| |-- rx_fifo_errors
| |-- rx_frame_errors
| |-- rx_length_errors
| |-- rx_missed_errors
| |-- rx_over_errors
| |-- rx_packets
| |-- tx_aborted_errors
| |-- tx_bytes
| |-- tx_carrier_errors
| |-- tx_compressed
| |-- tx_dropped
| |-- tx_errors
| |-- tx_fifo_errors
| |-- tx_heartbeat_errors
| |-- tx_packets
| `-- tx_window_errors
|-- tx_queue_len
`-- type
6 directories, 66 files
^ permalink raw reply [flat|nested] 2+ messages in thread