Click here to show toolbars of the Web Online Help System: show toolbars |
ClearBox Serverâ„¢ v1.2 Developer's Guide |
ITACACSRealmStripping::TACACSRealmStripAuthorAcctCalled by server to determine whether the request authorization or accounting packet will be forwarded and to strip user name and realm name from the the packet content. HRESULT TACACSRealmStripAuthorAcct( [in] long tag, [in] VARIANT_BOOL authorPacket, [in,out] TAC_AUTHORPARAMS * authorParams, [in,out] FORWARDADDRESS * fwdAddress, [out] VARIANT_BOOL * forwardPacket, [out] VARIANT_BOOL * nameOK); Parameters
Return ValuesIf extension returns error code, and authorStripping=VARIANT_TRUE, it is assumed that user didn't passed authorization, accounting error status is sent back otherwise. Thread SafetyThis 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 ManagementMemory for authorParams is allocated and freed by server. realmName field has NULL value and may be allocated by extension with call to SysAllocString. If extension changes name field, it must reallocate memory for it with SysReAllocString. RemarksServer can proxy TACACS+ packets via FOLLOW response only. In this case server instructs NAS (TACACS+ client) to resend packet to specified alternate TACACS+ server, and NAS is responsible for packet forwarding. Example CodeThis code will forward all accounting packets received from 192.168.2.3 host to 127.0.0.1. STDMETHODIMP CTest::TACACSRealmStripAuthorAcct( long tag, VARIANT_BOOL authorStripping, TAC_AUTHORPARAMS * authorParams, FORWARDADDRESS * fwdAddress, VARIANT_BOOL * forwardPacket, VARIANT_BOOL * nameOK) { *forwardPacket=VARIANT_FALSE; *nameOK=VARIANT_TRUE; if (authorPacket==VARIANT_FALSE && authorParams->clientIPAddress==inet_addr("192.168.2.3")) { *forwardPacket=VARIANT_TRUE; fwdAddress->proxyIPAddress=inet_addr("127.0.0.1"); // Other fields are not used with TACACS+ } return S_OK; } See AlsoITACACSRealmStripping, Realms and packet forwarding, TACACS+ realm stripping and forwarding process © 2001-2003 XPerience Technologies. www.xperiencetech.com |
Created by chm2web html help conversion utility. |