agentx subagent re-enabling

2012-09-24 Thread John Q
I have embedded a net-snmp agentx subagent in my c++ application code on Ubuntu 
Linux. I want to disable the agentx subagent once it is working and then 
re-enable it again. I am successfully able to setup the agent, poll the mib 
using snmpget from the command line and disable agentx socket connection by 
using snmp_shutdown but I am unable to re-enable the socket connection again 
once I disable it. 


Appreciate any help/pointers.

I use the following code to initialise the SNMP library and the agentx socket 
connection.

In the beginning, initialise the AgentX subagent -

netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);
    netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, 
NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 120);
    netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, 
NETSNMP_DS_AGENT_X_SOCKET, m_agentx_socket.c_str());
    

/* initialize the agent library */
init_agent("MyApp");
// initialise MIB module
init_snmp("MyApp");

The poll the MIB using snmpget and disable the connection using the function 
below -
snmp_shutdown("MyApp");
SOCK_CLEANUP;

Works fine so far.

Then I re-enable the connection using the code below but this does not work.
netsnmp_ds_set_boolean(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_ROLE, 1);
    netsnmp_ds_set_int(NETSNMP_DS_APPLICATION_ID, 
NETSNMP_DS_AGENT_AGENTX_PING_INTERVAL, 120);
    netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, 
NETSNMP_DS_AGENT_X_SOCKET, m_agentx_socket.c_str());
    

/* initialize the agent library */
init_agent("MyApp");
init_snmp("MyApp");--
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


snmpInBadCommunityUses is always zero

2012-09-24 Thread John Mullaney
I'm using net-snmp 5.7.1 on FreeBSD 8.8.1. I'm trying to test the snmp 
features. When I do a GET of snmpInBadCommunityUses it is always zero. I've did 
an snmpwalk using an invalid community string and that request got rejected, 
but the snmpInBadCommunityUses did not increment. Other snmp vars seem to be 
incrementing as expected. Any ideas?  Thanks, John Mullaney

--
John Mullaneyoffice 952-562-3056
Dell | Compellent  mobile 612-709-9050
7625 Smetana Lane, Minneapolis, MN  55344

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


5.6.1.1 release version crashes on Windows

2012-09-24 Thread Kyle G
I have installed the 5.6.1.1 version of net-snmp on windows 2008 Server r2. 

After it is set installed and set up, if I send an SNMP v2c trap, snmptrapd 
automatically exits every time.  It does not matter if this is running as a 
service, or as a stand alone application.  There are no extra plug-ins 
installed, just a clean installation of 5.6.1.1.

V1 traps are seen, and printed out to the screen, but v2c just cause the 
program to crash, with the usual unhelpful windows errors.

The system architecture is 64 bit, but the 5.6.1.1 download seems to be only 32 
bit.  I do not know if this could be the source of the problem.  Due to legal 
issues, I'm confined to working with 5.6.1.1 until I get approval to try maybe 
5.7.  However, i have not seen any indication that the behavior I am 
experiencing is normal.

I have tested many dfifferent mibs and formats for the v2c traps, and 
everything so far has failed.  Even the simple examples given in the online 
net-snmp documentation cause snmptrapd to crash.

Any help or suggestions would be appreciated.

Kyle Grundmann
--
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


row merge error

2012-09-24 Thread Joan Landry
Can anyone tell me what could cause the following error:

netsnmp_assert saved_requests[i] == request failed helpers/row_merge.c:270 
netsnmp_row_merge_helper_handler()

I use the following registration:

/*reg tables ***/
handler_ptr = netsnmp_create_handler("sysContactTable", 
sysContactTable_handler);
if(!handler_ptr)
{
  TRACE_LOG( TRACE_SNMP, TRACE_INFO, "Memory allocation failed for snmp mib 
init.");
  return;
}
reg = netsnmp_handler_registration_create("sysContactTableChain",
   handler_ptr,
   sysContactTable_oid,
   OID_LENGTH(sysContactTable_oid),
   HANDLER_CAN_RWRITE);
if(reg == NULL)
{
  netsnmp_handler_free(handler_ptr);
  return;
}
table_info = SNMP_MALLOC_TYPEDEF(netsnmp_table_registration_info);
if(!verifyTableInfo(table_info))
{
  netsnmp_handler_free(handler_ptr);
  netsnmp_handler_registration_free(reg);
  return;
}
netsnmp_table_helper_add_indexes(table_info, ASN_INTEGER,
  /* index: ovnNGSysContactIndex */0);
table_info->min_column = COLUMN_SYSCONTACTNAME;
table_info->max_column = COLUMN_SYSCONTACTEMAIL;
netsnmp_register_table(reg, table_info);
handler_ptr2 = netsnmp_get_row_merge_handler(reg->rootoid_len + 2);
if(!handler_ptr2)
{
  SNMP_FREE(table_info);
  netsnmp_handler_registration_free(reg);
  return;
}
netsnmp_inject_handler(reg, handler_ptr2);

Thanks


This email and attachments may contain privileged or confidential information 
intended only for the addressee(s) indicated. The sender does not waive any of 
its rights, privileges or protections respecting this information. If you are 
not the named addressee, an employee, or agent responsible for sending this 
message to the named addressee (or this message was received by mistake), you 
are not authorized to read, print, retain, copy or disseminate this message or 
any part of it. If received in error, please notify us immediately by e-mail, 
discard any paper copies and delete all electronic files of the email.

Computer viruses can be transmitted via email. The recipient should check this 
email and any attachments for viruses. Email transmission cannot be guaranteed 
to be secured or error-free as information could be intercepted, corrupted, 
lost, destroyed, arrive late or incomplete, or contain viruses. The sender 
accepts no liability for any damage caused by any transmitted viruses or errors 
or omissions in the contents of this message.

Overture Networks, Inc. 637 Davis Drive, Morrisville, NC USA 27560 
www.overturenetworks.com

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


Regarding Extension of Net-SNMP agent

2012-09-24 Thread RaviRaja M
Hi,

Actually after installation of Net-SNMP is didn't get any EXAMPLE.conf
file installed in the src directory. I Request to give some assistance on
Extending the agent because i am unable to get the CPU Usage by the
UCD-SNMP MIB   with the OID's.

Regards,
RaviRaja. M
--
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