
		CEXAMPLE

Cexample is a sample program to generate disconnect or change
filter requests to the RADIUS server running on an Ascend box.

The source file and Makefile is located in the subdirectory:

	"ascendd".

1. Building cexample:

	    a)	Goto "ascendd" subdirectory.
	    b)	Modify the Makefile for your particular
		platform.  If you've already built the
		RADIUS daemon then the Makefile has
		already been modified.
	    c)	Enter "gmake cexample".  The executable
		file is "cexample*".


2. Command format:

	cexample -H hostName -P port [-K secret]
		[-s sessRefNum] [-u userName] [-i ipAddr]
		[-c callFilterText]* [-d dataFilterText]*
		[-x]

	    hostName	The Ascend unit's IP address or
			its host name.

	    port	UDP port the Ascend unit is
			accepting RADIUS requests on.

	    secret	The shared secret.  If option
			omitted, program will search
			"/etc/raddb/clients" using
			'hostName'.

	    sessRefNum	A numeric value which identifies
			the specific session on the unit
			request is for.

	    userName	Name of the user associated with
			the session(s) on the unit request
			is for.

	    ipAddr	IP address associated with the
			session(s) on the unit request
			is for.

	    callFilterText
	    dataFilterText
			String specifying filter parameters.
			String format is identical to the
			Ascend-Call-Filter and
			Ascend-Data-Filter attributes.
			See the example "users" DB file
			for further details.

	    -x		Enable debug printouts.


	Command MUST specify 'hostName' AND 'port',
	Command MUST specify EITHER a 'sessRefNum',
	'userName', or 'ipAddr'.

	If the local RADIUS daemon is active then make
	sure 'port' is NOT the same ones used by the
	daemon otherwise a "fail to bind" error will occur.

	You MUST be root or have privilege to access
	/etc/raddb/clients if 'secret' is omitted.

	If the '-c' or '-d' option is omitted then a
	disconnect request will be sent.  If '-c' or '-d'
	appears then a change filter request will be sent.
	The '-c' or '-d' option specifies may appear as
	many times as desire with each specifing a single
	filter.  To generate a change filter request which
	deletes all filters, specify either '-c' or '-d'
	follow by the NULL string "".


3. Examples:

	cexample -H 206.65.212.238 -P 1700 -K xxx -s 56

		Disconnect the session associated with
		the session reference number 56.


	cexample -H maxhp -P 1700 -u mikey

		Disconnect all terminal server, routing,
		and bridging sessions associated with the
		user "mikey" on the unit "maxhp".  The
		shared secret is extracted from
		/etc/raddb/clients provided you have
		the proper permissions.


	cexample -H maxhp -P 1700 -k yyy -i 11.0.0.1

		Disconnect all routing and bridging sessions
		associated with the IP address 11.0.0.1.


	cexample -H maxhp -P 1700 -u mikey -i 11.0.0.1

		Disconnect all routing and bridging sessions
		associated with user "mikey" and IP address
		11.0.0.1.


	cexample -H maxhp -P 1700 -s 100 -d ""

		Delete all filters for routing or bridging
		sessions associated with the sesion reference
		number 100.


	cexample -H maxhp -P 1700 -u mikey -d "ip out drop"

		Change filters for the routing/bridging
		sessions associated with user "mikey".
		Filter drops all outgoing IP packets.


	cexample -H maxhp -P 1700 -i 11.0.0.1
			-d "generic out drop 9 ff 06 =="
			-d "generic out drop 90 ff 02 !="

		Change filters for the routing/bridging
		sessions associated with the IP address
		11.0.0.1.
		Filter drops all outgoing packets whose
		10th byte matches 0x06 or whose 91st
		byte doesn't match 0x02.

