tcp-info icon indicating copy to clipboard operation
tcp-info copied to clipboard

Add new types to inetdiag constants and snapshot.Decode

Open stephen-soltesz opened this issue 3 years ago • 2 comments

PR https://github.com/m-lab/tcp-info/pull/123 added new fields to the tcp.LinuxTCPInfo struct however, the snapshot.Decode function does not recognize all available inetdiag types

https://github.com/m-lab/tcp-info/blob/9928ad36d2e5f42c17dad065c98cf1346acc2026/inetdiag/inetdiag.go#L40-L61

The down stream effect of this is that the etl parser fails to load these fields and reports:

2022/08/22 12:04:54 snapshot.go:90: unhandled attribute type: 21
2022/08/22 12:04:53 snapshot.go:90: unhandled attribute type: 21
2022/08/22 12:04:52 snapshot.go:90: unhandled attribute type: 21
2022/08/22 12:04:51 snapshot.go:90: unhandled attribute type: 21
2022/08/22 12:04:50 snapshot.go:90: unhandled attribute type: 21
2022/08/22 12:01:53 snapshot.go:90: unhandled attribute type: 22

stephen-soltesz avatar Aug 22 '22 17:08 stephen-soltesz

Contrast inetdiag constants with https://lxr.missinglinkelectronics.com/linux/include/uapi/linux/inet_diag.h#L134

stephen-soltesz avatar Aug 22 '22 18:08 stephen-soltesz

These appear to be missing today: https://lxr.missinglinkelectronics.com/linux/include/uapi/linux/inet_diag.h#L160-L163

160        INET_DIAG_ULP_INFO,
161        INET_DIAG_SK_BPF_STORAGES,
162        INET_DIAG_CGROUP_ID,  // 21
163        INET_DIAG_SOCKOPT,    // 22

stephen-soltesz avatar Aug 22 '22 20:08 stephen-soltesz