Hi users,
I am new to Net-Snmp, I have done my research and got my MIBS run with
mib2c to get files i wanted. My application requires to listen on port 161,
receive requests and then process them with a handler. The problem is that
my daemon receives the GET requests but cant call the handlers. When a GET
request comes I see the following message.

           *Connection from UDP: [192.168.21.170]:1565->[192.168.21.24]*
>


What is it that I have to do. Am I missing something. My daemon program is
as follows.

int main (int argc, char *argv[])
> {
>     int agentx_subagent = 0;  /* master agent = 0, subagent = 1  */
>
>     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("agent");
>
>     /*  Initialize your MIB code here.  */
>     init_utl();
>
>     /*  `yourappname' will be used to read yourappname.conf files.  */
>     init_snmp("snmpd");
>
>     /*  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...  */
>     while (1) {
>         /* if you use select(), see snmp_api(3) */
>         /*     --- OR ---  */
>         agent_check_and_process(0); /* 0 == don't block */
>     }
>
>     /*  At shutdown time:  */
>     snmp_shutdown("agent");
> }
>


Cheers.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to