Right now, sockaddr_nl parameters are not displayed in kdump output,
however they are present in the structure in ktrace.out file when
ktrace is run.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 60360 Build 57244: arc lint + arc unit
Event Timeline
sys/sys/ktrace.h | ||
---|---|---|
39 ↗ | (On Diff #145917) | This include should be in kdump.c, not here. In general we try to avoid including headers within headers, when possible. |
Looks ok
usr.bin/kdump/kdump.c | ||
---|---|---|
51 | This should be sorted after the sys/ includes. The style(9) man page has some examples. In this case, netlink/netlink.h should come after netinet/in.h below. | |
1928 | I think it's not useful to print the length and family, those will always be the same. We don't print them for other sockaddr types. Something like netlink[pid=%u, groups=0x%x] makes more sense to me as a format string. |
Generally LGTM
usr.bin/kdump/kdump.c | ||
---|---|---|
1928 | It depends on what are the goals of printing. |
usr.bin/kdump/kdump.c | ||
---|---|---|
1928 | Well, this case won't match at all if nl_family != AF_NETLINK. Probably the "unknown address family" message below should include the family. If the length is wrong, we may indeed care, but probably not: classic unix socket interfaces take the sockaddr length as a separate parameter and typically overwrite the user-supplied length. Indeed, Linux sockaddrs don't have a length field at all. So it is rarely interesting, and it's not printed for the other sockaddr types handled above, which is why I suggested to omit it. I have no objection to including it though. |