Traps generation using notification.c model and Win32

"xxx yyy" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I'm trying, ultimately, to create a test program to generate trap messages 
(probably from within an AgentX agent extension context (version 5.x)) which 
specify an SNMP community depending on which (site) they were initiated from 
- (on a Windows 2000 (actually, XP Pro) platform) -

But initially, now that I have run SNMPD.exe with a simple snmpd.conf and 
successfully generated simple trap messages, I would like to compile and run 
a Win32 equivalent of the notification.c example (as a precursor to an 
AgentX extension?)

notification.c documentation says: When this module is compiled into the 
agent (run configure with --with-mib-modules="examples/notification") ...

(- Although there is a "Configure" file in the Win32 directory, I don't see 
any reference to with-mib-modules so I have to suppose that's not an 
equivalent script).

Apparently, I thought, this is the magic means by which the notification.c 
object code is setup to be linked into the snmpd (daemon) agent and 
something (a conditional compilation directive?)  must arrange for 
init_notification to be called somehow after which send_example_notification 
can be called as a callback - Searching through the entire body of Win32sdk 
code sources I could not find a single invocation to init_notification, 
however, so this seems dubious -

Question: In an e-mail archive reference to a Win32 implementation where the 
writer claimed he had "run configuration with 
--with-mib-modules="examples/notification", the writer declared he had used 
cygwin as his platform environment -
Do I need to set up a Linux-emulation to be able to run the configure script 
or is there a simplification whereby I can include notification.c in a 
(Visual Studio, for example, passing option arguments to the Project's 
Configuration Command Arguments Property line) project and do the equivalent 
of the script?
If so - which project, and/or what other steps are required?

Relating to how init_notification gets invoked, I ran across a related 
e-mail archive regarding Mib2c:
"So I finally figured out what the problem was ...  The initialize function 
*has* to be named init_FILENAME.  Mib2c generates the function init_FILENAME 
but it is pretty much just a wrapper function that they use to call the real 
initialize  function(s) which mib2c names initialize_table_FILENAME - "

Question: (Your one up on me, Chris) - What does this mean? Did the 
developer intend in his comment to say "init_<FILENAME> where <FILENAME> is 
a template name for ..." (such as init_notification above - and is this how 
configure causes init_notification to be called - by passing the filename?)? 
- or did he mean 'must match "init_FILENAME()" - (literally)'  - if so, why 
name the function init_notification) - Either way, just a note - why not 
state it as punctuated and worded here - (I realize he may have thought the 
comment adequate, but if it took Chris several e-mails, and myself a couple 
of hours, even after reading Chris's e-mail, of wondering about its intent, 
maybe it's not as clear as it could be).

How about a new motto at the bottom of the e-mails: "1 or 2 good example 
worth 10,000 word of explanation"




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.