Posted on 2006-06-21 10:12
Enjoy Life 阅读(453)
评论(0) 编辑 收藏 引用 所属分类:
Linux Programming Doc
ZT:
http://www.axlradius.com/clientdocs/docs/com/theorem/radius3/examples/radauth/radacct.html
com.theorem.radius3.examples.radauth
Class radacct
Object
radacct
-
public class radacct
-
extends Object
Test accounting class for a radius server.
Sends a pair of accounting requests to a RADIUS server using command line options. The first is a Start packet the second is a Stop packet.
Usage: radacct User-Name inputCount ouputCount sessionId server[:port default is 1813] secret [nasname]
The arguments:
-
name - User-Name attribute value - may contain a realm of the form michael@theorem.com These names must be in upper case.
-
inputOctets - Count of input bytes..
-
outputOctets - Count of output bytes..
-
SessionId - Accounting session Identifier.
-
server - The RADIUS server name or address. Optionally the port number can be appended to the server name. The default port is the RFC standard 1813. Many servers use the non-standard 1646 port.
-
secret - The Radius server shared secret.
-
nasname - Optional name to use for the NAS-Identifier value.
Examples:
radacct michael 1000 2000 MICK1 127.0.0.1 seversecret
radacct michael 10000 10200 Zither 192.168.1.1:1645 testtesttest
radacct michael 0000 10200 Acct-Zither 192.168.1.1 seversecret NAS1
Be sure that the RADIUS server allows the workstation as a client and that the secret is the same for the client and server.
Method Summary
|
static void
|
main
(String[] args)
Main task.
|
Methods inherited from class Object
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
radacct
public radacct()
main
public static void main(String[] args)
-
Main task. This authenticates and accounts against a radius server defined the radtest.properties file. The Authentication loop uses the AttributeArray class to create attributes. The Accounting loop use the Radius object's methods to create attributes.
-
-
Parameters:
-
args
- Command line arguments. login, input count, output count, Session Id, server[:port default is 1812], secretkey [nasname]
Submit a bug report or feature request
Copyright 1998-2002 AXL Software. PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.