Page MenuHomeFreeBSD

ifinfo: Print names of CSUM bits
AcceptedPublic

Authored by timo.voelker_fh-muenster.de on Mon, Feb 2, 4:49 PM.
Tags
None
Referenced Files
F144050538: D55055.id171061.diff
Tue, Feb 3, 10:48 PM
F144050510: D55055.diff
Tue, Feb 3, 10:48 PM
F144040834: D55055.id171061.diff
Tue, Feb 3, 7:04 PM
F144034887: D55055.diff
Tue, Feb 3, 4:56 PM
F144028036: D55055.diff
Tue, Feb 3, 2:30 PM
Unknown Object (File)
Tue, Feb 3, 11:20 AM
Unknown Object (File)
Tue, Feb 3, 10:07 AM
Unknown Object (File)
Tue, Feb 3, 1:53 AM
Subscribers

Details

Reviewers
wollman
tuexen
Summary

ifinfo prints the value of if_hwassist. The value is hard to read since it is a bitmap for CSUM_* bits defined in src/sys/sys/mbuf.h. With this patch, ifinfo additionally prints the names of the CSUM_* bits.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

tools/tools/ifinfo/ifinfo.c
199

first is used as a boolean. Can't you use bool first instead of int first?

timo.voelker_fh-muenster.de added inline comments.
tools/tools/ifinfo/ifinfo.c
199

bool seems not to be available as a data type when building a tool.

timo.voelker_fh-muenster.de marked an inline comment as done.

Use CSUM_BITS string defined in sys/mbuf.h for output.

Use bool type, which is possible after adding #include <ctype.h>

This revision is now accepted and ready to land.Tue, Feb 3, 2:22 PM