Code Search for Developers
 
 
  

agent__handler_8c.html from net-snmp at Krugle


Show agent__handler_8c.html syntax highlighted

<!--#set var="section" value="development" -->
<!--#include virtual="/page-top.html" -->
<!-- CONTENT START -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>agent_handler.c File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.11 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<hr><h1>agent_handler.c File Reference</h1><code>#include &lt;<a class="el" href="config_8h-source.html">config.h</a>&gt;</code><br>
<code>#include &lt;sys/types.h&gt;</code><br>
<code>#include &lt;string.h&gt;</code><br>
<code>#include &lt;mibincl.h&gt;</code><br>
<code>#include &lt;data_list.h&gt;</code><br>
<code>#include &lt;<a class="el" href="snmp__agent_8h-source.html">snmp_agent.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="agent__registry_8h-source.html">agent_registry.h</a>&gt;</code><br>
<code>#include &lt;<a class="el" href="helpers_2agent__handler_8h-source.html">agent_handler.h</a>&gt;</code><br>

<p>
<a href="agent__handler_8c-source.html">Go to the source code of this file.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a0">register_handler</a> (<a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *reginfo)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>register a handler, as defined by the handler_registration pointer.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a1">inject_handler</a> (<a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *reginfo, <a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *handler)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>inject a new handler into the calling chain of the handlers definedy by the handler_registration pointer.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a2">call_handlers</a> (<a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *reginfo, <a class="el" href="snmp__agent_8h.html#a21">agent_request_info</a> *reqinfo, <a class="el" href="snmp__agent_8h.html#a18">request_info</a> *requests)</td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a3">call_handler</a> (<a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *next_handler, <a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *reginfo, <a class="el" href="snmp__agent_8h.html#a21">agent_request_info</a> *reqinfo, <a class="el" href="snmp__agent_8h.html#a18">request_info</a> *requests)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>calls a handler with with appropriate NULL checking, etc.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>int&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a4">call_next_handler</a> (<a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *current, <a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *reginfo, <a class="el" href="snmp__agent_8h.html#a21">agent_request_info</a> *reqinfo, <a class="el" href="snmp__agent_8h.html#a18">request_info</a> *requests)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>calls the next handler in the chain after the current one with with appropriate NULL checking, etc.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a5">create_handler</a> (const char *name, NodeHandler *handler_access_method)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>creates a mib_handler structure given a name and a access method.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a6">create_handler_registration</a> (const char *name, NodeHandler *handler_access_method, oid *reg_oid, size_t reg_oid_len, int modes)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>creates a handler registration structure given a name, a access_method function, a registration location oid and the modes the handler supports.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="helpers_2agent__handler_8h.html#a10">delegated_cache</a> *&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a7">create_delegated_cache</a> (<a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *handler, <a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *reginfo, <a class="el" href="snmp__agent_8h.html#a21">agent_request_info</a> *reqinfo, <a class="el" href="snmp__agent_8h.html#a18">request_info</a> *requests, void *localinfo)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>creates a cache of information which can be saved for future reference.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="helpers_2agent__handler_8h.html#a10">delegated_cache</a> *&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a8">handler_check_cache</a> (<a class="el" href="helpers_2agent__handler_8h.html#a10">delegated_cache</a> *dcache)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>check's a given cache and returns it if it is still valid (ie, the agent still considers it to be an outstanding request.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a9">handler_mark_requests_as_delegated</a> (<a class="el" href="snmp__agent_8h.html#a18">request_info</a> *requests, int isdelegated)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>marks a list of requests as delegated (or not if isdelegaded = 0).</em> <a href="#a9">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a10">request_add_list_data</a> (<a class="el" href="snmp__agent_8h.html#a18">request_info</a> *request, data_list *node)</td></tr>
<tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a11">request_get_list_data</a> (<a class="el" href="snmp__agent_8h.html#a18">request_info</a> *request, const char *name)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a12">free_request_data_set</a> (<a class="el" href="snmp__agent_8h.html#a18">request_info</a> *request)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a13">free_request_data_sets</a> (<a class="el" href="snmp__agent_8h.html#a18">request_info</a> *request)</td></tr>
<tr><td nowrap align=right valign=top><a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a14">find_handler_by_name</a> (<a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *reginfo, char *name)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns a handler from a chain based on the name.</em> <a href="#a14">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>void *&nbsp;</td><td valign=bottom><a class="el" href="agent__handler_8c.html#a15">find_handler_data_by_name</a> (<a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *reginfo, char *name)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Returns a handler's void * pointer from a chain based on the name.</em> <a href="#a15">More...</a><em></em></font><br><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a name="a3" doxytag="agent_handler.c::call_handler"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int call_handler </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>next_handler</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reginfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a21">agent_request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reqinfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>requests</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
calls a handler with with appropriate NULL checking, etc.
<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00136">136</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00139                                                         {
00140     NodeHandler *nh;
00141     <font class="keywordtype">int</font> ret;
00142     
00143     <font class="keywordflow">if</font> (next_handler == NULL || reginfo == NULL || reqinfo == NULL ||
00144         requests == NULL) {
00145         snmp_log(LOG_ERR, <font class="stringliteral">"call_next_handler() called illegally"</font>);
00146         <font class="keywordflow">return</font>  SNMP_ERR_GENERR;
00147     }
00148 
00149     nh = next_handler-&gt;<a class="code" href="structmib__handler__s.html#m2">access_method</a>;
00150     <font class="keywordflow">if</font> (!nh) {
00151         snmp_log(LOG_ERR, <font class="stringliteral">"no access method specified in handler %s."</font>,
00152                  next_handler-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a>);
00153         <font class="keywordflow">return</font> SNMP_ERR_GENERR;
00154     }
00155 
00156     DEBUGMSGTL((<font class="stringliteral">"handler:calling"</font>, <font class="stringliteral">"calling handler %s\n"</font>,
00157                  next_handler-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a>));
00158 
00159     ret = (*nh)(next_handler, reginfo, reqinfo, requests);
00160 
00161     DEBUGMSGTL((<font class="stringliteral">"handler:returned"</font>, <font class="stringliteral">"handler %s returned %d\n"</font>,
00162                  next_handler-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a>, ret));
00163 
00164     <font class="keywordflow">return</font> ret;
00165 }
</pre></div>    </td>
  </tr>
</table>
<a name="a2" doxytag="agent_handler.c::call_handlers"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int call_handlers </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reginfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a21">agent_request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reqinfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>requests</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00070">70</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00072                                                   {
00073     NodeHandler *nh;
00074     <font class="keywordtype">int</font> status;
00075     
00076     <font class="keywordflow">if</font> (reginfo == NULL || reqinfo == NULL || requests == NULL) {
00077         snmp_log(LOG_ERR, <font class="stringliteral">"call_handlers() called illegally"</font>);
00078         <font class="keywordflow">return</font>  SNMP_ERR_GENERR;
00079     }
00080 
00081     <font class="keywordflow">if</font> (reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a> == NULL) {
00082         snmp_log(LOG_ERR, <font class="stringliteral">"no handler specified."</font>);
00083         <font class="keywordflow">return</font>  SNMP_ERR_GENERR;
00084     }
00085 
00086     <font class="keywordflow">switch</font>(reqinfo-&gt;<a class="code" href="structagent__request__info__s.html#m0">mode</a>) {
00087         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a4">MODE_GET</a>:
00088         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a5">MODE_GETNEXT</a>:
00089             <font class="keywordflow">if</font> (!(reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m5">modes</a> &amp; HANDLER_CAN_GETANDGETNEXT))
00090                 <font class="keywordflow">return</font> SNMP_ERR_NOERROR; <font class="comment">/* legal */</font>
00091             <font class="keywordflow">break</font>;
00092 
00093         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a9">MODE_SET_RESERVE1</a>:
00094         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a10">MODE_SET_RESERVE2</a>:
00095         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a11">MODE_SET_ACTION</a>:
00096         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a12">MODE_SET_COMMIT</a>:
00097         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a13">MODE_SET_FREE</a>:
00098         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a14">MODE_SET_UNDO</a>:
00099             <font class="keywordflow">if</font> (!(reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m5">modes</a> &amp; HANDLER_CAN_SET)) {
00100                 <font class="keywordflow">for</font>(; requests; requests = requests-&gt;<a class="code" href="structrequest__info__s.html#m8">next</a>) {
00101                     <a class="code" href="snmp__agent_8h.html#a39">set_request_error</a>(reqinfo, requests, SNMP_ERR_NOTWRITABLE);
00102                 }
00103                 <font class="keywordflow">return</font> SNMP_ERR_NOERROR;
00104             }
00105             <font class="keywordflow">break</font>;
00106 
00107         <font class="keywordflow">case</font> <a class="code" href="snmp__agent_8h.html#a6">MODE_GETBULK</a>:
00108             <font class="keywordflow">if</font> (!(reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m5">modes</a> &amp; HANDLER_CAN_GETBULK))
00109                 <font class="keywordflow">return</font> SNMP_ERR_NOERROR; <font class="comment">/* XXXWWW: should never get</font>
00110                                             here after we force a
00111                                             getbulk-&gt;getnext helper on
00112                                             them during registration
00113                                             process. */
00114             <font class="keywordflow">break</font>;
00115             
00116         <font class="keywordflow">default</font>:
00117             snmp_log(LOG_ERR, <font class="stringliteral">"unknown mode in call_handlers! bug!\n"</font>);
00118             <font class="keywordflow">return</font> SNMP_ERR_GENERR;
00119     }
00120     DEBUGMSGTL((<font class="stringliteral">"handler:calling"</font>, <font class="stringliteral">"calling main handler %s\n"</font>,
00121                  reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>-&gt;handler_name));
00122     
00123     nh = reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>-&gt;access_method;
00124     <font class="keywordflow">if</font> (!nh) {
00125         snmp_log(LOG_ERR, <font class="stringliteral">"no handler access method specified."</font>);
00126         <font class="keywordflow">return</font> SNMP_ERR_GENERR;
00127     }
00128 
00129     <font class="comment">/* XXX: define acceptable return statuses */</font>
00130     status = (*nh)(reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>, reginfo, reqinfo, requests);
00131 
00132     <font class="keywordflow">return</font> status;
00133 }
</pre></div>    </td>
  </tr>
</table>
<a name="a4" doxytag="agent_handler.c::call_next_handler"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int call_next_handler </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>current</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reginfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a21">agent_request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reqinfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>requests</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
calls the next handler in the chain after the current one with with appropriate NULL checking, etc.
<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00169">169</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00172                                                              {
00173 
00174     <font class="keywordflow">if</font> (current == NULL || reginfo == NULL || reqinfo == NULL ||
00175         requests == NULL) {
00176         snmp_log(LOG_ERR, <font class="stringliteral">"call_next_handler() called illegally"</font>);
00177         <font class="keywordflow">return</font>  SNMP_ERR_GENERR;
00178     }
00179 
00180     <font class="keywordflow">return</font> <a class="code" href="helpers_2agent__handler_8h.html#a17">call_handler</a>(current-&gt;<a class="code" href="structmib__handler__s.html#m3">next</a>, reginfo, reqinfo, requests);
00181 }
</pre></div>    </td>
  </tr>
</table>
<a name="a7" doxytag="agent_handler.c::create_delegated_cache"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="helpers_2agent__handler_8h.html#a10">delegated_cache</a>* create_delegated_cache </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>handler</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reginfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a21">agent_request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reqinfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>requests</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname">&nbsp; <em>localinfo</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
creates a cache of information which can be saved for future reference.
<p>
Use <a class="el" href="agent__handler_8c.html#a8">handler_check_cache</a>() later to make sure it's still valid before referencing it in the future. 
<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00221">221</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00225                                                              {
00226     <a class="code" href="structdelegated__cache__s.html">delegated_cache</a> *ret;
00227 
00228     ret = SNMP_MALLOC_TYPEDEF(<a class="code" href="structdelegated__cache__s.html">delegated_cache</a>);
00229     <font class="keywordflow">if</font> (ret) {
00230         ret-&gt;<a class="code" href="structdelegated__cache__s.html#m0">transaction_id</a> = reqinfo-&gt;<a class="code" href="structagent__request__info__s.html#m2">asp</a>-&gt;pdu-&gt;transid;
00231         ret-&gt;<a class="code" href="structdelegated__cache__s.html#m1">handler</a> = handler;
00232         ret-&gt;<a class="code" href="structdelegated__cache__s.html#m2">reginfo</a> = reginfo;
00233         ret-&gt;<a class="code" href="structdelegated__cache__s.html#m3">reqinfo</a> = reqinfo;
00234         ret-&gt;<a class="code" href="structdelegated__cache__s.html#m4">requests</a> = requests;
00235         ret-&gt;<a class="code" href="structdelegated__cache__s.html#m5">localinfo</a> = localinfo;
00236     }
00237     <font class="keywordflow">return</font> ret;
00238 }
</pre></div>    </td>
  </tr>
</table>
<a name="a5" doxytag="agent_handler.c::create_handler"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a>* create_handler </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname">&nbsp; <em>name</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>NodeHandler *&nbsp;</td>
          <td class="mdname">&nbsp; <em>handler_access_method</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
creates a mib_handler structure given a name and a access method.
<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00185">185</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00185                                                                      {
00186     <a class="code" href="structmib__handler__s.html">mib_handler</a> *ret = SNMP_MALLOC_TYPEDEF(<a class="code" href="structmib__handler__s.html">mib_handler</a>);
00187     ret-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a> = strdup(name);
00188     ret-&gt;<a class="code" href="structmib__handler__s.html#m2">access_method</a> = handler_access_method;
00189     <font class="keywordflow">return</font> ret;
00190 }
</pre></div>    </td>
  </tr>
</table>
<a name="a6" doxytag="agent_handler.c::create_handler_registration"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a>* create_handler_registration </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname">&nbsp; <em>name</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>NodeHandler *&nbsp;</td>
          <td class="mdname">&nbsp; <em>handler_access_method</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>oid *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reg_oid</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname">&nbsp; <em>reg_oid_len</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname">&nbsp; <em>modes</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
creates a handler registration structure given a name, a access_method function, a registration location oid and the modes the handler supports.
<p>
If modes == 0, then modes will automatically be set to the default value of only HANDLER_CAN_DEFAULT, which is by default. 
<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00197">197</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00200                                        {
00201     <a class="code" href="structhandler__registration__s.html">handler_registration</a> *the_reg;
00202     the_reg = SNMP_MALLOC_TYPEDEF(<a class="code" href="structhandler__registration__s.html">handler_registration</a>);
00203     <font class="keywordflow">if</font> (!the_reg)
00204         <font class="keywordflow">return</font> NULL;
00205 
00206     <font class="keywordflow">if</font> (modes)
00207         the_reg-&gt;<a class="code" href="structhandler__registration__s.html#m5">modes</a> = modes;
00208     <font class="keywordflow">else</font>
00209         the_reg-&gt;<a class="code" href="structhandler__registration__s.html#m5">modes</a> = HANDLER_CAN_DEFAULT;
00210 
00211     the_reg-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a> = <a class="code" href="helpers_2agent__handler_8h.html#a19">create_handler</a>(name, handler_access_method);
00212     memdup(&amp;the_reg-&gt;<a class="code" href="structhandler__registration__s.html#m2">rootoid</a>, reg_oid, reg_oid_len * <font class="keyword">sizeof</font>(oid));
00213     the_reg-&gt;<a class="code" href="structhandler__registration__s.html#m3">rootoid_len</a> = reg_oid_len;
00214     <font class="keywordflow">return</font> the_reg;
00215 }
</pre></div>    </td>
  </tr>
</table>
<a name="a14" doxytag="agent_handler.c::find_handler_by_name"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a>* find_handler_by_name </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reginfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>char *&nbsp;</td>
          <td class="mdname">&nbsp; <em>name</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a handler from a chain based on the name.
<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00300">300</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00301 {
00302     <a class="code" href="structmib__handler__s.html">mib_handler</a> *it;
00303     <font class="keywordflow">for</font>(it = reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>; it; it = it-&gt;<a class="code" href="structmib__handler__s.html#m3">next</a>) {
00304         <font class="keywordflow">if</font> (strcmp(it-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a>, name) == 0)<font class="keyword"> </font>{
00305             <font class="keywordflow">return</font> it;
00306         }
00307     }
00308     <font class="keywordflow">return</font> NULL;
00309 }
</pre></div>    </td>
  </tr>
</table>
<a name="a15" doxytag="agent_handler.c::find_handler_data_by_name"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void* find_handler_data_by_name </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reginfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>char *&nbsp;</td>
          <td class="mdname">&nbsp; <em>name</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Returns a handler's void * pointer from a chain based on the name.
<p>
This probably shouldn't be used by the general public as the void * data may change as a handler evolves. Handlers should really advertise some function for you to use instead. 
<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00316">316</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00318 {
00319     <a class="code" href="structmib__handler__s.html">mib_handler</a> *it = <a class="code" href="helpers_2agent__handler_8h.html#a14">find_handler_by_name</a>(reginfo, name);
00320     <font class="keywordflow">if</font> (it)
00321         <font class="keywordflow">return</font> it-&gt;<a class="code" href="structmib__handler__s.html#m1">myvoid</a>;
00322     <font class="keywordflow">return</font> NULL;
00323 }
</pre></div>    </td>
  </tr>
</table>
<a name="a12" doxytag="agent_handler.c::free_request_data_set"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void free_request_data_set </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname1">&nbsp; <em>request</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00285">285</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00286 {
00287   <font class="keywordflow">if</font> (request)
00288     free_list_data(request-&gt;<a class="code" href="structrequest__info__s.html#m1">parent_data</a>);
00289 }
</pre></div>    </td>
  </tr>
</table>
<a name="a13" doxytag="agent_handler.c::free_request_data_sets"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void free_request_data_sets </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname1">&nbsp; <em>request</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00292">292</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00293 {
00294   <font class="keywordflow">if</font> (request)
00295     free_all_list_data(request-&gt;<a class="code" href="structrequest__info__s.html#m1">parent_data</a>);
00296 }
</pre></div>    </td>
  </tr>
</table>
<a name="a8" doxytag="agent_handler.c::handler_check_cache"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> <a class="el" href="helpers_2agent__handler_8h.html#a10">delegated_cache</a>* handler_check_cache </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a10">delegated_cache</a> *&nbsp;</td>
          <td class="mdname1">&nbsp; <em>dcache</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
check's a given cache and returns it if it is still valid (ie, the agent still considers it to be an outstanding request.
<p>
Returns NULL if it's no longer valid. 
<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00244">244</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00245 {
00246     <font class="keywordflow">if</font> (!dcache)
00247         <font class="keywordflow">return</font> dcache;
00248     
00249     <font class="keywordflow">if</font> (<a class="code" href="snmp__agent_8h.html#a44">check_transaction_id</a>(dcache-&gt;<a class="code" href="structdelegated__cache__s.html#m0">transaction_id</a>) == SNMPERR_SUCCESS)
00250         <font class="keywordflow">return</font> dcache;
00251 
00252     <font class="keywordflow">return</font> NULL;
00253 }
</pre></div>    </td>
  </tr>
</table>
<a name="a9" doxytag="agent_handler.c::handler_mark_requests_as_delegated"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void handler_mark_requests_as_delegated </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>requests</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname">&nbsp; <em>isdelegated</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
marks a list of requests as delegated (or not if isdelegaded = 0).
<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00257">257</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00258 {
00259     <font class="keywordflow">while</font>(requests) {
00260         requests-&gt;<a class="code" href="structrequest__info__s.html#m4">delegated</a> = isdelegated;
00261         requests = requests-&gt;<a class="code" href="structrequest__info__s.html#m8">next</a>;
00262     }
00263 }
</pre></div>    </td>
  </tr>
</table>
<a name="a1" doxytag="agent_handler.c::inject_handler"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int inject_handler </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>reginfo</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a8">mib_handler</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>handler</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
inject a new handler into the calling chain of the handlers definedy by the handler_registration pointer.
<p>
The new handler is injected at the top of the list and hence will be the new handler to be called first. 
<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00060">60</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00060                                                                     {
00061     DEBUGMSGTL((<font class="stringliteral">"handler:inject"</font>, <font class="stringliteral">"injecting %s before %s\n"</font>, \
00062                 handler-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a>, reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a>));
00063     handler-&gt;<a class="code" href="structmib__handler__s.html#m3">next</a> = reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>;
00064     <font class="keywordflow">if</font> (reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>)
00065         reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>-&gt;<a class="code" href="structmib__handler__s.html#m4">prev</a> = handler;
00066     reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a> = handler;
00067     <font class="keywordflow">return</font> SNMPERR_SUCCESS;
00068 }
</pre></div>    </td>
  </tr>
</table>
<a name="a0" doxytag="agent_handler.c::register_handler"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int register_handler </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="helpers_2agent__handler_8h.html#a9">handler_registration</a> *&nbsp;</td>
          <td class="mdname1">&nbsp; <em>reginfo</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
register a handler, as defined by the handler_registration pointer.
<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00020">20</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00020                                                 {
00021     <a class="code" href="structmib__handler__s.html">mib_handler</a> *handler;
00022     DEBUGIF(<font class="stringliteral">"handler::register"</font>)<font class="keyword"> </font>{
00023         DEBUGMSGTL((<font class="stringliteral">"handler::register"</font>, <font class="stringliteral">"Registering"</font>));
00024         <font class="keywordflow">for</font>(handler = reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>; handler;
00025             handler = handler-&gt;<a class="code" href="structmib__handler__s.html#m3">next</a>) {
00026             DEBUGMSG((<font class="stringliteral">"handler::register"</font>,<font class="stringliteral">" %s"</font>, handler-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a>));
00027         }
00028             
00029         DEBUGMSG((<font class="stringliteral">"handler::register"</font>, <font class="stringliteral">" at "</font>));
00030         <font class="keywordflow">if</font> (reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m2">rootoid</a>) {
00031             DEBUGMSGOID((<font class="stringliteral">"handler::register"</font>, reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m2">rootoid</a>,
00032                          reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m3">rootoid_len</a>));
00033         } <font class="keywordflow">else</font> {
00034             DEBUGMSG((<font class="stringliteral">"handler::register"</font>, <font class="stringliteral">"[null]"</font>));
00035         }
00036         DEBUGMSG((<font class="stringliteral">"handler::register"</font>, <font class="stringliteral">"\n"</font>));
00037     }
00038 
00039     <font class="comment">/* don't let them register for absolutely nothing.  Probably a mistake */</font>
00040     <font class="keywordflow">if</font> (0 == reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m5">modes</a>) {
00041         reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m5">modes</a> = HANDLER_CAN_DEFAULT;
00042     }
00043 
00044     <font class="keywordflow">return</font> <a class="code" href="agent__registry_8c.html#a24">register_mib_context2</a>(reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m4">handler</a>-&gt;<a class="code" href="structmib__handler__s.html#m0">handler_name</a>,
00045                          NULL, 0, 0,
00046                          reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m2">rootoid</a>, reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m3">rootoid_len</a>,
00047                          reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m6">priority</a>,
00048                          reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m7">range_subid</a>, reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m8">range_ubound</a>,
00049                          NULL,
00050                          reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m1">contextName</a>,
00051                          reginfo-&gt;<a class="code" href="structhandler__registration__s.html#m9">timeout</a>,
00052                          0, reginfo);
00053 }
</pre></div>    </td>
  </tr>
</table>
<a name="a10" doxytag="agent_handler.c::request_add_list_data"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void request_add_list_data </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>request</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>data_list *&nbsp;</td>
          <td class="mdname">&nbsp; <em>node</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00266">266</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00267 {
00268   <font class="keywordflow">if</font> (request) {
00269     <font class="keywordflow">if</font> (request-&gt;<a class="code" href="structrequest__info__s.html#m1">parent_data</a>)
00270       add_list_data(&amp;request-&gt;<a class="code" href="structrequest__info__s.html#m1">parent_data</a>, node);
00271     <font class="keywordflow">else</font>
00272       request-&gt;<a class="code" href="structrequest__info__s.html#m1">parent_data</a> = node;
00273   }
00274 }
</pre></div>    </td>
  </tr>
</table>
<a name="a11" doxytag="agent_handler.c::request_get_list_data"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> void* request_get_list_data </td>
          <td class="md">(&nbsp;</td>
          <td class="md" nowrap><a class="el" href="snmp__agent_8h.html#a18">request_info</a> *&nbsp;</td>
          <td class="mdname">&nbsp; <em>request</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname">&nbsp; <em>name</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="agent__handler_8c-source.html#l00277">277</a> of file <a class="el" href="agent__handler_8c-source.html">agent_handler.c</a>.<div class="fragment"><pre>00278 {
00279   <font class="keywordflow">if</font> (request)
00280     <font class="keywordflow">return</font> get_list_data(request-&gt;<a class="code" href="structrequest__info__s.html#m1">parent_data</a>,name);
00281   <font class="keywordflow">return</font> NULL;
00282 }
</pre></div>    </td>
  </tr>
</table>
<hr><address><small>Generated on Sat Nov 10 14:09:52 2001 for net-snmp by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.11 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2001</small></address>
</body>
</html>
<!--#include virtual="/sfbutton.html" -->
<!--#include virtual="/sfbutton.html" -->
<!-- CONTENT END -->
<!--#include virtual="/page-bottom.html" -->





See more files for this project here

net-snmp

net-snmp provides tools and libraries relating to the Simple Network\r\nManagement Protocol including: An extensible agent, An SNMP library,\r\ntools to request or set information from SNMP agents, tools to\r\ngenerate and handle SNMP traps, etc.\r\n

Project homepage: http://sourceforge.net/projects/net-snmp
Programming language(s): C,Perl,Shell Script
License: other

  mfd/
  acconfig_8h-source.html
  acconfig_8h.html
  agent_2snmp__perl_8c-source.html
  agent__callbacks_8h-source.html
  agent__callbacks_8h.html
  agent__handler_8c-source.html
  agent__handler_8c.html
  agent__handler_8h-source.html
  agent__handler_8h.html
  agent__index_8c-source.html
  agent__index_8c.html
  agent__index_8h-source.html
  agent__index_8h.html
  agent__module__config_8h-source.html
  agent__read__config_8c-source.html
  agent__read__config_8c.html
  agent__read__config_8h-source.html
  agent__read__config_8h.html
  agent__registry_8c-source.html
  agent__registry_8c.html
  agent__registry_8h-source.html
  agent__registry_8h.html
  agent__trap_8c-source.html
  agent__trap_8c.html
  agent__trap_8h-source.html
  agent__trap_8h.html
  all__helpers_8c-source.html
  all__helpers_8h-source.html
  annotated.html
  asn1_8c-source.html
  asn1_8h-source.html
  auto__nlist_8c-source.html
  auto__nlist_8c.html
  auto__nlist_8h-source.html
  auto__nlist_8h.html
  autonlist_8h-source.html
  autonlist_8h.html
  baby__steps_8c-source.html
  baby__steps_8h-source.html
  blah.html
  bulk__to__next_8c-source.html
  bulk__to__next_8h-source.html
  cache__handler_8c-source.html
  cache__handler_8h-source.html
  callback_8c-source.html
  callback_8h-source.html
  check__varbind_8c-source.html
  check__varbind_8h-source.html
  cmu__compat_8c-source.html
  cmu__compat_8h-source.html
  config_8h-source.html
  config_8h.html
  config__api_8h-source.html
  container_8c-source.html
  container_8h-source.html
  container__binary__array_8c-source.html
  container__binary__array_8h-source.html
  container__iterator_8c-source.html
  container__iterator_8h-source.html
  container__list__ssll_8c-source.html
  container__list__ssll_8h-source.html
  container__null_8c-source.html
  container__null_8h-source.html
  data__list_8c-source.html
  data__list_8h-source.html
  data__set_8c-example.html
  data__set_8c-source.html
  data__set_8h-source.html
  debug__handler_8c-source.html
  debug__handler_8h-source.html
  default__store_8c-source.html
  default__store_8h-source.html
  default_store.html
  definitions_8h-source.html
  delayed__instance_8c-example.html
  delayed__instance_8c-source.html
  delayed__instance_8h-source.html
  deprecated.html
  dir_000000.html
  dir_000001.html
  dir_000002.html
  dir_000003.html
  dir_000004.html
  dir_000005.html
  dir_000006.html
  dir_000007.html
  dir_000008.html
  doxygen.css
  doxygen.gif
  doxygen.png
  ds__agent_8h-source.html
  ds__agent_8h.html
  example_8c-source.html
  example_8h-source.html
  examples.html
  factory_8h-source.html
  fd__event__manager_8c-source.html
  fd__event__manager_8h-source.html
  file__utils_8c-source.html
  file__utils_8h-source.html
  files.html