⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cradiusclientconnection_8h-source.html

📁 采用 ACE 开发的 radius 应用
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>ace-radius: RADIUS/CRadiusClientConnection.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.3.7-20040704 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a></div><h1>RADIUS/CRadiusClientConnection.h</h1><pre class="fragment"><div>00001 <span class="comment">/*</span>00002 <span class="comment"> * This source file is part of the ace-radius library.  This code was</span>00003 <span class="comment"> * written by Alex Agranov in 2004, and is covered by the BSD open source</span>00004 <span class="comment"> * license. Refer to the accompanying documentation for details on usage and</span>00005 <span class="comment"> * license.</span>00006 <span class="comment"> */</span>00007 00008 <span class="preprocessor">#ifndef _CRADIUSCLIENTCONNECTION_H__</span>00009 <span class="preprocessor"></span><span class="preprocessor">#define _CRADIUSCLIENTCONNECTION_H__</span>00010 <span class="preprocessor"></span>00011 <span class="preprocessor">#include "Global.h"</span>00012 <span class="preprocessor">#include "ace/SOCK_Dgram.h"</span>00013 <span class="preprocessor">#include "ace/Map_Manager.h"</span>00014 <span class="preprocessor">#include "ace/INET_Addr.h"</span>00015 00016 <span class="preprocessor">#include "CTask.h"</span>00017 <span class="preprocessor">#include "CRadius.h"</span>00018 <span class="preprocessor">#include "CRadiusPacket.h"</span>00019 00020 00021 <span class="keyword">class </span><a class="code" href="classCRadiusClientStack.html">CRadiusClientStack</a>;00022 <span class="keyword">class </span><a class="code" href="classCRadiusClientData.html">CRadiusClientData</a>;00023 <span class="keyword">class </span><a class="code" href="classCRadiusSecret.html">CRadiusSecret</a>;00024 <a name="l00044"></a><a class="code" href="classCRadiusClientConnection.html">00044</a> <span class="keyword">class </span><a class="code" href="classCRadiusClientConnection.html">CRadiusClientConnection</a> : <span class="keyword">public</span> <a class="code" href="classCTask.html">CTask</a>00045 {00046 <span class="keyword">public</span>:00048 00067     <a class="code" href="classCRadiusClientConnection.html#a0">CRadiusClientConnection</a>(<a class="code" href="classCRadiusClientStack.html">CRadiusClientStack</a> * p_stack,00068                             <a class="code" href="classCRadiusSecret.html">CRadiusSecret</a> * p_secret,00069                             <span class="keyword">const</span> <span class="keywordtype">char</span> * p_hostname, ACE_UINT16 p_port = D_RADIUS_AUTHENTICATION_PORT,00070                             <span class="keyword">const</span> <span class="keywordtype">char</span> * p_localHostname = NULL, ACE_UINT16 p_localPort = 0,00071                             <span class="keywordtype">int</span> p_responseTimeout = 5, <span class="keywordtype">int</span> p_retransmitCount = 4,00072                             <span class="keywordtype">int</span> p_disableConnectionThreshold = 20, <span class="keywordtype">int</span> p_disableConnectionTimeout = 15);00073 00074     00076 00079     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#a1">start</a>(<span class="keywordtype">void</span>);00080 00081 00083 00089     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#a2">sendPacket</a>(<a class="code" href="classCRadiusClientData.html">CRadiusClientData</a> * p_data);00090 00091 00093 00099     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#a3">handleMessage</a>(ACE_Message_Block * p_msg);00100 00102 00106     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#a4">handleTimeout</a>(<a class="code" href="classCTimer.html">CTimer</a> * p_timer);00107 00108 00110     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#a5">svcHandler</a>(<span class="keywordtype">void</span>);00111 00113 00117     <span class="keywordtype">void</span> <a class="code" href="classCRadiusClientConnection.html#a6">disable</a>(<span class="keywordtype">void</span>);00118 00119 00121     <a class="code" href="classCRadiusSecret.html">CRadiusSecret</a> * <a class="code" href="classCRadiusClientConnection.html#a7">getSecret</a>(<span class="keywordtype">void</span>);00122 00123 00124 <span class="keyword">private</span>:00125 00127 00131     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#d0">send</a>(<a class="code" href="classCRadiusClientData.html">CRadiusClientData</a> * p_data);00132 00133 00135 00139     <span class="keywordtype">void</span> <a class="code" href="classCRadiusClientConnection.html#d1">addToMap</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> p_id, <a class="code" href="classCRadiusClientData.html">CRadiusClientData</a> * p_data);00140 00142 00146     <a class="code" href="classCRadiusClientData.html">CRadiusClientData</a> * <a class="code" href="classCRadiusClientConnection.html#d2">findInMap</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> p_id);00147 00149 00152     <span class="keywordtype">void</span> <a class="code" href="classCRadiusClientConnection.html#d3">removeFromMap</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> p_id);00153 00154     00156 00159     <span class="keywordtype">void</span> <a class="code" href="classCRadiusClientConnection.html#d4">startRetransmitTimer</a>(<a class="code" href="classCRadiusClientData.html">CRadiusClientData</a> * p_data);00160 00161 00163 00168     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#d5">validateResponse</a>(<a class="code" href="classCRadiusPacket.html">CRadiusPacket</a> * p_responsePacket, <a class="code" href="classCRadiusPacket.html">CRadiusPacket</a> * p_requestPacket);00169 00170 00172 00176     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#d6">transmitFailure</a>(<a class="code" href="classCRadiusClientData.html">CRadiusClientData</a> * p_data);00177 00178 <a name="l00180"></a><a class="code" href="classCRadiusClientConnection.html#r0">00180</a>     <a class="code" href="classCRadiusClientStack.html">CRadiusClientStack</a> * <a class="code" href="classCRadiusClientConnection.html#r0">m_stack</a>;00181 <a name="l00183"></a><a class="code" href="classCRadiusClientConnection.html#r1">00183</a>     <a class="code" href="classCRadiusSecret.html">CRadiusSecret</a> * <a class="code" href="classCRadiusClientConnection.html#r1">m_secret</a>;00184 <a name="l00186"></a><a class="code" href="classCRadiusClientConnection.html#r2">00186</a>     <a class="code" href="classCRadiusPacket.html">CRadiusPacket</a> <a class="code" href="classCRadiusClientConnection.html#r2">m_packet</a>;00187 <a name="l00189"></a><a class="code" href="classCRadiusClientConnection.html#r3">00189</a>     ACE_INET_Addr   <a class="code" href="classCRadiusClientConnection.html#r3">m_serverAddress</a>;00190     <a name="l00192"></a><a class="code" href="classCRadiusClientConnection.html#r4">00192</a>     ACE_INET_Addr   <a class="code" href="classCRadiusClientConnection.html#r4">m_clientAddress</a>;00193     <a name="l00195"></a><a class="code" href="classCRadiusClientConnection.html#r5">00195</a>     ACE_SOCK_Dgram  <a class="code" href="classCRadiusClientConnection.html#r5">m_socket</a>; 00196 <a name="l00198"></a><a class="code" href="classCRadiusClientConnection.html#r6">00198</a>     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#r6">m_failureCount</a>;00199 <a name="l00201"></a><a class="code" href="classCRadiusClientConnection.html#r7">00201</a>     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#r7">m_isDisabled</a>;00202 <a name="l00204"></a><a class="code" href="classCRadiusClientConnection.html#r8">00204</a>     ACE_Time_Value <a class="code" href="classCRadiusClientConnection.html#r8">m_disabledTime</a>;00205 00206 <a name="l00208"></a><a class="code" href="classCRadiusClientConnection.html#r9">00208</a>     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#r9">m_disableConnectionThreshold</a>;00209 <a name="l00211"></a><a class="code" href="classCRadiusClientConnection.html#r10">00211</a>     ACE_Time_Value <a class="code" href="classCRadiusClientConnection.html#r10">m_disableConnectionTimeout</a>;00212 00213 00215 <a name="l00219"></a><a class="code" href="classCRadiusClientConnection.html#r11">00219</a>     ACE_Map_Manager&lt;unsigned char, CRadiusClientData *, ACE_Null_Mutex&gt; <a class="code" href="classCRadiusClientConnection.html#r11">m_packetMap</a>;00220 00221 <a name="l00223"></a><a class="code" href="classCRadiusClientConnection.html#r12">00223</a>     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#r12">m_responseTimeout</a>;00224     <a name="l00226"></a><a class="code" href="classCRadiusClientConnection.html#r13">00226</a>     <span class="keywordtype">int</span> <a class="code" href="classCRadiusClientConnection.html#r13">m_retransmitCount</a>;00227 00228     00229 };00230 00231 <span class="preprocessor">#endif // _CRADIUSCLIENTCONNECTION_H__</span>00232 <span class="preprocessor"></span></div></pre><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 30 11:00:57 2005 for ace-radius by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.7-20040704 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -