]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
11 years agobuild: both client and lib may need shipped headers in include/ 0.7.2
Vincent Bernat [Sat, 20 Apr 2013 00:59:47 +0000 (02:59 +0200)] 
build: both client and lib may need shipped headers in include/

For example, when sys/queue.h is incomplete.

11 years agofgetln: getline may need _GNU_SOURCE
Vincent Bernat [Sat, 20 Apr 2013 00:53:50 +0000 (02:53 +0200)] 
fgetln: getline may need _GNU_SOURCE

11 years agoinstall: install ChangeLog
Vincent Bernat [Fri, 19 Apr 2013 19:31:33 +0000 (21:31 +0200)] 
install: install ChangeLog

11 years agobsd: reorder headers to fix compilation of various BSD
Vincent Bernat [Fri, 19 Apr 2013 18:56:36 +0000 (20:56 +0200)] 
bsd: reorder headers to fix compilation of various BSD

11 years agoPrepare for 0.7.2 release.
Vincent Bernat [Fri, 19 Apr 2013 18:38:37 +0000 (20:38 +0200)] 
Prepare for 0.7.2 release.

11 years agodoc: update NEWS entry for "show statistics" command
Vincent Bernat [Tue, 16 Apr 2013 21:57:59 +0000 (23:57 +0200)] 
doc: update NEWS entry for "show statistics" command

11 years agolib: remove unneeded struct for stats in private.h
Vincent Bernat [Tue, 16 Apr 2013 21:55:02 +0000 (23:55 +0200)] 
lib: remove unneeded struct for stats in private.h

11 years agolldpcli: use human labels for statistics
Vincent Bernat [Tue, 16 Apr 2013 21:46:57 +0000 (23:46 +0200)] 
lldpcli: use human labels for statistics

Also fix display of "Ageout" and "Inserted".

11 years agolldpcli: reuse cmd_restrict_ports() to handle port restriction in "show stats"
Vincent Bernat [Tue, 16 Apr 2013 21:43:07 +0000 (23:43 +0200)] 
lldpcli: reuse cmd_restrict_ports() to handle port restriction in "show stats"

11 years agoevent: add missing <time.h> include
Vincent Bernat [Tue, 16 Apr 2013 21:40:35 +0000 (23:40 +0200)] 
event: add missing <time.h> include

11 years agolldpcli: Add support to display lldp stats
roopa [Tue, 16 Apr 2013 18:54:16 +0000 (11:54 -0700)] 
lldpcli: Add support to display lldp stats

This patch adds a new lldpcli command and required
server code to display per interface lldp stats

Sample output:

#lldpcli show statistics ports eth0
---------------------------------------------------
LLDP statistics:
---------------------------------------------------
Interface:    eth0
  tx_cnt:       2
  rx_cnt:       2
  rx_discarded_cnt: 0
  rx_unrecognized_cnt: 0
  ageout_cnt:
  insert_cnt:
  delete_cnt:   0
---------------------------------------------------

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
11 years agoRevert "debian: on Debian, don't ship upstart script"
Vincent Bernat [Tue, 16 Apr 2013 07:26:41 +0000 (09:26 +0200)] 
Revert "debian: on Debian, don't ship upstart script"

This reverts commit d5e9611c1cc903410f42a8272898b31404559c6f.

We can't request dh-autoreconf and have a buggy dh_installinit at the
same time. Let's remove this code about upstart. This only needs to be
fixed in backports.

11 years agodebian: on Debian, don't ship upstart script
Vincent Bernat [Tue, 16 Apr 2013 07:08:14 +0000 (09:08 +0200)] 
debian: on Debian, don't ship upstart script

11 years agodebian: require dh-autoreconf for autoreconf.mk to be present
Vincent Bernat [Tue, 16 Apr 2013 07:07:46 +0000 (09:07 +0200)] 
debian: require dh-autoreconf for autoreconf.mk to be present

11 years agocdp: force CDPv2 protocol with `-ccc` argument
Vincent Bernat [Fri, 12 Apr 2013 06:32:25 +0000 (08:32 +0200)] 
cdp: force CDPv2 protocol with `-ccc` argument

11 years agolldpd: really accepts only 4 neighbors
Vincent Bernat [Tue, 2 Apr 2013 18:26:30 +0000 (20:26 +0200)] 
lldpd: really accepts only 4 neighbors

11 years agolldpd: enforce TTL on remote chassis
Vincent Bernat [Sun, 31 Mar 2013 16:33:33 +0000 (18:33 +0200)] 
lldpd: enforce TTL on remote chassis

Remote chassis were not expired in a timely manner. They were only
expired when a change happened on an interface. To fix this, we
maintain a timer that will be triggered when an interface is about to
expire. The timer is updated when a change happens and rescheduled
once it is run.

11 years agolldpd: limit the maximum of neighbors per port and per protocol
Vincent Bernat [Sun, 31 Mar 2013 10:59:09 +0000 (12:59 +0200)] 
lldpd: limit the maximum of neighbors per port and per protocol

lldpd memory can be exhausted by adding too many neighbors. Moreover,
the communication with lldpcli is limited to a fixed number of
neighbors (packets may not exceed 1 << 19 in size). Therefore, we put
a hard limit to the number of neighbors accepted for a given port, for
a given protocol.

The limit will be tunable in the future.

Feature suggested by Chris Yang. Closes #32.

11 years agoREADME: add a note about executing lldpd without installing it
Vincent Bernat [Sat, 30 Mar 2013 22:31:10 +0000 (23:31 +0100)] 
README: add a note about executing lldpd without installing it

11 years agolib: fix sync_recv to handle segmentation
Vincent Bernat [Sat, 30 Mar 2013 14:42:51 +0000 (15:42 +0100)] 
lib: fix sync_recv to handle segmentation

While it should not happen with Unix sockets, a read() can return only
partial data. Therefore, we continue to poll until we get the
appropriate length.

This fix was proposed by Chris Yang. Closes #31.

11 years agotest: add an helper to generate many neighbors
Vincent Bernat [Sat, 30 Mar 2013 14:27:57 +0000 (15:27 +0100)] 
test: add an helper to generate many neighbors

Using scapy, we generate a pcap with as many neighbors we need.

11 years agolldpd: correctly parse /etc/os-release
Vincent Bernat [Sat, 30 Mar 2013 14:18:00 +0000 (15:18 +0100)] 
lldpd: correctly parse /etc/os-release

The previous parsing was just bogus and eated latest characters.

11 years agolib: `ctlname` in `lldpctl_conn_t` is not const
Vincent Bernat [Tue, 26 Feb 2013 13:28:57 +0000 (14:28 +0100)] 
lib: `ctlname` in `lldpctl_conn_t` is not const

It is allocated on the heap by `strdup()`

11 years agolib: bump version-info of liblldpctl for `lldpctl_new_name()` function
Vincent Bernat [Tue, 26 Feb 2013 13:26:43 +0000 (14:26 +0100)] 
lib: bump version-info of liblldpctl for `lldpctl_new_name()` function

11 years agoAdd a argument to specify the unix control socket 29/head
Zang MingJie [Tue, 26 Feb 2013 12:12:25 +0000 (20:12 +0800)] 
Add a argument to specify the unix control socket

11 years agoAdd autoreconf to call autogen.sh while build deb 28/head
Zealot [Tue, 26 Feb 2013 09:16:43 +0000 (17:16 +0800)] 
Add autoreconf to call autogen.sh while build deb

11 years agobuild: also ship ./autogen.sh
Vincent Bernat [Wed, 20 Feb 2013 22:12:32 +0000 (23:12 +0100)] 
build: also ship ./autogen.sh

11 years agobuild: use the same way as libbsd for version and changelog
Vincent Bernat [Wed, 20 Feb 2013 22:11:59 +0000 (23:11 +0100)] 
build: use the same way as libbsd for version and changelog

See:
 http://cgit.freedesktop.org/libbsd/tree/

11 years agobuild: try to save current version in `VERSION`
Vincent Bernat [Wed, 20 Feb 2013 21:35:57 +0000 (22:35 +0100)] 
build: try to save current version in `VERSION`

11 years agoinstall: remove liblldpctl previous symbolic link
Vincent Bernat [Wed, 13 Feb 2013 07:35:18 +0000 (08:35 +0100)] 
install: remove liblldpctl previous symbolic link

Otherwise, we get an error on "make install".

11 years agoconfigure: only match tags starting with a digit for version number
Vincent Bernat [Tue, 12 Feb 2013 19:53:36 +0000 (20:53 +0100)] 
configure: only match tags starting with a digit for version number

11 years agobuild: check if libevent as provided by pkg-config is working
Vincent Bernat [Mon, 4 Feb 2013 07:38:08 +0000 (08:38 +0100)] 
build: check if libevent as provided by pkg-config is working

If a user installs both libevent 2.0.x and libevent 1.4.x, pkg-config
may report libevent 2.0.x where it really is 1.4.x. The system is
broken in this case but we work-around this by using the shipped
libevent.

11 years agodoc: add documentation about reading /etc/lldpd.conf and /etc/lldpd.d/*
Vincent Bernat [Sun, 3 Feb 2013 08:58:01 +0000 (09:58 +0100)] 
doc: add documentation about reading /etc/lldpd.conf and /etc/lldpd.d/*

11 years agointerfaces: whitelist an interface before being checking lower
Vincent Bernat [Sun, 3 Feb 2013 08:38:19 +0000 (09:38 +0100)] 
interfaces: whitelist an interface before being checking lower

Some whitelisted interfaces, like dsa, have a lower interface in
managed mode but we still want to advertise on it. Move the check for
lower interface after whitelisting.

11 years agolibevent: produce smaller binaries when shipping libevent
Vincent Bernat [Tue, 29 Jan 2013 20:42:37 +0000 (21:42 +0100)] 
libevent: produce smaller binaries when shipping libevent

When shipping libevent, we try to build smaller binaries by disabling
unneeded stuff (openssl, threading, malloc replacement, debug stuff)
and enabling `--gc-sections`. On various tests, this remove 80K from
lldpd size (stripping excluded).

11 years agolldpcli: possibility to configure tx-delay
Vincent Bernat [Tue, 22 Jan 2013 22:14:53 +0000 (23:14 +0100)] 
lldpcli: possibility to configure tx-delay

11 years agolldpcli: fix exit command
Vincent Bernat [Tue, 22 Jan 2013 22:02:48 +0000 (23:02 +0100)] 
lldpcli: fix exit command

The exit command did not exit lldpcli anymore.

11 years agolldpcli: split actions.c in several files
Vincent Bernat [Tue, 22 Jan 2013 21:49:33 +0000 (22:49 +0100)] 
lldpcli: split actions.c in several files

We need `configure` to be more modulable.

11 years agolldpcli: put port restriction into a commands.c for use in other files
Vincent Bernat [Tue, 22 Jan 2013 21:33:57 +0000 (22:33 +0100)] 
lldpcli: put port restriction into a commands.c for use in other files

11 years agolldpd: discard output of lldpcli
Vincent Bernat [Tue, 22 Jan 2013 08:51:06 +0000 (09:51 +0100)] 
lldpd: discard output of lldpcli

We keep stderr since we may have logs here.

11 years agolldpd: pause only if lldpcli has not been disabled
Vincent Bernat [Tue, 22 Jan 2013 08:49:52 +0000 (09:49 +0100)] 
lldpd: pause only if lldpcli has not been disabled

11 years agolldpd: pause at start, unpause through lldpcli
Vincent Bernat [Tue, 22 Jan 2013 08:46:01 +0000 (09:46 +0100)] 
lldpd: pause at start, unpause through lldpcli

lldpd will be paused at start. Nothing will run. lldpcli job is to
unpause it once the configuration has been read.

11 years agolldpd: invoke lldpcli at start
Vincent Bernat [Sat, 19 Jan 2013 15:13:50 +0000 (16:13 +0100)] 
lldpd: invoke lldpcli at start

To configure itself, lldpd now invokes lldpcli when
starting. Currently, it does not really check if everything works as
expected but in the future, lldpcli will ask lldpd to "start".

The configuration files are:
 - ${sysconfdir}/lldpd.conf
 - ${sysconfdir}/lldpd.d/*.conf

11 years agoctl: close control socket on error when connecting
Vincent Bernat [Sun, 20 Jan 2013 12:18:30 +0000 (13:18 +0100)] 
ctl: close control socket on error when connecting

11 years agobuild: lib and client don't need shipped OS specific headers
Vincent Bernat [Sun, 20 Jan 2013 10:47:47 +0000 (11:47 +0100)] 
build: lib and client don't need shipped OS specific headers

11 years agolldpcli: add an option to read commands from files
Vincent Bernat [Fri, 18 Jan 2013 22:33:34 +0000 (23:33 +0100)] 
lldpcli: add an option to read commands from files

11 years agoFix some spelling mistakes.
Vincent Bernat [Fri, 18 Jan 2013 01:00:51 +0000 (02:00 +0100)] 
Fix some spelling mistakes.

11 years agodebian: don't remove inexistent CHANGELOG file
Vincent Bernat [Fri, 18 Jan 2013 00:57:08 +0000 (01:57 +0100)] 
debian: don't remove inexistent CHANGELOG file

11 years agodebian: provide a development package for liblldpctl
Vincent Bernat [Fri, 18 Jan 2013 00:56:53 +0000 (01:56 +0100)] 
debian: provide a development package for liblldpctl

11 years agopriv: add ability to lock filter on Linux
Vincent Bernat [Thu, 17 Jan 2013 21:01:34 +0000 (22:01 +0100)] 
priv: add ability to lock filter on Linux

This is a new feature which should be available in Linux 3.9. See:
 http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;a=commit;h=d59577b6ffd313d0ab3be39cb1ab47e29bdc9182

11 years agopriv: make inability to set write filter as fatal
Vincent Bernat [Thu, 17 Jan 2013 21:00:24 +0000 (22:00 +0100)] 
priv: make inability to set write filter as fatal

On BSD, if the userland supports an ioctl, the kernel is in sync and
also supports the ioctl. So, if BIOCSETWF exists, it should succeed.

11 years agopriv: create chroot if it does not exist
Vincent Bernat [Thu, 17 Jan 2013 08:02:48 +0000 (09:02 +0100)] 
priv: create chroot if it does not exist

This is not the ideal situation since the chroot should maybe contain
some additional stuff (like `/etc/localtime` with GNU libc) to make it
work properly, but this is more convenient that leaving the user does
exactly the same things. Packagers are still expected to populate the
chroot correctly before starting lldpd.

11 years agopriv: lock BPF interface on BSD
Vincent Bernat [Mon, 14 Jan 2013 09:21:13 +0000 (10:21 +0100)] 
priv: lock BPF interface on BSD

We move all BPF setup in the monitor process. When the socket is
configured, we lock it. This works for both OpenBSD and FreeBSD. This
feature does not seem to exist on Linux. However, for consistency, we
also move BPF filter setup in priv.c for Linux.

11 years agolldpcli: add "help" command in manual page
Vincent Bernat [Sun, 13 Jan 2013 13:21:11 +0000 (14:21 +0100)] 
lldpcli: add "help" command in manual page

11 years agoosx: don't include "head" bits in homebrew formula
Vincent Bernat [Sun, 13 Jan 2013 12:24:09 +0000 (13:24 +0100)] 
osx: don't include "head" bits in homebrew formula

We will add them back when they work.

11 years agoosx: update Homebrew formula with JSON and SNMP support
Vincent Bernat [Sun, 13 Jan 2013 12:23:32 +0000 (13:23 +0100)] 
osx: update Homebrew formula with JSON and SNMP support

11 years agosnmp: workaround unknown value for RONLY
Vincent Bernat [Sun, 13 Jan 2013 12:15:52 +0000 (13:15 +0100)] 
snmp: workaround unknown value for RONLY

This happens when Net-SNMP has been compiled with
NETSNMP_NO_LEGACY_DEFINITIONS defined. For example, on Mac OS X. This
seems a good way to deprecate an API still widely used just because it
is not used internally... <grin>

11 years agomarshal: serialization may return 0 and target untouched
Vincent Bernat [Sun, 13 Jan 2013 10:25:39 +0000 (11:25 +0100)] 
marshal: serialization may return 0 and target untouched

If serialization finds a structure already serialized, it skips it and
return 0. `target` should not be freed.

11 years agosnmp: frame.h is not needed anymore
Vincent Bernat [Sun, 13 Jan 2013 10:08:35 +0000 (11:08 +0100)] 
snmp: frame.h is not needed anymore

The `frame_checksum()` function is declared in `lldpd.h`.

11 years agoclang: additional fixes detected by clang analyzer
Vincent Bernat [Sun, 13 Jan 2013 10:02:28 +0000 (11:02 +0100)] 
clang: additional fixes detected by clang analyzer

11 years agoSmall fixes detected by clang analyzer.
Vincent Bernat [Sun, 13 Jan 2013 01:53:37 +0000 (02:53 +0100)] 
Small fixes detected by clang analyzer.

 - log: mark `fatal*()` function as noreturn
 - event: insert client in the list after its creation
 - lldpcli: avoid confusion by initializing cargc to 0
 - lldpd: avoid ambiguous use of strlen() in initialization
 - lldp/edp: fix memory leaks
 - tokenizer: fix a memory leak in low memory condition
 - cdp: don't accept too short TLV for port description

11 years agopackaging: update packaging stuff for release 0.7.1
Vincent Bernat [Sat, 12 Jan 2013 23:46:46 +0000 (00:46 +0100)] 
packaging: update packaging stuff for release

11 years agobuild: more changelog drama
Vincent Bernat [Sat, 12 Jan 2013 23:23:53 +0000 (00:23 +0100)] 
build: more changelog drama

We need ChangeLog to be listed in `dist_doc_DATA` or
`doc_DATA`. Therefore, we list it in the former and if we happen to
install from git, we just ship an empty ChangeLog.

11 years agosystemd: don't use SOCK_CLOEXEC
Vincent Bernat [Sat, 12 Jan 2013 23:03:32 +0000 (00:03 +0100)] 
systemd: don't use SOCK_CLOEXEC

It is unknown on RHEL5. Moreover, we promise to not exec anything in
this function.

11 years agoevent: replace obsolete `sigignore()` by `signal()`
Vincent Bernat [Sat, 12 Jan 2013 22:32:54 +0000 (23:32 +0100)] 
event: replace obsolete `sigignore()` by `signal()`

11 years agodoc: new homepage for lldpd
Vincent Bernat [Sat, 12 Jan 2013 22:01:44 +0000 (23:01 +0100)] 
doc: new homepage for lldpd

11 years agocompat: add `strnlen()` which may be absent on some older systems
Vincent Bernat [Fri, 11 Jan 2013 17:53:10 +0000 (18:53 +0100)] 
compat: add `strnlen()` which may be absent on some older systems

11 years agobsd: compatibility with systems that do not have interface descriptions
Vincent Bernat [Fri, 11 Jan 2013 17:42:50 +0000 (18:42 +0100)] 
bsd: compatibility with systems that do not have interface descriptions

11 years agobuild: fix changelog generation
Vincent Bernat [Fri, 11 Jan 2013 00:25:32 +0000 (01:25 +0100)] 
build: fix changelog generation

We really only want to generate changelog when building the dist
tarball. We force its generation using a fake PHONY target. We don't
list it as a dist_* something since it does not exist yet. Therefore,
we don't have to clean it.

11 years agoosx: add an homebrew formula
Vincent Bernat [Fri, 11 Jan 2013 00:07:38 +0000 (01:07 +0100)] 
osx: add an homebrew formula

This formula is currently incorrect because of the bad MD5 sum. We
will correct it at the first release supporting Mac OS X.

11 years agoconfigure: compatibility with automake 1.12
Vincent Bernat [Thu, 10 Jan 2013 23:01:31 +0000 (00:01 +0100)] 
configure: compatibility with automake 1.12

AM_PROG_AR should be used. The reason seems a bit obscure. This should
be done in libtool.

11 years agoautogen: don't use readlink -f
Vincent Bernat [Thu, 10 Jan 2013 22:52:26 +0000 (23:52 +0100)] 
autogen: don't use readlink -f

This is not portable. We are only interested in the basename, let's
just use $PWD instead of `.`.

11 years agoautogen: allow to override commands used
Vincent Bernat [Thu, 10 Jan 2013 22:44:51 +0000 (23:44 +0100)] 
autogen: allow to override commands used

For example:

    LIBTOOLIZE=glibtoolize ./autogen.sh

11 years agodmi: implementation for Mac OS X.
Vincent Bernat [Thu, 10 Jan 2013 22:11:23 +0000 (23:11 +0100)] 
dmi: implementation for Mac OS X.

We use the IOKit framework.

11 years agoMac OS X support.
Vincent Bernat [Thu, 10 Jan 2013 19:23:57 +0000 (20:23 +0100)] 
Mac OS X support.

This includes bond, VLAN and bridge support. Mac OS X is pretty
similar to FreeBSD except for bonding which is different. Bonding code
is stolen from ifconfig.c. Header files from XNU are
shipped because they are missing from Mac OS X developer tools.

Still missing:
 - integration into launchd
 - homebrew formula
 - DMI part (through ioreg)

11 years agobuild: add tag date in changelog
Vincent Bernat [Mon, 7 Jan 2013 21:56:07 +0000 (22:56 +0100)] 
build: add tag date in changelog

11 years agopriv: mirror the exit status of the child
Vincent Bernat [Mon, 7 Jan 2013 20:59:32 +0000 (21:59 +0100)] 
priv: mirror the exit status of the child

When exiting because the child has exited, the privileged processus
will mirror the exit status and the signal that killed the child if
any. This allows monitoring daemon like systemd to detect an
unexpected exit.

11 years agodebian: add systemd support
Vincent Bernat [Sun, 6 Jan 2013 23:53:01 +0000 (00:53 +0100)] 
debian: add systemd support

Provides a lldpd.service file and let `lldpd` notify systemd when it
is ready using the notification socket.

11 years agolldpd: remove uncleaned control socket when noone is listening
Vincent Bernat [Mon, 7 Jan 2013 11:26:25 +0000 (12:26 +0100)] 
lldpd: remove uncleaned control socket when noone is listening

11 years agodebian: provide an upstart job
Vincent Bernat [Sun, 6 Jan 2013 23:24:31 +0000 (00:24 +0100)] 
debian: provide an upstart job

lldpd daemonization seems to confuse upstart (I think this is because
it also forks the monitor process, otherwise the daemonization is
pretty classic). Therefore, when we detect we are run by
upstart (because of UPSTART_JOB variable), we raise the SIGSTOP signal
instead of daemonizing. Upstart notices it and will resume us and
consider we are ready. No more misleading fork.

Also, ignore SIGHUP which is used for reload.

11 years agoREADME: mention multi-OS support
Vincent Bernat [Sun, 6 Jan 2013 15:47:01 +0000 (16:47 +0100)] 
README: mention multi-OS support

And mention `lldpcli` in place of `lldpctl`.

11 years agodebian: update Debian packaging.
Vincent Bernat [Sun, 6 Jan 2013 15:46:36 +0000 (16:46 +0100)] 
debian: update Debian packaging.

The diff from the official package is now a lot smaller.

11 years agoredhat: fix Redhat packaging
Vincent Bernat [Sun, 6 Jan 2013 15:42:12 +0000 (16:42 +0100)] 
redhat: fix Redhat packaging

Call /sbin/ldconfig on postinstall.

11 years agoredhat: update lldpd.spec
Vincent Bernat [Sun, 6 Jan 2013 13:56:25 +0000 (14:56 +0100)] 
redhat: update lldpd.spec

11 years agobuild: fix generation of ChangeLog
Vincent Bernat [Sun, 6 Jan 2013 13:45:53 +0000 (14:45 +0100)] 
build: fix generation of ChangeLog

We must be able to have one when git is not present because we include
it in dist, but we also must generate it on each release. The previous
fix would keep the ChangeLog empty or not updated. We use a PHONY
target instead (and not a real PHONY target since we cannot add it
because automake doesn't like it).

11 years agolldpcli: add a "help" command. 0.7.0
Vincent Bernat [Sun, 6 Jan 2013 13:06:19 +0000 (14:06 +0100)] 
lldpcli: add a "help" command.

This should come handy for people not having readline or completion.

11 years agolldpcli: fix "source unknown" for Dot3/LLDP-MED power.
Vincent Bernat [Sun, 6 Jan 2013 12:34:36 +0000 (13:34 +0100)] 
lldpcli: fix "source unknown" for Dot3/LLDP-MED power.

11 years agolldpcli: don't rely on `rl_delete_text()`
Vincent Bernat [Sun, 6 Jan 2013 12:21:51 +0000 (13:21 +0100)] 
lldpcli: don't rely on `rl_delete_text()`

Even recent versions of libedit do not include `rl_delete_text()`
compatibility function. We don't use it.

11 years agolldpcli: make readline library optional.
Vincent Bernat [Sun, 6 Jan 2013 10:43:33 +0000 (11:43 +0100)] 
lldpcli: make readline library optional.

And improve compatibility. We should be compatible with BSD
libedit. However, we are not compatible with older versions that lack
`rl_insert_text()` and `rl_delete_text()`.

11 years agolldpcli: switch to GNU Readline.
Vincent Bernat [Sun, 6 Jan 2013 09:47:21 +0000 (10:47 +0100)] 
lldpcli: switch to GNU Readline.

libedit is not available on old versions of Linux distro. We try to
use Readline API instead which may be compatible with the libedit
version available in BSD.

This means that we have to write our own tokenizer. This also means
that we can make Readline optional.

11 years agoevent: trigger the main iteration when starting the main loop.
Vincent Bernat [Sat, 5 Jan 2013 19:57:24 +0000 (20:57 +0100)] 
event: trigger the main iteration when starting the main loop.

Otherwise, nothing will happen until there is an interface change...

11 years agolldpcli: ensure `conn` is initialized to NULL to avoid a compiler warning
Vincent Bernat [Sat, 5 Jan 2013 19:44:53 +0000 (20:44 +0100)] 
lldpcli: ensure `conn` is initialized to NULL to avoid a compiler warning

11 years agolldpcli: don't propose configure for options not compiled
Vincent Bernat [Sat, 5 Jan 2013 16:37:37 +0000 (17:37 +0100)] 
lldpcli: don't propose configure for options not compiled

We don't rely on ENABLE_* variables to keep lldpcli independant of the
source code of the library.

11 years agolib: fix a compilation problem when LLDP-MED or Dot3 were disabled
Vincent Bernat [Sat, 5 Jan 2013 16:31:02 +0000 (17:31 +0100)] 
lib: fix a compilation problem when LLDP-MED or Dot3 were disabled

11 years agoredhat: also ship lldpcli
Vincent Bernat [Sat, 5 Jan 2013 16:24:33 +0000 (17:24 +0100)] 
redhat: also ship lldpcli

11 years agoredhat: add libedit-devel for RPM distros as well
Vincent Bernat [Sat, 5 Jan 2013 16:22:46 +0000 (17:22 +0100)] 
redhat: add libedit-devel for RPM distros as well

11 years agodebian: also add libedit-dev as a dependency
Vincent Bernat [Sat, 5 Jan 2013 16:21:21 +0000 (17:21 +0100)] 
debian: also add libedit-dev as a dependency

11 years agotravis: add libedit-dev in the dependencies
Vincent Bernat [Sat, 5 Jan 2013 16:20:56 +0000 (17:20 +0100)] 
travis: add libedit-dev in the dependencies

11 years agolldpcli: let libedit install its own signal handlers (SIGWINCH)
Vincent Bernat [Sat, 5 Jan 2013 16:13:02 +0000 (17:13 +0100)] 
lldpcli: let libedit install its own signal handlers (SIGWINCH)

11 years agoMerge branch 'feature/1/cli'
Vincent Bernat [Sat, 5 Jan 2013 16:00:05 +0000 (17:00 +0100)] 
Merge branch 'feature/1/cli'