On 2011-02-23 01:06, Wes Hardaker wrote:
A massive patch that implements the following feature:
http://www.net-snmp.org/wiki/index.php/Feature_Marking_and_Selection
is being committed at the moment. Michael Baer (baerm) and I have been
working on it for about 3 months or longer in an offline git
repository. Originally I was hoping we could commit it in smaller
chunks, but 'git svn' really doesn't like merges, branches and trees
just like Dorothy doesn't. So, it's going in as a huge commit (at least
it'll be easy to reverse if need be).
I have just written my first feature, in part inspired by bug #3234754,
and I came to the following problems:
* How should features that affect the ABI/API be handled?
* Looking at REMOVE_STATISTICS it seems it is ok to include the feature
header from a .h file, is that correct?
Does anyone have any other comments on it?
Otherwise I will commit it in a few days.
/MF
Index: include/net-snmp/library/snmp_transport.h
===================================================================
--- include/net-snmp/library/snmp_transport.h (revision 20150)
+++ include/net-snmp/library/snmp_transport.h (working copy)
@@ -12,6 +12,8 @@
#include <net-snmp/library/asn1.h>
+#include <net-snmp/net-snmp-features.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -185,11 +187,13 @@
size_t name_length;
const char **prefix;
+#ifndef NETSNMP_FEATURE_REMOVE_TDOMAIN_CREATE_FROM_TSTRING
/*
* The f_create_from_tstring field is deprecated, please do not use it
* for new code and try to migrate old code away from using it.
*/
netsnmp_transport *(*f_create_from_tstring) (const char *, int);
+#endif
netsnmp_transport *(*f_create_from_ostring) (const u_char *, size_t, int);
Index: snmplib/snmp_transport.c
===================================================================
--- snmplib/snmp_transport.c (revision 20150)
+++ snmplib/snmp_transport.c (working copy)
@@ -71,6 +71,7 @@
#include <net-snmp/library/snmp_service.h>
#include <net-snmp/library/read_config.h>
+netsnmp_feature_child_of(tdomain_create_from_tstring, netsnmp_unused)
netsnmp_feature_child_of(transport_all, libnetsnmp)
netsnmp_feature_child_of(tdomain_support, transport_all)
@@ -628,9 +629,11 @@
"default address \"%s\"\n",
match->prefix[0], addr ? addr : "[NIL]",
addr2 ? addr2 : "[NIL]"));
+#ifndef NETSNMP_FEATURE_REMOVE_TDOMAIN_CREATE_FROM_TSTRING
if (match->f_create_from_tstring)
t = match->f_create_from_tstring(addr, local);
else
+#endif
t = match->f_create_from_tstring_new(addr, local, addr2);
if (t) {
curfilename = prev_curfilename;
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders