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

📄 snmp.refentries.toc82.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">snmpSubEncode</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.TOC81.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC83.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="89456"> <i class="i">snmpSubEncode</i>(&nbsp;) </a></i></h2></font><h4 class="SH"><a name="89457"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="89458"><div class="aX"><b class="routine"><i class="routine">snmpSubEncode</i></b><b>(&nbsp;)</b>     -     encode a packet for transmission to master agent or subagent </div></a></dl></dl><h4 class="SH"><a name="89459"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="89460">INT_32_T snmpSubEncode &nbsp;&nbsp;&nbsp;&nbsp;( &nbsp;&nbsp;&nbsp;&nbsp;VBL_T *&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pVblist,&nbsp;&nbsp; /* varbindlist to be encoded */ &nbsp;&nbsp;&nbsp;&nbsp;SA_HEADER_T *&nbsp;&nbsp;pHdr,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* header block structure&nbsp;&nbsp;&nbsp;&nbsp;*/ &nbsp;&nbsp;&nbsp;&nbsp;SA_DEMUX_T *&nbsp;&nbsp; pDemuxer,&nbsp;&nbsp;/* demuxer structure&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; */ &nbsp;&nbsp;&nbsp;&nbsp;EBUFFER_T *&nbsp;&nbsp;&nbsp;&nbsp;pBuf&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /* buffer to place result in */ &nbsp;&nbsp;&nbsp;&nbsp;)</a></b></pre></dl></dl><h4 class="SH"><a name="89467"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89468"> </a>This routine encodes a memory-resident varbind list. The result is a buffer containing a message ready for transmission. Most of the arguments are values to be encoded into the buffer.</p><dl class="margin"><dd><div class="Indent"><a name="89469"> </a><i class="i">pVblist <br></i>Expects a pointer to a VLB_T structure containing the list of the varbinds to be encoded in the message. In a control message, the varbinds identify the nodes or instances to be added or removed from the master agents MIB tree. In a query message, the varbinds identify the variables to be gotten or set. In a trap message sent from a subagent to its master agent, the varbinds specify the objects to be sent in a trap message to the SNMP manager. A trap message from a subagent follows the SNMPv2 trap style. Thus, the first object in the list must always be <b>sysUpTime</b>. The second object must be a <b>snmpTrapOID.0</b> whose value is the administratively assigned name of the notification.</div><br><dd><div class="Indent"><a name="89470"> </a><i class="i">pHdr <br></i>Expects a pointer to a <b>SA_HEADER_T</b> structure containing all the items that go into the message header.</div><br><dd><div class="Indent"><a name="89471"> </a><i class="i">pDemuxer <br></i>Expects a pointer to an <b>SA_DEMUX_T</b> structure containing all the information the subagent might need to demux the packet. That is, to determine the time and space contexts for this request. In a v1 request, the string part of the demuxer is the community string and the object ID is unused. In a v2 request, the string is the local entity string from the context and the Object ID is the local time ID from the context.</div><br><dd><div class="Indent"><a name="89472"> </a><i class="i">pBuf <br></i>Expects a pointer to an EBUFFER_T structure into which <b class="routine"><i class="routine">snmpSubEncode</i></b><b>(&nbsp;)</b> can write the encoded packet. If <i class="i">pBuf</i> references a previously allocated <b class="routine"><i class="routine">snmpSubEncode</i></b><b>(&nbsp;)</b> tries to the necessary space. </div><br></dl></dl></dl><h4 class="SH"><a name="89473"> </a>RETURNS </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89474"> </a>0, if successful (that is, the structure at pBuf is ready for transmission); 1, if there is an illegal or unknown argument; 2, if there is insufficient buffer space at <i class="i">pBuf</i> or space cannot be allocated. </p></dl></dl><h4 class="SH"><a name="89477"> </a>SEE ALSO </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89478"> </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.TOC81.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC83.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 + -