]> git.ipfire.org Git - thirdparty/lldpd.git/commit
lib: ability to get and query local chassis
authorVincent Bernat <vincent@bernat.im>
Sat, 11 Jul 2015 18:04:12 +0000 (20:04 +0200)
committerVincent Bernat <vincent@bernat.im>
Sat, 11 Jul 2015 20:00:51 +0000 (22:00 +0200)
commit99ef55d3e58ed24be169c38120dd2693b49af1f6
tree5b9010cd734a567e069a8fd53cc39e7228ea7ccd
parent81291d63f9b127be9c670de7fdfc83e42776f530
lib: ability to get and query local chassis

Up until now, to get information about the local chassis, we had to get
one interface and query the associated local port, then get chassis
information out of it.

With this change, a dedicated `lldpctl_get_local_chassis()` function is
provided and returns a chassis atom. All the chassis-related properties
are moved to this kind of atom. We also add a `lldpctl_k_port_chassis`
key to get the chassis associated to a port.

Left for next commits:
 - lldpcli hasn't been updated
 - compatibility layer to query chassis-related properties from port
src/ctl.h
src/daemon/client.c
src/lib/Makefile.am
src/lib/atom.c
src/lib/atom.h
src/lib/atoms/chassis.c [new file with mode: 0644]
src/lib/atoms/mgmt.c
src/lib/atoms/port.c
src/lib/lldpctl.h
src/lib/lldpctl.map