| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Radtest provides two commands for interaction with remote
RADIUS servers.
Command send sends request to the server specified in
‘raddb/client.conf’. Its syntax is:
send [flags] port-type code [expr-or-pair-list] |
Optional flags can be used for fine-tuning the internals of
send. You will seldom need to use these, unless you are
developing GNU Radius. See section send, for the detailed description of these.
The first obligatory argument, port-type, specifies which RADIUS port to send the request to. Specifying ‘auth’ will send the request to the authentication port (see section auth-port); specifying ‘acct’ will send it to the accounting port (see section acct-port).
Argument code gives the request code. It is either a number or a symbolic request code name (see section Numeric Values).
The last argument, expr-or-pair-list is either a
radtest expression evaluating to avlist or a list
of A/V pairs. These pairs will be included in the request.
Here are several examples:
# Send a |
Command send stores the reply code into the variable
REPLY_CODE and reply pairs into the variable REPLY
(see section Built-in Variables).
Another primitive is expect. Expect takes at most two
arguments: a request code (either numeric or symbolic, (see section Numeric Values)) and optional
list of A/V pairs (similar to send expr-or-pair-list
argument). Expect check if these match current
REPLY_CODE and REPLY values and if so, prints
the string ‘PASS’. Otherwise, it prints ‘FAIL’. This
command is designed primarily for use in GNU Radius testsuite.
Expect is usually used right after send, as shown
in the example below:
send auth Access-Request User-Name = "foo" User-Password = "bar" expect Access-Accept Reply-Message = "Access allowed" |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated by Sergey Poznyakoff on December, 6 2008 using texi2html 1.78.