"Fossies" - the Fresh Open Source Software archive

Member "radius-1.6.1/doc/texinfo/radscm.texi" of archive radius-1.6.1.tar.gz:


1 radscm: A Guile Interface to Radius Functions

radscm is a Scheme interpreter based on Guile with the addition of special functions and variables for communicating with radiusd. This chapter concentrates on the special features provided by radscm. Refer to Guile documentation for information about Scheme and Guile (see Overview in The Guile Reference Manual).

Variables

Variable: %raddb-path

A path to the Radius configuration directory.

Function: rad-server-list

A list of radius servers. Each element of the list is:

(list id-str host-str secret-str auth-num acct-num
      cntl-num)

where the arguments are as follows:

id-strServer ID
host-strServer hostname or IP
secret-strShared secret key to use
auth-numAuthentication port number
acct-numAccounting port number
cntl-numControl channel port number

Thus, each entry can be used as an argument to rad-client-set-server or rad-client-add-server.

Functions

Function: rad-send-internal port-number code-number pair-list

Sends the request to currently selected server. Arguments are:

port-number

Port number to use. These values are allowed:

0Authentication port
1Accounting port
2Control port

The actual port numbers are those configured for the given server.

code-number

Request code.

pair-list

List of attribute-value pairs. Each pair is either

        (cons attr-name-str value)

or

        (cons attr-number value)

Return: On success,

        (list return-code-number pair-list)

On failure,

        '()
Function: rad-send port-number code-number pair-list . verbose

Sends a radius request. Actually it does the same work as rad-send-internal, but if verbose is specified, the verbose report about interaction with the radius server is printed.

Function: rad-client-list-servers

List currently configured servers. Two columns for each server are displayed: server ID and IP.

Function: rad-get-server

Returns the ID of the currently selected server.

Function: rad-client-set-server list

Selects for use the server described by list. Here list takes the form

(list id-str host-str secret-str auth-num acct-num
      cntl-num)

where the elements are as follows:

id-strServer ID
host-strServer hostname or IP
secret-strShared secret key to use
auth-numAuthentication port number
acct-numAccounting port number
cntl-numControl channel port number
Function: rad-client-add-server list

Adds the server described by list to the list of active servers. Here list takes the form

(list id-str host-str secret-str auth-num acct-num
      cntl-num)

where the elements are as follows:

id-strServer ID
host-strServer hostname or IP
secret-strShared secret key to use
auth-numAuthentication port number
acct-numAccounting port number
cntl-numControl channel port number
Function: rad-read-no-echo prompt-str

Prints the given prompt-str, disables echoing, reads a string up to the next newline character, restores echoing, and returns the string entered. This is the interface to the C getpass(3) function.

Function: rad-client-source-ip ip-str

Sets the IP to be used as source. ip-str can be either an IP in dotted-quad form or a hostname.

Function: rad-client-timeout number

Sets the timeout in seconds for waiting for a server reply.

Function: rad-client-retry number

Sets the number of retries for sending requests to a Radius server.

Function: rad-format-code dest-bool code-number

Format a radius reply code into a human-readable form. dest-bool has the same meaning as in format (see Formatted Output in The Guile Reference Manual.)

Function: rad-format-pair dest-bool pair

Format a radius attribute-value pair for output. dest-bool has the same meaning as in format. pair is either

                (cons name-str value)

or

                (cons attr-number value)

where value may be of any type appropriate for the given attribute.

Function: rad-print-pairs dest-bool pair-list

Output the radius attribute-value pairs from pair-list. dest-bool has the same meaning as in format. pair-list is a list of pairs in the form

                (cons name-str value)

or

                (cons attr-number value)

where value may be of any type appropriate for the given attribute.

All @attr{Reply-Message} pairs from the list are concatenated and displayed as one.

Function: rad-format-reply-msg pair-list . text

Concatenate and print text from all @attr{Reply-Message} pairs from pair-list. If text is specified, it is printed before the concatenated text.

Function: rad-list-servers

For each server from rad-server-list, print its ID and hostname or IP.

Function: rad-select-server ID-STR

Select the server identified by id-str as a current server. The server data are looked up in rad-server-list variable.

Function: rad-add-server id-str

Add the server identified by id-str to the list of current servers. The server data are looked up in rad-server-list variable.


This document was generated on February 10, 2014 using texi2html.