run the example-demon as master agent

Gina Gorgogianni <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAKFb=wof=qBWxh+EUu6j3aBRp0a9AON5hAA31fpjCbeS8So3dA@mail.gmail.com>
Hello all,

I'm a new user of net snmp and I'm trying to use it to make a c++ program
expose some of its variables.
I have put my c++ code in the example-demon.c file provided in the rootkit
of the official page and is works fine when I run it as a subagent and I
use the snmpd as a master agent.

My question is:
Which exactly is the use of the line
int agentx_subagent = 1; /* change this if you want to be a SNMP master
agent */
??

What is supposed to happen when I change this variable to 0?
I am trying to run it as a master agent so that I will no longer need the
snmpd agent but I'm not sure if that's possible without making any other
changes. Do i need to add a handler with a switch-case for every command
(GET-case, GETNEXT-case etc)?
And is it possible anyway to use another agent as master agent instead of
snmpd?
Right now, when i run it as a master agent without starting tha snmpd agent
I get the error "Timeout: No Response from localhost".

If I start the snmpd everything works as expected and the snmpget command
returns the correct result.

Thanks in advance for any help!
Gina

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2

_______________________________________________
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.