+ Support for newer ethtool interface on Linux
(ETHTOOL_GLINKSETTINGS) and additional speed settings.
+ Current MAU type is displayed even when autoneg is off.
+ + Increase netlink receive buffer by default. Can be changed at
+ compile-time through ./configure.
* Fix:
+ Correctly parse LLDP-MED civic address when the length of the
TLV exceeds the length of the address.
lldp_ARG_WITH([lldpd-ctl-socket], [Path to socket for communication with lldpd], [${runstatedir}/lldpd.socket])
lldp_ARG_WITH([lldpd-pid-file], [Path to lldpd PID file], [${runstatedir}/lldpd.pid])
+# Netlink
+lldp_ARG_WITH_UNQUOTED([netlink-receive-bufsize], [Netlink receive buffer size], [256*1024])
+lldp_ARG_WITH_UNQUOTED([netlink-send-bufsize], [Netlink send buffer size], [0])
+
# CDP/FDP/EDP/SONMP
lldp_ARG_ENABLE([cdp], [Cisco Discovery Protocol], [yes])
lldp_ARG_ENABLE([fdp], [Foundry Discovery Protocol], [yes])
exec_prefix=$exec_prefix_save
])
+dnl lldp_ARG_WITH_UNQUOTED(name, help1, default)
+
+AC_DEFUN([lldp_ARG_WITH_UNQUOTED],[
+ AC_ARG_WITH([$1],
+ AS_HELP_STRING([--with-$1],
+ [$2 @<:@default=$3@:>@]),[
+ AC_DEFINE_UNQUOTED(AS_TR_CPP([$1]), [$withval], [$2])
+ AC_SUBST(AS_TR_CPP([$1]), [$withval])],[
+ AC_DEFINE_UNQUOTED(AS_TR_CPP([$1]), [$3], [$2])
+ AC_SUBST(AS_TR_CPP([$1]), [$3])
+ eval with_[]m4_translit([$1], [-+.], [___])=$3
+])])
+
dnl lldp_ARG_WITH(name, help1, default)
AC_DEFUN([lldp_ARG_WITH],[
#define NETLINK_BUFFER 4096
-#ifndef RTNL_SND_BUFSIZE
-#define RTNL_SND_BUFSIZE 32 * 1024
-#endif
-#ifndef RTNL_RCV_BUFSIZE
-#define RTNL_RCV_BUFSIZE 256 * 1024
-#endif
-
struct netlink_req {
struct nlmsghdr hdr;
struct rtgenmsg gen;
static int
netlink_socket_set_buffer_sizes(int s)
{
- int sndbuf = RTNL_SND_BUFSIZE;
- int rcvbuf = RTNL_RCV_BUFSIZE;
+ int sndbuf = NETLINK_SEND_BUFSIZE;
+ int rcvbuf = NETLINK_RECEIVE_BUFSIZE;
socklen_t size = 0;
int got = 0;