lldpcli: rename "unconfigure lldp custom-tlvs" to "unconfigure lldp custom-tlv"
There was a bit of confusion regarding this command.
It's documented as 'unconfigure lldp custom-tlv', when in fact it's
'unconfigure lldp custom-tlvs' (plural).
That's also my fault, since I did not update much (or take care about)
documentation.
It seems simpler to rename the command as is in the doc than change
the doc.
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
Vincent Bernat [Sat, 25 Jul 2015 15:23:01 +0000 (17:23 +0200)]
netlink: use netlink to retrieve bridge/bond/vlan information
On Linux, Netlink is more efficient to get this kind of information. Use
it all the time, unless we are configured to run on old kernels. In this
case, fallback to the previous functions.
An old kernel is now < 2.6.32 (RHEL 6, Ubuntu Lucid, Debian Squeeze).
Vincent Bernat [Sat, 11 Jul 2015 20:39:13 +0000 (22:39 +0200)]
lldpcli: get chassis atom to query chassis-related information
Don't rely on the previously introduced compatibility layer. There is no
plan to deprecate this layer, but as an example, we prefer to show how
stuff should be done.
Vincent Bernat [Sat, 11 Jul 2015 18:41:44 +0000 (20:41 +0200)]
lib: bump ABI
Due to the absence of compatibility layer, all atom-related functions
are considered incompatible since they don't work on ports like they
used too. This is not strictly an ABI incompatibility, but we consider
the change important enough to do like it was.
This commit will be reverted once the compatibility layer is here.
Vincent Bernat [Sat, 11 Jul 2015 18:04:12 +0000 (20:04 +0200)]
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
Vincent Bernat [Mon, 25 May 2015 17:36:34 +0000 (19:36 +0200)]
osx: ensure pre/postinstall scripts are created correctly
Because we declare the scripts/*install target in `edit.am` and in
`Makefile.am`, only one of them is used. With automake, it doesn't seem
possible to easily extend a target. Instead, do the chmod just before we
need it.
Vincent Bernat [Thu, 21 May 2015 06:45:55 +0000 (08:45 +0200)]
lib: don't use priority with constructor
It is not supported on older versions of gcc. Like the one in RHEL 5. It
should not matter for our case as atoms and builders can be added in any
order. Cc @commodo for confirmation.
Vincent Bernat [Wed, 20 May 2015 21:44:21 +0000 (23:44 +0200)]
build: don't use -Wl,-pie
This flag seems to work when running on i386 on Linux but isn't handled
correctly by libtool and liblldpctl.so ends being without any
symbol. Use -pie only and try an up-to-date libtoolize on OSX to see if
it performs better.
Vincent Bernat [Wed, 20 May 2015 20:35:20 +0000 (22:35 +0200)]
build: require json-c >= 0.10
`json_object_object_get_ex` is only available from this version. json-c
name has been introduced from 0.11, so we can safely assume that with
this name, we have the right version. Do the checks only on old names.
Vincent Bernat [Wed, 20 May 2015 06:54:05 +0000 (08:54 +0200)]
build: compile libevent with -fPIC
When embedded, libevent is configured with `--disable-shared
--enable-static`. This makes libevent compiled without `-fPIC` and we
cannot build a PIE. Use `--with-pic` to force compilation with `-fPIC`.
Vincent Bernat [Tue, 19 May 2015 13:05:13 +0000 (15:05 +0200)]
build: add a switch to disable hardening functions
Even when the tests succeed, on some platforms, hardening CFLAGS
fail. For example, this is the case on OpenWRT. It seems that the
executable needs to be linked to libssp. Difficult to test if the
problem only happens at runtime since we can execute anything.
Vincent Bernat [Thu, 14 May 2015 22:45:51 +0000 (00:45 +0200)]
frame: change checksum function
At the end of function, we used to call ntohs() but we also call the
same function before providing the checksum to POKE_UINT16 (which will
in turn call ntohs). We remove those two first extra calls as they
aren't necessary.
Moreover, the SNMP agent uses this function and this makes it
endian-dependant. We don't want that.
The function is quite convulated and isn't a classic checksum
function. I don't remember how I came with this function but since there
is the special case for Cisco devices and I know this special case work
now, I don't want to change to another function which may breaks this
special case.
Add a NEWS entry to let people know, just in case.
Vincent Bernat [Sun, 10 May 2015 10:58:16 +0000 (12:58 +0200)]
build: automatic detection of optional features
`./configure` can now detect optional features. This works with XML and
JSON output as well as for SNMP support. The defaults are still the
same, so a user has to pass `auto` keyword to the requested option (for
example `--with-json=auto`).