Page MenuHomeFreeBSD

ifinfo: Print names of CSUM bits
ClosedPublic

Authored by timo.voelker_fh-muenster.de on Feb 2 2026, 4:49 PM.
Tags
None
Referenced Files
F167847928: D55055.id171466.diff
Mon, Aug 24, 11:44 PM
F167816684: D55055.id.diff
Mon, Aug 24, 6:37 PM
F167801653: D55055.id171061.diff
Mon, Aug 24, 4:00 PM
F167801645: D55055.id171061.diff
Mon, Aug 24, 4:00 PM
F167801640: D55055.id171061.diff
Mon, Aug 24, 4:00 PM
Unknown Object (File)
Mon, Aug 24, 9:20 AM
Unknown Object (File)
Sun, Aug 23, 3:32 PM
Unknown Object (File)
Sat, Aug 22, 8:57 PM
Subscribers

Details

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.Feb 3 2026, 2:22 PM
This revision was automatically updated to reflect the committed changes.