Function statistics [src]
Resets or collects the statistics on a network interface.
Prototype
pub fn statistics(self: *SimpleNetwork, reset_flag: bool) StatisticsError!Statistics
Parameters
self: *SimpleNetwork
reset_flag: bool
Possible Errors
Source
pub fn statistics(self: *SimpleNetwork, reset_flag: bool) StatisticsError!Statistics {
var stats: Statistics = undefined;
var stats_size: usize = @sizeOf(Statistics);
switch (self._statistics(self, reset_flag, &stats_size, &stats)) {
.success => {},
.not_started => return Error.NotStarted,
.invalid_parameter => return Error.InvalidParameter,
.device_error => return Error.DeviceError,
.unsupported => return Error.Unsupported,
else => |status| return uefi.unexpectedStatus(status),
}
if (stats_size != @sizeOf(Statistics))
return error.Unexpected
else
return stats;
}