problem in sending more than one trap

This is a discussion on problem in sending more than one trap within the SNMP Users forums, part of the Networking and Network Related category; --===============0066337632== Content-Type: multipart/alternative; boundary="----=_Part_129405_479195.1167804243760" ------=_Part_129405_479195.1167804243760 Content-Type: text/plain; charset=ISO-8859-1; ...


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

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-03-2007
payal singla
 
Posts: n/a
Default problem in sending more than one trap

--===============0066337632==
Content-Type: multipart/alternative;
boundary="----=_Part_129405_479195.1167804243760"

------=_Part_129405_479195.1167804243760
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I had written a code which sends the trap if host-name is changed.
the code is working fine for the first time, but when we try to change the
host-name for the second time
we get the error :

"No support for any checked transport domain"
snmptrap: unknown host (127.0.0.1)

In main ()
The code is to check the hostname from proc file, infinitely in while loop
and as soon as it detects the change a trap function is called.
In trap(),
We are mainly initializing the session , opening the session, creating pdu,
sending the pdu(trap) n closing the session.
main commands used for the above are:
snmp_open
snmp_pdu_create(SNMP_MSG_TRAP2)
snmp_send
snmp_close

since we are able to receive the trap for the first time, this means that we
are going on the right track. but for the next time when we change that
host-name again, there is some problem related to the session as the
snmp_open commands fails and returns NULL.
Kindly point out the things which we might be missing

Thanks,
Payal Singla

------=_Part_129405_479195.1167804243760
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,<br><br>I had written a code which sends the trap if host-name is changed.<br>the code is working fine for the first time, but when we try to change the host-name for the second time<br>we get the error&nbsp; :<br><br>&quot;No support for any checked transport domain&quot;
<br>snmptrap: unknown host (<a href="http://127.0.0.1">127.0.0.1</a>)<br><br>In main ()<br>The code is to check the hostname from proc file, infinitely in while loop and as soon as it detects the change a trap function is called.
<br>In trap(),<br>We are mainly initializing the session , opening&nbsp; the session, creating pdu, sending the pdu(trap) n closing the session.<br>main commands used for the above are:<br>snmp_open<br>snmp_pdu_create(SNMP_MSG_TRAP 2)
<br>snmp_send<br>snmp_close<br><br>since we are able to receive the trap for the first time, this means that we are going on the right track. but for the next time when we change that host-name again, there is some problem related to the session as the snmp_open commands fails and returns NULL.
<br>Kindly point out the things which we might be missing<br><br>Thanks, <br>Payal Singla

------=_Part_129405_479195.1167804243760--


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

--===============0066337632==--

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 04:59 AM.


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