ClearBox Server™ v1.2 Developer's Guide

IRADIUSAccounting::ProcessAccounting

Called by server when it receives RADIUS accounting packet.

HRESULT ProcessAccounting(
	[in] long tag,
	[in] USERINFOLITE * userInf,
	[in] unsigned long attributesNum,
	[in] RADIUS_ATTRIBUTE * inpAttributes,
	[out] USERADDRESS * userAddr,
	[out] ACCOUNTINGSTATUS * status);

Parameters

tag
[in] Unique value identifying RADIUS packet in whose context this method is called.
userInf
[in] Describes user.
attributesNum
[in] Number of attributes in array pointed by inpAttributes.
inpAttributes
[in] Array of attributes from accounting packet.
userAddr
[out] If extension decides to disconnect user (setting status to A_DISCONNECT) and returns appropriate status, this structure must be filled properly and its validInfo field set to VARIANT_TRUE.
status
[out] Extension must set this parameter to accounting processing result.

Return Values

If extension returns error code, it is assumed that status was set to A_ERROR.

Thread Safety

This method is called in context of WORK thread. (See Server Threads Model for details.) You should synchronize data which is shared with other threads.

Memory Management

Memory for userInf fields is allocated and freed by server, so extension must not change them.

Memory for inpAttributes is allocated and freed by server.

Memory for userAddr fields may be allocated by extension and is freed by server.

Remarks

This method may be used to disconnect a user when it is an interim accounting record, setting status to A_DISCONNECT. Disconnecting user on receiving "start" or "stop" record is senseless.

See Also

IRADIUSAccounting, RADIUS accounting packet processing, Accounting concepts


© 2001-2003 XPerience Technologies. www.xperiencetech.com

Created by chm2web html help conversion utility.