Code Search for Developers
 
 
  

callback_8h-source.html from net-snmp at Krugle


Show callback_8h-source.html syntax highlighted

<!--#set var="section" value="development" -->
<!--#include virtual="/page-top.html" -->
<!-- CONTENT START -->
  <!-- Generated by Doxygen 1.3.9.1 -->

  <div class="qindex">
    <a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class=
    "qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class=
    "qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <a class=
    "qindex" href="examples.html">Examples</a>
  </div>

  <div class="nav">
    <a class="el" href="dir_000000.html">include</a>&nbsp;/&nbsp;<a class="el" href=
    "dir_000001.html">net-snmp</a>&nbsp;/&nbsp;<a class="el" href="dir_000006.html">library</a>
  </div>

  <h1>callback.h</h1>

  <div class="fragment">
    <pre class="fragment">
00001 <span class="comment">/*</span>
00002 <span class="comment"> * callback.c: A generic callback mechanism </span>
00003 <span class="comment"> */</span>
00004 
00005 <span class="preprocessor">#ifndef CALLBACK_H</span>
00006 <span class="preprocessor">#define CALLBACK_H</span>
00007 
00008 <span class="preprocessor">#ifdef __cplusplus</span>
00009 <span class="keyword">extern</span>          <span class="stringliteral">"C"</span> {
00010 <span class="preprocessor">#endif</span>
00011 
00012 <span class="preprocessor">#define MAX_CALLBACK_IDS    2</span>
00013 <span class="preprocessor">#define MAX_CALLBACK_SUBIDS 16</span>
00014 
00015     <span class="comment">/*</span>
00016 <span class="comment">     * Callback Major Types </span>
00017 <span class="comment">     */</span>
00018 <span class="preprocessor">#define SNMP_CALLBACK_LIBRARY     0</span>
00019 <span class="preprocessor">#define SNMP_CALLBACK_APPLICATION 1</span>
00020 
00021     <span class="comment">/*</span>
00022 <span class="comment">     * SNMP_CALLBACK_LIBRARY minor types </span>
00023 <span class="comment">     */</span>
00024 <span class="preprocessor">#define SNMP_CALLBACK_POST_READ_CONFIG          0</span>
00025 <span class="preprocessor">#define SNMP_CALLBACK_STORE_DATA                1</span>
00026 <span class="preprocessor">#define SNMP_CALLBACK_SHUTDOWN                  2</span>
00027 <span class="preprocessor">#define SNMP_CALLBACK_POST_PREMIB_READ_CONFIG   3</span>
00028 <span class="preprocessor">#define SNMP_CALLBACK_LOGGING                   4</span>
00029 <span class="preprocessor">#define SNMP_CALLBACK_SESSION_INIT              5</span>
00030 
00031 
00032     <span class="comment">/*</span>
00033 <span class="comment">     * Callback priority (lower priority numbers called first(</span>
00034 <span class="comment">     */</span>
00035 <span class="preprocessor">#define NETSNMP_CALLBACK_HIGHEST_PRIORITY      -1024 </span>
00036 <span class="preprocessor">#define NETSNMP_CALLBACK_DEFAULT_PRIORITY       0</span>
00037 <span class="preprocessor">#define NETSNMP_CALLBACK_LOWEST_PRIORITY        1024</span>
00038 
00039     <span class="keyword">typedef</span> int     (SNMPCallback) (<span class="keywordtype">int</span> majorID, <span class=
"keywordtype">int</span> minorID,
00040                                     <span class="keywordtype">void</span> *serverarg, <span class=
"keywordtype">void</span> *clientarg);
00041 
00042     <span class="keyword">struct </span>snmp_gen_callback {
00043         SNMPCallback   *sc_callback;
00044         <span class="keywordtype">void</span>           *sc_client_arg;
00045         <span class="keywordtype">int</span>             priority;
00046         <span class="keyword">struct </span>snmp_gen_callback *next;
00047     };
00048 
00049     <span class="comment">/*</span>
00050 <span class="comment">     * function prototypes </span>
00051 <span class="comment">     */</span>
00052     <span class="keywordtype">void</span>            init_callbacks(<span class="keywordtype">void</span>);
00053 
00054     <span class="keywordtype">int</span>             netsnmp_register_callback(<span class=
"keywordtype">int</span> major, <span class="keywordtype">int</span> minor,
00055                                               SNMPCallback * new_callback,
00056                                               <span class="keywordtype">void</span> *arg, <span class=
"keywordtype">int</span> priority);
00057     <span class="keywordtype">int</span>             <a class="code" href=
"group__callback.html#ga8">snmp_register_callback</a>(<span class="keywordtype">int</span> major, <span class=
"keywordtype">int</span> minor,
00058                                            SNMPCallback * new_callback,
00059                                            <span class="keywordtype">void</span> *arg);
00060     <span class="keywordtype">int</span>             <a class="code" href=
"group__callback.html#ga10">snmp_call_callbacks</a>(<span class="keywordtype">int</span> major, <span class=
"keywordtype">int</span> minor,
00061                                         <span class="keywordtype">void</span> *caller_arg);
00062     <span class="keywordtype">int</span>             snmp_callback_available(<span class=
"keywordtype">int</span> major, <span class="keywordtype">int</span> minor);      <span class=
"comment">/* is &gt;1 available */</span>
00063     <span class="keywordtype">int</span>             snmp_count_callbacks(<span class=
"keywordtype">int</span> major, <span class="keywordtype">int</span> minor); <span class=
"comment">/* ret the number registered */</span>
00064     <span class="keywordtype">int</span>             <a class="code" href=
"group__callback.html#ga13">snmp_unregister_callback</a>(<span class="keywordtype">int</span> major, <span class=
"keywordtype">int</span> minor,
00065                                              SNMPCallback * new_callback,
00066                                              <span class="keywordtype">void</span> *arg, <span class=
"keywordtype">int</span> matchargs);
00067     <span class="keywordtype">void</span>            clear_callback (<span class="keywordtype">void</span>);
00068     <span class="keywordtype">int</span>             <a class="code" href=
"group__callback.html#ga14">netsnmp_callback_clear_client_arg</a>(<span class="keywordtype">void</span> *, <span class=
"keywordtype">int</span> i, <span class="keywordtype">int</span> j);
00069 
00070     <span class="keyword">struct </span>snmp_gen_callback *snmp_callback_list(<span class=
"keywordtype">int</span> major, <span class="keywordtype">int</span> minor);
00071 
00072 <span class="preprocessor">#ifdef __cplusplus</span>
00073 }
00074 <span class="preprocessor">#endif</span>
00075 <span class="preprocessor">#endif                          </span><span class="comment">/* CALLBACK_H */</span>
</pre>
  </div>
  <hr size="1" />

  <address style="align: right;">
    <small>Generated on Fri Dec 30 13:47:44 2005 for net-snmp by&nbsp; <a href="http://www.doxygen.org/index.html"><img src=
    "doxygen.png" alt="doxygen" align="middle" border="0" /></a> 1.3.9.1</small>
  </address>
<!-- 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