55 |
|
in a 64bit int, which wraps somewhere near 17 million terabytes. |
56 |
|
</para> |
57 |
|
<para> |
58 |
+ |
<function>get_network_stats</function> also returns the number |
59 |
+ |
of packets sent and received, and the number of errors that |
60 |
+ |
have occured. It also makes the number of collisions available. |
61 |
+ |
</para> |
62 |
+ |
<para> |
63 |
|
<function>get_network_stats_diff</function> is the same as |
64 |
|
<function>get_network_stats</function> except it will return the |
65 |
|
difference since the last call. So, for instance a call to |
84 |
|
char *interface_name; |
85 |
|
long long tx; |
86 |
|
long long rx; |
87 |
+ |
long long ipackets; |
88 |
+ |
long long opackets; |
89 |
+ |
long long ierrors; |
90 |
+ |
long long oerrors; |
91 |
+ |
long long collisions; |
92 |
|
time_t systime; |
93 |
|
}network_stat_t; |
94 |
|
</programlisting> |
122 |
|
<listitem> |
123 |
|
<para> |
124 |
|
The number of bytes received. |
125 |
+ |
</para> |
126 |
+ |
</listitem> |
127 |
+ |
</varlistentry> |
128 |
+ |
<varlistentry> |
129 |
+ |
<term> |
130 |
+ |
<structfield>ipackets</structfield> |
131 |
+ |
</term> |
132 |
+ |
<listitem> |
133 |
+ |
<para> |
134 |
+ |
The number of packets received. |
135 |
+ |
</para> |
136 |
+ |
</listitem> |
137 |
+ |
</varlistentry> |
138 |
+ |
<varlistentry> |
139 |
+ |
<term> |
140 |
+ |
<structfield>opackets</structfield> |
141 |
+ |
</term> |
142 |
+ |
<listitem> |
143 |
+ |
<para> |
144 |
+ |
The number of packets transmitted. |
145 |
+ |
</para> |
146 |
+ |
</listitem> |
147 |
+ |
</varlistentry> |
148 |
+ |
<varlistentry> |
149 |
+ |
<term> |
150 |
+ |
<structfield>ierrors</structfield> |
151 |
+ |
</term> |
152 |
+ |
<listitem> |
153 |
+ |
<para> |
154 |
+ |
The number of receive errors. |
155 |
+ |
</para> |
156 |
+ |
</listitem> |
157 |
+ |
</varlistentry> |
158 |
+ |
<varlistentry> |
159 |
+ |
<term> |
160 |
+ |
<structfield>oerrors</structfield> |
161 |
+ |
</term> |
162 |
+ |
<listitem> |
163 |
+ |
<para> |
164 |
+ |
The number of transmit errors. |
165 |
+ |
</para> |
166 |
+ |
</listitem> |
167 |
+ |
</varlistentry> |
168 |
+ |
<varlistentry> |
169 |
+ |
<term> |
170 |
+ |
<structfield>collisions</structfield> |
171 |
+ |
</term> |
172 |
+ |
<listitem> |
173 |
+ |
<para> |
174 |
+ |
The number of collisions. |
175 |
|
</para> |
176 |
|
</listitem> |
177 |
|
</varlistentry> |