On Mon, 2005-07-18 at 09:39 -0700, Alaios wrote: > .. i have written a small c programe that reads the > IPDiscards value.....
First question - what MIB object are you actually talking about? ipInDiscards, ipOutDiscards, or ipRoutingDiscards ? There's no such MIB object as "IPDiscards" > I want to find a > way to change the value to the snmp server. You can't. All three of these MIB objects are defined as "read-only", and are simply reporting values from the underlying system. The only way to change this value is to force the kernel to discard some packets, which would affect the relevant counter. If this is just for testing purposes, then I suppose you could probably get away with hacking the agent code to return a dummy value. You haven't said which version of the code you're working with, or what operating system you're using. But have a look at 'agent/mibgroup/mibII/ip.c' and look for the relevant DISCARDS switch block. Be aware that there are four or five separate switch statements (for different architectures), so you need to make sure that you change the correct one. Dave ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders