The Scheme accounting procedure must be declared as follows:
The function must return a boolean value. The accounting succeeds only
if it returned #t.
Here is an example of Scheme accounting function. The function dumps the contents of the incoming request to a file:
    (define radius-acct-file "/var/log/acct/radius")
    
    (define (acct req)
      (call-with-output-file radius-acct-file
        (lambda (port)
          (for-each (lambda (pair)
                      (display (car pair) port)
                      (display "=" port)
                      (display (cdr pair) port)
                      (newline port))
                    req)
          (newline port)))
      #t)
Go to the first, previous, next, last section, table of contents.