This is a discussion on Re: about agentx support in windows within the SNMP Coders forums, part of the Networking and Network Related category; --===============0512877347== Content-Type: multipart/alternative; boundary="----=_Part_1346_7434487.1165298977307" ------=_Part_1346_7434487.1165298977307 Content-Type: text/plain; charset=ISO-8859-1; ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
--===============0512877347==
Content-Type: multipart/alternative; boundary="----=_Part_1346_7434487.1165298977307" ------=_Part_1346_7434487.1165298977307 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, Sir the code that i have given in last mail. I tried that code to run in linux it run properly in linux this is log of snmpd process running on linux after receiving trap from my code Received 80 bytes from 127.0.0.1 0000: 01 01 00 00 00 00 00 00 00 00 00 00 21 75 CC 67 ............!u.g 0016: 3C 00 00 00 00 00 00 00 05 04 00 00 01 00 00 00 <............... 0032: 88 1F 00 00 03 00 00 00 02 00 00 00 0A 00 00 00 ................ 0048: 19 00 00 00 4E 65 74 2D 53 4E 4D 50 20 41 67 65 ....Net-SNMP Age 0064: 6E 74 58 20 73 75 62 2D 61 67 65 6E 74 00 00 00 ntX sub-agent... Sending 88 bytes to 127.0.0.1 0000: 01 12 00 00 0A 00 00 00 00 00 00 00 21 75 CC 67 ............!u.g 0016: 44 00 00 00 25 26 00 00 00 00 00 00 04 00 00 00 D...%&.......... 0032: 05 04 00 00 01 00 00 00 88 1F 00 00 03 00 00 00 ................ 0048: 02 00 00 00 0A 00 00 00 19 00 00 00 4E 65 74 2D ............Net- 0064: 53 4E 4D 50 20 41 67 65 6E 74 58 20 73 75 62 2D SNMP AgentX sub- 0080: 61 67 65 6E 74 00 00 00 agent... Received 152 bytes from 127.0.0.1 0000: 01 0C 00 00 0A 00 00 00 00 00 00 00 22 75 CC 67 ............"u.g 0016: 84 00 00 00 43 00 00 00 04 02 00 00 01 00 00 00 ....C........... 0032: 01 00 00 00 03 00 00 00 00 00 00 00 2A 26 00 00 ............*&.. 0048: 06 00 00 00 06 06 00 00 03 00 00 00 01 00 00 00 ................ 0064: 01 00 00 00 04 00 00 00 01 00 00 00 00 00 00 00 ................ 0080: 04 04 01 00 01 00 00 00 05 42 00 00 00 00 00 00 .........B...... 0096: 01 00 00 00 04 00 00 00 04 04 00 00 01 00 00 00 ................ 0112: 05 42 00 00 04 00 00 00 00 00 00 00 17 00 00 00 .B.............. 0128: 74 65 73 74 69 6E 67 20 74 72 61 70 20 69 6E 20 testing trap in 0144: 77 69 6E 64 6F 77 73 00 windows. Sending 110 bytes to 127.0.0.1 0000: 30 6C 02 01 01 04 06 70 75 62 6C 69 63 A7 5F 02 0l.....public._. 0016: 04 08 5D 5C 03 02 01 00 02 01 00 30 51 30 0E 06 ..]\.......0Q0.. 0032: 08 2B 06 01 02 01 01 03 00 43 02 26 2A 30 18 06 .+.......C.&*0.. 0048: 0A 2B 06 01 06 03 01 01 04 01 00 06 0A 2B 06 01 .+...........+.. 0064: 04 01 81 84 05 00 01 30 25 06 0A 2B 06 01 04 01 .......0%..+.... 0080: 81 84 05 04 00 04 17 74 65 73 74 69 6E 67 20 74 .......testing t 0096: 72 61 70 20 69 6E 20 77 69 6E 64 6F 77 73 rap in windows Sending 160 bytes to 127.0.0.1 0000: 01 12 00 00 0A 00 00 00 00 00 00 00 22 75 CC 67 ............" u.g 0016: 8C 00 00 00 2B 26 00 00 00 00 00 00 43 00 00 00 ....+&......C... 0032: 04 02 00 00 01 00 00 00 01 00 00 00 03 00 00 00 ................ 0048: 00 00 00 00 2A 26 00 00 06 00 00 00 06 06 00 00 ....*&.......... 0064: 03 00 00 00 01 00 00 00 01 00 00 00 04 00 00 00 ................ 0080: 01 00 00 00 00 00 00 00 04 04 01 00 01 00 00 00 ................ 0096: 05 42 00 00 00 00 00 00 01 00 00 00 04 00 00 00 .B.............. 0112: 04 04 00 00 01 00 00 00 05 42 00 00 04 00 00 00 .........B...... 0128: 00 00 00 00 17 00 00 00 74 65 73 74 69 6E 67 20 ........testing 0144: 74 72 61 70 20 69 6E 20 77 69 6E 64 6F 77 73 00 trap in windows. According to this log I understand that all trap received by snmpd but when the same code i run under windows trap are not received by snmpd even if i tried to sniff packet send by my code on localhost using "Colasoft Capsa 5.5 Enterprise Demo" tool still no packet received by this tool also, my intepritation is that packet i.e. trap not at all send by send_v2trap i.e. code that i mentioned in earlier mail. so what may be the problem ? Is this problem with windows ? just to aid you i compile my code as follow in windows C:\NETSNMP\Code>cl /MD subagent.c /link netsnmp.lib wsock32.lib advapi32.lib netsnmpagent.lib netsnmpmibs.lib netsnmphelpers.lib Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved. subagent.c Microsoft (R) Incremental Linker Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. /out:subagent.exe netsnmp.lib wsock32.lib advapi32.lib netsnmpagent.lib netsnmpmibs.lib netsnmphelpers.lib subagent.obj LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library Thanks in advance Regards Bhushan. E . Sonawane On 12/4/06, bhushan <sonawanebhushan@gmail.com> wrote: > > sorry sir > By typing mistake i made that mistake in mail. > both port numbers setting are same still main agent not getting > packet of subagent(i.e. traps). > what may be the problem? > sorry for my typing mistake again > Thanks > Regards > Bhushan. E . Sonawane > > On 12/4/06, Dave Shield <D.T.Shield@csc.liv.ac.uk> wrote: > > > > On 04/12/06, bhushan <sonawanebhushan@gmail.com> wrote: > > > for agentx support enabling i putted following line in my snmpd.conf > > > master agentx > > > agentXSocket tcp: 127.0.0.1:755 > > > > So the master agent is listening on port 755 > > > > > > > char *cptr= "tcp:localhost:705"; > > > netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, > > > NETSNMP_DS_AGENT_X_SOCKET, cptr); > > > > But the client is connecting to port 705 > > > > That won't work - the two configurations must match. > > > > Dave > > > > > > -- > > -- ------=_Part_1346_7434487.1165298977307 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello,<br>Sir the code that i have given in last mail. I tried that code to run in linux <br>it run properly in linux this is log of snmpd process running on linux after receiving <br>trap from my code<br><br>Received 80 bytes from <a href="http://127.0.0.1/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 127.0.0.1</a><br>0000: 01 01 00 00 00 00 00 00 00 00 00 00 21 75 CC 67 ............!u.g<br>0016: 3C 00 00 00 00 00 00 00 05 04 00 00 01 00 00 00 <...............<br>0032: 88 1F 00 00 03 00 00 00 02 00 00 00 0A 00 00 00 ................ <br>0048: 19 00 00 00 4E 65 74 2D 53 4E 4D 50 20 41 67 65 ....Net-SNMP Age<br>0064: 6E 74 58 20 73 75 62 2D 61 67 65 6E 74 00 00 00 ntX sub-agent...<br> <br> <br>Sending 88 bytes to <a href="http://127.0.0.1/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 127.0.0.1</a><br>0000: 01 12 00 00 0A 00 00 00 00 00 00 00 21 75 CC 67 ............!u.g<br>0016: 44 00 00 00 25 26 00 00 00 00 00 00 04 00 00 00 D...%&..........<br>0032: 05 04 00 00 01 00 00 00 88 1F 00 00 03 00 00 00 ................ <br>0048: 02 00 00 00 0A 00 00 00 19 00 00 00 4E 65 74 2D ............Net-<br>0064: 53 4E 4D 50 20 41 67 65 6E 74 58 20 73 75 62 2D SNMP AgentX sub-<br>0080: 61 67 65 6E 74 00 00 00 &n bsp; &nbs p; agent... <br> <br> <br>Received 152 bytes from <a href="http://127.0.0.1/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">127.0.0.1</a><br>0000: 01 0C 00 00 0A 00 00 00 00 00 00 00 22 75 CC 67 ............" u.g<br>0016: 84 00 00 00 43 00 00 00 04 02 00 00 01 00 00 00 ....C........... <br>0032: 01 00 00 00 03 00 00 00 00 00 00 00 2A 26 00 00 ............*&..<br>0048: 06 00 00 00 06 06 00 00 03 00 00 00 01 00 00 00 ................<br>0064: 01 00 00 00 04 00 00 00 01 00 00 00 00 00 00 00 ................ <br>0080: 04 04 01 00 01 00 00 00 05 42 00 00 00 00 00 00 .........B......<br>0096: 01 00 00 00 04 00 00 00 04 04 00 00 01 00 00 00 ................<br>0112: 05 42 00 00 04 00 00 00 00 00 00 00 17 00 00 00 .B.............. <br>0128: 74 65 73 74 69 6E 67 20 74 72 61 70 20 69 6E 20 testing trap in<br>0144: 77 69 6E 64 6F 77 73 00 &n bsp; &nbs p; windows.<br> <br> <br>Sending 110 bytes to <a href="http://127.0.0.1/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> 127.0.0.1 </a><br>0000: 30 6C 02 01 01 04 06 70 75 62 6C 69 63 A7 5F 02 0l.....public._.<br>0016: 04 08 5D 5C 03 02 01 00 02 01 00 30 51 30 0E 06 ..]\.......0Q0..<br>0032: 08 2B 06 01 02 01 01 03 00 43 02 26 2A 30 18 06 .+.......C.&*0.. <br>0048: 0A 2B 06 01 06 03 01 01 04 01 00 06 0A 2B 06 01 .+...........+..<br>0064: 04 01 81 84 05 00 01 30 25 06 0A 2B 06 01 04 01 .......0%..+....<br>0080: 81 84 05 04 00 04 17 74 65 73 74 69 6E 67 20 74 .......testing t <br>0096: 72 61 70 20 69 6E 20 77 69 6E 64 6F 77 73 rap in windows<br> <br> <br>Sending 160 bytes to <a href="http://127.0.0.1/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">127.0.0.1 </a><br>0000: 01 12 00 00 0A 00 00 00 00 00 00 00 22 75 CC 67 ............" u.g<br>0016: 8C 00 00 00 2B 26 00 00 00 00 00 00 43 00 00 00 ....+&......C...<br>0032: 04 02 00 00 01 00 00 00 01 00 00 00 03 00 00 00 ................<br>0048: 00 00 00 00 2A 26 00 00 06 00 00 00 06 06 00 00 ....*&.......... <br>0064: 03 00 00 00 01 00 00 00 01 00 00 00 04 00 00 00 ................<br>0080: 01 00 00 00 00 00 00 00 04 04 01 00 01 00 00 00 ................<br>0096: 05 42 00 00 00 00 00 00 01 00 00 00 04 00 00 00 .B.............. <br>0112: 04 04 00 00 01 00 00 00 05 42 00 00 04 00 00 00 .........B......<br>0128: 00 00 00 00 17 00 00 00 74 65 73 74 69 6E 67 20 ........testing<br>0144: 74 72 61 70 20 69 6E 20 77 69 6E 64 6F 77 73 00 trap in windows. <br><br><br><br>According to this log I understand that all trap received by snmpd<br>but when the same code i run under windows trap are not received by snmpd<br>even if i tried to sniff packet send by my code on localhost using <br>"Colasoft Capsa 5.5 Enterprise Demo" tool still no packet received by this tool <br>also, my intepritation is that packet i.e. trap not at all send by send_v2trap i.e. code <br>that i mentioned in earlier mail. so what may be the problem ? <br>Is this problem with windows ?<br>just to aid you i compile my code as follow in windows<br><br>C:\NETSNMP\Code>cl /MD subagent.c /link netsnmp.lib wsock32.lib advapi32.lib netsnmpagent.lib netsnmpmibs.lib netsnmphelpers.lib <br>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86<br>Copyright (C) Microsoft Corp 1984-1998. All rights reserved.<br>subagent.c<br>Microsoft (R) Incremental Linker Version 6.00.8168<br>Copyright (C) Microsoft Corp 1992-1998. All rights reserved. <br>/out:subagent.exe<br>netsnmp.lib<br>wsock32.lib<br> advapi32.lib<br>netsnmpagent.lib<br>netsnmpmibs.li b<br>netsnmphelpers.lib<br>subagent.obj<br>LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; use /NODEFAULTLIB:library <br><br>Thanks in advance<br>Regards <br>Bhushan. E . Sonawane<br><br><br><div><span class="gmail_quote">On 12/4/06, <b class="gmail_sendername">bhushan</b> <<a href="mailto:sonawanebhushan@gmail.com">sonawanebh ushan@gmail.com </a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> sorry sir <br> By typing mistake i made that mistake in mail.<br> both port numbers setting are same still main agent not getting <br> packet of subagent(i.e. traps).<br> what may be the problem?<br> sorry for my typing mistake again <br> Thanks<br> Regards<br><span class="sg"> Bhushan. E . Sonawane </span><div><span class="e" id="q_10f4dde6a644b25f_2"><br><br><div><span class="gmail_quote">On 12/4/06, <b class="gmail_sendername">Dave Shield</b> <<a href="mailto:D.T.Shield@csc.liv.ac.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> D.T.Shield@csc.liv.ac.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> On 04/12/06, bhushan <<a href="mailto:sonawanebhushan@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">sonawanebhu shan@gmail.com</a>> wrote:<br>> for agentx support enabling i putted following line in my snmpd.conf<br>> master agentx<br>> agentXSocket tcp: <a href="http://127.0.0.1:755" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">127.0.0.1:7 55</a><br><br>So the master agent is listening on port 755<br><br><br>> char *cptr= "tcp:localhost:705"; <br>> netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID,<b r> > &nbs p; NETSNMP_DS_AGENT_X_SOCKET, cptr);<br><br>But the client is connecting to port 705<br><br>That won't work - the two configurations must match.<br><br>Dave<br></blockquote></div><br><br clear="all"><br></span> </div>-- <br><br> </blockquote></div><br><br clear="all"><br>-- <br><br> ------=_Part_1346_7434487.1165298977307-- --===============0512877347== 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 --===============0512877347== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/...et-snmp-coders --===============0512877347==-- |