This is a discussion on Re: about agentx support in windows - SNMP ; --===============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 ...
--===============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, bhushanwrote:
>
> 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 Shieldwrote:
> >
> > On 04/12/06, bhushanwrote:
> > > 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,
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 . SonawaneOn 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 <.T.Shield@csc.liv.ac.uk" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
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--
--===============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==--