chiark / gitweb /
sd-rtnl: rework rtnl type system
authorTom Gundersen <teg@jklm.no>
Wed, 26 Mar 2014 18:25:01 +0000 (19:25 +0100)
committerTom Gundersen <teg@jklm.no>
Fri, 28 Mar 2014 18:11:59 +0000 (19:11 +0100)
commitd8e538ecd9e62f841242f07e3df5c835c1ba6313
tree0fba56485f73d01a985ed4afaff83cffa19068d2
parent9f5bbfe354c52cd9e28cca32c35596b73e8d738b
sd-rtnl: rework rtnl type system

Use a static table with all the typing information, rather than repeated
switch statements. This should make it a lot simpler to add new types.

We need to keep all the type info to be able to create containers
without exposing their implementation details to the users of the library.

As a freebee we verify the types of appended/read attributes.

The API is extended to nicely deal with unions of container types.
Makefile.am
src/libsystemd/sd-rtnl/rtnl-internal.h
src/libsystemd/sd-rtnl/rtnl-message.c
src/libsystemd/sd-rtnl/rtnl-types.c [new file with mode: 0644]
src/libsystemd/sd-rtnl/rtnl-types.h [new file with mode: 0644]
src/libsystemd/sd-rtnl/test-rtnl.c
src/network/networkd-netdev.c
src/nspawn/nspawn.c
src/systemd/sd-rtnl.h