lkmi_netdev
#include <lkmi.h >
int lkmi_netdev (lkmi_netdev_t *netdev, int index, int num);
- netdev
-
Pointer to structure which is described bellow. If this pointer is NULL
then number of NICs is returned.
- index
-
Index of first evaluated NICs. First index is 0.
- num
-
Number of lkmi_netdev_t blocks in fsinfo array.
Function retrieves information about Network Interface Cards (NICs)
and their counters in structure lkmi_netdev_t which contains these fields.
For more information see kernel source code.
Note: counters contains counted data since last system boot.
- name
-
Interface name. I.e. eth0
- recv_bytes
-
Number of received bytes (octets).
- recv_pkts
-
Number of received packets.
- recv_errs
-
Number of received mangled packets. Late collision detections may be included.
- recv_drop
-
Number of received but dropped packets.
- recv_fifo
-
No idea
- recv_frame
-
Number of received packet with framing error. ?
- xmit_bytes
-
Number of transmitted bytes (octets).
- xmit_pkts
-
Number of transmitted packets. i.e. late detected collision.
- xmit_errs
-
Number of errors during transmission.
- xmit_drop
-
Number of dropped packets. I am not sure what this means.
- xmit_fifo
-
No idea
- xmit_colls
-
Number of collisions during transmission.
- xmit_carrier
-
Number of carrier loses during transmitting.
If parameter netdev is NULL then number of NICs is returned.
If this parameter is valid pointer and function ends successfully then returns 0.
If call fail, functions returns -1 and sets
errno value to:
- ENODEV
-
NICs index is out of range.
- other
-
The lkmi_net function may also fail and set errno
for any of the errors specified for the routine fopen(3).
Please use the SourceForge Reporting page
which is located here:
Bug Report
This function is written as part of lkmi library for Linux system
and may be freely distributed under GPL terms.
Copyright (c) 1995, 2002 David Doubrava (linux_monitor(at)volny(dot)cz).
Origin of values description is in Linux kernel source.
lkmi,
lkmi_cpu,
lkmi_files,
lkmi_filesys,
lkmi_hdd,
lkmi_hw_intr,
lkmi_inodes,
lkmi_memory,
lkmi_memoryswap,
lkmi_net,
lkmi_proc,
lkmi_readprocesses,
lkmi_swap,
lkmi_swapex,
lkmi_system