📄 psnmp_8h-source.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>psnmp.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.2.18 --><center><a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center><hr><h1>psnmp.h</h1><a href="psnmp_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>00002 <span class="comment"> * psnmp.h</span>00003 <span class="comment"> *</span>00004 <span class="comment"> * Simple Network Management Protocol classes.</span>00005 <span class="comment"> *</span>00006 <span class="comment"> * Portable Windows Library</span>00007 <span class="comment"> *</span>00008 <span class="comment"> * Copyright (c) 1993-2002 Equivalence Pty. Ltd.</span>00009 <span class="comment"> *</span>00010 <span class="comment"> * The contents of this file are subject to the Mozilla Public License</span>00011 <span class="comment"> * Version 1.0 (the "License"); you may not use this file except in</span>00012 <span class="comment"> * compliance with the License. You may obtain a copy of the License at</span>00013 <span class="comment"> * http://www.mozilla.org/MPL/</span>00014 <span class="comment"> *</span>00015 <span class="comment"> * Software distributed under the License is distributed on an "AS IS"</span>00016 <span class="comment"> * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See</span>00017 <span class="comment"> * the License for the specific language governing rights and limitations</span>00018 <span class="comment"> * under the License.</span>00019 <span class="comment"> *</span>00020 <span class="comment"> * The Original Code is Portable Windows Library.</span>00021 <span class="comment"> *</span>00022 <span class="comment"> * The Initial Developer of the Original Code is Equivalence Pty. Ltd.</span>00023 <span class="comment"> *</span>00024 <span class="comment"> * Contributor(s): ______________________________________.</span>00025 <span class="comment"> *</span>00026 <span class="comment"> * $Log: psnmp.h,v $</span>00027 <span class="comment"> * Revision 1.9 2002/11/06 22:47:24 robertj</span>00028 <span class="comment"> * Fixed header comment (copyright etc)</span>00029 <span class="comment"> *</span>00030 <span class="comment"> * Revision 1.8 2002/09/16 01:08:59 robertj</span>00031 <span class="comment"> * Added #define so can select if #pragma interface/implementation is used on</span>00032 <span class="comment"> * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.</span>00033 <span class="comment"> *</span>00034 <span class="comment"> * Revision 1.7 1999/03/09 08:01:46 robertj</span>00035 <span class="comment"> * Changed comments for doc++ support (more to come).</span>00036 <span class="comment"> *</span>00037 <span class="comment"> * Revision 1.6 1999/02/16 08:07:10 robertj</span>00038 <span class="comment"> * MSVC 6.0 compatibility changes.</span>00039 <span class="comment"> *</span>00040 <span class="comment"> * Revision 1.5 1998/11/30 02:50:55 robertj</span>00041 <span class="comment"> * New directory structure</span>00042 <span class="comment"> *</span>00043 <span class="comment"> * Revision 1.4 1998/09/23 06:27:38 robertj</span>00044 <span class="comment"> * Added open source copyright license.</span>00045 <span class="comment"> *</span>00046 <span class="comment"> * Revision 1.3 1996/11/04 03:56:16 robertj</span>00047 <span class="comment"> * Added selectable read buffer size.</span>00048 <span class="comment"> *</span>00049 <span class="comment"> * Revision 1.2 1996/09/20 12:19:36 robertj</span>00050 <span class="comment"> * Used read timeout instead of member variable.</span>00051 <span class="comment"> *</span>00052 <span class="comment"> * Revision 1.1 1996/09/14 12:58:57 robertj</span>00053 <span class="comment"> * Initial revision</span>00054 <span class="comment"> *</span>00055 <span class="comment"> * Revision 1.6 1996/05/09 13:23:49 craigs</span>00056 <span class="comment"> * Added trap functions</span>00057 <span class="comment"> *</span>00058 <span class="comment"> * Revision 1.5 1996/04/23 12:12:46 craigs</span>00059 <span class="comment"> * Changed to use GetErrorText function</span>00060 <span class="comment"> *</span>00061 <span class="comment"> * Revision 1.4 1996/04/16 13:20:43 craigs</span>00062 <span class="comment"> * Final version prior to beta1 release</span>00063 <span class="comment"> *</span>00064 <span class="comment"> * Revision 1.3 1996/04/15 09:05:30 craigs</span>00065 <span class="comment"> * Latest version prior to integration with Robert's changes</span>00066 <span class="comment"> *</span>00067 <span class="comment"> * Revision 1.2 1996/04/01 12:36:12 craigs</span>00068 <span class="comment"> * Fixed RCS header, added IPAddress functions</span>00069 <span class="comment"> *</span>00070 <span class="comment"> * Revision 1.1 1996/03/02 06:49:51 craigs</span>00071 <span class="comment"> * Initial revision</span>00072 <span class="comment"> *</span>00073 <span class="comment"> */</span>00074 00075 <span class="preprocessor">#ifndef _PSNMP_H</span>00076 <span class="preprocessor"></span><span class="preprocessor">#define _PSNMP_H</span>00077 <span class="preprocessor"></span>00078 <span class="preprocessor">#ifdef P_USE_PRAGMA</span>00079 <span class="preprocessor"></span><span class="preprocessor">#pragma interface</span>00080 <span class="preprocessor"></span><span class="preprocessor">#endif</span>00081 <span class="preprocessor"></span>00082 <span class="preprocessor">#include <<a class="code" href="sockets_8h.html">ptlib/sockets.h</a>></span>00083 <span class="preprocessor">#include <<a class="code" href="pasn_8h.html">ptclib/pasn.h</a>></span>00084 00085 00087 <a name="l00090"></a><a class="code" href="classPSNMPVarBindingList.html">00090</a> <span class="keyword">class </span><a class="code" href="classPSNMPVarBindingList.html">PSNMPVarBindingList</a> : <span class="keyword">public</span> <a class="code" href="classPObject.html">PObject</a>00091 {00092 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPSNMPVarBindingList.html">PSNMPVarBindingList</a>, <a class="code" href="classPObject.html">PObject</a>)00093 <span class="keyword">public</span>:00094 00095 <span class="keywordtype">void</span> <a class="code" href="classPSNMPVarBindingList.html#a0">Append</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & objectID);00096 <span class="keywordtype">void</span> <a class="code" href="classPSNMPVarBindingList.html#a0">Append</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & objectID, <a class="code" href="classPASNObject.html">PASNObject</a> * obj);00097 <span class="keywordtype">void</span> <a class="code" href="classPSNMPVarBindingList.html#a2">AppendString</a>(<span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & objectID, <span class="keyword">const</span> <a class="code" href="classPString.html">PString</a> & str);00098 00099 <span class="keywordtype">void</span> <a class="code" href="classPSNMPVarBindingList.html#a3">RemoveAll</a>();00100 00101 PINDEX <a class="code" href="classPSNMPVarBindingList.html#a4">GetSize</a>() <span class="keyword">const</span>;00102 00103 <a class="code" href="classPString.html">PString</a> <a class="code" href="classPSNMPVarBindingList.html#a5">GetObjectID</a>(PINDEX idx) <span class="keyword">const</span>;00104 <a class="code" href="classPASNObject.html">PASNObject</a> & <a class="code" href="classPSNMPVarBindingList.html#a6">operator[]</a>(PINDEX idx) <span class="keyword">const</span>;00105 00106 <span class="keywordtype">void</span> <a class="code" href="classPSNMPVarBindingList.html#a7">PrintOn</a>(ostream & strm) <span class="keyword">const</span>;00107 00108 <span class="keyword">protected</span>:<a name="l00109"></a><a class="code" href="classPSNMPVarBindingList.html#n0">00109</a> <a class="code" href="classPStringList.html">PStringList</a> <a class="code" href="classPSNMPVarBindingList.html#n0">objectIds</a>;<a name="l00110"></a><a class="code" href="classPSNMPVarBindingList.html#n1">00110</a> PASNObjectList <a class="code" href="classPSNMPVarBindingList.html#n1">values</a>;00111 };00112 00114 <a name="l00117"></a><a class="code" href="classPSNMP.html">00117</a> <span class="keyword">class </span><a class="code" href="classPSNMP.html">PSNMP</a> : <span class="keyword">public</span> <a class="code" href="classPIndirectChannel.html">PIndirectChannel</a>00118 {00119 <a class="code" href="object_8h.html#a27">PCLASSINFO</a>(<a class="code" href="classPSNMP.html">PSNMP</a>, <a class="code" href="classPIndirectChannel.html">PIndirectChannel</a>)00120 <span class="keyword">public</span>:<a name="l00121"></a><a class="code" href="classPSNMP.html#s26">00121</a> <span class="keyword">enum</span> <a class="code" href="classPSNMP.html#s26">ErrorType</a> {00122 <span class="comment">// Standard RFC1157 errors</span>00123 <a class="code" href="classPSNMP.html#s26s0">NoError</a> = 0,00124 <a class="code" href="classPSNMP.html#s26s1">TooBig</a> = 1,00125 <a class="code" href="classPSNMP.html#s26s2">NoSuchName</a> = 2,00126 <a class="code" href="classPSNMP.html#s26s3">BadValue</a> = 3,00127 <a class="code" href="classPSNMP.html#s26s4">ReadOnly</a> = 4,00128 <a class="code" href="classPSNMP.html#s26s5">GenErr</a> = 5,00129 00130 <span class="comment">// Additional errors</span>00131 <a class="code" href="classPSNMP.html#s26s6">NoResponse</a>,00132 <a class="code" href="classPSNMP.html#s26s7">MalformedResponse</a>,00133 <a class="code" href="classPSNMP.html#s26s8">SendFailed</a>,00134 <a class="code" href="classPSNMP.html#s26s9">RxBufferTooSmall</a>,00135 <a class="code" href="classPSNMP.html#s26s10">TxDataTooBig</a>,00136 <a class="code" href="classPSNMP.html#s26s11">NumErrors</a>00137 };00138 <a name="l00139"></a><a class="code" href="classPSNMP.html#s27">00139</a> <span class="keyword">enum</span> <a class="code" href="classPSNMP.html#s27">RequestType</a> {00140 <a class="code" href="classPSNMP.html#s27s12">GetRequest</a> = 0,00141 <a class="code" href="classPSNMP.html#s27s13">GetNextRequest</a> = 1,00142 <a class="code" href="classPSNMP.html#s27s14">GetResponse</a> = 2,00143 <a class="code" href="classPSNMP.html#s27s15">SetRequest</a> = 3,00144 <a class="code" href="classPSNMP.html#s27s16">Trap</a> = 4,00145 };00146 00147 <span class="keyword">enum</span> { <a class="code" href="classPSNMP.html#s28s17">TrapPort</a> = 162 };00148 <a name="l00149"></a><a class="code" href="classPSNMP.html#s29">00149</a> <span class="keyword">enum</span> <a class="code" href="classPSNMP.html#s29">TrapType</a> {00150 <a class="code" href="classPSNMP.html#s29s18">ColdStart</a> = 0,00151 <a class="code" href="classPSNMP.html#s29s19">WarmStart</a> = 1,00152 <a class="code" href="classPSNMP.html#s29s20">LinkDown</a> = 2,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -