Re: "hardware abstraction" in 5.4

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 05/12/06, Petri Jarre <[email protected]> wrote:
> I'd like to find more information about the "hardware abstraction layer"
> which was listed as one new item for snmpd in net-snmp-5.4 NEWS file.
>
> Is this "hardware abstraction" just a way to implement MIB modules

Yes.
In particular, it's a mechanism for representing particular hardware-related
information in a standard (architecture-independent) way, so that the
O/S-specific details can be removed from MIB module code.  It also means
that similar MIB modules (e.g. UCD-specific and IETF-standard MIBs)
can report consistent information, without having to duplicate what is
effectively the same low-level code.

With the 5.4 agent, this is being used to consolidate the 'ucd-snmp/vmstat'
and 'host/hr_processor' MIB modules (for CPU statistics).  It's also used
for the UCD memory statistics.
    See 'agent/mibgroup/hardware/{cpu,memory}' for the HAL implementation,
and 'agent/mibgroup/ucd-snmp/{vmstat.c,memory.c}' for where it's used.


>                                                   My primary concern is that if it is a
> new/changed API, it means that I can not compile the new IP-MIB and
> IF-MIB implementations with a 5.1.2 agent, right?

Fret ye not.
This new mechanism will not break *any* existing MIB module code.
Nothing that doesn't explicitly refer to the HAL-related calls will be
affected in the slightest.   You can even choose to re-instate the
previous implementations for the modules listed above, and this
should work fine.
   In principle, we could extend the HAL mechanism to cover network
interfaces, but that's currently being handled by Robert's MfD-based
re-writes (which has a similar idea in the 'data_access' subtree).  I
don't really intend to try and duplicate or replace this work.  The HAL
development is currently concentrating on the overlap between UCD
and HostRes information.



> Supposedly it first appeared in 5.3.x but I didn't see any mention of it in
> the 5.3 section of the NEWS file?

That saw the first HAL-related code, but none of the active MIB module
code relied on it.  I was (optimistically) hoping that interested coders
might take a look at it, and feel back suggestions before things actually
went into service.  I ought to know better by now!

>                                            I also couldn't find anything named
> "hardware abstraction layer" in the API doc, but that could be just my
> fault.

No - it's not documented at all.
This isn't really aimed at most MIB module developers.
It's really only relevant to people wanting to port the existing agent to a
new architecture, or extend the coverage of existing hardware-related
information.

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.