SNMP++ improvements and AGENT++ addition
cover SNMP++ improvements and AGENT++ addition
Hi all,
this patchset provides various improvements to the SNMP++ package and adds the AGENT++ library on top of it.
- patches 1 and 2 fix minor issues with SNMP++;
- patches 3 and 4 add options to enable optional features of SNMP++ that have a relevant impact on the filesystem size or memory usage;
- patch 5 adds AGENT++; it does not necessarily require the previous patches.
Luca Ceresoli (5):
snmppp: fix missing includes
snmppp: update download URL
snmppp: add option to enable logging
snmppp: add option to disable SNMPv3 support
agentpp: new package
package/Config.in | 1 + package/agentpp/Config.in | 20 +++++++++++ package/agentpp/agentpp.mk | 20 +++++++++++ package/snmppp/Config.in | 19 +++++++++- .../snmppp/snmppp-01-Add-missing-includes.patch | 41 ++++++++++++++++++++++ package/snmppp/snmppp.mk | 12 +++++-- 6 files changed, 110 insertions(+), 3 deletions(-) create mode 100644 package/agentpp/Config.in create mode 100644 package/agentpp/agentpp.mk create mode 100644 package/snmppp/snmppp-01-Add-missing-includes.patch
Signature · 4 lines
Luca -- 1.8.3.2
PATCH 1/5 snmppp: fix missing includes
--- .../snmppp/snmppp-01-Add-missing-includes.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 package/snmppp/snmppp-01-Add-missing-includes.patch
package/snmppp/snmppp-01-Add-missing-includes.patch new file +41 -0
@@ -0,0 +1,41 @@ +From 6433c6e8d81313ec7ef6c8d3abf96fffa537e23e Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli <[email protected]> +Date: Tue, 1 Apr 2014 14:35:25 +0200 +Subject: [PATCH] Add missing includes + +Signed-off-by: Luca Ceresoli <[email protected]> +--- + include/snmp_pp/config_snmp_pp.h.in | 4 ++++ + include/snmp_pp/smival.h | 1 + + 2 files changed, 5 insertions(+) + +diff --git a/include/snmp_pp/config_snmp_pp.h.in b/include/snmp_pp/config_snmp_pp.h.in +index 89a5b0d..3100713 100644 +--- a/include/snmp_pp/config_snmp_pp.h.in ++++ b/include/snmp_pp/config_snmp_pp.h.in +@@ -28,6 +28,10 @@ + #ifndef _CONFIG_SNMP_PP_H_ + #define _CONFIG_SNMP_PP_H_ + ++#ifdef __linux__ ++#include <sys/socket.h> ++#endif ++ + #define SNMP_PP_VERSION_STRING "@VERSION@" + #define SNMP_PP_VERSION @SNMP_PP_MAJOR_VERSION@ + #define SNMP_PP_RELEASE @SNMP_PP_MINOR_VERSION@ +diff --git a/include/snmp_pp/smival.h b/include/snmp_pp/smival.h +index 7a36fab..7522087 100644 +--- a/include/snmp_pp/smival.h ++++ b/include/snmp_pp/smival.h +@@ -59,6 +59,7 @@ + #define _SMIVALUE + + //----[ includes ]----------------------------------------------------- ++#include <string.h> + #include "snmp_pp/smi.h" + + #ifdef SNMP_PP_NAMESPACE +-- +1.8.3.2 +
Signature · 1 line
1.8.3.2
PATCH 2/5 snmppp: update download URL
In reply to Luca CeresoliThe filename of the SNMP++ sources has changed.
The old one is still working because the server automatically redirects to the new file, but it is safer to use the official name.
--- package/snmppp/snmppp.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/snmppp/snmppp.mk +1 -1
@@ -5,7 +5,7 @@ ################################################################################ SNMPPP_VERSION = 3.3.4 -SNMPPP_SOURCE = snmp++$(SNMPPP_VERSION).tar.gz +SNMPPP_SOURCE = snmp++-$(SNMPPP_VERSION).tar.gz SNMPPP_SITE = http://www.agentpp.com SNMPPP_DEPENDENCIES = openssl host-pkgconf SNMPPP_INSTALL_STAGING = YES
Signature · 1 line
1.8.3.2
PATCH 3/5 snmppp: add option to enable logging
In reply to Luca CeresoliSNMP++ logging can be overly verbose, and according to the SNMP++ documentation, disabling logging "increases performance drastically and minimizes memory consumption".
--- package/snmppp/Config.in | 11 +++++++++++ package/snmppp/snmppp.mk | 1 + 2 files changed, 12 insertions(+)
package/snmppp/Config.in +11 -0
@@ -8,5 +8,16 @@ config BR2_PACKAGE_SNMPPP http://www.agentpp.com/snmp_pp3_x/snmp_pp3_x.html +if BR2_PACKAGE_SNMPPP + +config BR2_PACKAGE_SNMPPP_LOGGING + bool "enable logging" + help + Enable logging output for SNMP++. + According to the SNMP++ documentation, disabling logging "increases + performance drastically and minimizes memory consumption". + +endif + comment "snmp++ needs a toolchain w/ threads, C++" depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
package/snmppp/snmppp.mk +1 -0
@@ -11,6 +11,7 @@ SNMPPP_DEPENDENCIES = openssl host-pkgconf SNMPPP_INSTALL_STAGING = YES # no configure script in tarball SNMPPP_AUTORECONF = YES +SNMPPP_CONF_OPT = $(if $(BR2_PACKAGE_SNMPPP_LOGGING),--enable-logging,--disable-logging) SNMPPP_LICENSE = SNMP++ SNMPPP_LICENSE_FILES = src/v3.cpp
Signature · 1 line
1.8.3.2
PATCH 4/5 snmppp: add option to disable SNMPv3 support
In reply to Luca CeresoliDisabling SNMPv3 support also removes the dependency on OpenSSL, which is pretty large (over 2 MB of uncompressed filesystem size on an ARM926 platform).
BR2_PACKAGE_SNMPPP_SNMPV3 defaults to yes for backward compatibility with previous Buildroot releases, where SNMPv3 was always enabled.
--- package/snmppp/Config.in | 8 +++++++- package/snmppp/snmppp.mk | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-)
package/snmppp/Config.in +7 -1
@@ -2,7 +2,6 @@ config BR2_PACKAGE_SNMPPP bool "snmp++" depends on BR2_INSTALL_LIBSTDCPP depends on BR2_TOOLCHAIN_HAS_THREADS - select BR2_PACKAGE_OPENSSL help SNMP++v3.x is a C++ API which supports SNMP v1, v2c, and v3.
@@ -17,6 +16,13 @@ config BR2_PACKAGE_SNMPPP_LOGGING According to the SNMP++ documentation, disabling logging "increases performance drastically and minimizes memory consumption". +config BR2_PACKAGE_SNMPPP_SNMPV3 + bool "enable SNMPv3" + default y + select BR2_PACKAGE_OPENSSL + help + Enable optional support for SNMP++. This selects OpenSSL. + endif comment "snmp++ needs a toolchain w/ threads, C++"
package/snmppp/snmppp.mk +8 -1
@@ -7,7 +7,7 @@ SNMPPP_VERSION = 3.3.4 SNMPPP_SOURCE = snmp++-$(SNMPPP_VERSION).tar.gz SNMPPP_SITE = http://www.agentpp.com -SNMPPP_DEPENDENCIES = openssl host-pkgconf +SNMPPP_DEPENDENCIES = host-pkgconf SNMPPP_INSTALL_STAGING = YES # no configure script in tarball SNMPPP_AUTORECONF = YES
@@ -15,4 +15,11 @@ SNMPPP_CONF_OPT = $(if $(BR2_PACKAGE_SNMPPP_LOGGING),--enable-logging,--disable- SNMPPP_LICENSE = SNMP++ SNMPPP_LICENSE_FILES = src/v3.cpp +ifeq ($(BR2_PACKAGE_SNMPPP_SNMPV3),y) + SNMPPP_CONF_OPT += --enable-snmpv3 + SNMPPP_DEPENDENCIES += openssl +else + SNMPPP_CONF_OPT += --disable-snmpv3 +endif + $(eval $(autotools-package))
Signature · 1 line
1.8.3.2
PATCH 5/5 agentpp: new package
In reply to Luca Ceresoli--- package/Config.in | 1 + package/agentpp/Config.in | 20 ++++++++++++++++++++ package/agentpp/agentpp.mk | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 package/agentpp/Config.in create mode 100644 package/agentpp/agentpp.mk
package/Config.in +1 -0
@@ -700,6 +700,7 @@ source "package/mediastreamer/Config.in" endmenu menu "Networking" +source "package/agentpp/Config.in" source "package/c-ares/Config.in" source "package/cppzmq/Config.in" source "package/czmq/Config.in"
package/agentpp/Config.in new file +20 -0
@@ -0,0 +1,20 @@ +config BR2_PACKAGE_AGENTPP + bool "agent++" + select BR2_PACKAGE_SNMPPP + depends on BR2_INSTALL_LIBSTDCPP + help + AGENT++ is a set of C++ classes which provides a complete protocol + engine and dispatch table for the development of SNMP agents. + AGENT++ is a multilingual API which supports SNMPv1, SNMPv2c, and + SNMPv3. It provides various C++ classes implementing prototypes for + scalar and table SNMP managed objects that can be customized by + derivation. Additional classes support the development of proxy + agents as well as sending notifications. + + SNMPv3 support is enabled if SNMP++ enables it. + + http://www.agentpp.com/agentpp3_5/agentpp3_5.html + + +comment "agent++ needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/agentpp/agentpp.mk new file +20 -0
@@ -0,0 +1,20 @@ +############################################################# +# +# agentpp +# +############################################################# + +AGENTPP_VERSION = 4.0.2 +AGENTPP_SOURCE = agent++-$(AGENTPP_VERSION).tar.gz +AGENTPP_SITE = http://www.agentpp.com +AGENTPP_LICENSE = Apache-2.0 +AGENTPP_LICENSE_FILES = LICENSE-2_0.txt +AGENTPP_INSTALL_STAGING = YES +AGENTPP_DEPENDENCIES = host-pkgconf snmppp +AGENTPP_CONF_OPT += \ + --disable-proxy \ + --disable-forwarder \ + --disable-rpath \ + --disable-dependency-tracking + +$(eval $(autotools-package))
Signature · 1 line
1.8.3.2
PATCH 5/5 agentpp: new package
Quoted 29 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Luca" == Luca Ceresoli <[email protected]> writes:
Signed-off-by Luca Ceresoli <[email protected]>--- package/Config.in | 1 + package/agentpp/Config.in | 20 ++++++++++++++++++++ package/agentpp/agentpp.mk | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 package/agentpp/Config.in create mode 100644 package/agentpp/agentpp.mkpackage/Config.in +1
-0@@ -700,6 +700,7 @@ source "package/mediastreamer/Config.in" endmenu menu "Networking" +source "package/agentpp/Config.in" source "package/c-ares/Config.in" source "package/cppzmq/Config.in" source "package/czmq/Config.in"package/agentpp/Config.in new file +0
-0
package/agentpp/Config.in line 4
Quoted 4 lines
package/agentpp/Config.in new file +4
-0@@ -0,0 +1,20 @@ +config BR2_PACKAGE_AGENTPP + bool "agent++" + select BR2_PACKAGE_SNMPPP + depends on BR2_INSTALL_LIBSTDCPP
snmp++ needs threads, so agent++ does as well.
Quoted 4 lines
package/agentpp/Config.in new file +4
-0+ help + AGENT++ is a set of C++ classes which provides a complete protocol + engine and dispatch table for the development of SNMP agents. + AGENT++ is a multilingual API which supports SNMPv1, SNMPv2c, and
package/agentpp/Config.in line 18
Quoted 10 lines
package/agentpp/Config.in new file +10
-0+ SNMPv3. It provides various C++ classes implementing prototypes for + scalar and table SNMP managed objects that can be customized by + derivation. Additional classes support the development of proxy + agents as well as sending notifications. + + SNMPv3 support is enabled if SNMP++ enables it. + + http://www.agentpp.com/agentpp3_5/agentpp3_5.html + +
Double newline after help.
package/agentpp/agentpp.mk line 5
Quoted 13 lines
package/agentpp/Config.in new file +2
-0+comment "agent++ needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPpackage/agentpp/agentpp.mk new file +5
-0@@ -0,0 +1,20 @@ +############################################################# +# +# agentpp +# +#############################################################
80 chars header.
Committed with that fixed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
cover SNMP++ improvements and AGENT++ addition
In reply to Luca CeresoliQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Luca" == Luca Ceresoli <[email protected]> writes:
Hi all,
this patchset provides various improvements to the SNMP++ package and adds the AGENT++ library on top of it.- patches 1 and 2 fix minor issues with SNMP++;
- patches 3 and 4 add options to enable optional features of SNMP++ that have a relevant impact on the filesystem size or memory usage;
- patch 5 adds AGENT++; it does not necessarily require the previous patches.
Committed series, thanks.
Signature · 1 line
Bye, Peter Korsgaard