]> git.ipfire.org Git - thirdparty/lldpd.git/log
thirdparty/lldpd.git
14 years agoAllow to force a protocol.
Vincent Bernat [Fri, 12 Mar 2010 13:47:05 +0000 (14:47 +0100)] 
Allow to force a protocol.

This fixes ticket #34. By using the option to enable a protocol twice,
we are able to speak a protocol even when no peer is detected. In this
case, packets are sent even when another protocol is detected. A new
parameter has been added to get this behaviour for LLDP as well.

14 years agoAdd specifically a "-h" switch for lldpd and lldpctl
Vincent Bernat [Wed, 17 Mar 2010 12:48:48 +0000 (13:48 +0100)] 
Add specifically a "-h" switch for lldpd and lldpctl

14 years agoAdd "format" option.
Vincent Bernat [Wed, 17 Mar 2010 12:44:44 +0000 (13:44 +0100)] 
Add "format" option.

14 years agoUse some conditionals to display some command line options.
Vincent Bernat [Wed, 17 Mar 2010 12:43:58 +0000 (13:43 +0100)] 
Use some conditionals to display some command line options.

14 years agoAdd a summary of available options in usage() of lldpd and lldpctl
Vincent Bernat [Wed, 17 Mar 2010 12:38:11 +0000 (13:38 +0100)] 
Add a summary of available options in usage() of lldpd and lldpctl

Patch from Jorge Boncompte (see ticket #29).

14 years agoUpdate README with the latest information 0.5.0
Vincent Bernat [Sat, 13 Mar 2010 21:18:03 +0000 (22:18 +0100)] 
Update README with the latest information

14 years agoAfter displaying PVID, close the section tag.
Vincent Bernat [Sat, 13 Mar 2010 21:14:31 +0000 (22:14 +0100)] 
After displaying PVID, close the section tag.

14 years agoAdd XML support for Redhat as well.
Vincent Bernat [Fri, 12 Mar 2010 19:13:17 +0000 (20:13 +0100)] 
Add XML support for Redhat as well.

14 years agoCompile with XML enabled for Debian.
Vincent Bernat [Fri, 12 Mar 2010 19:09:51 +0000 (20:09 +0100)] 
Compile with XML enabled for Debian.

14 years agoRemove unused chassis in lldpd_cleanup() instead of lldpd_port_cleanup().
Vincent Bernat [Fri, 12 Mar 2010 16:12:52 +0000 (17:12 +0100)] 
Remove unused chassis in lldpd_cleanup() instead of lldpd_port_cleanup().

In some cases, lldpd_port_cleanup() is called when a reference to the
chassis that will be removed is hold for updating. This happens when
we need to update the information on a chassis known by only one port:
 1. we find that the chassis is still the same
 2. we remove the port and hence remove the chassis which becomes
    unused and freed
 3. with the previous reference to the chassis, we try to update it
    with new information while it has been freed.

Freeing in lldpd_cleanup() is more natural and less risky.

14 years agoRetrieve FD_SETSIZE in a sane environment.
Vincent Bernat [Fri, 12 Mar 2010 11:03:24 +0000 (12:03 +0100)] 
Retrieve FD_SETSIZE in a sane environment.

Since we import linux/if.h, in some environment, we may end up
importing kernel FD_SETSIZE that may be inappropriate (too large). For
example, on Sarge systems, FD_SETSIZE becomes 8192 instead of 1024 but
FD_ISSET is unable to handle this size.

14 years agoIncrease refcount of the local chassis when a new port is created.
Vincent Bernat [Wed, 10 Mar 2010 07:22:40 +0000 (08:22 +0100)] 
Increase refcount of the local chassis when a new port is created.

Also add an explanation of refcount handling in a part of the code
that was a bit difficult to follow. Now, each time that p_chassis is
affected to a new value, c_refcount should be updated accordingly.

14 years agoAdd a CHANGELOG entry for XML output functionality.
Vincent [Sat, 6 Mar 2010 09:15:14 +0000 (10:15 +0100)] 
Add a CHANGELOG entry for XML output functionality.

14 years agoFix wrong age display.
Andreas Hofmeister [Mon, 1 Mar 2010 14:28:29 +0000 (15:28 +0100)] 
Fix wrong age display.

There are only 24 hours and 60 minutes per hour ...

14 years agoUse LLOG_WARNX in xml_writer.c and remove superfluous newlines.
Andreas Hofmeister [Sun, 28 Feb 2010 16:50:35 +0000 (17:50 +0100)] 
Use LLOG_WARNX in xml_writer.c and remove superfluous newlines.

14 years agoAdd the text output label as "label" attribute to all xml elements.
Andreas Hofmeister [Sun, 28 Feb 2010 16:45:12 +0000 (17:45 +0100)] 
Add the text output label as "label" attribute to all xml elements.

Might be helpful when creating html via xslt etc.

14 years agoFix error handling in location data.
Andreas Hofmeister [Sun, 28 Feb 2010 16:26:14 +0000 (17:26 +0100)] 
Fix error handling in location data.

Instead of just logging an invalid data length for location data, an error
element is emited to the output.

An unknown location fromat is now enclosed in an "unknown" tag to prevent
that the "location" element ever contains character data.

14 years agoImplement an XML writer.
Andreas Hofmeister [Sun, 28 Feb 2010 14:32:01 +0000 (15:32 +0100)] 
Implement an XML writer.

XML output can be enabled with the "--with-xml" configure option. libxml2 is
used to create the actual XML output.

14 years agoImplement a basic "writer" infrastructure to emit structured text.
Andreas Hofmeister [Sun, 28 Feb 2010 14:24:35 +0000 (15:24 +0100)] 
Implement a basic "writer" infrastructure to emit structured text.

This patch implements a basic plain text writer and uses that in display.c.

14 years agoRip display related stuff out of lldpctl and put into display.c
Andreas Hofmeister [Fri, 26 Feb 2010 18:13:36 +0000 (19:13 +0100)] 
Rip display related stuff out of lldpctl and put into display.c

14 years agoAvoid dereferencing a type-punned pointer.
Vincent [Sat, 6 Mar 2010 08:53:40 +0000 (09:53 +0100)] 
Avoid dereferencing a type-punned pointer.

When passing a file descriptor, we were dereferencing a unsigned char
pointer. This breaks strict-aliasing rules in C99. Moreover, we should
care about the alignment (even if in this case, this is aligned
because the previous member of the struct is an int). Therefore, we
use memcpy instead.

14 years agoFree unused chassis.
Vincent [Sat, 6 Mar 2010 08:41:53 +0000 (09:41 +0100)] 
Free unused chassis.

When reference count for a chassis drops to 0, we free the chassis.
This cannot happen to the local chassis because a reference should be
held to it even without any local port.

14 years agoDon't listen/send LLDP packets on bridge.
Vincent [Tue, 2 Mar 2010 17:17:04 +0000 (18:17 +0100)] 
Don't listen/send LLDP packets on bridge.

A bridge, like a VLAN or a bond device is no place to listen or send
LLDP packets.

14 years agoDo not require libtool 2.2
Andreas Hofmeister [Fri, 26 Feb 2010 17:47:05 +0000 (18:47 +0100)] 
Do not require libtool 2.2

... 1.5.26 apparently does nicely.

14 years agoMake lldpctl refuse attempts to change anything when running setuid.
Andreas Hofmeister [Sat, 27 Feb 2010 18:58:46 +0000 (19:58 +0100)] 
Make lldpctl refuse attempts to change anything when running setuid.

When running setuid, lldpctl now refuses to set location data. This should
make it save to run the program setuid root by normal users including a
web-server f.e.

14 years agoFix autoconf complains about libtool.
Andreas Hofmeister [Fri, 26 Feb 2010 16:59:21 +0000 (17:59 +0100)] 
Fix autoconf complains about libtool.

Add AC_PROG_LIBTOOL and removed AC_PROG_RANLIB.

14 years agoAdd a manual page for the new -X option.
Vincent [Sat, 27 Feb 2010 09:25:56 +0000 (10:25 +0100)] 
Add a manual page for the new -X option.

14 years agoAllow to specify the AgentX socket to use (instead of the default one).
Vincent [Sat, 27 Feb 2010 09:18:03 +0000 (10:18 +0100)] 
Allow to specify the AgentX socket to use (instead of the default one).

This means that AgentX can be configured to use tcp:127.0.0.1:705 (for
example). Since we are running in a chroot, we cannot use hostnames.
Any network socket should work. Unix sockets should work as before
(using privilege separation).

14 years agoEnsure that umask is set at a sensible value before building the chroot.
Vincent [Sat, 27 Feb 2010 08:57:48 +0000 (09:57 +0100)] 
Ensure that umask is set at a sensible value before building the chroot.

Since the unprivileged process needs to be able to read /etc/localtime
in the chroot, we ensure that the umask is set correctly for this.

14 years agoFor Redhat, adapt init.d script to initialize the chroot.
Vincent [Sat, 27 Feb 2010 08:53:38 +0000 (09:53 +0100)] 
For Redhat, adapt init.d script to initialize the chroot.

The chroot is an empty directory containing a copy of /etc/localtime
to enable the use of the correct timestamp when logging for the
process trapped in the chroot.

14 years agoFor Debian init.d, build the chroot before starting the daemon.
Vincent Bernat [Sat, 27 Feb 2010 08:48:10 +0000 (09:48 +0100)] 
For Debian init.d, build the chroot before starting the daemon.

The chroot is an empty directory with a copy of /etc/localtime. This
file ensures that we are able to write logs using the correct time.

14 years agoChange handling of conditional builds in the spec file
Peter Kjellström [Fri, 12 Feb 2010 11:31:13 +0000 (12:31 +0100)] 
Change handling of conditional builds in the spec file

Change handling of build options from using simple define statements
to using the RPMs bcond_without functionality. bcond_without instead
of bcond_with ensures that the old behaviour is preserved (all
options are still enabled by default). This change allows the
convenient "rpmbuild --without xxx" and is in line with:

http://www.rpm.org/wiki/PackagerDocs/ConditionalBuilds

14 years agoMerge branch '30-vlanid-without-name'
Vincent Bernat [Sat, 5 Dec 2009 11:09:27 +0000 (12:09 +0100)] 
Merge branch '30-vlanid-without-name'

14 years agoDon't set MFS with MTU value.
Vincent Bernat [Sat, 5 Dec 2009 10:58:51 +0000 (11:58 +0100)] 
Don't set MFS with MTU value.

Because there is no way to retrieve MFS value from Linux (unless we
try to set it to some arbitrary value), we did use the MTU instead.
This is incorrect, as notified in ticket #31.

Since some equipements could use this value to trigger an alert, we
prefer not to send any value. We don't seem able to detect for VLAN
support or Jumbo frames support.

14 years agoDisplay PVID even when we don't know its name.
Vincent Bernat [Sat, 5 Dec 2009 10:49:30 +0000 (11:49 +0100)] 
Display PVID even when we don't know its name.

We also display it if we have names for some VLANs but not for the
PVID one.

14 years agoCope with Port VLAN ID but no VLAN names.
Vincent Bernat [Sat, 5 Dec 2009 10:44:11 +0000 (11:44 +0100)] 
Cope with Port VLAN ID but no VLAN names.

This fix ticket #30.

14 years agoMake netsnmp headers compatible with C99.
Vincent Bernat [Wed, 28 Oct 2009 10:38:03 +0000 (11:38 +0100)] 
Make netsnmp headers compatible with C99.

Disable inlining by adding -DNETSNMP_NO_INLINE to CFLAGS. Since we
only use header files, this should not be a problem. A more valid fix
would be to turn NETSNMP_INLINE into "extern inline" instead of just
"inline".

Without this fix, we get a lot of warnings with gcc 4.3.

14 years agoMake lldpctl display the age of displayed information.
Vincent Bernat [Mon, 19 Oct 2009 17:07:52 +0000 (19:07 +0200)] 
Make lldpctl display the age of displayed information.

We rely on recorded time for last change and display the difference
with the current time. Information is displayed like this:

Interface: veth1 (via LLDP) - RID: 1 - Time: 0 day, 00:04:42

Any change will reset this time (for example, a new VLAN).

This should close ticket #21.

14 years agoAdd some additional GCC options by default.
Vincent Bernat [Wed, 28 Oct 2009 09:55:53 +0000 (10:55 +0100)] 
Add some additional GCC options by default.

We enable most warnings (but disable unused-parameter and
sign-compare). We also enable stack protector.

14 years agoGet timezone info before being in the chroot.
Vincent Bernat [Thu, 15 Oct 2009 10:18:45 +0000 (12:18 +0200)] 
Get timezone info before being in the chroot.

Depending on the libc, first implicit call to tzset() can be done when
invoking syslog() the first time. In most situation, this is done when
we are in a chroot and therefore, we cannot read /etc/localtime and
get an accurate timezone information. Therefore, we invoke tzset()
before being in chroot.

14 years agoFix file descriptor leak when enabling "listen on VLAN" feature
Vincent Bernat [Thu, 1 Oct 2009 20:16:25 +0000 (22:16 +0200)] 
Fix file descriptor leak when enabling "listen on VLAN" feature

The VLAN list was always reinitialized...

14 years agoReset "sent" flag for each port when sending.
Vincent Bernat [Thu, 1 Oct 2009 18:59:04 +0000 (20:59 +0200)] 
Reset "sent" flag for each port when sending.

On ports not receiving anything, we send an LLDP packet only on the
first running port. Others get ignored. We reset "sent" flag to 0 for
each port.

14 years agoUpdate CHANGELOG to reflect recent feature merges.
Vincent Bernat [Thu, 1 Oct 2009 07:03:28 +0000 (09:03 +0200)] 
Update CHANGELOG to reflect recent feature merges.

14 years agoAdd CHANGELOG from 0.4.1.
Vincent Bernat [Thu, 1 Oct 2009 06:58:15 +0000 (08:58 +0200)] 
Add CHANGELOG from 0.4.1.

14 years agoMerge branch '15-old-compat'
Vincent Bernat [Thu, 1 Oct 2009 06:53:25 +0000 (08:53 +0200)] 
Merge branch '15-old-compat'

Fix a conflict in src/lldpd.h. This is just a space story.

14 years agoAlso ship CHANGELOG file
Vincent Bernat [Wed, 30 Sep 2009 12:29:39 +0000 (14:29 +0200)] 
Also ship CHANGELOG file

14 years agoDefine ioctl for VLAN and bond.
Vincent Bernat [Wed, 30 Sep 2009 00:42:06 +0000 (02:42 +0200)] 
Define ioctl for VLAN and bond.

We also give some kind of advice for people without if_vlan.h or with
an outdated if_bonding.h (for example, people with RHEL 2.1).

14 years agoFix some warnings about incompatible pointer types.
Vincent Bernat [Tue, 29 Sep 2009 17:28:20 +0000 (19:28 +0200)] 
Fix some warnings about incompatible pointer types.

14 years agoSave cache at various points of configure script.
Vincent Bernat [Tue, 29 Sep 2009 16:56:09 +0000 (18:56 +0200)] 
Save cache at various points of configure script.

14 years agolinux/filter.h may need linux/types on old systems.
Vincent Bernat [Tue, 29 Sep 2009 15:43:47 +0000 (17:43 +0200)] 
linux/filter.h may need linux/types on old systems.

14 years agoAdd support for libc not defining __progname symbol.
Vincent Bernat [Tue, 29 Sep 2009 15:10:10 +0000 (17:10 +0200)] 
Add support for libc not defining __progname symbol.

This may happen with ancient releases of uClibc.

14 years agoRework autoconf stuff.
Vincent Bernat [Tue, 29 Sep 2009 14:44:59 +0000 (16:44 +0200)] 
Rework autoconf stuff.

Update to autoconf 2.64.

Use custom macro for ethtool, netsnmp and argument handling to shorten
main configure.ac file.

Use less verbose build process by default.

For headers, missing header is fatal for now because we don't know how
to replace them. Better handling will be done later. We only target
Linux for now with GNU LibC: portability issues are narrow.

Display results at the end of configure process.

AC_C_CONST is obsolete

See:
 http://www.nabble.com/fix-AC_C_CONST-to-work-with-CFLAGS--O2--Wall--Werror-td17164627.html
 http://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fC_005fCONST-790

Some useful documentation about autoconf:
 http://sources.redhat.com/autobook/ (a bit outdated)
 http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool
 http://www.flameeyes.eu/autotools-mythbuster/

14 years agoFix some warnings in tests.
Vincent Bernat [Sat, 26 Sep 2009 06:21:00 +0000 (08:21 +0200)] 
Fix some warnings in tests.

In C99, large integers are put in long long instead of unsigned long
int in C90. Or something like that.

14 years agoInclude manual pages into distribution.
Vincent Bernat [Thu, 24 Sep 2009 09:28:24 +0000 (11:28 +0200)] 
Include manual pages into distribution.

By default, manual pages are not included in "make dist". We add them
by adding them in EXTRA_DIST. See:
 http://gnu.huihoo.org/automake-1.4/html_node/automake_50.html

14 years agoUse "void" instead of empty parameter list for function prototypes.
Vincent Bernat [Thu, 24 Sep 2009 08:27:15 +0000 (10:27 +0200)] 
Use "void" instead of empty parameter list for function prototypes.

Using empty parameter list means that we don't know what are the
parameters of a function, while using "void" means that there is no
parameter for this function. Some compilers are ticky about this. See
C99 6.11.6 and 6.7.5.3 §14.

This also allows to fix a little bug: priv_ctl_create was called with
a parameter.

14 years agoUse libtool convenience libraries for common files for lldpd and lldpctl.
Vincent Bernat [Thu, 24 Sep 2009 08:13:27 +0000 (10:13 +0200)] 
Use libtool convenience libraries for common files for lldpd and lldpctl.

Instead of directly linking common files, we use another libtool
convenience library (libcommon.la). We also separate server part of
ctl.c into a separate file to avoid -DCLIENT_ONLY flag which was
causing recompilation of most files.

We also move compatibility objects (like strcpy() function) into
libcommon.la.

14 years agoReplace index() by strchr()
Vincent Bernat [Thu, 9 Jul 2009 19:56:17 +0000 (21:56 +0200)] 
Replace index() by strchr()

strchr() is POSIX while index() is deprecated.

14 years agoWhen SYSFS_BRIDGE_* stuff does not exist, just use old /proc.
Vincent Bernat [Thu, 9 Jul 2009 19:32:50 +0000 (21:32 +0200)] 
When SYSFS_BRIDGE_* stuff does not exist, just use old /proc.

14 years agoCompatibility with gcc 2.95.x: add spaces around __VA__ARGS__
Vincent Bernat [Thu, 9 Jul 2009 19:30:14 +0000 (21:30 +0200)] 
Compatibility with gcc 2.95.x: add spaces around __VA__ARGS__

14 years agoMore ethtool compatibility
Vincent Bernat [Thu, 9 Jul 2009 18:37:26 +0000 (20:37 +0200)] 
More ethtool compatibility

14 years agoCompilation fix for ancient gcc.
Vincent Bernat [Thu, 9 Jul 2009 18:10:43 +0000 (20:10 +0200)] 
Compilation fix for ancient gcc.

gcc 2.96 does not like "char frame[]" declaration and complains with
"array size missing in frame'". We circumvent this limitation by using
a one byte array instead of an undefined one.

14 years agoAdd '-k' flag to disable kernel version advertising.
Vincent Bernat [Wed, 23 Sep 2009 07:14:50 +0000 (09:14 +0200)] 
Add '-k' flag to disable kernel version advertising.

From a suggestion and a patch proposed in ticket #19. With this flag,
system description is just the kernel name and software version as
advertised if LLDP-MED is enabled is set to "Unknown".

14 years agoBridge ioctls cannot be used with a 32bit userland on a 64bit kernel.
Vincent Bernat [Wed, 2 Sep 2009 12:20:56 +0000 (14:20 +0200)] 
Bridge ioctls cannot be used with a 32bit userland on a 64bit kernel.

Don't output any warning when ioctl fails.

14 years agoFix LSB header in provided Debian init.d script.
Vincent Bernat [Tue, 18 Aug 2009 12:05:52 +0000 (14:05 +0200)] 
Fix LSB header in provided Debian init.d script.

Thanks to a patch from Petter Reinholdtsen:
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=542161

14 years agoAdd missing argument in some call to LLOG_INFO in lldp.c.
Vincent Bernat [Mon, 17 Aug 2009 17:46:28 +0000 (19:46 +0200)] 
Add missing argument in some call to LLOG_INFO in lldp.c.

This fixes #17. Also add __attribute__ to log_* functions to let gcc
automatically check for this.

14 years agoDo not include <ifaddrs.h> since we want to replace it.
Vincent Bernat [Thu, 9 Jul 2009 18:14:27 +0000 (20:14 +0200)] 
Do not include <ifaddrs.h> since we want to replace it.

14 years agoProvide another getifaddrs implementation, stolen from USAGI project
Vincent Bernat [Thu, 9 Jul 2009 16:05:02 +0000 (18:05 +0200)] 
Provide another getifaddrs implementation, stolen from USAGI project

14 years agoAdd getifaddrs() replacement for system without it.
Vincent Bernat [Wed, 8 Jul 2009 22:10:11 +0000 (00:10 +0200)] 
Add getifaddrs() replacement for system without it.

14 years agoRemove *.pcap file on clean.
Vincent Bernat [Tue, 7 Jul 2009 13:20:07 +0000 (15:20 +0200)] 
Remove *.pcap file on clean.

14 years agoAdd unit tests for EDP
Vincent Bernat [Tue, 7 Jul 2009 13:09:55 +0000 (15:09 +0200)] 
Add unit tests for EDP

14 years agoAdd SONMP unit tests.
Vincent Bernat [Tue, 7 Jul 2009 12:08:06 +0000 (14:08 +0200)] 
Add SONMP unit tests.

14 years agoAdd CDP unit tests.
Vincent Bernat [Tue, 7 Jul 2009 11:39:52 +0000 (13:39 +0200)] 
Add CDP unit tests.

14 years agoMove pcap stuff into a separate file to allow sharing with future tests.
Vincent Bernat [Tue, 7 Jul 2009 08:17:33 +0000 (10:17 +0200)] 
Move pcap stuff into a separate file to allow sharing with future tests.

14 years agoDisable some tests when some features (dot1, dot3, lldpmed) are not
Vincent Bernat [Tue, 7 Jul 2009 07:57:01 +0000 (09:57 +0200)] 
Disable some tests when some features (dot1, dot3, lldpmed) are not
enabled.

14 years agofail_* macros do not break execution flow.
Vincent Bernat [Tue, 7 Jul 2009 07:01:45 +0000 (09:01 +0200)] 
fail_* macros do not break execution flow.

Unlike what happen with unit tests framework in other languages,
fail_* macro does not jump to next test. Therefore, we have to break
flow ourselves.

14 years agoAdd LLDP receive tests
Vincent Bernat [Mon, 6 Jul 2009 13:35:58 +0000 (15:35 +0200)] 
Add LLDP receive tests

14 years agoAdd LLDP send tests.
Vincent Bernat [Mon, 6 Jul 2009 09:42:31 +0000 (11:42 +0200)] 
Add LLDP send tests.

14 years agoAdd unit tests for lists packing/unpacking.
Vincent Bernat [Sun, 5 Jul 2009 18:02:17 +0000 (20:02 +0200)] 
Add unit tests for lists packing/unpacking.

14 years agoUnit tests for packing/unpacking.
Vincent Bernat [Sun, 5 Jul 2009 17:30:56 +0000 (19:30 +0200)] 
Unit tests for packing/unpacking.

We build a static library liblldpd.la to ease linking to tests.
liblldpd.la is equal to lldpd except:
 - no main (but lldpd_main instead)
 - no link to netsnmp (because libtool try to link many many more
   things)

14 years agoUpdate signature of transport string function for SNMP.
Vincent Bernat [Tue, 7 Jul 2009 13:23:07 +0000 (15:23 +0200)] 
Update signature of transport string function for SNMP.

14 years agoFix bug in CDP packet generation: CDP version was always 1.
Vincent Bernat [Tue, 7 Jul 2009 09:42:35 +0000 (11:42 +0200)] 
Fix bug in CDP packet generation: CDP version was always 1.

"(a && b) || c" gives 0 or 1, not b or c. Replace with a?b:c.

14 years agoFix compilation issues when DOT1 or DOT3 are not enabled.
Vincent Bernat [Tue, 7 Jul 2009 07:38:53 +0000 (09:38 +0200)] 
Fix compilation issues when DOT1 or DOT3 are not enabled.

14 years agoFix comment of iface_port_name_desc()
Vincent Bernat [Wed, 10 Jun 2009 13:39:49 +0000 (15:39 +0200)] 
Fix comment of iface_port_name_desc()

14 years agoUse ifAlias from newer Linux kernels if available.
Vincent Bernat [Wed, 10 Jun 2009 13:22:29 +0000 (15:22 +0200)] 
Use ifAlias from newer Linux kernels if available.

From 2.6.28, Linux allows to attach a description to an interface. We
grab this description from /sys/class/net/$IFACE/ifalias if it exists
and is not empty and use it as port description. In this case,
interface name is used as port ID.

 PortID:    veth0 (ifName)
 PortDescr: Test interface

This closes ticket #10.

14 years agoSet h_ifindex correctly.
Vincent Bernat [Tue, 9 Jun 2009 05:42:32 +0000 (07:42 +0200)] 
Set h_ifindex correctly.

We also use this index as a way to define an interface. The following
comment has been added to lldpd.h:

An interface is uniquely identified by h_ifindex, h_ifname and h_ops.
This means if an interface becomes enslaved, it will be considered as
a new interface. The same applies for renaming and we include the
index in case of renaming to an existing interface.

14 years agoAdd a callback mechanism to watch for incoming data on sockets.
Vincent Bernat [Sun, 7 Jun 2009 12:17:45 +0000 (14:17 +0200)] 
Add a callback mechanism to watch for incoming data on sockets.

This callback mechanism is used to handle socket control. It could
also be used when we will need to monitor sockets outside of a port
context.

15 years agoAdd a note about EDP in changelog.
Vincent Bernat [Sat, 6 Jun 2009 21:06:38 +0000 (23:06 +0200)] 
Add a note about EDP in changelog.

15 years agoUpdate changelog.
Vincent Bernat [Sat, 6 Jun 2009 21:04:35 +0000 (23:04 +0200)] 
Update changelog.

15 years agoMake "listen on vlan" feature optional at compile-time.
Vincent Bernat [Thu, 4 Jun 2009 21:26:25 +0000 (23:26 +0200)] 
Make "listen on vlan" feature optional at compile-time.

The code to handle this feature is a bit kludgy and it seems safer to
compile out this feature by default.

15 years agoThere are duplicate in the list of address we give to handler
Vincent Bernat [Thu, 4 Jun 2009 21:16:36 +0000 (23:16 +0200)] 
There are duplicate in the list of address we give to handler
functions. We need to acknowledge this correctly.

For bonds and regular interfaces, just check that h_flags is 0 before
trying to get information one more time.

For VLAN, check if the VLAN is already present in the list.

15 years agoAdd back "listen on VLAN" feature.
Vincent Bernat [Thu, 4 Jun 2009 21:12:40 +0000 (23:12 +0200)] 
Add back "listen on VLAN" feature.

15 years agoOne VLAN can be associated to multiple interfaces through bridge or
Vincent Bernat [Thu, 4 Jun 2009 19:44:40 +0000 (21:44 +0200)] 
One VLAN can be associated to multiple interfaces through bridge or
bond. Handle those cases appropriately.

15 years agoAdd back support for bonding using the new architecture.
Vincent Bernat [Wed, 3 Jun 2009 19:35:31 +0000 (21:35 +0200)] 
Add back support for bonding using the new architecture.

15 years agoDon't free statically allocated port.
Vincent Bernat [Tue, 2 Jun 2009 08:57:15 +0000 (10:57 +0200)] 
Don't free statically allocated port.

15 years agoChange the way interface information are collected.
Vincent Bernat [Tue, 2 Jun 2009 07:56:25 +0000 (09:56 +0200)] 
Change the way interface information are collected.

Move interface related stuff into interfaces.c.
A set of handlers are called sequentially to handle interfaces.

15 years agoMove chassis update to a function.
Vincent Bernat [Sun, 31 May 2009 08:35:11 +0000 (10:35 +0200)] 
Move chassis update to a function.

Later, the function could be replaced with something less hackish if
needed.

15 years agoFix SNMP support to handle multiple systems on the same port.
Vincent Bernat [Sun, 24 May 2009 18:23:59 +0000 (20:23 +0200)] 
Fix SNMP support to handle multiple systems on the same port.

15 years agoFix support for EDP with respect to multisystem support.
Vincent Bernat [Sun, 24 May 2009 17:33:28 +0000 (19:33 +0200)] 
Fix support for EDP with respect to multisystem support.
EDP VLAN are transmitted in another VLAN and therefore need to be
attached to the right existing system.

15 years agoAdd some debug output to track know remote systems/ports.
Vincent Bernat [Sun, 24 May 2009 17:16:01 +0000 (19:16 +0200)] 
Add some debug output to track know remote systems/ports.

15 years agoAdapt lldpctl to display received systems for each port.
Vincent Bernat [Sun, 24 May 2009 12:29:15 +0000 (14:29 +0200)] 
Adapt lldpctl to display received systems for each port.