Main Page | Class Hierarchy | Class List | File List | Class Members

Radius.h

00001 // This is part of tacppd project (extended tacacs++ daemon)
00002 // (c) Copyright in 2000-2004 by tacppd team and contributors
00003 // see http://tacppd.org for more information
00004 //
00005 // file: Radius.h
00006 // description: RADIUS support
00007 
00008 //  This program is free software; you can redistribute it and/or modify
00009 //  it under the terms of the GNU General Public License as published by
00010 //  the Free Software Foundation; either version 2 of the License, or
00011 //  (at your option) any later version.
00012 //
00013 //  This program is distributed in the hope that it will be useful,
00014 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 //  GNU General Public License for more details.
00017 //
00018 //  You should have received a copy of the GNU General Public License
00019 //  along with this program; if not, write to the Free Software
00020 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 // modifications:
00023 //
00024 
00025 // all comments which start from /** - this is comments for KDoc */
00026 //  for classes
00027 //    @short [short description of the class]
00028 //    @author [class author]
00029 //    @version [class version]
00030 //    @see [references to other classes or methods]
00031 //  for methods
00032 //    @see [references]
00033 //    @return [sentence describing the return value]
00034 //    @exception [list the exeptions that could be thrown]
00035 //    @param [name id] [description]    - can be multiple
00036 
00037 #ifndef __RADIUS_H__
00038 #define __RADIUS_H__
00039 
00040 #include "global.h"
00041 
00042 namespace tacpp {
00043 
00044 // RADIUS codes
00045 
00046 // send from NAS to server
00047 // must have attribute User-Name
00048 // must have NAS-Identifier or NAS-IP-Address
00049 // must have User-Password or CHAP-Password
00050 // must have NAS-Port or NAS-Port-Type
00051 #define RC_ACCESS_REQUEST       1
00052 
00053 // send from server to NAS
00054 // Identifier must be saved from packet Access-Request
00055 #define RC_ACCESS_ACCEPT        2
00056 #define RC_ACCESS_REJECT        3
00057 #define RC_ACCOUNTING_REQUEST   4
00058 #define RC_ACCOUNTING_RESPONCE  5
00059 #define RC_ACCESS_CHALLENGE     11
00060 #define RC_STATUS_SERVER        12
00061 #define RC_STATUS_CLIENT        13
00062 
00063 
00064 // Radius Identifier
00065 
00066 
00067 // Length
00068 
00069 #define RADIUS_HEADER_LEN       20
00070 
00071 // Authenticator
00072 
00073 // Request authenticator
00074 
00075 // Response Authenticator
00076 
00077 
00078 
00079 
00080 
00081 // Radius Attributes
00082 #define RC_USER_NAME                    1
00083 #define RC_USER_PASSWORD                2
00084 #define RC_CHAP_PASSWORD        3
00085 #define RC_NAS_IP_ADDRESS       4
00086 #define RC_NAS_PORT                             5
00087 #define RC_SERVICE_TYPE                     6
00088 #define RC_FRAMED_PROTOCOL                7
00089 #define RC_FRAMED_IP_ADDRESS            8
00090 #define RC_FRAMED_IP_NETMASK            9
00091 #define RC_FRAMED_ROUTING       10
00092 #define RC_FILTER_ID            11
00093 #define RC_FRAMED_MTU           12
00094 #define RC_FRAMED_COMPRESSION   13
00095 #define RC_LOGIN_IP_HOST        14
00096 #define RC_LOGIN_SERVICE        15
00097 #define RC_LOGIN_TCP_PORT       16
00098 #define RC_UNUSSIGNED1          17
00099 #define RC_REPLY_MESSAGE        18
00100 #define RC_CALLBACK_NUMBER      19
00101 #define RC_CALLBACK_ID          20
00102 #define RC_UNUSSIGNED2          21
00103 #define RC_FRAMED_ROUTE         22
00104 #define RC_FRAMED_IPX_NETWORK   23
00105 #define RC_STATE                24
00106 #define RC_CLASS                25
00107 #define RC_VENDOR_SPECIFIC      26
00108 #define RC_SESSION_TIMEOUT      27
00109 #define RC_IDLE_TIMEOUT         28
00110 #define RC_TERMINATION_ACTION   29
00111 #define RC_CALLED_STATION_ID    30
00112 #define RC_CALLING_STATION_ID   31
00113 #define RC_NAS_IDENTIFIER       32
00114 #define RC_PROXY_STATE          33
00115 #define RC_LOGIN_LAT_SERVICE    34
00116 #define RC_LOGIN_LAT_NODE       35
00117 #define RC_LOGIN_LAT_GROUP      36
00118 #define RC_FRAMED_APPLETALK_LINK        37
00119 #define RC_FRAMED_APPLETALK_NETWORK     38
00120 #define RC_FRAMED_APPLETALK_ZONE        39
00121 #define RC_CHAP_CHALLENGE       60
00122 #define RC_NAS_PORT_TYPE        61
00123 #define RC_PORT_LIMIT           62
00124 #define RC_LOGIN_LAT_PORT       63
00125 
00129 struct radius_header {
00132   unsigned char Code;
00135   unsigned char Identifier;
00138   unsigned short int Length;
00141   unsigned char Authenticator[16];
00142   // unsigned char attributes[Length]
00143 };
00144 
00148 struct attribute_header {
00151   unsigned char type;
00154   unsigned char length;
00155   // unsigned char value[length]
00156 };
00157 
00162 class RadiusPacket {
00165   unsigned char Identifier;
00166  public:
00167 };
00168 
00169 };
00170 
00171 #endif //__RADIUS_H__

Generated on Thu Jul 21 23:09:45 2005 for tacppd.kdevelop by doxygen 1.3.5