Re: Perl versus c agent

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Fri, 2005-10-14 at 14:47 +0000, xuemei wrote:
> What are the major features/differences between the C and Perl agent?

What do you mean by "the perl agent"?

The Net-SNMP agent is written in C, not perl.
It's possible to *use* perl code within the agent (via an
embedded perl interpreter), and it's possible to link new C
code with the agent.  But it's the same agent in both cases.


> If need to extend the agent functionality is the main purpose,
> mib2c is a necessary tool to have,

Nope.
This is helpful, but it's not strictly necessary.
Mib2c simply generates a template of C code.
It's perfectly valid to write exactly the same code
by hand - perhaps using existing MIB implementations
as a guide.

That's probably not true for some MIB frameworks - most notably
the MfD structure, which relies on a *lot* of automatically
generated code.  It wouldn't be sensible to try and reproduce
this manually.

But it's perfectly feasible to develop a group of scalar
objects, or an iterator-based or table_data-style table,
without using mib2c to generate the initial template.


>  [mib2c] belongs to the perl module,

It's written in perl - yes.
I wouldn't really describe it as "belonging" to the perl module.

>  does the c agent has the similar tool?

Yes - it's called "mib2c".
Hint: what do you think the name means? :-)


Dave


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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.