This patch reduces the number of symbols without NETSNMP_-prefix that
are injected into the namespace of users of the Net-SNMP library.
Note: none of the Net-SNMP API functions accepts one of the values of
the constants that are moved by this patch. Engine ID and engine NIC
are specified in snmpd.conf. See also the documentation of the
engineIDType and engineIDNic keywords.
---
 include/net-snmp/library/snmpv3.h | 9 ---------
 snmplib/snmpv3.c                  | 9 +++++++++
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/net-snmp/library/snmpv3.h b/include/net-snmp/library/snmpv3.h
index df8b8a4ad110..86bddabb82c1 100644
--- a/include/net-snmp/library/snmpv3.h
+++ b/include/net-snmp/library/snmpv3.h
@@ -16,15 +16,6 @@ extern          "C" {

#define MAX_ENGINEID_LENGTH 32 /* per SNMP-FRAMEWORK-MIB SnmpEngineID TC */

-#define ENGINEID_TYPE_IPV4    1
-#define ENGINEID_TYPE_IPV6    2
-#define ENGINEID_TYPE_MACADDR 3
-#define ENGINEID_TYPE_TEXT    4
-#define ENGINEID_TYPE_EXACT   5
-#define ENGINEID_TYPE_NETSNMP_RND 128
-
-#define        DEFAULT_NIC "eth0"
-
     NETSNMP_IMPORT int
snmpv3_parse_args(char *optarg, netsnmp_session * session, char **Apsz, char **Xpsz, int argc, char *const *argv, int flags);
diff --git a/snmplib/snmpv3.c b/snmplib/snmpv3.c
index 771ba3b0bce5..dca92258c37e 100644
--- a/snmplib/snmpv3.c
+++ b/snmplib/snmpv3.c
@@ -86,6 +86,15 @@

 #include <net-snmp/net-snmp-features.h>

+#define ENGINEID_TYPE_IPV4    1
+#define ENGINEID_TYPE_IPV6    2
+#define ENGINEID_TYPE_MACADDR 3
+#define ENGINEID_TYPE_TEXT    4
+#define ENGINEID_TYPE_EXACT   5
+#define ENGINEID_TYPE_NETSNMP_RND 128
+
+#define        DEFAULT_NIC "eth0"
+
 static u_long   engineBoots = 1;
 static unsigned int engineIDType = ENGINEID_TYPE_NETSNMP_RND;
 static unsigned char *engineID = NULL;
--
2.16.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to