Warning: Unknown token

"BIbhudatta Nayak" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

I am using VC++ 6.0 for c++ codding on windows2000.
i have created my own MIB with 2 Integer32 type object.
Then I have generated .c and .h file for my MIB using mib2c.
Then i developed an agent program by including this .c and .h file.
When I run my agent it shows following message.
--------------------
C:/usr/snmp/persist/mysnmpproj.conf: line 32: Warning: Unknown token:
setserialn
o.
Warning: no access control information configured.
  It's unlikely this agent can serve any useful purpose in this state.
  Run "snmpconf -g basic_setup" to help you configure the mysnmpproj.conffile f
or this agent.
Error opening specified endpoint ""
select: No such file or directory
Press any key to continue.
------------------
For your reference I have given the contain of "mysnmpproj.conf" which is
automatically created.
------------------------------
engineBoots 2                         #(this is line 32)
------------------
My project name is "mysnmpproj". I have given the codding of my
mysnmpproj.cpp. I think this is a master agent.
Is there any problem with the codding. Please correct me.
----------------------------
// mysnmpproj.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"


#include <iostream.h>
#include <string.h>
#include <malloc.h>

#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>

#include <net-snmp/agent/mib_modules.h>

#include "telesTryModuleMIB.h"

static int keep_running;

int
main (int argc, char *argv[])
{


  int agentx_subagent = 0;  /* Change this if you're a master agent.  */

  snmp_enable_stderrlog();

  /*  If we're an AgentX subagent...  */
 // if (agentx_subagent) {
      /* ...make us an AgentX client.  */
 //
netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID,NETSNMP_DS_AGENT_ROLE, 1);
  //}

  init_agent("mysnmpproj");

  /*  Initialize your MIB code here.  */
  init_telesTryModuleMIB();

  /*  `yourappname' will be used to read yourappname.conf files.  */
  init_snmp("mysnmpproj");

  /*  If we're going to be a SNMP master agent...  */
  if (!agentx_subagent)
      init_master_agent();  /*  Listen on default port (161).  */

  /*  Your main loop here...  */
  keep_running=1;
  while (keep_running) {
      /* if you use select(), see snmp_api(3) */
      /*     --- OR ---  */
      agent_check_and_process(0); /* 0 == don't block */
  }

  /*  At shutdown time:  */
  snmp_shutdown("mysnmpproj");
    return 0;
}
----------------------------

Thanks in advance.

Regards
Bibhudatta

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

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