Re: snmpd.conf: unknown token: dlmod

2013-01-03 Thread Nuno Magalhães

Ok,

Got it working.
Created a configuration file with:
*agentAddress udp:161,udp6:[::1]:161**
**rocommunity  public localhost**
**dlmod  obu /home/jmpg/.snmp/obu.so*

And did a snmpwalk and it listed more than just the system OIDs.
Furthermore, I found that my OIDs were being listed.
Did a snmpget and it worked.
Giving access to a specific machine was just changing localhost to the 
machine's IP.


Thanks,
Nuno Magalhães.

On 02-01-2013 15:46, Dave Shield wrote:

On 2 January 2013 15:46, Nuno Magalhães  wrote:

Hi Dave,

 From the FAQ and your previous answers I assume
"rocommunity public" in the snmpd.conf gives us all views (more than system
only).

Is this true?

Try it.
What do you see?

Dave



--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712___
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


Re: snmpd.conf: unknown token: dlmod

2013-01-02 Thread Dave Shield
On 2 January 2013 14:59, Nuno Magalhães  wrote:
> Hi Dave,
>
> Furthermore if I execute the command:
> "snmpwalk -v 2c -c public 10.181.30.153 .iso"
>
>
> I get the following output:
[snip]
> iso.3.6.1.2.1.25.1.7.0 = No more variables left in this MIB View (It is past
> the end of the MIB tree)
>
> Which means that .iso.3.6.1.4.1.19278.14.1.2.0 is not registered/recognized
> at server?

No - it probably means that you haven't looked at the FAQ entry
I can see the system group, but nothing else.  Why?


Dave

--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
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


Re: snmpd.conf: unknown token: dlmod

2013-01-02 Thread Nuno Magalhães
Hi Dave,

Furthermore if I execute the command:
"snmpwalk -v 2c -c public 10.181.30.153 .iso"

I get the following output:
iso.3.6.1.2.1.1.1.0 = STRING: "Linux asus-B53E 3.5.0-17-generic 
#28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64"
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10
iso.3.6.1.2.1.1.3.0 = Timeticks: (732) 0:00:07.32
iso.3.6.1.2.1.1.4.0 = STRING: "Me "
iso.3.6.1.2.1.1.5.0 = STRING: "asus-B53E"
iso.3.6.1.2.1.1.6.0 = STRING: "Sitting on the Dock of the Bay"
iso.3.6.1.2.1.1.7.0 = INTEGER: 72
iso.3.6.1.2.1.1.8.0 = Timeticks: (4) 0:00:00.04
iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.10.3.1.1
iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.11.3.1.1
iso.3.6.1.2.1.1.9.1.2.3 = OID: iso.3.6.1.6.3.15.2.1.1
iso.3.6.1.2.1.1.9.1.2.4 = OID: iso.3.6.1.6.3.1
iso.3.6.1.2.1.1.9.1.2.5 = OID: iso.3.6.1.2.1.49
iso.3.6.1.2.1.1.9.1.2.6 = OID: iso.3.6.1.2.1.4
iso.3.6.1.2.1.1.9.1.2.7 = OID: iso.3.6.1.2.1.50
iso.3.6.1.2.1.1.9.1.2.8 = OID: iso.3.6.1.6.3.16.2.2.1
iso.3.6.1.2.1.1.9.1.3.1 = STRING: "The SNMP Management Architecture MIB."
iso.3.6.1.2.1.1.9.1.3.2 = STRING: "The MIB for Message Processing and 
Dispatching."
iso.3.6.1.2.1.1.9.1.3.3 = STRING: "The management information 
definitions for the SNMP User-based Security Model."
iso.3.6.1.2.1.1.9.1.3.4 = STRING: "The MIB module for SNMPv2 entities"
iso.3.6.1.2.1.1.9.1.3.5 = STRING: "The MIB module for managing TCP 
implementations"
iso.3.6.1.2.1.1.9.1.3.6 = STRING: "The MIB module for managing IP and 
ICMP implementations"
iso.3.6.1.2.1.1.9.1.3.7 = STRING: "The MIB module for managing UDP 
implementations"
iso.3.6.1.2.1.1.9.1.3.8 = STRING: "View-based Access Control Model for 
SNMP."
iso.3.6.1.2.1.1.9.1.4.1 = Timeticks: (2) 0:00:00.02
iso.3.6.1.2.1.1.9.1.4.2 = Timeticks: (2) 0:00:00.02
iso.3.6.1.2.1.1.9.1.4.3 = Timeticks: (2) 0:00:00.02
iso.3.6.1.2.1.1.9.1.4.4 = Timeticks: (3) 0:00:00.03
iso.3.6.1.2.1.1.9.1.4.5 = Timeticks: (3) 0:00:00.03
iso.3.6.1.2.1.1.9.1.4.6 = Timeticks: (3) 0:00:00.03
iso.3.6.1.2.1.1.9.1.4.7 = Timeticks: (3) 0:00:00.03
iso.3.6.1.2.1.1.9.1.4.8 = Timeticks: (4) 0:00:00.04
iso.3.6.1.2.1.25.1.1.0 = Timeticks: (1091850) 3:01:58.50
iso.3.6.1.2.1.25.1.2.0 = Hex-STRING: 07 DD 01 02 0E 32 0F 00 2B 00 00
iso.3.6.1.2.1.25.1.3.0 = INTEGER: 1536
iso.3.6.1.2.1.25.1.4.0 = STRING: 
"BOOT_IMAGE=/boot/vmlinuz-3.5.0-17-generic 
root=UUID=2b0abab3-5671-481c-a478-95fdbb285478 ro quiet splash vt.handoff=7"
iso.3.6.1.2.1.25.1.5.0 = Gauge32: 3
iso.3.6.1.2.1.25.1.6.0 = Gauge32: 168
iso.3.6.1.2.1.25.1.7.0 = INTEGER: 0
iso.3.6.1.2.1.25.1.7.0 = No more variables left in this MIB View (It is 
past the end of the MIB tree)

Which means that .iso.3.6.1.4.1.19278.14.1.2.0 is not 
registered/recognized at server?

Regards,
Nuno Magalhães.

On 02-01-2013 13:39, Dave Shield wrote:
> On 2 January 2013 13:12, Nuno Magalhães  wrote:
>> iso.3.6.1.4.1.19278.14.1.2 = No Such Object available on this agent at this 
>> OID
>>
>> What's wrong?
> You've forgotten the instance subidentifier.
>
> ONBOARD-MIB::obuModule1Status appears to be a scalar object,
> so the command you need to use is
> snmpget -v 2c -c public 10.181.30.153 1.3.6.1.4.1.19278.14.1.2.0
>
> Remember, the (sole) instance for a scalar object will *always*
> have an instance subidentifier of 0.
>
> Dave
>


--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
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


Re: snmpd.conf: unknown token: dlmod

2013-01-02 Thread Dave Shield
On 2 January 2013 15:46, Nuno Magalhães  wrote:
> Hi Dave,
>
> From the FAQ and your previous answers I assume
> "rocommunity public" in the snmpd.conf gives us all views (more than system
> only).
>
> Is this true?

Try it.
What do you see?

Dave

--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
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


Re: snmpd.conf: unknown token: dlmod

2013-01-02 Thread Nuno Magalhães
Hi Dave,

 From the FAQ and your previous answers I assume
"rocommunity public" in the snmpd.conf gives us all views (more than 
system only).

Is this true?

Regards,
Nuno Magalhães.



On 02-01-2013 15:03, Dave Shield wrote:
> On 2 January 2013 14:59, Nuno Magalhães  wrote:
>> Hi Dave,
>>
>> Furthermore if I execute the command:
>> "snmpwalk -v 2c -c public 10.181.30.153 .iso"
>>
>>
>> I get the following output:
>  [snip]
>> iso.3.6.1.2.1.25.1.7.0 = No more variables left in this MIB View (It is past
>> the end of the MIB tree)
>>
>> Which means that .iso.3.6.1.4.1.19278.14.1.2.0 is not registered/recognized
>> at server?
> No - it probably means that you haven't looked at the FAQ entry
>  I can see the system group, but nothing else.  Why?
>
>
> Dave
>


--
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
___
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


Re: snmpd.conf: unknown token: dlmod

2013-01-01 Thread Dave Shield
On 1 January 2013 08:01, Bart Van Assche  wrote:
> Note: the Net-SNMP dlmod module has been ported recently to Windows.

Thanks for that, Bart.
This must have happened during my recent sabbatical from the project.
Certainly the code I was looking at didn't seem to support dlmod under
Windows, but I might have been looking at the wrong branch.

Do you know which releases this functionality is included in?
(or is it currently just in the main development trunk?)

Dave

--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
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


Re: snmpd.conf: unknown token: dlmod

2013-01-01 Thread Bart Van Assche
On 12/30/12 01:13, Dave Shield wrote:
> Windows seems to use 'winExtDLL' instead of 'dlmod'

The recommended approach on Unix and Windows for extending Net-SNMP is 
AgentX. This is because AgentX uses interprocess communication and hence 
a bug in an AgentX sub-agent does not affect the snmpd master process. 
The winExtDLL module was developed to allow Net-SNMP to use existing 
extension agents that support Microsoft's SNMP extension agent API. Code 
generated by mib2c uses the Net-SNMP API and hence - when compiled as a 
shared library or DLL - can be loaded by dlmod but not by winExtDLL.

Note: the Net-SNMP dlmod module has been ported recently to Windows. 
Instructions for downloading the latest Net-SNMP git tree can be found 
here: http://net-snmp.sourceforge.net/wiki/index.php/Git. These 
instructions show how to clone the Net-SNMP git tree from the command 
line. If you would prefer to use a GUI, a list of git GUIs for Windows 
can be found here: 
http://stackoverflow.com/questions/157476/what-guis-exist-for-git-on-windows.

Bart.


--
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread nuno . magalhaes
"snmpget -v 1 -c public 127.0.0.1:1161 1.3.6.1.4.1.19278.14.1.3"

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: ONBOARD-MIB::obuModule2Status

"snmpget -v 2c -c public 127.0.0.1:1161 1.3.6.1.4.1.19278.14.1.3"

ONBOARD-MIB::obuModule2Status = No Such Instance currently exists at this OID

Regards,
Nuno Magalhães

Quoting Dave Shield :

>
> On 31 Dec 2012, at 14:08, Nuno Magalhães  wrote:
>
>> Hi Dave,
>>
>> I'm using the latest snmpget.exe from the output binaries just built.
>
> Yes, but what is the exact command you are issuing?
>
> Dave
>




--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread Dave Shield

On 31 Dec 2012, at 14:08, Nuno Magalhães  wrote:

> Hi Dave,
> 
> I'm using the latest snmpget.exe from the output binaries just built.

Yes, but what is the exact command you are issuing?

Dave
--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread Nuno Magalhães
Hi Dave,

I'm using the latest snmpget.exe from the output binaries just built.

Regards,
Nuno Magalhães.


Em 31-12-2012 12:55, Dave Shield escreveu:
> On 31 December 2012 12:32, Nuno Magalhães  wrote:
>> And BTW, why do I receive this message in the snmpget command:
>> --
>> Error in packet
>> Reason: (noSuchName) There is no such variable name in this MIB.
>> Failed object: ONBOARD-MIB::obuModule2Status
> The other question here is:
> what is the snmpget command that you are using?
>
> Dave
>
>
> -
> Não foram detectados vírus nesta  mensagem.
> Verificado por AVG - www.avg.com
> Versão: 2013.0.2805 / Base de dados de Vírus: 2637/5998 - Data de Lançamento: 
> 12/30/12
>
>


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread Dave Shield
On 31 December 2012 12:32, Nuno Magalhães  wrote:
> And BTW, why do I receive this message in the snmpget command:
> --
> Error in packet
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: ONBOARD-MIB::obuModule2Status

The other question here is:
   what is the snmpget command that you are using?

Dave

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread Nuno Magalhães
I think I'm only missing a simple step don't you think?
BTW I'm using win32dll should I use win32 project?

Regards,
Nuno Magalhães.

Em 31-12-2012 12:43, Nuno Magalhães escreveu:
> Hi Dave,
>
> I think so. I'm sending you the source.
>
> Included also the line:
> #include "mibgroup/examples/obu.h"
> in the mib_module_includes.h
>
> and added the line:
> if (should_init("obu")) init_obu();
> in the mib_module_inits.h
>
> Regards,
> Nuno Magalhães.
>
> Em 31-12-2012 12:34, Dave Shield escreveu:
>> On 31 December 2012 12:32, Nuno Magalhães  
>> wrote:
>>> And BTW, why do I receive this message in the snmpget command:
>>> -- 
>>> Error in packet
>>> Reason: (noSuchName) There is no such variable name in this MIB.
>>> Failed object: ONBOARD-MIB::obuModule2Status
>>> -- 
>>> It seems that the correct parameter is addressed but no function on the
>>> backend is processing it.
>> Have you written a function/module to handle this object?
>>
>> Dave
>>
>>
>> -
>> Não foram detectados vírus nesta  mensagem.
>> Verificado por AVG - www.avg.com
>> Versão: 2013.0.2805 / Base de dados de Vírus: 2637/5998 - Data de 
>> Lançamento: 12/30/12
>>
>>
>


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread Nuno Magalhães
Hi Dave,

And BTW, why do I receive this message in the snmpget command:
--
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: ONBOARD-MIB::obuModule2Status
--
It seems that the correct parameter is addressed but no function on the 
backend is processing it.

Regards,
Nuno Magalhães.

Em 31-12-2012 11:57, Nuno Magalhães escreveu:
> Hi Dave,
>
> 1) Compiled the source of the latest realease for win32dll project 
> (with the new extension).
>
> 2)
> Set the MIBDIRS environment variables to "C:\usr\mibs" and put it all 
> there.
> Set the MIBS=ALL environment variable.
> Put the bin directory of the resulting source compilation in the path 
> (a long path but still finds the execs).
>
> 3) When I try to run a command (example snmpget or snmpd) I get the 
> following output:
>
> C:\usr>snmpget -v 1 -c public 127.0.0.1:1161 1.3.6.1.4.1.19278.14.1.2
> MIB search path: C:\usr\mibs
> Cannot find module (SNMPv2-SMI): At line 5 in C:\usr\mibs/UDP-MIB.txt
> Cannot find module (INET-ADDRESS-MIB): At line 8 in 
> C:\usr\mibs/UDP-MIB.txt
> Cannot find module (UDP-MIB): At line 1 in (none)
> Cannot find module (SNMPv2-TC): At line 37 in 
> C:\usr\mibs/UCD-SNMP-MIB.txt
> Cannot find module (UCD-SNMP-MIB): At line 1 in (none)
> Cannot find module (UCD-SNMP-MIB-OLD): At line 1 in (none)
> Cannot find module (UCD-IPFWACC-MIB): At line 1 in (none)
> Cannot find module (UCD-IPFILTER-MIB): At line 1 in (none)
> Cannot find module (UCD-DLMOD-MIB): At line 1 in (none)
> Cannot find module (UCD-DISKIO-MIB): At line 1 in (none)
> Cannot find module (UCD-DEMO-MIB): At line 1 in (none)
> Cannot find module (IPV6-FLOW-LABEL-MIB): At line 15 in 
> C:\usr\mibs/TUNNEL-MIB.txt
> Cannot find module (SNMPv2-MIB): At line 12 in C:\usr\mibs/IF-MIB.txt
> Cannot find module (IANAifType-MIB): At line 13 in C:\usr\mibs/IF-MIB.txt
> Cannot find module (IF-MIB): At line 18 in C:\usr\mibs/TUNNEL-MIB.txt
> Cannot find module (TUNNEL-MIB): At line 1 in (none)
> Cannot find module (TRANSPORT-ADDRESS-MIB): At line 1 in (none)
> Cannot find module (TCP-MIB): At line 1 in (none)
> Cannot find module (SNMPv2-TM): At line 1 in (none)
> Cannot find module (SNMPv2-CONF): At line 1 in (none)
> Cannot find module (SNMP-FRAMEWORK-MIB): At line 11 in 
> C:\usr\mibs/SNMP-VIEW-BASED-ACM-MIB.txt
> Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 1 in (none)
> Cannot find module (SNMP-USER-BASED-SM-MIB): At line 13 in 
> C:\usr\mibs/SNMP-USM-DH-OBJECTS-MIB.txt
> Cannot find module (SNMP-USM-DH-OBJECTS-MIB): At line 1 in (none)
> Cannot find module (SNMP-USM-AES-MIB): At line 1 in (none)
> Cannot find module (SNMP-TSM-MIB): At line 1 in (none)
> Cannot find module (SNMP-TARGET-MIB): At line 16 in 
> C:\usr\mibs/SNMP-TLS-TM-MIB.txt
> Cannot find module (SNMP-TLS-TM-MIB): At line 1 in (none)
> Cannot find module (SNMP-PROXY-MIB): At line 1 in (none)
> Cannot find module (SNMP-NOTIFICATION-MIB): At line 1 in (none)
> Cannot find module (SNMP-MPD-MIB): At line 1 in (none)
> Cannot find module (SNMP-COMMUNITY-MIB): At line 1 in (none)
> Cannot find module (SMUX-MIB): At line 1 in (none)
> Cannot find module (SCTP-MIB): At line 1 in (none)
> Cannot find module (RMON-MIB): At line 1 in (none)
> Cannot find module (RFC-1215): At line 1 in (none)
> Cannot find module (ONBOARD-MIB): At line 1 in (none)
> Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
> Cannot find module (NETWORK-SERVICES-MIB): At line 1 in (none)
> Cannot find module (NET-SNMP-MIB): At line 12 in 
> C:\usr\mibs/NET-SNMP-VACM-MIB.txt
> Cannot find module (NET-SNMP-VACM-MIB): At line 1 in (none)
> Cannot find module (NET-SNMP-TC): At line 1 in (none)
> Cannot find module (NET-SNMP-SYSTEM-MIB): At line 1 in (none)
> Cannot find module (NET-SNMP-PERIODIC-NOTIFY-MIB): At line 1 in (none)
> Cannot find module (NET-SNMP-EXAMPLES-MIB): At line 11 in 
> C:\usr\mibs/NET-SNMP-PASS-MIB.txt
> Cannot find module (NET-SNMP-PASS-MIB): At line 1 in (none)
> Cannot find module (NET-SNMP-MONITOR-MIB): At line 1 in (none)
> Cannot find module (NET-SNMP-AGENT-MIB): At line 8 in 
> C:\usr\mibs/NET-SNMP-EXTEND-MIB.txt
> Cannot find module (NET-SNMP-EXTEND-MIB): At line 1 in (none)
> Cannot find module (MTA-MIB): At line 1 in (none)
> Cannot find module (LM-SENSORS-MIB): At line 1 in (none)
> Cannot find module (IPV6-TC): At line 7 in C:\usr\mibs/IPV6-UDP-MIB.txt
> Cannot find module (IPV6-UDP-MIB): At line 1 in (none)
> Cannot find module (IPV6-TCP-MIB): At line 1 in (none)
> Cannot find module (IPV6-MIB): At line 1 in (none)
> Cannot find module (IPV6-ICMP-MIB): At line 1 in (none)
> Cannot find module (IP-MIB): At line 1 in (none)
> Cannot find module (IANA-RTPROTO-MIB): At line 12 in 
> C:\usr\mibs/IP-FORWARD-MIB.txt
> Cannot find module (IP-FORWARD-MIB): At line 1 in (none)
> Cannot find module (IF-INVERTED-STACK-MIB): At line 1 in (none)
> Cannot find module (IANA-LANGUAGE-MIB): At line 1 in (none)
> Cannot find module (IANA-ADDRESS-FAMILY-NUMBERS-MIB): At line 1

Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread Dave Shield
On 31 December 2012 12:32, Nuno Magalhães  wrote:
> And BTW, why do I receive this message in the snmpget command:
> --
> Error in packet
> Reason: (noSuchName) There is no such variable name in this MIB.
> Failed object: ONBOARD-MIB::obuModule2Status
> --
> It seems that the correct parameter is addressed but no function on the
> backend is processing it.

Have you written a function/module to handle this object?

Dave

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread Dave Shield
On 31 December 2012 11:57, Nuno Magalhães  wrote:
> - Why can't it find the modules? What modules is it referring to?

I'll pass on the MIB file errors - someone more knowledgeable than me about
Windows might be able to help there.   (Though I'm suspicious about the mixture
of forward and backward slashes in the error message).


> - How can I generate configuration files?

Configuration files are simply text files.  You can create them using
any text editor
(notepad, wordpad, etc, etc)

Just create a file containing

rocommunity public

and that should allow you access to all (supported) information

Dave

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-31 Thread Nuno Magalhães
Hi Dave,

1) Compiled the source of the latest realease for win32dll project (with 
the new extension).

2)
Set the MIBDIRS environment variables to "C:\usr\mibs" and put it all 
there.
Set the MIBS=ALL environment variable.
Put the bin directory of the resulting source compilation in the path (a 
long path but still finds the execs).

3) When I try to run a command (example snmpget or snmpd) I get the 
following output:

C:\usr>snmpget -v 1 -c public 127.0.0.1:1161 1.3.6.1.4.1.19278.14.1.2
MIB search path: C:\usr\mibs
Cannot find module (SNMPv2-SMI): At line 5 in C:\usr\mibs/UDP-MIB.txt
Cannot find module (INET-ADDRESS-MIB): At line 8 in C:\usr\mibs/UDP-MIB.txt
Cannot find module (UDP-MIB): At line 1 in (none)
Cannot find module (SNMPv2-TC): At line 37 in C:\usr\mibs/UCD-SNMP-MIB.txt
Cannot find module (UCD-SNMP-MIB): At line 1 in (none)
Cannot find module (UCD-SNMP-MIB-OLD): At line 1 in (none)
Cannot find module (UCD-IPFWACC-MIB): At line 1 in (none)
Cannot find module (UCD-IPFILTER-MIB): At line 1 in (none)
Cannot find module (UCD-DLMOD-MIB): At line 1 in (none)
Cannot find module (UCD-DISKIO-MIB): At line 1 in (none)
Cannot find module (UCD-DEMO-MIB): At line 1 in (none)
Cannot find module (IPV6-FLOW-LABEL-MIB): At line 15 in 
C:\usr\mibs/TUNNEL-MIB.txt
Cannot find module (SNMPv2-MIB): At line 12 in C:\usr\mibs/IF-MIB.txt
Cannot find module (IANAifType-MIB): At line 13 in C:\usr\mibs/IF-MIB.txt
Cannot find module (IF-MIB): At line 18 in C:\usr\mibs/TUNNEL-MIB.txt
Cannot find module (TUNNEL-MIB): At line 1 in (none)
Cannot find module (TRANSPORT-ADDRESS-MIB): At line 1 in (none)
Cannot find module (TCP-MIB): At line 1 in (none)
Cannot find module (SNMPv2-TM): At line 1 in (none)
Cannot find module (SNMPv2-CONF): At line 1 in (none)
Cannot find module (SNMP-FRAMEWORK-MIB): At line 11 in 
C:\usr\mibs/SNMP-VIEW-BASED-ACM-MIB.txt
Cannot find module (SNMP-VIEW-BASED-ACM-MIB): At line 1 in (none)
Cannot find module (SNMP-USER-BASED-SM-MIB): At line 13 in 
C:\usr\mibs/SNMP-USM-DH-OBJECTS-MIB.txt
Cannot find module (SNMP-USM-DH-OBJECTS-MIB): At line 1 in (none)
Cannot find module (SNMP-USM-AES-MIB): At line 1 in (none)
Cannot find module (SNMP-TSM-MIB): At line 1 in (none)
Cannot find module (SNMP-TARGET-MIB): At line 16 in 
C:\usr\mibs/SNMP-TLS-TM-MIB.txt
Cannot find module (SNMP-TLS-TM-MIB): At line 1 in (none)
Cannot find module (SNMP-PROXY-MIB): At line 1 in (none)
Cannot find module (SNMP-NOTIFICATION-MIB): At line 1 in (none)
Cannot find module (SNMP-MPD-MIB): At line 1 in (none)
Cannot find module (SNMP-COMMUNITY-MIB): At line 1 in (none)
Cannot find module (SMUX-MIB): At line 1 in (none)
Cannot find module (SCTP-MIB): At line 1 in (none)
Cannot find module (RMON-MIB): At line 1 in (none)
Cannot find module (RFC-1215): At line 1 in (none)
Cannot find module (ONBOARD-MIB): At line 1 in (none)
Cannot find module (NOTIFICATION-LOG-MIB): At line 1 in (none)
Cannot find module (NETWORK-SERVICES-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-MIB): At line 12 in 
C:\usr\mibs/NET-SNMP-VACM-MIB.txt
Cannot find module (NET-SNMP-VACM-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-TC): At line 1 in (none)
Cannot find module (NET-SNMP-SYSTEM-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-PERIODIC-NOTIFY-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-EXAMPLES-MIB): At line 11 in 
C:\usr\mibs/NET-SNMP-PASS-MIB.txt
Cannot find module (NET-SNMP-PASS-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-MONITOR-MIB): At line 1 in (none)
Cannot find module (NET-SNMP-AGENT-MIB): At line 8 in 
C:\usr\mibs/NET-SNMP-EXTEND-MIB.txt
Cannot find module (NET-SNMP-EXTEND-MIB): At line 1 in (none)
Cannot find module (MTA-MIB): At line 1 in (none)
Cannot find module (LM-SENSORS-MIB): At line 1 in (none)
Cannot find module (IPV6-TC): At line 7 in C:\usr\mibs/IPV6-UDP-MIB.txt
Cannot find module (IPV6-UDP-MIB): At line 1 in (none)
Cannot find module (IPV6-TCP-MIB): At line 1 in (none)
Cannot find module (IPV6-MIB): At line 1 in (none)
Cannot find module (IPV6-ICMP-MIB): At line 1 in (none)
Cannot find module (IP-MIB): At line 1 in (none)
Cannot find module (IANA-RTPROTO-MIB): At line 12 in 
C:\usr\mibs/IP-FORWARD-MIB.txt
Cannot find module (IP-FORWARD-MIB): At line 1 in (none)
Cannot find module (IF-INVERTED-STACK-MIB): At line 1 in (none)
Cannot find module (IANA-LANGUAGE-MIB): At line 1 in (none)
Cannot find module (IANA-ADDRESS-FAMILY-NUMBERS-MIB): At line 1 in (none)
Cannot find module (HOST-RESOURCES-MIB): At line 5 in 
C:\usr\mibs/HOST-RESOURCES-TYPES.txt
Cannot find module (HOST-RESOURCES-TYPES): At line 1 in (none)
Cannot find module (HCNUM-TC): At line 1 in (none)
Cannot find module (EtherLike-MIB): At line 1 in (none)
Cannot find module (DISMAN-PING-MIB): At line 22 in 
C:\usr\mibs/DISMAN-TRACEROUTE-MIB.txt
Cannot find module (DISMAN-TRACEROUTE-MIB): At line 1 in (none)
Cannot find module (DISMAN-SCRIPT-MIB): At line 1 in (none)
Cannot find module (DISMAN-SCHEDULE-MIB): At line 1 in (none)
Can

Re: snmpd.conf: unknown token: dlmod

2012-12-30 Thread Dave Shield
On 30 December 2012 05:30, Nuno Magalhães  wrote:
> Hi Dave,
>
> So, how do I extend the functionality of an agent in windows (i.e.:
> defining, monitoring and trapping new OID's).

The design of the Net-SNMP agent is such that a MIB module
(as generated by mib2c) can be used in one of three ways:
  - compiled into the main SNMP agent
  - as a dynamically loaded module (i.e. dlmod)
  - as an AgentX subagent

Personally, I tend to feel that compiling the module into the main
agent is the simplest way to get started.   So you could take the
code that you were trying to load dynamically, and compile this
into the main agent directly.
   See the section of the README.win32 file headed
"Microsoft Visual C++ - Extending the Agent" for more details.
(You could also use this description to omit the MIB modules
 that you're not interested in, which would avoid having to
 disable them using -I-)


Dave

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-29 Thread Nuno Magalhães
Hi Dave,

So, how do I extend the functionality of an agent in windows (i.e.: 
defining, monitoring and trapping new OID's).

Can you give me an example/steps starting with the mib2c.exe command.

Thanks in advance,
Nuno Magalhães.

Em 30-12-2012 00:13, Dave Shield escreveu:
> On 29 December 2012 22:00, Nuno Magalhães  wrote:
>> I thought I was only enabling debug for dlmod token -Ddlmod.
> My apologies - I'd misread the command you were using to start the agent.
> You are quite correct.
>
>
>> Even if I simply call snmpd.exe with no parameters the error persists.
> Looking at the code that includes the dlmod module  (in ucd_snmp.h):
>
>  #if defined(HAVE_DLFCN_H) && defined(HAVE_DLOPEN)
>  config_require(ucd-snmp/dlmod)
>  #endif
>
> I'm not convinced that this module is supported under Windows.
> Certainly the standard Windows version of the net-snmp-config.h
> file  doesn't define either of these two tokens.
>
>Windows seems to use 'winExtDLL' instead of 'dlmod'
> >From the winExtDLL.c file:
>
>   * @note All Windows extension DLLs are loaded during startup of the Net-SNMP
>   *   service. The Net-SNMP service must be restarted to load new modules. 
> This
>   *   extension is NOT for dynamically loading Net-SNMP extensions.
>
>
> Dave
>
>
> -
> Não foram detectados vírus nesta  mensagem.
> Verificado por AVG - www.avg.com
> Versão: 2013.0.2805 / Base de dados de Vírus: 2637/5995 - Data de Lançamento: 
> 12/29/12
>
>


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-29 Thread Dave Shield
On 29 December 2012 22:00, Nuno Magalhães  wrote:
> I thought I was only enabling debug for dlmod token -Ddlmod.

My apologies - I'd misread the command you were using to start the agent.
You are quite correct.


> Even if I simply call snmpd.exe with no parameters the error persists.

Looking at the code that includes the dlmod module  (in ucd_snmp.h):

#if defined(HAVE_DLFCN_H) && defined(HAVE_DLOPEN)
config_require(ucd-snmp/dlmod)
#endif

I'm not convinced that this module is supported under Windows.
Certainly the standard Windows version of the net-snmp-config.h
file  doesn't define either of these two tokens.

  Windows seems to use 'winExtDLL' instead of 'dlmod'
>From the winExtDLL.c file:

 * @note All Windows extension DLLs are loaded during startup of the Net-SNMP
 *   service. The Net-SNMP service must be restarted to load new modules. This
 *   extension is NOT for dynamically loading Net-SNMP extensions.


Dave

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-29 Thread Nuno Magalhães
Hi Dave,

I thought I was only enabling debug for dlmod token -Ddlmod.
Even if I simply call snmpd.exe with no parameters the error persists.
What should I call to suppress this error?

Regards,
Nuno Magalhães.

Em 29-12-2012 21:18, Dave Shield escreveu:
> On 29 December 2012 09:23, Nuno Magalhães  wrote:
>> 3) The problem: whenever I launch the snmpd with the necessary arguments:
>> snmpd.exe -V -f -Lo
>> -I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable
>> -DnstAgentPluginObject,dlmod,winExtDLL
> If I've read this correctly, you are giving the SNMP agent a list of
> modules that should *not* be initialized ('-I-')
> and this list includes the module that is responsible for dynamic
> loading of modules  ('dlmod')
>
>> "C:/Program Files/Net-SNMP 5.6.1.1/etc/snmp/snmpd.conf: line 19:
>>  Warning: Unknown token: dlmod."
> That would seem reasonable.
> The 'dlmod' token is registered by the 'dlmod' module, which you have 
> disabled.
> So it would naturally follow that this particular token won't be recognised.
>
> So the first thing would probably be to remove this from the list of modules
> that you are suppressing.
>
> Dave
>
>
> -
> Não foram detectados vírus nesta  mensagem.
> Verificado por AVG - www.avg.com
> Versão: 2013.0.2805 / Base de dados de Vírus: 2637/5995 - Data de Lançamento: 
> 12/29/12
>
>


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-29 Thread Dave Shield
On 29 December 2012 09:23, Nuno Magalhães  wrote:
> 3) The problem: whenever I launch the snmpd with the necessary arguments:
> snmpd.exe -V -f -Lo
> -I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable
> -DnstAgentPluginObject,dlmod,winExtDLL

If I've read this correctly, you are giving the SNMP agent a list of
modules that should *not* be initialized ('-I-')
and this list includes the module that is responsible for dynamic
loading of modules  ('dlmod')

> "C:/Program Files/Net-SNMP 5.6.1.1/etc/snmp/snmpd.conf: line 19:
> Warning: Unknown token: dlmod."

That would seem reasonable.
The 'dlmod' token is registered by the 'dlmod' module, which you have disabled.
So it would naturally follow that this particular token won't be recognised.

So the first thing would probably be to remove this from the list of modules
that you are suppressing.

Dave

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-29 Thread Nuno Magalhães

Hi Bart,

Sorry, but the patch is rejected on the latest revision (20533) from the 
official repository.


Can you tell me the revision (for that version 5.6). I downloaded the 
5.7.2 and the patch is rejected.


Or better yet, can you send me an updated patch for the latest revision.
(Because the latest version still has this issue)

Thanks a lot,
Nuno Magalhães.

Em 29-12-2012 17:11, Bart Van Assche escreveu:

On 12/29/12 10:23, Nuno Magalhães wrote:

I installed the version 5.6.1.1 (Windows Extension mode) of the windows
Net-SNMP on my Windows Server 2007 machine.

I'm facing an issue and here are the steps described:

1) I generated a couple of source files from the MIB (with the tool
mib2c) with no problems.

2) The configuration was scalar, so I implemented responses of raw 
values.


3) The problem: whenever I launch the snmpd with the necessary 
arguments:

snmpd.exe -V -f -Lo
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable
-DnstAgentPluginObject,dlmod,winExtDLL

It tells me at some point in the log that the generated DLL (extension)
could not be parsed in snmpd.conf:
"C:/Program Files/Net-SNMP 5.6.1.1/etc/snmp/snmpd.conf: line 19:
Warning: Unknown token: dlmod."

The configuration file is specifying the Dlmod like the following:
dlmod  obu_agent.dll "C:\Program Files\Net-SNMP 5.6.1.1"

I think I'm stuck on this... the DLL is not being loaded/started but I
can see the requests coming whenever I call a specific OID with the
snmpget command.


Does the attached patch help (compile-tested only) ?

Bart.



-
Não foram detectados vírus nesta  mensagem.
Verificado por AVG - www.avg.com
Versão: 2013.0.2805 / Base de dados de Vírus: 2637/5994 - Data de Lançamento: 
12/28/12


--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912___
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


Re: snmpd.conf: unknown token: dlmod

2012-12-29 Thread Bart Van Assche

On 12/29/12 10:23, Nuno Magalhães wrote:

I installed the version 5.6.1.1 (Windows Extension mode) of the windows
Net-SNMP on my Windows Server 2007 machine.

I'm facing an issue and here are the steps described:

1) I generated a couple of source files from the MIB (with the tool
mib2c) with no problems.

2) The configuration was scalar, so I implemented responses of raw values.

3) The problem: whenever I launch the snmpd with the necessary arguments:
snmpd.exe -V -f -Lo
-I-udp,udpTable,tcp,tcpTable,icmp,ip,interfaces,system_mib,sysORTable
-DnstAgentPluginObject,dlmod,winExtDLL

It tells me at some point in the log that the generated DLL (extension)
could not be parsed in snmpd.conf:
"C:/Program Files/Net-SNMP 5.6.1.1/etc/snmp/snmpd.conf: line 19:
Warning: Unknown token: dlmod."

The configuration file is specifying the Dlmod like the following:
dlmod  obu_agent.dll "C:\Program Files\Net-SNMP 5.6.1.1"

I think I'm stuck on this... the DLL is not being loaded/started but I
can see the requests coming whenever I call a specific OID with the
snmpget command.


Does the attached patch help (compile-tested only) ?

Bart.

diff --git a/agent/mibgroup/ucd-snmp/dlmod.c b/agent/mibgroup/ucd-snmp/dlmod.c
index 32f29a4..5b90bcb 100644
--- a/agent/mibgroup/ucd-snmp/dlmod.c
+++ b/agent/mibgroup/ucd-snmp/dlmod.c
@@ -4,6 +4,7 @@
  */
 #include 
 
+#include 
 #if HAVE_STDLIB_H
 #include 
 #endif
@@ -24,10 +25,14 @@
 #include "struct.h"
 #include "util_funcs.h"
 
+#if defined(WIN32)
+#include 
+#else
 #include 
+#endif
 #include "dlmod.h"
 
-static struct dlmod *dlmods = NULL;
+static struct dlmod *dlmods;
 static unsigned int dlmod_next_index = 1;
 static char dlmod_path[1024];
 
@@ -73,10 +78,10 @@ init_dlmod(void)
 const char * const p = getenv("SNMPDLMODPATH");
 strlcpy(dlmod_path, SNMPDLMODPATH, sizeof(dlmod_path));
 if (p) {
-if (p[0] == ':') {
+if (p[0] == ENV_SEPARATOR_CHAR) {
 int len = strlen(dlmod_path);
-if (len >= 1 && dlmod_path[len - 1] != ':')
-strlcat(dlmod_path, ":", sizeof(dlmod_path));
+if (len >= 1 && dlmod_path[len - 1] != ENV_SEPARATOR_CHAR)
+strlcat(dlmod_path, ENV_SEPARATOR, sizeof(dlmod_path));
 strlcat(dlmod_path, p + 1, sizeof(dlmod_path));
 } else
 strlcpy(dlmod_path, p, sizeof(dlmod_path));
@@ -99,15 +104,16 @@ dlmod_create_module(void)
 struct dlmod  **pdlmod, *dlm;
 
 DEBUGMSGTL(("dlmod", "dlmod_create_module\n"));
-dlm = (struct dlmod *) calloc(1, sizeof(struct dlmod));
+dlm = calloc(1, sizeof(struct dlmod));
 if (dlm == NULL)
 return NULL;
 
-dlm->index = (int)dlmod_next_index++;
+dlm->index = dlmod_next_index++;
 dlm->status = DLMOD_UNLOADED;
 
-for (pdlmod = &dlmods; *pdlmod != NULL; pdlmod = &((*pdlmod)->next));
-(*pdlmod) = dlm;
+for (pdlmod = &dlmods; *pdlmod != NULL; pdlmod = &((*pdlmod)->next))
+;
+*pdlmod = dlm;
 
 return dlm;
 }
@@ -129,6 +135,83 @@ dlmod_delete_module(struct dlmod *dlm)
 }
 }
 
+#if defined(WIN32)
+/* MSVC or MinGW but not Cygwin or native Unix */
+static const char netsnmp_dl_suffix[] = "dll";
+#else
+static const char netsnmp_dl_suffix[] = "so";
+#endif
+
+static void* netsnmp_dlopen(const char *path)
+{
+#if defined(WIN32)
+return LoadLibrary(path);
+#elif defined(RTLD_NOW)
+return dlopen(path, RTLD_NOW);
+#else
+return dlopen(path, RTLD_LAZY);
+#endif
+}
+
+static void netsnmp_dlclose(void *handle)
+{
+#if defined(WIN32)
+FreeLibrary(handle);
+#else
+dlclose(handle);
+#endif
+}
+
+static void *netsnmp_dlsym(void *handle, const char *symbol)
+{
+#if defined(WIN32)
+return GetProcAddress(handle, symbol);
+#else
+return dlsym(handle, symbol);
+#endif
+}
+
+static const char *netsnmp_dlerror(void)
+{
+#if defined(WIN32)
+static char errstr[256];
+const DWORD dwErrorcode = GetLastError();
+LPTSTR  lpMsgBuf;
+
+FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+  NULL, dwErrorcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+  (LPTSTR) &lpMsgBuf, 0, NULL);
+if (lpMsgBuf) {
+LPTSTR  p;
+
+/*
+ * Remove trailing "\r\n".
+ */
+p = strchr(lpMsgBuf, '\r');
+if (p)
+*p = '\0';
+snprintf(errstr, sizeof(errstr), "%s", lpMsgBuf);
+LocalFree(lpMsgBuf);
+} else {
+snprintf(errstr, sizeof(errstr), "error code %ld", dwErrorcode);
+}
+return errstr;
+#else
+return dlerror();
+#endif
+}
+
+static int dlmod_is_abs_path(const char *path)
+{
+#if defined(WIN32)
+return (strncmp(path, "//", 2) == 0 || strncmp(path, "", 2) == 0) ||
+(isalpha((u_char)path[0]) && path[1] == ':' &&
+ (path[2] == '/' || path[2] == '\\'));
+#else
+return path[0] == '/';
+#endif
+}
+
 void
 dlmod_load_module(