⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 snmp.refentries.toc2.html

📁 vxworks相关论文
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><link rel="STYLESHEET" type="text/css" href="wrs.css"><title>saIoLib     SNMP Reference   </title></head><body bgcolor="FFFFFF"><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a></a><a href="snmp.refEntries.TOC.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="snmp.refEntries.TOC1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p><font face="Helvetica, sans-serif" class="sans"><h2 class="H1"><i><a name="88652"> saIoLib </a></i></h2></font><h4 class="SH"><a name="88653"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="88654"><div class="aX"><b class="library">saIoLib</b>     -     default transport routines for SNMP subagent </div></a></dl></dl><h4 class="SH"><a name="88655"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="88656"> </a><b class="routine"><i class="routine">snmpSaInit</i></b><b>(&nbsp;)</b>     -     initialize the subagent </p><dd><p class="Body"><a name="88657"> </a><b class="routine"><i class="routine">saIoWrite</i></b><b>(&nbsp;)</b>     -     send a packet to the master agent's message queue </p><dd><p class="Body"><a name="88658"> </a><b class="routine"><i class="routine">saIpcFree</i></b><b>(&nbsp;)</b>     -     free the specified IPC mechanism </p><dd><p class="Body"><a name="88659"> </a><b class="routine"><i class="routine">saMsgBuild</i></b><b>(&nbsp;)</b>     -     build and encode a message and send it to the master agent </p><dd><p class="Body"><a name="88660"> </a><b class="routine"><i class="routine">hdrBlkBuild</i></b><b>(&nbsp;)</b>     -     create the header block and the demuxer information </p><dd><p class="Body"><a name="88661"> </a><b class="routine"><i class="routine">envoy_now</i></b><b>(&nbsp;)</b>     -     return the number of clock ticks elapsed since the timer was set </p><dd><p class="Body"><a name="88662"> </a><b class="routine"><i class="routine">envoy_call_timer</i></b><b>(&nbsp;)</b>     -     execute the specified function when the timer expires </p></dl><dl class="margin"><dd><pre class="Code"><b><a name="88663">PTR_T&nbsp;snmpSaInit  (PTR_T&nbsp;saId, PTR_T&nbsp;sa_root, SA_REG_COMPLETE_T&nbsp;saRegComp) </a></b><dd> <b><a name="88664">STATUS&nbsp;saIoWrite  (PTR_T&nbsp;ipchandle, EBUFFER_T&nbsp;*&nbsp;pBuf, INT_32_T&nbsp;code) </a></b><dd> <b><a name="88665">void&nbsp;saIpcFree  (PTR_T&nbsp;ipchandle) </a></b><dd> <b><a name="88666">void&nbsp;saMsgBuild  (VBL_T&nbsp;*&nbsp;vblist, SA_HEADER_T&nbsp;*&nbsp;hdr_blk, SA_DEMUX_T&nbsp;*&nbsp;demuxer, PTR_T&nbsp;saId) </a></b><dd> <b><a name="88667">void&nbsp;hdrBlkBuild  (SA_HEADER_T&nbsp;*&nbsp;hdr, VBL_T&nbsp;*&nbsp;vblist, int&nbsp;opt, int&nbsp;group, PTR_T&nbsp;saId) </a></b><dd> <b><a name="88668">bits32_t&nbsp;envoy_now  (void) </a></b><dd> <b><a name="88669">void&nbsp;envoy_call_timer  (bits32_t&nbsp;when, void&nbsp;(*what)(void)) </a></b></pre></dl></dl><h4 class="SH"><a name="88670"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="88671"> </a>This library implements the subagent side of the IPC mechanism used to pass messages between the SNMP master agent and its subagents. In the shipped version of this library, the IPC mechanism is a message queue. However, it is a relatively simple matter to replace the message queue with a socket if you cannot use message queues.</p><dd><p class="Body"><a name="88672"> </a>To set up the IPC mechanism and spawn a task to monitor it, call <b class="routine"><i class="routine">snmpSaInit</i></b><b>(&nbsp;)</b>. To send a message to the master agent, you can call <b class="routine"><i class="routine">saIoWrite</i></b><b>(&nbsp;)</b>. However, you will likely never call this function directly. Instead, you will call <b class="routine"><i class="routine">hdrBlkBuild</i></b><b>(&nbsp;)</b>. Internally, <b class="routine"><i class="routine">hdrBlkBuild</i></b><b>(&nbsp;)</b> calls <b class="routine"><i class="routine">saMsgBuild</i></b><b>(&nbsp;)</b>, which calls <b class="routine"><i class="routine">snmpSubEncode</i></b><b>(&nbsp;)</b> and finally <b class="routine"><i class="routine">saIoWrite</i></b><b>(&nbsp;)</b>.</p><dd><p class="Body"><a name="88673"> </a>The first message you will transmit using <b class="routine"><i class="routine">hdrBlkBuild</i></b><b>(&nbsp;)</b> will be a registration message that registers objects and instances as a group in the master agent's MIB tree. If successful, the response to this message will contain a group ID. Make sure that you store this ID so that you can later remove the group from the MIB tree when you want to deregister the subagent. You also need this ID if you want to register instances of the object just registered.</p><dd><p class="Body"><a name="88674"> </a>Exactly how and when you register a subagent is up to you, but keep in mind that you can do so only after the master agent is up an running. </p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a></a><a href="snmp.refEntries.TOC.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="snmp.refEntries.TOC1.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC3.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc.    conversion tool:  Quadralay WebWorks Publisher 4.0.11    template:         CSS Template, Jan 1998 - Jefro --->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -