📄 m2udplib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/m2UdpLib.html - generated by refgen from m2UdpLib.c --> <title> m2UdpLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>VxWorks Reference Manual : Libraries</i></a></p></blockquote><h1>m2UdpLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>m2UdpLib</strong> - MIB-II UDP-group API for SNMP agents </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><i><a href="./m2UdpLib.html#m2UdpInit">m2UdpInit</a></i>( )</b> - initialize MIB-II UDP-group access<br><b><i><a href="./m2UdpLib.html#m2UdpGroupInfoGet">m2UdpGroupInfoGet</a></i>( )</b> - get MIB-II UDP-group scalar variables<br><b><i><a href="./m2UdpLib.html#m2UdpTblEntryGet">m2UdpTblEntryGet</a></i>( )</b> - get a UDP MIB-II entry from the UDP list of listeners<br><b><i><a href="./m2UdpLib.html#m2UdpDelete">m2UdpDelete</a></i>( )</b> - delete all resources used to access the UDP group<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides MIB-II services for the UDP group. It providesroutines to initialize the group, access the group scalar variables, andread the table of UDP listeners. For a broader description of MIB-IIservices, see the manual entry for m2Lib.<p></blockquote><h4>USING THIS LIBRARY</h4><blockquote><p>This library can be initialized and deleted by calling<b><i><a href="./m2UdpLib.html#m2UdpInit">m2UdpInit</a></i>( )</b> and <b><i><a href="./m2UdpLib.html#m2UdpDelete">m2UdpDelete</a></i>( )</b> respectively, if only the UDP group's services are needed. If full MIB-II support is used, this group and all othergroups can be initialized and deleted by calling <b><i><a href="./m2Lib.html#m2Init">m2Init</a></i>( )</b> and <b><i><a href="./m2Lib.html#m2Delete">m2Delete</a></i>( )</b>.<p>The group scalar variables are accessed by calling <b><i><a href="./m2UdpLib.html#m2UdpGroupInfoGet">m2UdpGroupInfoGet</a></i>( )</b>as follows:<pre> M2_UDP udpVars; if (m2UdpGroupInfoGet (&udpVars) == OK) /* values in udpVars are valid */</pre>The UDP table of listeners can be accessed in lexicographical order.The first entry in the table can be accessed by setting the tableindex to zero in a call to <b><i><a href="./m2UdpLib.html#m2UdpTblEntryGet">m2UdpTblEntryGet</a></i>( )</b>. Every other entrythereafter can be accessed by incrementing the index returned from theprevious invocation to the next possible lexicographical index, andrepeatedly calling <b><i><a href="./m2UdpLib.html#m2UdpTblEntryGet">m2UdpTblEntryGet</a></i>( )</b> with the <b>M2_NEXT_VALUE</b> constantas the search parameter. For example:<pre>M2_UDPTBL udpEntry; /* Specify zero index to get the first entry in the table */ udpEntry.udpLocalAddress = 0; /* local IP Address in host byte order */ udpEntry.udpLocalPort = 0; /* local port Number */ /* get the first entry in the table */ if ((m2UdpTblEntryGet (M2_NEXT_VALUE, &udpEntry) == OK) /* values in udpEntry in the first entry are valid */ /* process first entry in the table */ /* * For the next call, increment the index returned in the previous call. * The increment is to the next possible lexicographic entry; for * example, if the returned index was 0.0.0.0.3000 the index passed in the * next invocation should be 0.0.0.0.3001. If an entry in the table * matches the specified index, then that entry is returned. * Otherwise the closest entry following it, in lexicographic order, * is returned. */ /* get the second entry in the table */ if ((m2UdpTblEntryGet (M2_NEXT_VALUE, &udpEntry) == OK) /* values in udpEntry in the second entry are valid */</pre></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>m2Lib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2UdpLib.html#top">m2UdpLib</a></b>, <b><a href="./m2Lib.html#top">m2Lib</a></b>, <b><a href="./m2IfLib.html#top">m2IfLib</a></b>, <b><a href="./m2IpLib.html#top">m2IpLib</a></b>, <b><a href="./m2IcmpLib.html#top">m2IcmpLib</a></b>, <b><a href="./m2TcpLib.html#top">m2TcpLib</a></b>, <b><a href="./m2SysLib.html#top">m2SysLib</a></b><hr><a name="m2UdpInit"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>m2UdpInit</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>m2UdpInit</i>( )</strong> - initialize MIB-II UDP-group access</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2UdpInit (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine allocates the resources needed to allow access to the UDP MIB-II variables. This routine must be called before any UDP variablescan be accessed.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, always.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2UdpLib.html#top">m2UdpLib</a></b>, <b><i><a href="./m2UdpLib.html#m2UdpGroupInfoGet">m2UdpGroupInfoGet</a></i>( )</b>, <b><i><a href="./m2UdpLib.html#m2UdpTblEntryGet">m2UdpTblEntryGet</a></i>( )</b>, <b><i><a href="./m2UdpLib.html#m2UdpDelete">m2UdpDelete</a></i>( )</b><hr><a name="m2UdpGroupInfoGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>m2UdpGroupInfoGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>m2UdpGroupInfoGet</i>( )</strong> - get MIB-II UDP-group scalar variables</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2UdpGroupInfoGet ( M2_UDP * pUdpInfo /* pointer to the UDP group structure */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine fills in the UDP structure at <i>pUdpInfo</i> with the MIB-IIUDP scalar variables.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if <i>pUdpInfo</i> is not a valid pointer.<p></blockquote><h4>ERRNO</h4><blockquote><p><p>S_m2Lib_INVALID_PARAMETER<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2UdpLib.html#top">m2UdpLib</a></b>, <b><i><a href="./m2UdpLib.html#m2UdpInit">m2UdpInit</a></i>( )</b>, <b><i><a href="./m2UdpLib.html#m2UdpTblEntryGet">m2UdpTblEntryGet</a></i>( )</b>, <b><i><a href="./m2UdpLib.html#m2UdpDelete">m2UdpDelete</a></i>( )</b><hr><a name="m2UdpTblEntryGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>m2UdpTblEntryGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>m2UdpTblEntryGet</i>( )</strong> - get a UDP MIB-II entry from the UDP list of listeners</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2UdpTblEntryGet ( int search, /* M2_EXACT_VALUE or M2_NEXT_VALUE */ M2_UDPTBL * pUdpEntry /* ptr to the requested entry with index */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine traverses the UDP table of listeners and does an<b>M2_EXACT_VALUE</b> or a <b>M2_NEXT_VALUE</b> search based on the<i>search</i> parameter. The calling routine is responsible forsupplying a valid MIB-II entry index in the input structure<i>pUdpEntry</i>. The index is made up of the IP address and the localport number. The first entry in the table is retrieved by doing a<b>M2_NEXT_VALUE</b> search with the index fields set to zero.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the input parameter is not specified or a match is not found.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> S_m2Lib_INVALID_PARAMETER<br> S_m2Lib_ENTRY_NOT_FOUND<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2UdpLib.html#top">m2UdpLib</a></b>, <b><a href="./m2Lib.html#top">m2Lib</a></b>, <b><i><a href="./m2UdpLib.html#m2UdpInit">m2UdpInit</a></i>( )</b>, <b><i><a href="./m2UdpLib.html#m2UdpGroupInfoGet">m2UdpGroupInfoGet</a></i>( )</b>, <b><i><a href="./m2UdpLib.html#m2UdpDelete">m2UdpDelete</a></i>( )</b><hr><a name="m2UdpDelete"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>m2UdpDelete</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>m2UdpDelete</i>( )</strong> - delete all resources used to access the UDP group</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS m2UdpDelete (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine frees all the resources allocated at the time the group wasinitialized. The UDP group should not be accessed after this routine has beencalled.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, always.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./m2UdpLib.html#top">m2UdpLib</a></b>, <b><i><a href="./m2UdpLib.html#m2UdpInit">m2UdpInit</a></i>( )</b>, <b><i><a href="./m2UdpLib.html#m2UdpGroupInfoGet">m2UdpGroupInfoGet</a></i>( )</b>, <b><i><a href="./m2UdpLib.html#m2UdpTblEntryGet">m2UdpTblEntryGet</a></i>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -