Go to the first, previous, next, last section, table of contents.
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
. Please refer to Guile documentation for
information about Scheme and Guile See section `Overview' in The Guile Reference Manual.
Variables
- Variable: %raddb-path
-
A path to 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:
ID-STR |
Server ID,
|
HOST-STR |
Server hostname or IP address,
|
SECRET-STR |
Shared secret key to use,
|
AUTH-NUM |
Authentication port number,
|
ACCT-NUM |
Accounting port number,
|
CNTL-NUM |
Control 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:
0 |
Authentication port,
|
1 |
Accounting port,
|
2 |
Control 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 address.
- 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. A LIST should be:
(list ID-STR HOST-STR SECRET-STR AUTH-NUM ACCT-NUM CNTL-NUM)
where:
ID-STR |
Server ID,
|
HOST-STR |
Server hostname or IP address,
|
SECRET-STR |
Shared secret key to use,
|
AUTH-NUM |
Authentication port number,
|
ACCT-NUM |
Accounting port number,
|
CNTL-NUM |
Control channel port number.
|
- Function: rad-client-add-server LIST
-
Adds the server described by LIST to the list of active servers.
A LIST should be:
(list ID-STR HOST-STR SECRET-STR AUTH-NUM ACCT-NUM CNTL-NUM)
where:
ID-STR |
Server ID,
|
HOST-STR |
Server hostname or IP address,
|
SECRET-STR |
Shared secret key to use,
|
AUTH-NUM |
Authentication port number,
|
ACCT-NUM |
Accounting port number,
|
CNTL-NUM |
Control 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 address to be used as source. IP-STR can be either an
IP address in dotted-quad form or a hostname.
- Function: rad-client-timeout NUMBER
-
Sets the timeout for waiting to the 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.
- 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 the 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 "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 "Reply-Message" pairs from the
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 address.
- 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.
Go to the first, previous, next, last section, table of contents.