Fwd: Error in Packet. ,,Please discard this E-mail

This is a discussion on Fwd: Error in Packet. ,,Please discard this E-mail within the SNMP Users forums, part of the Networking and Network Related category; --0-749088580-1176341690=:40092 Content-Type: multipart/alternative; boundary="0-135083851-1176341690=:40092" --0-135083851-1176341690=:40092 Content-...


Go Back   Usenet Forums > Networking and Network Related > SNMP Users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-12-2007
Reza Salehi
 
Posts: n/a
Default Fwd: Error in Packet. ,,Please discard this E-mail

--0-749088580-1176341690=:40092
Content-Type: multipart/alternative; boundary="0-135083851-1176341690=:40092"

--0-135083851-1176341690=:40092
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Please discard my previous E-mail. I found the problem.It should be a return at end of my handler subroutine .

Thanks again,
Reza

Note: forwarded message attached.


---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
--0-135083851-1176341690=:40092
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<DIV>Please discard my previous E-mail. I found the problem.It should be a return at end of my handler subroutine .</DIV> <DIV>&nbsp;</DIV> <DIV>Thanks again,</DIV> <DIV>Reza<BR><BR>Note: forwarded message attached.</DIV><p>
<hr size=1>Don't be flakey. <a href="http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail">Get Yahoo! Mail for Mobile</a> and <br><a href="http://us.rd.yahoo.com/evt=43909/*http://mobile.yahoo.com/mail">always stay connected</a> to friends.
--0-135083851-1176341690=:40092--
--0-749088580-1176341690=:40092
Content-Type: message/rfc822

X-Apparently-To: rezsalehi@yahoo.com via 206.190.49.76;
Wed, 11 Apr 2007 17:58:23 -0700
X-Originating-IP: [66.35.250.225]
Authentication-Results: mta546.mail.mud.yahoo.com from=lists.sourceforge.net;
domainkeys=neutral (no sig)
Received: from 66.35.250.225 (EHLO lists-outbound.sourceforge.net)
(66.35.250.225)
by mta546.mail.mud.yahoo.com with SMTP; Wed, 11 Apr 2007 17:58:18 -0700
Received: from sc8-sf-list2-new.sourceforge.net
(sc8-sf-list2-new-b.sourceforge.net [10.3.1.94])
by sc8-sf-spam2.sourceforge.net (Postfix) with ESMTP
id B5FF71608B; Wed, 11 Apr 2007 17:58:16 -0700 (PDT)
Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91]
helo=mail.sourceforge.net)
by sc8-sf-list2-new.sourceforge.net with esmtp (Exim 4.43)
id 1Hbnbc-0004ER-2W for net-snmp-users@lists.sourceforge.net;
Wed, 11 Apr 2007 17:56:10 -0700
Received: from web53210.mail.re2.yahoo.com ([206.190.49.80])
by mail.sourceforge.net with smtp (Exim 4.44) id 1Hbnbe-0002gU-29
for net-snmp-users@lists.sourceforge.net;
Wed, 11 Apr 2007 17:56:10 -0700
Received: (qmail 82074 invoked by uid 60001); 12 Apr 2007 00:56:03 -0000
X-YMail-OSG: 7WV0Xz4VM1kIN4sl1FpBvtGp.NZ0crKdYa2qL1Rd
Received: from [209.31.221.227] by web53210.mail.re2.yahoo.com via HTTP;
Wed, 11 Apr 2007 17:56:03 PDT
Date: Wed, 11 Apr 2007 17:56:03 -0700 (PDT)
From: Reza Salehi <rezsalehi@yahoo.com>
Subject: Error in Packet. ,,Reason: (gen Error) A general Failure occured)
To: SNMP FORUM <net-snmp-users@lists.sourceforge.net>
MIME-Version: 1.0
X-Spam-Score: 2.3 (++)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
See http://spamassassin.org/tag/ for more details.
Report problems to
http://sf.net/tracker/?func=add&group_id=1&atid=200001
2.2 FORGED_YAHOO_RCVD 'From' yahoo.com does not match 'Received'
headers
0.0 HTML_MESSAGE BODY: HTML included in message
0.1 HTML_50_60 BODY: Message is 50% to 60% HTML
X-BeenThere: net-snmp-users@lists.sourceforge.net
X-Mailman-Version: 2.1.8
Precedence: list
List-Id: General discussion forum for net-snmp users
<net-snmp-users.lists.sourceforge.net>
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/net-snmp-users>,
<mailto:net-snmp-users-request@lists.sourceforge.net?subject=unsubscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users>
List-Post: <mailto:net-snmp-users@lists.sourceforge.net>
List-Help: <mailto:net-snmp-users-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/net-snmp-users>,
<mailto:net-snmp-users-request@lists.sourceforge.net?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0276755949=="
Sender: net-snmp-users-bounces@lists.sourceforge.net
Errors-To: net-snmp-users-bounces@lists.sourceforge.net
Content-Length: 2031

--===============0276755949==
Content-Type: multipart/alternative; boundary="0-732188372-1176339363=:81007"
Content-Transfer-Encoding: 8bit

--0-732188372-1176339363=:81007
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


I compiled and ran nstAgentSubagentObject example successfully.Then I added a handler in registration call ( Please see the code below)(a simple subroutine just print a string).I can compile and run my subagent but when I try to run snmpget or snmpset I get the error:

Error in Packet.
Reason: (gen Error) A general Failure occured)
Faild Object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0

If I remark that printf and compile it again then I can retrieve/set MIB through snmpget and set.
If I add a sum or sub in code it wont work again

I really appreciate if somebody can help me.

Regards,
Reza


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

/
static int nstAgentSubagentObject = 2;
/
void
init_nstAgentSubagentObject(void)
{
static oid nstAgentSubagentObject_oid[] =
{ 1, 3, 6, 1, 4, 1, 8072, 2, 4, 1, 1, 2, 0 };
DEBUGMSGTL(("nstAgentSubagentObject",
"Initializing the nstAgentSubagentObject module\n"));


DEBUGMSGTL(("nstAgentSubagentObject",
"Initalizing nstAgentSubagentObject scalar integer. Default value = %d\n",
nstAgentSubagentObject));
netsnmp_register_int_instance("nstAgentSubagentObj ect",
nstAgentSubagentObject_oid,
OID_LENGTH(nstAgentSubagentObject_oid),
&nstAgentSubagentObject,Subhandler);

DEBUGMSGTL(("nstAgentSubagentObject",
"Done initalizing nstAgentSubagentObject module\n"));
}

int Subhandler(netsnmp_mib_handler *handler,netsnmp_handler_registration *reginfo,netsnmp_agent_request_info *reqinfo,netsnmp_request_info *requests)
{
int temp,uu,xx;
// printf("this is a test \n");
temp=0;
uu=0;
temp=25;
uu=34;
xx=123;
// xx++;


}


---------------------------------
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains.
--0-732188372-1176339363=:81007
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<DIV>&nbsp;</DIV> <DIV>I compiled and ran nstAgentSubagentObject example successfully.Then I added a handler in registration call ( Please see the code below)(a simple subroutine just print a string).I can compile and run my subagent but when I try to run&nbsp; snmpget or snmpset I get the error:</DIV> <DIV><STRONG></STRONG>&nbsp;</DIV> <DIV><STRONG>Error in Packet.</STRONG></DIV> <DIV><STRONG>Reason: (gen Error) A general Failure occured)</STRONG></DIV> <DIV><STRONG>Faild Object: NET-SNMP-TUTORIAL-MIB::nstAgentSubagentObject.0</STRONG></DIV> <DIV>&nbsp;</DIV> <DIV>If I remark that printf and compile it again then I can retrieve/set&nbsp;&nbsp;MIB &nbsp;through snmpget and set. </DIV> <DIV>If I add a sum or sub&nbsp;in code it &nbsp;wont work again</DIV> <DIV>&nbsp;</DIV> <DIV>I really appreciate if somebody&nbsp; can help me.</DIV> <DIV>&nbsp;</DIV> <DIV>Regards,</DIV> <DIV>Reza</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV><FONT color=#0000ff size=2>
<DIV>#include</FONT><FONT size=2> &lt;net-snmp/net-snmp-config.h&gt;</DIV></FONT><FONT color=#0000ff size=2> <DIV>#include</FONT><FONT size=2> &lt;net-snmp/net-snmp-includes.h&gt;</DIV></FONT><FONT color=#0000ff size=2> <DIV>#include</FONT><FONT size=2> &lt;net-snmp/agent/net-snmp-agent-includes.h&gt;</DIV></FONT><FONT color=#0000ff size=2> <DIV>#include</FONT><FONT size=2> "nstAgentSubagentObject.h"</DIV> <DIV>&nbsp;</DIV> <DIV>/</DIV></FONT><FONT color=#0000ff size=2> <DIV>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> nstAgentSubagentObject = 2;</DIV> <DIV>/</DIV></FONT><FONT color=#0000ff size=2> <DIV>void</DIV></FONT><FONT size=2> <DIV>init_nstAgentSubagentObject(</FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2>)</DIV> <DIV>{</DIV> <DIV></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> oid nstAgentSubagentObject_oid[] =</DIV> <DIV>{ 1, 3, 6, 1, 4, 1, 8072, 2, 4, 1, 1, 2, 0 };</DIV>
<DIV>DEBUGMSGTL(("nstAgentSubagentObject",</DIV> <DIV>"Initializing the nstAgentSubagentObject module\n"));</DIV> <DIV>&nbsp;</DIV> <DIV></DIV> <DIV>DEBUGMSGTL(("nstAgentSubagentObject",</DIV> <DIV>"Initalizing nstAgentSubagentObject scalar integer. Default value = %d\n",</DIV> <DIV>nstAgentSubagentObject));</DIV> <DIV>netsnmp_register_int_instance("nstAgentSubage ntObject",</DIV> <DIV>nstAgentSubagentObject_oid,</DIV> <DIV>OID_LENGTH(nstAgentSubagentObject_oid),</DIV> <DIV>&amp;nstAgentSubagentObject,<STRONG>Subhandle r</STRONG>);</DIV> <DIV>&nbsp;</DIV> <DIV>DEBUGMSGTL(("nstAgentSubagentObject",</DIV> <DIV>"Done initalizing nstAgentSubagentObject module\n"));</DIV> <DIV>}</DIV> <DIV>&nbsp;</DIV></FONT><FONT color=#0000ff size=2> <DIV>int</FONT><FONT size=2> <STRONG>Subhandler</STRONG>(netsnmp_mib_handler *handler,netsnmp_handler_registration *reginfo,netsnmp_agent_request_info *reqinfo,netsnmp_request_info *requests)</DIV> <DIV>{</DIV> <DIV></FONT><FONT
color=#0000ff size=2>int</FONT><FONT size=2> temp,uu,xx; </DIV> <DIV></FONT><FONT color=#008000 size=2>// printf("this is a test \n");</DIV></FONT><FONT size=2> <DIV>temp=0;</DIV> <DIV>uu=0; </DIV> <DIV>temp=25;</DIV> <DIV>uu=34;</DIV> <DIV>xx=123;</DIV> <DIV></FONT><FONT color=#008000 size=2>// xx++;</DIV> <DIV>&nbsp;</DIV> <DIV>&nbsp;</DIV></FONT><FONT size=2> <DIV>}</DIV></FONT><p>
<hr size=1>Finding fabulous fares is fun.<br><a href="http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVpBF9TAzk3NDA3NTg5BF9z AzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS 0wNw--
">Let Yahoo! FareChase search your favorite travel sites</a> to find flight and hotel bargains.
--0-732188372-1176339363=:81007--


--===============0276755949==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
--===============0276755949==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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/...net-snmp-users

--===============0276755949==--


--0-749088580-1176341690=:40092
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?p...rge&CID=DEVDEV
--0-749088580-1176341690=:40092
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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/...net-snmp-users

--0-749088580-1176341690=:40092--

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:02 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0