📄 snmp.refentries.toc46.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">masterIpcComp</i>( ) 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.TOC45.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC47.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="89261"> <i class="i">masterIpcComp</i>( ) </a></i></h2></font><h4 class="SH"><a name="89262"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="89099"><div class="aX"><b class="routine"><i class="routine">masterIpcComp</i></b><b>( )</b> - transmit a completion of transmission message </div></a></dl></dl><h4 class="SH"><a name="89100"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="89101">void masterIpcComp ( OCTET_T opcode, /* this specifies what needs to be done */ EBUFFER_T * pBuf, /* reply message to be sent */ VBL_T * pVblist, /* list of varbinds that the message contained */ PTR_T ipchandle /* subagent address */ )</a></b></pre></dl></dl><h4 class="SH"><a name="89108"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89109"> </a>If the SNMP master agent uses <b class="routine"><i class="routine">snmpMasterHandlerAsync</i></b><b>( )</b> to process a subagent's unsolicited control message (such as a registration request), it uses <b class="routine"><i class="routine">masterIpcComp</i></b><b>( )</b> to complete processing for the message. In the current implementation, this means telling the subagent the completion status of a registration or deregistration request. However, you can rewrite this function to implement a broader range of responses (such as forwarding traps to the SNMP manager).</p><dd><p class="Body"><a name="89110"> </a>When the master agent calls this routine, it uses <i class="i">opcode</i> to indicate the processing status of the message. If the status indicates an error, <b class="routine"><i class="routine">masterIpcComp</i></b><b>( )</b> drops the packet. If the status indicates success, the master agent uses the <i class="i">pBuf</i> parameter to pass in a message for the subagent at <i class="i">ipchandle</i>. Internally, <b class="routine"><i class="routine">masterIpcComp</i></b><b>( )</b> calls <b class="routine"><i class="routine">masterIoWrite</i></b><b>( )</b> to forward the message to the specified subagent. If this message is the response to a successful registration request, it contains the group ID for the MIB variables just added to the master agent's MIB tree. The subagent needs this group ID for any deregistration request it might send later. It also uses this ID to register instances of the object just registered.</p><dd><p class="Body"><a name="89111"> </a>If the <i class="i">opcode</i> is a value of 1 or greater (up to and including 127), the master agent uses the <i class="i">pVblist </i>parameter to pass in a varbind list that it extracted from the control message. In the current implementation, the <b class="routine"><i class="routine">masterIpcComp</i></b><b>( )</b> routine does nothing with the message and returns. However, you could modify <b class="routine"><i class="routine">masterIpcComp</i></b><b>( )</b> to process the message according to the value specified by <i class="i">opcode</i>. For example, if <i class="i">opcode</i> indicates a trap, you could forward the information at <i class="i">pVblist </i>to the SNMP manager.</p><dd><p class="Body"><a name="89112"> </a>Currently, <b>subagent.h</b> defines symbolic constants for opcodes 1 through 12 (with opcode 11, <b>SA_TRAP_REQUEST</b>, reserved for trap requests). You are free to use the remaining opcodes for message types specific to your implementation. </p></dl></dl><h4 class="SH"><a name="89113"> </a>RETURNS </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89114"> </a>N/A </p></dl></dl><h4 class="SH"><a name="89115"> </a>SEE ALSO </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89116"> </a><b>masterIoLib</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.TOC45.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC47.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 + -