lldp: refactor keeping tlv data and order entries in neighbor GVariant
The fields in the neighbor variant should have a defined order. Instead of sorting the hash table entries while constructing the variant in lldp_neighbor_to_variant(), refactor the management of the TLV attributes. As we only support known attributes, we can store them in an array at a known index instead of putting them in a hash table. An alternative would be to have explict fields for every known attribute. That would be even more efficient, but requires more work when adding new attributes.
Showing with 167 additions and 107 deletions