[prev in list] [next in list] [prev in thread] [next in thread]
List: net-snmp-users
Subject: Trying to GET the details of unauthorized user
From: "Kumar Sanjay-XJD784" <xjd784 () motorolasolutions ! com>
Date: 2011-03-28 8:18:26
Message-ID: 8CF7B9626A8DD146B9D1190EC148178006D67C86 () zmy16exm62 ! ds ! mot ! com
[Download RAW message or body]
--===============6660909102312936904==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01CBED20.B718A16C"
This is a multi-part message in MIME format.
Hi All,
I am trying to GET the details of unauthorized user, trying
to access the SNMP Agent.
For that I am trying to get the snmpv3 access details in function
"usm_process_in_msg" in snmpusm.c
Here I am trying to get IP address of the V3 user from
"netsnmp_session * sess, /* IN - session which got the message
*/"
a function parameter to "usm_process_in_msg",
there is an element in data structure "netsnmp_session" char
*peername; /* Domain name or dotted IP address of default peer */
snmp_log( LOG_INFO, "sanjay unknown username: %s ** ip:%s ** %x ** \n",
secName, sess->peername, sess->peername );
Output:
user.info snmpd: sanjay unknown username: mot ** ip:(null) ** 0 **
But unfortunately peername is "null" string.
Could someone help me out where I need to update the netsnmp_session
structure
so the I will be able to get the IP Address in "usm_process_in_msg" ?
Thanks,
Sanjay
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.6058" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011>Hi
All,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011>
I am trying to GET the details of unauthorized user, trying to access
the SNMP Agent.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011>For that I am
trying to get the snmpv3 access details in function <STRONG>"usm_process_in_msg"
in snmpusm.c</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011>Here I
am trying to get IP address of the V3 user from
"netsnmp_session * sess, /* IN -
session which got the message */" </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011>a function parameter
to "usm_process_in_msg", </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011>there is an element
in data structure "netsnmp_session"
char *peername; /* Domain
name or dotted IP address of default peer */</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#ff0000 size=2><SPAN
class=739000108-28032011><STRONG>snmp_log( LOG_INFO, "sanjay unknown username:
%s ** ip:%s ** %x ** \n", secName, sess->peername, sess->peername
);</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#ff0000 size=2><SPAN
class=739000108-28032011><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#ff0000 size=2><SPAN
class=739000108-28032011><STRONG>Output: </STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#ff0000 size=2><SPAN
class=739000108-28032011><STRONG>user.info snmpd: sanjay unknown username: mot
** ip:(null) ** 0 **</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011><STRONG>But
unfortunately peername is "null" string.</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011>Could someone help
me out where I need to update the netsnmp_session structure </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011>so the I will be
able to get the IP Address in <STRONG>"usm_process_in_msg"
?</STRONG></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011><STRONG></STRONG></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=739000108-28032011>Thanks,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=739000108-28032011>Sanjay
<BR><BR></DIV></SPAN></FONT></BODY></HTML>
[Attachment #4 (--===============6660909102312936904==)]
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic