📄 snmp.refentries.toc77.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">snmpSaInit</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.TOC76.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC78.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="89537"> <i class="i">snmpSaInit</i>( ) </a></i></h2></font><h4 class="SH"><a name="89538"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="89539"><div class="aX"><b class="routine"><i class="routine">snmpSaInit</i></b><b>( )</b> - initialize the subagent </div></a></dl></dl><h4 class="SH"><a name="89540"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="89541">PTR_T snmpSaInit ( PTR_T saId, /* ipchandle for socket/queue */ PTR_T sa_root, /* pointer to mib root node */ SA_REG_COMPLETE_T saRegComp /* registration complete routine */ )</a></b></pre></dl></dl><h4 class="SH"><a name="89547"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89548"> </a>Call this routine to initialize an SNMP subagent. Internally, this routine creates an IPC mechanism for receiving messages from the master agent and then spawns a task to run <b class="routine"><i class="routine">snmpSaMonitor</i></b><b>( )</b>, a function that monitors the IPC mechanism created by <b class="routine"><i class="routine">snmpSaInit</i></b><b>( )</b>. As input, <b class="routine"><i class="routine">snmpSaInit</i></b><b>( )</b> takes the parameters: <i class="i">saId</i>, <i class="i">sa_root</i>, and <i class="i">saRegComp</i>.</p><dl class="margin"><dd><div class="Indent"><a name="89549"> </a><i class="i">saId <br></i>Expects a null. In most functions in this library, an <i class="i">saId</i> parameter is a pointer to the IPC mechanism used to pass messages to the subagent. However, the IPC mechanism is first created internally to this function. Thus, this <i class="i">saId</i> parameter is not actually used for input nor is it an output parameter. It is included for parallelism with other functions in this library.</div><br><dd><div class="Indent"><a name="89550"> </a><i class="i">sa_root <br></i>This parameter provides a pointer to the MIB tree for this subagent.</div><br><dd><div class="Indent"><a name="89551"> </a><i class="i">saRegComp <br></i>Use this routine to pass in a pointer to the function that <b class="routine"><i class="routine">snmpSaHandlerAsync</i></b><b>( )</b> should execute in response to a registration status message from the master agent. If the registration was successful, the response contains a group ID for the MIB variables registered with the master agent. You will need this group ID when it comes time to deregister this SNMP subagent, or when you need to register instances of the object just registered.</div><br></dl><dd><p class="Body"><a name="89552"> </a>Although this function sets up the IPC mechanism and spawns the task that is effectively the SNMP subagent, this routine does not actually register the subagent with the master agent. The details of how and when one does that are entirely dependent upon the nature of the system you are designing. Thus, no generic registration utility is provided. For more information on sending a registration request to the master agent, see the description of <b class="routine"><i class="routine">hdrBlkBuild</i></b><b>( )</b>. </p></dl></dl><h4 class="SH"><a name="89553"> </a>RETURNS </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89554"> </a>A pointer to the IPC mechanism created within this function, or NULL on failure. </p></dl></dl><h4 class="SH"><a name="89555"> </a>SEE ALSO </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="89556"> </a><b class="library">saIoLib</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.TOC76.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC78.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 + -