You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/util/cstruct
Andrew Dunham 58cc049a9f
util/cstruct: add package for decoding padded C structures (#5429)
I was working on my "dump iptables rules using only syscalls" branch and
had a bunch of C structure decoding to do. Rather than manually
calculating the padding or using unsafe trickery to actually cast
variable-length structures to Go types, I'd rather use a helper package
that deals with padding for me.

Padding rules were taken from the following article:
  http://www.catb.org/esr/structure-packing/

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
2 years ago
..
cstruct.go util/cstruct: add package for decoding padded C structures (#5429) 2 years ago
cstruct_example_test.go util/cstruct: add package for decoding padded C structures (#5429) 2 years ago
cstruct_test.go util/cstruct: add package for decoding padded C structures (#5429) 2 years ago