Re: Return type

This is a discussion on Re: Return type within the SNMP Coders forums, part of the Networking and Network Related category; On 02/01/2008, Siva Prakash Reddy G <sivag@aztecsoft.com> wrote: > when I execute snmpset command ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-02-2008
Dave Shield
 
Posts: n/a
Default Re: Return type

On 02/01/2008, Siva Prakash Reddy G <sivag@aztecsoft.com> wrote:
> when I execute snmpset command example....
> how var_system function will know that it is set request....


It doesn't.
The var_system function is called in an identical fashion for both
a GET request and a SET request.


> how it will know it is a set request and how
> it will execute the *write_method = writeSystem;


It doesn't know whether this is a GET or a SET request,
so it should return the appropriate 'write_method' hook
routine.

> if it is get request then writeSystem function won't be called.
> How this is can be happened.


The var_system routine doesn't know whether this is a GET
or a SET request. But the code that *calls* the var_system
routine does.
So var_system will set up the write_method hook value,
just in case this is a SET request. If it is, then the agent
driving code will use this hook value to invoke the SET
processing code for that object.
If this is actually a GET request, then the agent driving
code will simply ignore the 'write_method' value.


Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:15 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0