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

📄 snmp.refentries.toc81.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">snmpSaHandlerWR</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.TOC80.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC82.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="89634"> <i class="i">snmpSaHandlerWR</i>(&nbsp;) </a></i></h2></font><h4 class="SH"><a name="89635"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="89636"><div class="aX"><b class="routine"><i class="routine">snmpSaHandlerWR</i></b><b>(&nbsp;)</b>     -     provide <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b> functionality synchronously </div></a></dl></dl><h4 class="SH"><a name="89637"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="93063">INT_32_T snmpSaHandlerWR &nbsp;&nbsp;&nbsp;&nbsp;( &nbsp;&nbsp;&nbsp;&nbsp;OCTET_T *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pMsg,&nbsp;&nbsp;&nbsp;&nbsp; /* message from the master-agent */ &nbsp;&nbsp;&nbsp;&nbsp;ALENGTH_T&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;msgl,&nbsp;&nbsp;&nbsp;&nbsp; /* kength of message in octets&nbsp;&nbsp; */ &nbsp;&nbsp;&nbsp;&nbsp;EBUFFER_T *&nbsp;&nbsp;&nbsp;&nbsp;pBuf,&nbsp;&nbsp;&nbsp;&nbsp; /* buffer to hold reply packet&nbsp;&nbsp; */ &nbsp;&nbsp;&nbsp;&nbsp;SA_HEADER_T *&nbsp;&nbsp;pHdr,&nbsp;&nbsp;&nbsp;&nbsp; /* place for header structure&nbsp;&nbsp;&nbsp;&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;VBL_T *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pVblist,&nbsp;&nbsp;/* place for vblist&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;PTR_T&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;)</a></b></pre></dl></dl><h4 class="SH"><a name="93065"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89648"> </a>This routine puts a synchronous shell around <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b>. Like <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b>, this function can decode a message from the master agent. If the message is a query against a variable in the subagent's MIB tree, <b class="routine"><i class="routine">snmpSaHandlerWR</i></b><b>(&nbsp;)</b> processes the request and generates a response. However, <b class="routine"><i class="routine">snmpSaHandlerWR</i></b><b>(&nbsp;)</b> does not handle the completion processing for the message that would have been handled by the <i class="i">pIoComp</i>, <i class="i">pErrComp</i>, and <i class="i">pRegComp</i> routines specified as input to <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b>.</p><dd><p class="Body"><a name="89649"> </a>Instead, it uses its returned function value to indicate that status of the message processing and uses <i class="i">pBuf</i>, <i class="i">pHdr</i>, and <i class="i">pVblist</i> as output parameters if that status requires additional processing on your part. For example, if the message was a successfully processed query, the response data is included in <i class="i">pVblist</i> and a header is included in <i class="i">pHdr</i>, but that response is not yet encoded in a packet or transmitted back to the master agent. In <b class="routine"><i class="routine">snmpSaHandlerAsyn</i></b><b>(&nbsp;)</b>, all that would normally be handled in the <i class="i">pIoComp</i> routine. Effectively, you must now call your <i class="i">pIoComp</i> routine explicitly. </p><dl class="margin"><dd><div class="Indent"><a name="89650"> </a><i class="i">pMsg <br></i>Expects a pointer to the message, an octet string, from the master agent. </div><br><dd><div class="Indent"><a name="89651"> </a><i class="i">msgl <br></i>Expects the length of the message starting at <i class="i">pMsg</i>. </div><br><dd><div class="Indent"><a name="89652"> </a><i class="i">pBuf <br></i>Expects a pointer to a previously allocate EBUFFER_T into which this function can write a response, if any. In some cases (if <b>opcode1</b> is <b>SA_QUERY_REQUEST</b>), instead of indicating an error in the returned value of <b class="routine"><i class="routine">snmpSaHandlerWR</i></b><b>(&nbsp;)</b>, the error is encoded into this message. This is done for errors more appropriately handled by the SNMP manager. </div><br><dd><div class="Indent"><a name="89653"> </a><i class="i">pHdr <br></i>Expects a pointer to a previously allocated <b>SA_HEADER_T</b> structure into which this function can writer header block information, if necessary. If <b>hdr_blk.sa_error</b> is non-zero, other members might not contain valid data. </div><br><dd><div class="Indent"><a name="89654"> </a><i class="i">pVblist <br></i>Expects a pointer to a previously allocated VBL_T structure into which this function can write the list of nodes found in the original message from the master agent. </div><br><dd><div class="Indent"><a name="89655"> </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></dl></dl></dl><h4 class="SH"><a name="89656"> </a>RETURNS </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89657"> </a>0 on success, or a positive value indicating an error. For return code values, see <b>subagent.h</b>. Using these values as a switch, you should call one of the functions you would have specified for <i class="i">pIoComp</i>, <i class="i">pErrComp</i>, or <i class="i">pRegComp</i> in a call to <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>(&nbsp;)</b>. </p></dl></dl><h4 class="SH"><a name="89658"> </a>SEE ALSO </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89659"> </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.TOC80.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC82.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 + -