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
- Reviewers
melifaro glebius markj - Commits
- rG7678dac43714: ktrace: support AF_NETLINK in ktrstruct
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 60355 Build 57239: arc lint + arc unit
Event Timeline
sys/sys/ktrace.h | ||
---|---|---|
39 | 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. | |
1927 | 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 | ||
---|---|---|
1927 | It depends on what are the goals of printing. |
usr.bin/kdump/kdump.c | ||
---|---|---|
1927 | 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. |