Commit 40190a8
committed
netlink: add struct tag-based attribute codec
Add a reflection-based Codec that maps struct fields tagged with
`netlink:"<index>[,opts]"` to netlink attributes, providing a
declarative alternative to manual AttributeEncoder/AttributeDecoder
usage.
Supported types: scalars (uint*/int* with optional be/le byte order),
strings, []byte, bools (flags), nested structs, pointers (optional),
slices (multi/indexed layouts), and sub-messages via resolver functions.
Struct metadata is cached per type to avoid repeated reflection
overhead.
See #286.1 parent 45ff015 commit 40190a8
2 files changed
Lines changed: 1578 additions & 0 deletions
0 commit comments