📄 snmp.refentries.toc92.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">snmpdTrapSend</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.TOC91.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC93.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="84649"> <i class="i">snmpdTrapSend</i>( ) </a></i></h2></font><h4 class="SH"><a name="84650"> </a>NAME </h4><dl class="margin"><dl class="margin"><dd><a name="84651"><div class="aX"><b class="routine"><i class="routine">snmpdTrapSend</i></b><b>( )</b> - general interface to trap facilities </div></a></dl></dl><h4 class="SH"><a name="84652"> </a>SYNOPSIS </h4><dl class="margin"><dl class="margin"><dd><pre class="Code"><b><a name="84653">void snmpdTrapSend ( void * pSnmpEndpoint, /* snmp agent transport endpoint */ int numDestn, /* number of destinations */ void ** ppDestAddrTbl, /* array of ptrs to destinations */ void * pLocalAddr, /* local address */ int version, /* SNMP version */ char * pTrapCmnty, /* trap community string */ OIDC_T * pMyOid, /* agent object identifier */ int myOidLen, /* length of agent object identifier */ u_long * pIpAddr, /* ip address of sender */ int trapType, /* trap type */ int trapSpecific, /* trap specific code */ int numVarBinds, /* number of varbinds in packet */ FUNCPTR trapVarBindsRtn, /* routine to bind varbinds */ void * pCookie /* argument to binding routine */ )</a></b></pre></dl></dl><h4 class="SH"><a name="84670"> </a>DESCRIPTION </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84671"> </a>This routine sends a trap of type <i class="i">trapType</i> and specific <i class="i">trapSpecific</i> to all the specified destinations, given an array of destinations in <i class="i">ppDestAddrTbl</i> of len <i class="i">numDestn</i>.</p><dd><p class="Body"><a name="84672"> </a>The <i class="i">version</i> parameter is either SNMP_VERSION_1 or SNMP_VERSION_2, depending on whether a v1-style or v2-style trap is to be generated. The community used is specified by <i class="i">pTrapCmnty</i>. The <i class="i">pLocalAddr</i> parameter indicates a local address to use for a sending endpoint. The parameters <i class="i">pMyOid</i> and <i class="i">myOidlen</i> specify the system object identifier (<i class="i">sysObjId</i>) to use.</p><dd><p class="Body"><a name="84673"> </a><i class="i">numVarBinds</i> indicates the number of variable bindings that are to be encoded in the packet. The <i class="i">trapVarBindsRtn</i> parameter is the routine to use for doing the variable bindings. And the parameter <i class="i">pCookie</i> is passed to this routine as shown in the following:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="84674">(*trapVarBindsRtn) (pPkt, pCookie)</a></b></pre></dl></dl><h4 class="SH"><a name="84675"> </a>RETURNS </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84676"> </a>N/A </p></dl></dl><h4 class="SH"><a name="84677"> </a>SEE ALSO </h4><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84678"> </a><b>snmpdLib</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.TOC91.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="snmp.refEntries.TOC93.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 + -