📄 readme
字号:
This file documents `mod_radius' php module. See end of file forcopying conditions.* Introduction`Mod_radius' is a loadable php module providing functions for queryingremote RADIUS servers and analyzing their replies. The module is designedfor use with php version 4.3.x (Zend v1.3.0).The complete example of using this module may be found in/examples/radius.php.* ConstantsThe module defines following constants:1) Attribute data typesTYPE_INVALID Invalid data typeTYPE_INTEGER IntegerTYPE_IPADDR IPv4 AddressTYPE_STRING String (0..253 characters)TYPE_DATE Date2) GNU Radius port typesPORT_AUTH Port for sending authentication requestsPORT_ACCT Port for sending accounting requests3) RADIUS Request codes:RT_ACCESS_REQUEST 1RT_ACCESS_ACCEPT 2RT_ACCESS_REJECT 3RT_ACCOUNTING_REQUEST 4RT_ACCOUNTING_RESPONSE 5RT_ACCOUNTING_STATUS 6RT_PASSWORD_REQUEST 7RT_PASSWORD_ACK 8RT_PASSWORD_REJECT 9RT_ACCOUNTING_MESSAGE 10RT_ACCESS_CHALLENGE 11RT_STATUS_SERVER 12RT_STATUS_CLIENT 13RT_ASCEND_TERMINATE_SESSION 31RT_ASCEND_EVENT_REQUEST 33RT_ASCEND_EVENT_RESPONSE 34RT_ASCEND_ALLOCATE_IP 51RT_ASCEND_RELEASE_IP 52* FunctionsThe module provides following functions:** void radius_set_debug (string level);Sets debug level to that specified by its argument.** void radius_clear_debug (void);Clears debug level.** bool radius_auth_user (string user_name, string password [, array send_pairs]);Sends an Access-Request to the RADIUS server. As usual for GNU Radiusclient programs, the parameters of the server are retrieved fromclient configuration file. The two obligatory arguments `user_name'and `password' specify user name and password to send.Optional `send_pairs' is an array of A/V pairs to send. The array isindexed with attribute dictionary name. The values in the array are thevalues of corresponding attributes. If several instances of the sameattribute must be sent, these must form a sub-array. For example:$send = array ( "NAS-IP-Address" => "127.0.0.1", "NAS-Identifier" => "apache", "Reply-Message" => array ("first message", "second message") );This will add to the request NAS-IP-Address and NAS-Identifier pairsand *two* Reply-Message pairs with values "first message" and"second message".`Radius_auth_user' returns TRUE if the user was successfully authenticated(an Access-Accept reply has been received) or FALSE otherwise.** long radius_query (long port_type, long request_code, array request_pairs [, reply_pairs [, reply_message]]);Sends an arbitrary query to the server. Arguments are: port_type Type of port to send the request through. Use PORT_AUTH and PORT_ACCT constants for this argument. request_code RADIUS request code. request_pairs A/V pairs to be added to the request. See description of `send_pairs' argument to function `radius_auth_user'. reply_pairs If this argument is given, it is filled with reply pairs received from the server. The structure of the array is the same as described above (see `send_pairs' argument to function `radius_auth_user'). reply_message This argument, if specified, receives a concatenated values of all Reply-Message attributes found in the reply. It can thus be used to display the entire reply message.`Radius_query' returns RADIUS code of the reply. ** string radius_lookup_value (string attribute, long value);Looks up in the dictionary the symbolic name for integer `value'of the given `attribute'. Returns the name or NULL if not found.** long radius_attribute_type (string attribute);Returns data type of a dictionary attribute identified by its name.* Copyright information:Copyright (C) 2004 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them.Received: from odessa.farlep.net (odessa.farlep.net [213.130.1.236]) by Mirddin.farlep.net with ESMTP id i7QHAq022191 for <gray@Mirddin.farlep.net>; Thu, 26 Aug 2004 20:10:52 +0300X-Mailutils-Message-Id: i7QHAq022191Date: Thu, 26 Aug 2004 20:10:49 +0300From: Sergei Sinkovsky <glorybox@farlep.net>Reply-To: Sergei Sinkovsky <glorybox@farlep.net>X-Priority: 3 (Normal)Message-ID: <100428618320.20040826201049@farlep.net>To: Sergey Poznyakoff <gray@Mirddin.farlep.net>Subject: Re: mod_radius.c moduleIn-Reply-To: <200408261708.i7QH86022177@Mirddin.farlep.net>References: <200408261708.i7QH86022177@Mirddin.farlep.net>MIME-Version: 1.0Content-Type: text/plain; charset=us-asciiContent-Transfer-Encoding: 7bitX-Envelope-Date: Thu Aug 26 20:10:52 2004X-Envelope-Sender: glorybox@farlep.netHello Sergey,Thursday, August 26, 2004, 8:08:06 PM, you wrote:SP> Hi Sergey,SP> I ask your permission to include mod_radius.c in theSP> next release of GNU Radius. Will you agree to distribute itSP> with the project under the terms of GPL?SP> Regards,SP> SegreyI grant my permission on including mod_radius.c in the next releasesof GNU Radius and distributing it under the terms of GNU GPL.Sergei Sinkovskimailto:glorybox@farlep.netLocal Variables:mode: outlineparagraph-separate: "[ ]*$"version-control: neverEnd:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -