This is a huge commit, but 90%+ of it is just splitting
'lib/atom-private.c' into smaller atoms and putting them
into the 'lib/atoms' folder.
Some glue code has been added, for constructing maps and builders.
For the 'struct atom_builder' type a 'nextb' field has been
appended at the end, to help make it a single-linked list of
'struct atom_builders's.
The 'next' field in 'struct atom_builder' is taken (hence 'nextb').
For the maps, a wrapper struct (called 'struct atom_map')
has been added on top of 'lldpctl_map_t' in order to create
single-linked list construct of maps.
The struct looks like:
struct atom_map {
int key; /* lldpctl_key_t equivalent */
struct atom_map *next; /* next 'struct atom_map' */
lldpctl_map_t map[]; /* has to be at the end to
to be statically init-ed */
}
The point of this is to register them at load-time so
that 'lldpctl_key_get_map()' can return them.
Each file in 'lib/atoms' registers it's own 'struct atom_builder's
and 'struct atom_map's.
The whole point of this is to be able to add a 'custom' and/or
'custom_list' atom(s) to be able to configure/broadcast other TLVs
in the future.
This mechanism is extensible to add other TLVs defined by
future standards.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>