On Fri, 2005-06-10 at 11:58, Thorsten Freimann wrote:
> this is what I searched! But it doesnt work :-(

Oh, yes it does!

> I write down this code:

     [snip]

I've just copied that code into a file, added the missing
header lines, and got the following:

$ cc z.c `net-snmp-config --libs`
$ ./a.out
No log handling enabled - turning on stderr logging
/usr/local/etc/snmp/snmpd.conf: line 1: Warning: Unknown token:
rocommunity.
/usr/local/etc/snmp/snmpd.conf: line 2: Warning: Unknown token:
rwcommunity.
/usr/local/etc/snmp/snmpd.conf: line 11: Warning: Unknown token:
createUser.
/usr/local/etc/snmp/snmpd.conf: line 12: Warning: Unknown token: rwuser.
/usr/local/etc/snmp/snmpd.conf: line 14: Warning: Unknown token:
override.
config trapsink : localhost    <===========================
/usr/local/etc/snmp/snmpd.conf: line 20: Warning: Unknown token:
agentSecName.
/usr/local/etc/snmp/snmpd.conf: line 22: Warning: Unknown token: repeat.
/usr/local/etc/snmp/snmpd.conf: line 44: Warning: Unknown token: sh.


Note the line marked.
I tweaked the printf statement slightly, to show what was being
"processed" (and dropped the counter).   This code fragment is
indeed working as expected.
    Your problem probably lies elsewhere.


It might be worth setting the "read_config" debug token,
to check that the correct config files are being read:

            debug_register_tokens("read_config");
            snmp_set_do_debugging(1);
                                                                                
Dave



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to