On Mon, 2010-06-14 at 14:53 +0200, Jan Safranek wrote:
> Sometime before net-snmp-5.5 Magnus reorganized util_funcs.h and created
> new headers in agent/mibgroup/util_funcs/*.h. Old util_funcs.h just
> includes them, but these header files won't get installed on 'make install'.
Ok. I messed up. I really should fix this.
> There is quite ugly hack to get mibgroup/util_funcs.h installed and I
> don't think it is right to extend it in even more ugly way to install
> agent/mibgroup/util_funcs/*.h
Agreed - ugly hacks are bad.
> IMHO all the headers in mibgroup/ directory should be internal and not
> public, otherwise we get mad maintaining their dependencies.
Agreed.
I also think that -lnetsnmpmibs shouldn't be part of the default link
command for subagents as that contains implementation details for the
installed agent, not library routines for general use.
To mess things up further some things under mibgroup/ ends up in
-lnetsnmpagent (e.g the agentx routines) and so I suppose they are
public interfaces(?) but the headers for those parts ain't installed.
The choice of agent and mibs is by the way somewhat random but there is
a slight overweight for extension protocols. Here it should be noted
that a protocol that allows subagents to register to this agent don't
need to be in the agent lib. One that allows the agent to register as a
subagent I don't know about.
> Why are the util_funcs.h in mibgroup/ anyway?
It looks like a pile of unrelated routines that was thought to be of
some general utility at some point (back in the 4.x days from the style
of the routines).
The point of my splitting of it was to separate the unrelated parts so I
could build the agent without them.
> Shouldn't it be part of the agent itself?
I'd prefer if it wasn't - the parts that remain in util_funcs.h at the
moment are used by
* ucd-snmp/pass_persist, ucd-snmp/pass, ucd-snmp/proc (there are
som routines for popening things)
* mibII/system_mib (if execv exists and the uname function doesn't
exist (odd system!) then the agent tries to run 'uname -a' in
order to get sysDesc and uname -n (if no gethostname function)
to get sysName.
There are also a whole bunch that say they use it but are mistaken. I
should fix those some day.
> Or is hacking agent/Makefile.in the right way to fix the header
> installation?
I fear that.
/MF
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders