>>>>> On Thu, 1 Sep 2011 09:57:56 +0100, Dave Shield 
>>>>> <[email protected]> said:

DS> First of all, what is meant by the "running executable"?
DS> Is this talking about the agent, or the command-line tools,
DS> or what?

DS> Secondly, how do I know what is meant by "needless" code?
DS> Needless for what?    For example, will it remove SNMPv1 support?
DS> SNMPv2c support?    SNMPv3 support?   All of these?

It's at the function level.  Once all the mib modules, etc, have been
picked then at compile time it makes a first pass looking through all
the code for netsnmp_feature_request() (and want()) lines, as well as
netsnmp_feature_provides() and more commonly netsnmp_feature_child_of()
lines.  It then sorts through them all and sets #defines based on what
it finds that one piece of code require (say the foo feature) but yet
another wasn't required or wanted (say the bar feature).

It'll then define:

#define NETSNMP_FEATURE_HAS_FOO
#define NETSNMP_FEATURE_REMOVE_BAR

Then in the code, the function bar() (or multiple functions) is
surrounded with:

#ifndef NETSNMP_FEATURE_REMOVE_BAR
bar() {
...
}
#endif

Thus bar() is only compiled if and only if something else wanted it around.

[note that I'm talking about individual functions because that's the
most common case, but there are other cases where the feature really is
encapsulated in multiple functions and the ifdef surrounds multiple
functions].

And then there are configure switches to control things [like adding in
features that no code in the base compile needed, as well as removing
"wanted" features that can be compiled with out but are on by default
(logging_syslog is an example: you can remove all the syslogging code
from snmplib using a --with-out-features="logging_syslog" flag).

DS> I haven't really looked at the details of the feature mechanism yet.

I tried to document it fairly well on the wiki.

DS> My understanding of   --enable-mini-agent   is that it strips out all
DS> but the bare essentials of the agent framework,   and it's then up
DS> to the developer to put back in anything that they actually want.

Correct.  And somewhat tangential.

[[--enable-minimialist]]

DS> Hence this would naturally also cover [removing] the "nice-to-haves"

Maybe true, and I could argue it both ways.  But it's been published now
so I'm not sure we can change the existing definition safely.

DS> Given that the whole feature mechanism is new with 5.7,
DS> I don't see any problems in changing the behaviour of these
DS> configure flags while things bed down.

I do.  The flag is already written into other documentation and I know
for a fact other folks are using it.  Changing it would mean they would
have to adjust their understanding of the flag based on which version
they were using.

It's really only safer to use a new flag.  If there was a huge problem,
I could see wanting to change it.  But wouldn't it make more sense to
add another flag rather than redefine what that one means?  Or maybe
adding two more flags, and hiding the existing one but aliasing it to
the newer equivalent.

DS> But I'd suggest that features in the 5.7.x line should be regarded
DS> as "under development", and hence be open to changes as required.

Based on what?  It's been *long* discussed, the documentation has been
around for comment for ages (the wiki page was created on Jan 3).

DS> But personally I don't think we're at that stage yet.

Because you haven't had the time to look at it yet?  It's not like it
hasn't been discussed before.

It's not safe to change at this point.  Please.  We can add to it, but
changing the meanings of the flags will cause problems and I don't see a
clear benefit of why we'd want to do it.  There are safer ways to change
the advertised functionality without changing the existing meanings.

-- 
Wes Hardaker
Please mail all replies to [email protected]

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to