/*
* radproto.h
*
* RADIUS protocol client classes that offer good performance,
* scalability and multithreading access.
*
* Copyright (c) 2003, Quarcom FHU, Michal Zygmuntowicz
*
* This work is published under the GNU Public License (GPL)
* see file COPYING for details.
* We also explicitely grant the right to link this code
* with the OpenH323 library.
*
* $Log: radproto.h,v $
* Revision 1.13 2005/04/18 11:24:51 zvision
* Use list instead of vector in GetSocket to prevent from using invalidated
* iterators. Thanks to kubuqi cn
*
* Revision 1.12 2004/07/26 12:19:42 zvision
* New faster Radius implementation, thanks to Pavel Pavlov for ideas!
*
* Revision 1.11.2.3 2004/07/12 22:27:32 zvision
* Ability to set a shared secret for each RADIUS server separatelly.
* More RADIUS code optimizations.
*
* Revision 1.11.2.2 2004/07/07 23:11:08 zvision
* Faster and more elegant handling of Cisco VSA
*
* Revision 1.11.2.1 2004/07/07 20:50:14 zvision
* New, faster, Radius client implementation. Thanks to Pavel Pavlov for ideas!
*
* Revision 1.11 2004/04/21 14:15:27 zvision
* Default ports are now set to fixes values (1812,1813), because of problems
* with getservbyname and multiple threads on some systems
*
* Revision 1.10 2004/04/17 11:43:43 zvision
* Auth/acct API changes.
* Header file usage more consistent.
*
* Revision 1.9 2004/03/17 00:00:38 zvision
* Conditional compilation to allow to control RADIUS on Windows just by setting HA_RADIUS macro
*
* Revision 1.8 2003/11/11 11:14:21 zvision
* Fixed invalid signed/unsigned integer conversions for radius attributes.
* Optimized radius attributes handling.
*
* Revision 1.7 2003/10/08 12:40:48 zvision
* Realtime accounting updates added
*
* Revision 1.6 2003/09/29 16:11:44 zvision
* Added cvs Id keyword to header #define macro
*
* Revision 1.5 2003/09/24 00:22:03 zvision
* Removed time_t RadAttr constructors
*
* Revision 1.4 2003/09/12 16:31:16 zvision
* Accounting initially added to the 2.2 branch
*
* Revision 1.3 2003/08/20 14:46:19 zvision
* Avoid PString reference copying. Small code improvements.
*
* Revision 1.2 2003/08/19 10:44:19 zvision
* Initially added to 2.2 branch
*
* Revision 1.1.2.5 2003/07/03 15:32:20 zvision
* Fixed comments. Removed md5 param from VerifyResponseAuthenticator.
*
* Revision 1.1.2.4 2003/06/19 10:52:24 zvision
* Added AcctStatusTypes enum.
*
* Revision 1.1.2.3 2003/06/05 10:02:21 zvision
* Bugfixes and small code cleanup.
*
* Revision 1.1.2.2 2003/05/13 17:45:01 zvision
* Added attribute searching functions
*
* Revision 1.1.2.1 2003/04/23 20:14:56 zvision
* Initial revision
*
*/
#if HAS_RADIUS
#ifndef __RADPROTO_H
#define __RADPROTO_H "@(#) $Id: radproto.h,v 1.13 2005/04/18 11:24:51 zvision Exp $"
#include <vector>
#include <ptlib/sockets.h>
class PRandom;
class PMessageDigest5;
/// Encapsulates RADIUS Attribute structure.
class RadiusAttr
{
public:
friend class RadiusPDU;
enum Constants {
/// max length of the attribute raw data
MaxLength = 255,
/// length of the attribute fixed header (Type+Length)
FixedHeaderLength = 2,
/// max length of the Value field
MaxValueLength = (MaxLength - FixedHeaderLength),
/// length of the fixed header for VSA
/// (standard header + VendorId field)
VsaFixedHeaderLength = FixedHeaderLength + 4,
/// max length of the VSA Value field
VsaMaxValueLength = (MaxLength - VsaFixedHeaderLength),
/// length of the fixed header for RFC2865 conformant VSA
/// (standard header + VendorId, VendorType and VendorLength fields)
VsaRfc2865FixedHeaderLength = VsaFixedHeaderLength + 2,
/// max length of the VSA RFC2865 conformant Value field
VsaMaxRfc2865ValueLength = (MaxLength - VsaRfc2865FixedHeaderLength)
};
/// Constants for RADIUS Attribute Type field
enum AttrTypes {
Invalid = 0, UserName, UserPassword, ChapPassword,
NasIpAddress = 4, NasPort, ServiceType, FramedProtocol,
FramedIpAddress = 8, FramedIpNetmask, FramedRouting, FilterId,
FramedMtu = 12, FramedCompression, LoginIpHost, LoginService,
LoginTcpPort = 16, OldPassword, ReplyMessage, CallbackNumber,
CallbackId = 20, Expiration, FramedRoute, FramedIpxNet,
State = 24, AttrTypeClass, VendorSpecific, SessionTimeout,
IdleTimeout = 28, TerminationAction, CalledStationId, CallingStationId,
NasIdentifier = 32, ProxyState, LoginLatService, LoginLatNode,
LoginLatGroup = 36, FramedAppleTalkLink, FramedAppleTalkNetwork, FramedAppleTalkZone,
AcctStatusType = 40, AcctDelayTime, AcctInputOctets, AcctOutputOctets,
AcctSessionId = 44, AcctAuthentic, AcctSessionTime, AcctInputPackets,
AcctOutputPackets = 48, AcctTerminateCause, AcctMultiSessionId, AcctLinkCount,
AcctInputGigawords = 52, AcctOutputGigawords, EventTimestamp = 55,
ChapChallenge = 60, NasPortType, PortLimit, LoginLatPort,
TunnelType = 64, TunnelMediumType, TunnelClientEndpoint, TunnelServerEndpoint,
AcctTunnelConnectionId = 68, TunnelPassword,
PasswordRetry = 75,
Prompt = 76, ConnectInfo, ConfigurationToken,
AcctInterimInterval = 85, AcctTunnelPacketsLost, NasPortId
};
/// Constants for Service-Type attribute values
enum ServiceTypes {
ST_Login = 1, ST_Framed, ST_CallbackLogin,
ST_CallbackFramed = 4, ST_Outbound, ST_Administrative,
ST_NasPrompt = 7,
ST_AuthenticateOnly = 8, ST_CallbackNasPrompt, ST_CallCheck,
ST_CallbackAdministrative = 9
};
/// Constants for Framed-Protocol attribute values
enum FramedProtocols {
FP_Ppp = 1,
FP_Slip
};
/// Constants for Framed-Compression attribute values
enum FramedCompressionTypes {
FC_None = 0,
FC_VJTcpIp,
FC_Ipx,
FC_StacLZS
};
/// Constants for Login-Service attribute values
enum LoginServiceTypes {
LS_Telnet = 0, LS_Rlogin, LS_TcpClear, LS_PortMaster,
LS_Lat, LS_X25_PAD, LS_X25_T3POS, LS_TcpClearQuiet
};
/// Constants for NAS-Port-Type attribute values
enum NASPortTypes {
NasPort_Asynchronous = 0, NasPort_Synchronous, NasPort_IsdnSynchronous,
NasPort_IsdnAsynchronousV120 = 3, NasPort_IsdnAsynchronousV110,
NasPort_Virtual = 5, NasPort_Piafs, NasPort_HdlcClearChannel,
NasPort_X25 = 8, NasPort_X75, NasPort_G3Fax, NasPort_SDSL,
NasPort_AdslCap = 12, NasPort_AdslDmt, NasPort_Idsl, NasPort_Ehternet,
NasPort_xDsl = 16, NasPort_Cable, NasPort_WirelessOther,
NasPort_WirelessIeee8021 = 19
};
/// Constants for Acct-Status-Type atribute values
enum AcctStatusTypes {
AcctStatus_Start = 1,
AcctStatus_Stop = 2,
AcctStatus_InterimUpdate = 3,
AcctStatus_AccountingOn = 7,
AcctStatus_AccountingOff = 8
};
/// Constants for VendorId VSA field
enum VendorIdentifiers {
CiscoVendorId = 9
};
/// Contants for Cisco VSA types
enum CiscoVSA {
CiscoVSA_AV_Pair = 1,
CiscoVSA_h323_remote_address = 23, CiscoVSA_h323_conf_id = 24,
CiscoVSA_h323_setup_time = 25, CiscoVSA_h323_call_origin = 26,
CiscoVSA_h323_call_type = 27, CiscoVSA_h323_connect_time = 28,
CiscoVSA_h323_disconnect_time = 29, CiscoVSA_h323_disconnect_cause = 30,
CiscoVSA_h323_voice_quality = 31, CiscoVSA_h323_gw_id = 33,
CiscoVSA_h323_incoming_conf_id = 35,
CiscoVSA_h323_credit_amount = 101, CiscoVSA_h323_credit_time = 102,
CiscoVSA_h323_return_code = 103, CiscoVSA_h323_redirect_number = 106,
CiscoVSA_h323_preferred_lang = 107,
CiscoVSA_h323_redirect_ip_address = 108,
CiscoVSA_h323_billing_model = 109, CiscoVSA_h323_currency = 110
};
/** Construct uninitialized attribute. It should be initialized
later by other means (operator=, etc.)
*/
RadiusAttr();
/** Create TLV RADIUS attribute of a given type,
initializing #value# field with 'attrLength' bytes
of data pointed to by 'attrValue'. In case of VSA,
#vsaVendorId# is read from the attribute's value data.
*/
RadiusAttr(
unsigned char attrType, /// Attribute Type (see #enum AttrTypes#)
const void* attrValue, /// buffer with attribute Value data
PINDEX valueLength /// length of attribute Value data
没有合适的资源?快使用搜索试试~ 我知道了~
supern0.9.rar_DHT_Kademlia
共76个文件
h:37个
cxx:33个
scc:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 154 浏览量
2022-09-23
23:41:31
上传
评论
收藏 296KB RAR 举报
温馨提示
用P2P技术实现的一个VOIP应用,用到了Kademlia这一DHT算法
资源推荐
资源详情
资源评论
收起资源包目录
supern0.9.rar (76个子文件)
supern
Routing.h 12KB
name.h 2KB
ProxyChannel.cxx 113KB
version.h 2KB
bin
GkStatus.h 7KB
gk.cxx 22KB
Neighbor.h 4KB
Routing.cxx 27KB
addpasswd.cxx 2KB
yasocket.cxx 20KB
radproto.h 46KB
gk.h 4KB
singleton.h 3KB
sqlauth.cxx 25KB
cisco.cxx 8KB
Neighbor.cxx 34KB
RasTbl.cxx 67KB
gksql_mysql.cxx 13KB
sigmsg.h 6KB
rwlock.h 1KB
supern.dsp 7KB
slist.h 1KB
gktimer.h 11KB
GkClient.h 6KB
version.cxx 1KB
sqlacct.h 3KB
gkauth.h 29KB
RasSrv.cxx 75KB
gkconfig.h 8KB
h323util.h 6KB
Toolkit.cxx 39KB
gkacct.h 13KB
gksql.cxx 14KB
job.h 6KB
clirw.h 3KB
sigmsg.cxx 5KB
SoftPBX.h 2KB
ProxyChannel.h 9KB
h323util.cxx 9KB
main.cxx 639B
radproto.cxx 69KB
radauth.h 14KB
SoftPBX.cxx 10KB
radacct.cxx 10KB
RasTbl.h 38KB
sqlacct.cxx 8KB
resource.h 451B
vssver.scc 1KB
singleton.cxx 1KB
gkacct.cxx 28KB
supern.dsw 535B
rasinfo.h 9KB
gktimer.cxx 4KB
RasSrv.h 6KB
cisco.h 3KB
gk_const.h 1KB
GkClient.cxx 38KB
gksql_pgsql.cxx 12KB
gkconfig.cxx 5KB
RasPDU.h 10KB
stl_supp.h 9KB
precompile.cxx 1KB
GkStatus.cxx 33KB
gksql.h 15KB
mssccprj.scc 138B
factory.h 8KB
Toolkit.h 15KB
radacct.h 5KB
radauth.cxx 42KB
supern.plg 9KB
job.cxx 11KB
clirw.cxx 18KB
versionts.h 159B
yasocket.h 11KB
gkauth.cxx 60KB
www.pudn.com.txt 218B
共 76 条
- 1
资源评论
小波思基
- 粉丝: 72
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功