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

📄 snmp.refentries.toc78.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><i class="i">snmpSaHandlerAsync</i>(&nbsp;)     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.TOC77.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC79.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="89566"> <i class="i">snmpSaHandlerAsync</i>(&nbsp;) </a></i></h2></font><h4 class="SH"><a name="89567"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="89568"><div class="aX"><b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b>     -     asynchronous message processing routine for the subagent </div></a></dl></dl><h4 class="SH"><a name="89569"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="89570">void snmpSaHandlerAsync &nbsp;&nbsp;&nbsp;&nbsp;( &nbsp;&nbsp;&nbsp;&nbsp;OCTET_T *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pMsg,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* message from the master-agent */ &nbsp;&nbsp;&nbsp;&nbsp;ALENGTH_T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msglength,&nbsp;&nbsp;/* length of message in octets&nbsp;&nbsp; */ &nbsp;&nbsp;&nbsp;&nbsp;PTR_T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;root,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* root of mib tree&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;SA_IO_COMPLETE_T *&nbsp;&nbsp; pIoComp,&nbsp;&nbsp;&nbsp;&nbsp;/* I/O completion routine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */ &nbsp;&nbsp;&nbsp;&nbsp;SA_ERR_COMPLETE_T *&nbsp;&nbsp;pErrComp,&nbsp;&nbsp; /* error completion routine&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;SA_REG_COMPLETE_T *&nbsp;&nbsp;pRegComp,&nbsp;&nbsp; /* registration complete routine */ &nbsp;&nbsp;&nbsp;&nbsp;PTR_T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cookie&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* cookie&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;)</a></b></pre></dl></dl><h4 class="SH"><a name="89580"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89581"> </a>It decodes the message in <i class="i">pMsg</i> and responds appropriately, which can include testing, getting, and setting variables. After the message is processed, <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b> then calls whichever completion routine is appropriate.</p><dl class="margin"><dd><div class="Indent"><a name="89582"> </a><i class="i">pMsg <br></i>Expects pointer to an octet string containing the message from the master agent.</div><br><dd><div class="Indent"><a name="89583"> </a><i class="i">msglength <br></i>Expects the length of the message.</div><br><dd><div class="Indent"><a name="89584"> </a><i class="i">root <br></i>Expects a pointer to the root of the subagent's MIB tree. If <i class="i">root</i> is NULL, the default <b>mib_root_node</b> is used.</div><br><dd><div class="Indent"><a name="89585"> </a><i class="i">pIoComp <br></i>Expects a pointer to the function <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b> should call after it has processed the message from the master agent. This routine should be able to send a response to the master agent, if necessary. This function must handle the building, encoding, transmission of the response to the master agent. This function must be of the form: </div><br></dl><dl class="margin"><dd><pre class="Code2"><b><a name="89586">void SA_IO_COMPLETE_T(PTR_T pktp, SA_HEADER_T *hdr_blk, PTR_T cookie)</a></b></pre></dl><dl class="margin"><dd><div class="Indent"><a name="89587"> </a>When the subagent calls this routine, it uses the <i class="i">pktp</i> parameter to pass in a pointer to the data to be sent to the master agent. It uses the <i class="i">hdr_blk</i> parameter to pass in a pointer to the header to be included with the packet. It uses the <i class="i">cookie</i> parameter to pass in the <i class="i">cookie</i> specified in the call to <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b>. You can use this <i class="i">cookie</i> to carry information specific to your environment and application. </div><br><dd><div class="Indent"><a name="89588"> </a><i class="i">pErrComp <br></i>Expects a pointer to the function <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b> should call if it cannot generate an appropriate response to a message from the master agent. This function must be of the form: </div><br></dl><dl class="margin"><dd><pre class="Code2"><b><a name="89589">void SA_ERR_COMPLETE_T(int error_code, PTR_T cookie)</a></b></pre></dl><dl class="margin"><dd><div class="Indent"><a name="89590"> </a>The <i class="i">error_code</i> passes in one of the following error codes: </div><br><dd><div class="Indent"><a name="89591"> </a><b class="symbol_UC">SA_GEN_ERROR <br>SA_UNKNOWN_VERSION <br>SA_UNKNOWN_OPCODE1 <br>SA_UNKNOWN_OPCODE2 <br>SA_UNKNOWN_ENCODING <br>SA_DECODE_FAILURE <br>SA_ENCODE_FAILURE <br>SA_UNKNOWN_NODE <br>SA_UNKNOWN_TAG <br>SA_UNKNOWN_GRP <br>SA_SHORT_MSG <br>SA_IPC_ERROR <br>SA_LOCK_ERROR <br>SA_NODE_ERROR <br>SA_MEMORY_ERROR <br>SA_UNSUPPORTED_TYPE <br>SA_NO_SAVED_PACKET</b></div><br><dd><div class="Indent"><a name="89592"> </a>The <i class="i">cookie</i> parameter passes in the <i class="i">cookie</i> specified in the call to <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b>. You can use this <i class="i">cookie</i> to carry information specific to your environment and application.</div><br><dd><div class="Indent"><a name="89593"> </a><i class="i">pRegComp <br></i>Expects a pointer to the function <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b> should call in response to a registration completion message from the master agent. If successful, this message should contain a group ID for the MIB variables that the registration request added to the master agent's MIB tree. The subagent needs this ID when it comes time to deregister and remove those variables from the master agent's MIB tree. This function must be of the form: </div><br></dl><dl class="margin"><dd><pre class="Code2"><b><a name="89594">void&nbsp;SA_REG_COMPLETE_T&nbsp;(&nbsp;INT_32_T&nbsp;ecode,&nbsp;SA_HEADER_T&nbsp;*hdr_blk, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VBL_T&nbsp;*vblp,&nbsp;PTR_T&nbsp;cookie&nbsp;)</a></b></pre></dl><dl class="margin"><dd><div class="Indent"><a name="89595"> </a>This completion routine expects an error code in <i class="i">ecode</i>, a header block in <i class="i">hdr_blk</i>, a list of nodes at <i class="i">vblp</i>, and the <i class="i">cookie</i> passed into the <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b>. </div><br><dd><div class="Indent"><a name="89596"> </a><i class="i">cookie <br></i>Expects a pointer that you can use to pass data unchanged to the functions you specified in the <i class="i">pIoComp</i>, <i class="i">pErrComp</i>, and <i class="i">pRegComp</i> functions. </div><br></dl></dl></dl><h4 class="SH"><a name="89597"> </a>RETURNS </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89598"> </a>N/A </p></dl></dl><h4 class="SH"><a name="89599"> </a>SEE ALSO </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89600"> </a><b class="library">subagentLib</b> </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.TOC77.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC79.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 + -