Re: system name

"Dave Shield" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On 03/08/07, Nikolett C <[email protected]> wrote:
> I can now get (and also set) a string in my new MIB, but for this 'hostname'
> object it is me that gives the value. I'd need the computer to give it

You're providing the code that implements this particular object.
Add code to the handler routine that deals with a request, which
retreives the 'hostname' value and returns it.

Or since this is typically fixed for the lifetime of the agent, you could
put this code in the 'init_xxx' routine, and set up a suitable variable
to hold the value.   The handler routine can then simply return the
contents of this variable.

But fundamentally, you're implementing the MIB, so you can write
code to return whatever values you like.

Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
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.