From: John Dennis Date: Sun, 18 Sep 2011 07:17:45 +0000 (+0200) Subject: Document all command line args & add missing man pages X-Git-Tag: release_3_0_0_beta0~635 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac75a05d5f60b10d74b5a50a144ea9676b229d6b;p=thirdparty%2Ffreeradius-server.git Document all command line args & add missing man pages Go through every installed command and verify: * There exists a man page for the command, if not create one * For every command line arg in each command: - Assure the arg appears in the synopis section of the man page - Assure the arg is documented in the options section of the man page - Assure the arg is documented in the "usage" emitted by the command In addition to the above this patch also does: * Clean up captitalization & the use of terminating periods. * Removed superfluous unused l option from the getopt format string of radwho * Remove rlm_ippool_tool.pod, superseded by rlm_ippool_tool.8 man page The follow new man pages were added: man/man1/smbencrypt.1 man/man5/checkrad.5 man/man8/radconf2xml.8 man/man8/radcrypt.8 man/man8/radsniff.8 src/modules/rlm_dbm/rlm_dbm_cat.8 src/modules/rlm_dbm//rlm_dbm_parse.8 src/modules/rlm_ippool/rlm_ippool_tool.8 --- diff --git a/man/man1/radclient.1 b/man/man1/radclient.1 index 79d2e0cdd02..1a79e6d9913 100644 --- a/man/man1/radclient.1 +++ b/man/man1/radclient.1 @@ -3,18 +3,23 @@ radclient - send packets to a RADIUS server, show reply .SH SYNOPSIS .B radclient +.RB [ \-4 ] +.RB [ \-6 ] .RB [ \-d .IR raddb_directory ] .RB [ \-c .IR count ] .RB [ \-f .IR file ] +.RB [ \-F ] +.RB [ \-h ] .RB [ \-i .IR id ] .RB [ \-n .IR num_requests_per_second ] .RB [ \-p .IR num_requests_in_parallel ] +.RB [ \-q ] .RB [ \-r .IR num_retries ] .RB [ \-s ] @@ -22,7 +27,8 @@ radclient - send packets to a RADIUS server, show reply .IR shared_secret_file ] .RB [ \-t .IR timeout ] -.RB [ \-qvx ] +.RB [ \-v ] +.RB [ \-x ] \fIserver {acct|auth|status|disconnect|auto} secret\fP .SH DESCRIPTION \fBradclient\fP is a radius client program. It can send arbitrary radius @@ -40,6 +46,10 @@ automatically encrypted before the packet is sent to the server. .SH OPTIONS +.IP \-4 +Use IPv4 (default) +.IP \-6 +Use IPv6 .IP \-c\ \fIcount\fP Send each packet \fIcount\fP times. .IP \-d\ \fIraddb_directory\fP @@ -51,6 +61,10 @@ they are read from stdin. This option can be specified multiple times, in which case packets are sent in order by file, and within each file, by first packet to last packet. A blank line separates logical packets within a file. +.IP \-F +Print the file name, packet number and reply code. +.IP \-h +Print usage help information. .IP \-i\ \fIid\fP Use \fIid\fP as the RADIUS request Id. .IP \-n\ \fInum_requests_per_second\fP diff --git a/man/man1/radeapclient.1 b/man/man1/radeapclient.1 index a4a3d1681af..e9ccc7f88bf 100644 --- a/man/man1/radeapclient.1 +++ b/man/man1/radeapclient.1 @@ -3,13 +3,25 @@ radeapclient - send EAP packets to a RADIUS server, calculate responses .SH SYNOPSIS .B radeapclient +.RB [ \-c +.IR count ] .RB [ \-d .IR raddb_directory ] .RB [ \-f .IR file ] +.RB [ \-h ] .RB [ \-i .IR source_ip ] -.RB [ \-xy ] +.RB [ \-q ] +.RB [ \-s ] +.RB [ \-r +.IR retries ] +.RB [ \-S +.IR file ] +.RB [ \-t +.IR timeout ] +.RB [ \-v ] +.RB [ \-x ] \fIserver {acct|auth} secret\fP .SH DESCRIPTION \fBradeapclient\fP is a radius client program. It can send arbitrary radius @@ -28,6 +40,32 @@ MD5 challenge. .PP No other EAP types are currently supported. +.SH OPTIONS +.IP \-c\ \fIcount\fP +Send each packet \fIcount\fP times. +.IP \-d\ \fIraddb\fP +Set dictionary directory. +.IP \-f\ \fIfile\fP +Read packets from \fIfile\fP, not stdin. +.IP \-r\ \fIretries\fP +If timeout, retry sending the packet \fIretries\fP times. +.IP \-t\ \fItimeout\fP +Wait \fItimeout\fP seconds before retrying (may be a floating point number). +.IP \-h +Print usage help information. +.IP \-i\ \fIid\fP +Set request id to '\fIid\fP'. Values may be 0..255 +.IP \-S\ \fIfile\fP +Read secret from \fIfile\fP, not command line. +.IP \-q +Quiet, do not print anything out. +.IP \-s +Print out summary information of auth results. +.IP \-v +Show program version information. +.IP \-x +Enable debugging mode. + .SH EXAMPLE A sample session that queries the remote server with an EAP-MD5 diff --git a/man/man1/radzap.1 b/man/man1/radzap.1 index a87bf60ec9e..a2d529d064f 100644 --- a/man/man1/radzap.1 +++ b/man/man1/radzap.1 @@ -5,6 +5,7 @@ radzap - remove rogue entries from the active sessions database .B radzap .RB [ \-d .IR raddb_directory ] +.RB [ \-h ] .RB [ \-N .IR nas_ip_address ] .RB [ \-P @@ -13,6 +14,7 @@ radzap - remove rogue entries from the active sessions database .IR user ] .RB [ \-U .IR user ] +.RB [ \-x ] \fIserver[:port] secret\fP .SH DESCRIPTION The FreeRadius server can be configured to maintain an active session @@ -34,6 +36,8 @@ also be maintained in SQL. The directory that contains the RADIUS configuration files. \fBradzap\fP reads \fIradiusd.conf\fP to determine the location of the \fIradutmp\fP file. +.IP \-h +Print usage help information. .IP \-N\ \fInas_ip_address\fP Zap the entries which match the given NAS IP address. .IP \-P\ \fInas_port\fP @@ -42,6 +46,8 @@ Zap the entries which match the given NAS port. Zap the entries which match the given username (case insensitive). .IP \-U\ \fIuser\fP Zap the entries which match the given username (case sensitive). +.IP \-x +Enable debugging output. .IP server[:port] The hostname or IP address of the remote server. Optionally a UDP port can be specified. If no UDP port is specified, it is looked up in diff --git a/man/man8/radiusd.8 b/man/man8/radiusd.8 index 990509a247f..0a96827d3a3 100644 --- a/man/man8/radiusd.8 +++ b/man/man8/radiusd.8 @@ -7,13 +7,18 @@ radiusd - Authentication, Authorization and Accounting server .RB [ \-d .IR config_directory ] .RB [ \-f ] +.RB [ \-h ] .RB [ \-i .IR ip-address ] +.RB [ \-l +.IR log_file ] +.RB [ \-m ] .RB [ \-n .IR name ] .RB [ \-p .IR port ] .RB [ \-s ] +.RB [ \-t ] .RB [ \-v ] .RB [ \-x ] .RB [ \-X ] @@ -60,6 +65,14 @@ If this command-line option is given, then the "bind_address" and all This option MUST be used in conjunction with "-p". .IP \-f Do not fork, stay running as a foreground process. +.IP \-h +Print usage help information. +.IP "\-l \fIlog_file\fP" +Defaults to \fI${logdir}/radius.log\fP. \fBRadiusd\fP writes it's logging +information to this file. If log_file is the string "stdout" logging will +be written to stdout. +.IP \-m +On SIGINT or SIGQUIT exit cleanly instead of immediately. .IP "\-n \fIname\fP" Read \fIraddb/name.conf\fP instead of \fIraddb/radiusd.conf\fP. .IP "\-p \fIport\fP" @@ -79,6 +92,8 @@ requests. Some systems have issues with threading, however, so running in "single server" mode may help to address those issues. In single server mode, the server will also not "daemonize" (auto-background) itself. +.IP \-t +Do not spawn threads. .IP \-v Print server version information and exit. .IP \-X diff --git a/man/man8/radmin.8 b/man/man8/radmin.8 index 57642bc4fe2..f5db690451f 100644 --- a/man/man8/radmin.8 +++ b/man/man8/radmin.8 @@ -7,8 +7,10 @@ radmin - FreeRADIUS Administration tool .IR config_directory ] .RB [ \-e .IR command ] +.RB [ \-E ] .RB [ \-f .IR socket_file ] +.RB [ \-h ] .RB [ \-i .IR input_file ] .RB [ \-n @@ -36,8 +38,12 @@ configuration files to find the "listen" section that defines the control socket filename. .IP "\-e \fIcommand\fP" Run \fIcommand\fP and exit. +.IP \-E +Echo commands as they are being executed. .IP "\-f \fIsocket_file\fP" Specify the socket filename directly. The radiusd.conf file is not read. +.IP \-h +Print usage help information. .IP "\-i \fIinput_file\fP" Reads input from the specified file. If not specified, stdin is used. This also sets "-q". diff --git a/man/man8/radsqlrelay.8 b/man/man8/radsqlrelay.8 index 89f797f43b4..65622e1e82a 100644 --- a/man/man8/radsqlrelay.8 +++ b/man/man8/radsqlrelay.8 @@ -17,6 +17,7 @@ radsqlrelay - relay SQL queries to a central database server .SH SYNOPSIS .B radsqlrelay +.RB [ \-? ] .RB [ \-d .IR sql_driver ] .RB [ \-b @@ -27,9 +28,12 @@ radsqlrelay - relay SQL queries to a central database server .IR host ] .RB [ \-u .IR user ] +.RB [ \-P +.IR port ] .RB [ \-p .IR password ] .RB [ \-1 ] +.RB [ \-x ] \fIfile_path\fP .SH DESCRIPTION @@ -42,6 +46,8 @@ must be configured in the \fBradiusd\fP server before you can use \fBradsqlrelay\fP. .SH OPTIONS +.IP "\-?" +Print usage help information. .IP "\-d \fIsql_driver\fP" Driver to use: mysql, pg, oracle. .IP "\-b \fIdatabase\fP" @@ -52,10 +58,14 @@ Read password from file, instead of command line. Connect to host. .IP "\-u \fIuser\fP" User for login. +.IP "\-P \fIport\fP" +Port number to use for connection. .IP "\-p \fIpassword\fP" Password to use when connecting to server. .IP "\-1" One-shot mode: push the file to database and exit. +.IP "\-x" +Turn on debugging. .IP "file_path" The pathname of the SQL logfile to use. diff --git a/src/main/radclient.c b/src/main/radclient.c index a14801d8606..edbb2decd2a 100644 --- a/src/main/radclient.c +++ b/src/main/radclient.c @@ -99,6 +99,8 @@ static void NEVER_RETURNS usage(void) fprintf(stderr, " -c count Send each packet 'count' times.\n"); fprintf(stderr, " -d raddb Set dictionary directory.\n"); fprintf(stderr, " -f file Read packets from file, not stdin.\n"); + fprintf(stderr, " -F Print the file name, packet number and reply code.\n"); + fprintf(stderr, " -h Print usage help information.\n"); fprintf(stderr, " -i id Set request id to 'id'. Values may be 0..255\n"); fprintf(stderr, " -n num Send N requests/s\n"); fprintf(stderr, " -p num Send 'num' packets from a file in parallel.\n"); diff --git a/src/main/radiusd.c b/src/main/radiusd.c index 735c2fe299c..ea80b47a72f 100644 --- a/src/main/radiusd.c +++ b/src/main/radiusd.c @@ -501,10 +501,13 @@ static void NEVER_RETURNS usage(int status) fprintf(output, " -d raddb_dir Configuration files are in \"raddbdir/*\".\n"); fprintf(output, " -f Run as a foreground process, not a daemon.\n"); fprintf(output, " -h Print this help message.\n"); - fprintf(output, " -i ipaddr Listen on ipaddr ONLY\n"); + fprintf(output, " -i ipaddr Listen on ipaddr ONLY.\n"); + fprintf(output, " -l log_file Logging output will be written to this file.\n"); + fprintf(output, " -m On SIGINT or SIGQUIT exit cleanly instead of immediately.\n"); fprintf(output, " -n name Read raddb/name.conf instead of raddb/radiusd.conf\n"); - fprintf(output, " -p port Listen on port ONLY\n"); + fprintf(output, " -p port Listen on port ONLY.\n"); fprintf(output, " -s Do not spawn child processes to handle requests.\n"); + fprintf(output, " -t Disable threads.\n"); fprintf(output, " -v Print server version information.\n"); fprintf(output, " -X Turn on full debugging.\n"); fprintf(output, " -x Turn on additional debugging. (-xx gives more debugging).\n"); diff --git a/src/main/radmin.c b/src/main/radmin.c index e9f8508d15b..1cef681686b 100644 --- a/src/main/radmin.c +++ b/src/main/radmin.c @@ -169,6 +169,7 @@ static int usage(void) printf(" -e command Execute 'command' and then exit.\n"); printf(" -E Echo commands as they are being executed.\n"); printf(" -f socket_file Open socket_file directly, without reading radius.conf\n"); + printf(" -h Print usage help information.\n"); printf(" -i input_file Read commands from 'input_file'.\n"); printf(" -n name Read raddb/name.conf instead of raddb/radiusd.conf\n"); printf(" -o output_file Write commands to 'output_file'.\n"); diff --git a/src/main/radwho.c b/src/main/radwho.c index e381f23057a..f906d571db7 100644 --- a/src/main/radwho.c +++ b/src/main/radwho.c @@ -318,7 +318,7 @@ int main(int argc, char **argv) radius_dir = RADIUS_DIR; - while((c = getopt(argc, argv, "d:flnN:sSipP:crRu:U:Z")) != EOF) switch(c) { + while((c = getopt(argc, argv, "d:fnN:sSipP:crRu:U:Z")) != EOF) switch(c) { case 'd': radius_dir = optarg; break; diff --git a/src/main/radzap b/src/main/radzap index d3d84503190..a30189cadf7 100755 --- a/src/main/radzap +++ b/src/main/radzap @@ -5,12 +5,13 @@ usage() { echo "Usage: radzap [options] server[:port] secret" >&2 - echo " -d raddb_directory: directory where radiusd.conf is located" + echo " -h Print usage help information." + echo " -d raddb_directory: directory where radiusd.conf is located." echo " -N nas_ip_address: IP address of the NAS to zap." echo " -P nas_port: NAS port that the user is logged into." echo " -u username: Name of user to zap (case insensitive)." echo " -U username: like -u, but case-sensitive." - echo " -x : more debugging output" + echo " -x Enable debugging output." exit ${1:-0} } diff --git a/src/modules/rlm_dbm/Makefile.in b/src/modules/rlm_dbm/Makefile.in index 5ee66fb9c76..93c9187d069 100644 --- a/src/modules/rlm_dbm/Makefile.in +++ b/src/modules/rlm_dbm/Makefile.in @@ -8,7 +8,7 @@ HEADERS = RLM_UTILS = @dbm_utils@ RLM_CFLAGS = @dbm_cflags@ RLM_LIBS = @dbm_ldflags@ -RLM_INSTALL = +RLM_INSTALL = @dbm_install@ include ../rules.mak @@ -19,3 +19,7 @@ rlm_dbm_parser: rlm_dbm_parser.lo $(LIBRADIUS) rlm_dbm_cat: rlm_dbm_cat.lo $(LIBRADIUS) $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(RLM_LDFLAGS) \ -o $@ $^ $(RLM_LIBS) $(LIBS) + +rlm_dbm_install: rlm_dbm_cat rlm_dbm_parser + $(INSTALL) -m 644 rlm_dbm_cat.8 $(R)$(mandir)/man8 + $(INSTALL) -m 644 rlm_dbm_parsel.8 $(R)$(mandir)/man8 diff --git a/src/modules/rlm_dbm/rlm_dbm_cat.8 b/src/modules/rlm_dbm/rlm_dbm_cat.8 new file mode 100644 index 00000000000..9e5e495c1b4 --- /dev/null +++ b/src/modules/rlm_dbm/rlm_dbm_cat.8 @@ -0,0 +1,42 @@ +.TH RLM_DBM_CAT 8 +.SH NAME +rlm_dbm_cat - list contents of radius database +.SH SYNOPSIS +.B rlm_dbm_cat +.RB [ \-f +.IR file ] +.RB [ \-w ] +.RB [ \-i +.IR number ] +.RB [ \-l +.IR number ] +.RB [ \-v ] +[\fIusername ...\fP] + +.SH DESCRIPTION +\fBrlm_dbm_cat\fP simply lists the definition(s) of the username(s) +or group name(s), or the entire database. +.PP + +.SH OPTIONS + +.IP \-f\ \fIfilename\fP +The file name of the database to list. +.IP \-w +Long lines should be wrapped +.IP \-i\ \fInumber\fP +Set the left margin then wrapped. +.IP \-l\ \fInumber\fP +How long line should be to be wrapped (wrap threshold) +.IP \-v +Print the version number and exit. + +.SH SEE ALSO +radiusd(8) +.SH AUTHORS +.TP +Author: +Andrei Koulik +.TP +Documentation: +Bjørn Nordbø diff --git a/src/modules/rlm_dbm/rlm_dbm_parse.8 b/src/modules/rlm_dbm/rlm_dbm_parse.8 new file mode 100644 index 00000000000..51dd1fcd83f --- /dev/null +++ b/src/modules/rlm_dbm/rlm_dbm_parse.8 @@ -0,0 +1,109 @@ +.TH RLM_DBM_PARSE 8 +.SH NAME +rlm_dbm_parse - transforms simple syntax into rlm_dbm format +.SH SYNOPSIS +.B rlm_dbm_parse +.RB [ \-c ] +.RB [ \-d +.IR raddb ] +.RB [ \-i +.IR inputfile ] +.RB [ \-o +.IR outputfile ] +.RB [ \-x ] +.RB [ \-v ] +.RB [ \-q ] +[\fIusername ...\fP] + +.SH DESCRIPTION +\fBrlm_dbm_parse\fP reads a file of the syntax defined below, and writes +a database file usable by rlm_dbm or edits current database. +.PP + +.SH INPUT FORMAT + +\fIrlm_dbm_parse\fP reads a format similar to the one used by the files +module. In incomplete RFC2234 ABNF, it looks like this: + +.nf +entries = *entry +entry = identifier TAB definition +identifier = username / group-name +username = +PCHAR +groupname = +PCHAR +definition = (check-item ",")* LF ( *( reply-item ",") / ";" ) LF +check-item = AS IN FILES +reply-item = AS IN FILES +* need definition of username and groupname +.fi + +As an example, these are the standard files definitions (files module). + +.nf +DEFAULT Service-Type == Framed-User + Framed-IP-Address = 255.255.255.254, + Framed-MTU = 576, + Service-Type = Framed-User, + Fall-Through = Yes + +#except who call from number 555-666 +DEFAULT Auth-Type := Reject,Service-Type ==Framed-User, + Calling-Station-ID == "555-666" + +#or call number 555-667 +DEFAULT Auth-Type := Reject,Service-Type ==Framed-User, + Calling-Station-ID == "555-667" +.fi + +To be a valid rlm_dbm input file, it should look like this: + +.nf +DEFAULT Service-Type == Framed-User # (1) + Framed-IP-Address = 255.255.255.254, # comma, list cont'd + Framed-MTU = 576, + Service-Type = Framed-User, + Fall-Through = Yes # \\n, end of list + Auth-Type := Reject,Service-Type ==Framed-User, # (2) + Calling-Station-ID == "555-666" + ; # ;, no reply items + Auth-Type := Reject,Service-Type ==Framed-User, # (3) + Calling-Station-ID == "555-667" + ; # ditto +.fi + +This user (the DEFAULT user) contains three entries, 1, 2 and 3. The +first entry has a list of reply items, terminated by a reply item +without a trailing comma. Entries 2 and 3 has empty reply lists, as +indicated by the semicolon. This is necessary to separate an empty +line (which is ignored) from the empty list. +Definition Fall-Through = Yes used in order to say module to check next +record. By default Fall-Through = Yes. + +.SH OPTIONS + +.IP \-d\ \fIraddb\fP +Use \fIraddb\fP as the radiusd configuration directory. +.IP \-i\ \fIinputfile\fP +Use \fIfile\fP as the input file. If not defined then use standard input. +.IP \-o\ \fIoutputfile\fP +Use \fIfile\fP as the output file. +.IP \-c +Create a new database (empty output file before writing) +.IP \-x +Enable debug mode. Multiple x flags increase debug level. +.IP \-q +Do not print statistics (quiet). +.IP \-v +Print the version and exit. +.IP \-r +Remove a username or group name from the database. + +.SH SEE ALSO +radiusd(8) +.SH AUTHORS +.TP +Author: +Andrei Koulik +.TP +Documentation: +Bjørn Nordbø diff --git a/src/modules/rlm_eap/radeapclient.c b/src/modules/rlm_eap/radeapclient.c index ec59fe38615..400fa37d84b 100644 --- a/src/modules/rlm_eap/radeapclient.c +++ b/src/modules/rlm_eap/radeapclient.c @@ -91,6 +91,7 @@ static void NEVER_RETURNS usage(void) fprintf(stderr, " -f file Read packets from file, not stdin.\n"); fprintf(stderr, " -r retries If timeout, retry sending the packet 'retries' times.\n"); fprintf(stderr, " -t timeout Wait 'timeout' seconds before retrying (may be a floating point number).\n"); + fprintf(stderr, " -h Print usage help information.\n"); fprintf(stderr, " -i id Set request id to 'id'. Values may be 0..255\n"); fprintf(stderr, " -S file read secret from file, not command line.\n"); fprintf(stderr, " -q Do not print anything out.\n"); diff --git a/src/modules/rlm_ippool/Makefile.in b/src/modules/rlm_ippool/Makefile.in index a1768500bb5..358edc4ac43 100644 --- a/src/modules/rlm_ippool/Makefile.in +++ b/src/modules/rlm_ippool/Makefile.in @@ -18,11 +18,5 @@ rlm_ippool_tool: rlm_ippool_tool.lo $(LIBRADIUS) $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(RLM_LDFLAGS) \ -o $@ $^ $(RLM_LIBS) $(LIBS) -rlm_ippool_tool.8: rlm_ippool_tool.pod - pod2man --release=" " --date="October 2nd, 2003" \ - --center="FreeRADIUS Daemon" --section=8 \ - rlm_ippool_tool.pod > rlm_ippool_tool.8 - -# Install man page rlm_ippool_install: rlm_ippool_tool rlm_ippool_tool.8 $(INSTALL) -m 644 rlm_ippool_tool.8 $(R)$(mandir)/man8 diff --git a/src/modules/rlm_ippool/rlm_ippool_tool.8 b/src/modules/rlm_ippool/rlm_ippool_tool.8 index 7b755d27c63..65adf1a0716 100644 --- a/src/modules/rlm_ippool/rlm_ippool_tool.8 +++ b/src/modules/rlm_ippool/rlm_ippool_tool.8 @@ -1,232 +1,122 @@ -.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to -.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' -.\" expand to `' in nroff, nothing in troff, for use with C<>. -.tr \(*W-|\(bv\*(Tr -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "RLM_IPPOOL_TOOL 8" -.TH RLM_IPPOOL_TOOL 8 "October 2nd, 2003" " " "FreeRADIUS Daemon" -.SH "NAME" -\&\fBrlm_ippool_tool\fR \- dump the contents of the FreeRadius ippool database files. -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -\&\fBrlm_ippool_tool\fR [\fBoptions\fR] <\fIsession-db\fR> <\fIindex-db\fR> [\fBipaddress\fR] -.PP -\&\fBrlm_ippool_tool\fR \fI\-n\fR <\fIsession-db\fR> <\fIindex-db\fR> <\fIipaddress\fR> <\fInasIP\fR> <\fInasPort\fR> -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -\&\fBrlm_ippool_tool\fR dumps the contents of the FreeRADIUS ippool databases for +.TH RLM_IPPOOL_TOOL 8 +.SH NAME +rlm_ippool_tool - dump the contents of the FreeRadius ippool database files +.SH SYNOPSIS +.P +If an ipaddress is specified then that address is used to +limit the actions or output. + +.B rlm_ippool_tool +.RB [ \-a ] +.RB [ \-c ] +.RB [ \-o ] +.RB [ \-v ] +\fIsession-db\fP \fIindex-db\fP [\fIipaddress\fP] + +.P +Mark the entry nasIP/nasPort as having ipaddress + +.B rlm_ippool_tool +\-n \fIsession-db\fP \fIindex-db\fP \fIipaddress\fP \fInasIP\fP \fInasPort\fP + +.P +Update old format database to new. + +.B rlm_ippool_tool +\-u \fIsession-db\fP \fInew-session-db\fP + +.SH DESCRIPTION +\fBrlm_ippool_tool\fP dumps the contents of the FreeRADIUS ippool databases for analyses or for removal of active (stuck?) entries. -.PP -\&\fBrlm_ippool_tool \-n\fR adds a usage entry to the FreeRADIUS ippool databases. -.PP -Options are: -.IP "\fB\-a\fR" 8 -.IX Item "-a" +.P +Or with the \fB\-n\fP argument adds a usage entry to the FreeRADIUS ippool databases. + + +.SH OPTIONS + +.IP \-a Print all active entries. -.IP "\fB\-c\fR" 8 -.IX Item "-c" -Report the number of active entries. -.IP "\fB\-r\fR" 8 -.IX Item "-r" +.IP \-c +Report number of active entries. +.IP \-r Remove active entries. -.IP "\fB\-v\fR" 8 -.IX Item "-v" -Verbose report of all entries -.IP "\fB\-n\fR" 8 -.IX Item "-n" -Database addition mode (\*(L"New\*(R") -.SH "EXAMPLES" -.IX Header "EXAMPLES" +.IP \-v +Verbose report of all entries. +.IP \-o +Assume old database format (nas/port pair, not md5 output). +.IP \-n +Mark the entry nasIP/nasPort as having ipaddress. +.IP \-u +Update old format database to new. + +.SH EXAMPLES + +.P Given the syntax in the FreeRadius radiusd.conf: -.PP -.Vb 7 -\& ippool myippool { -\& range-start = 192.168.1.0 -\& range-stop = 192.168.1.255 -\& [...] -\& session-db = ${raddbdir}/ip-pool.db -\& ip-index = ${raddbdir}/ip-index.db -\& } -.Ve -.PP +.IP +.nf + ippool myippool { + range-start = 192.168.1.0 + range-stop = 192.168.1.255 + [...] + session-db = ${raddbdir}/ip-pool.db + ip-index = ${raddbdir}/ip-index.db + } +.fi +.P To see the number of active entries in this pool, use: -.PP -.Vb 2 -\& $ rlm_ippool_tool -c ip-pool.db ip-index.db -\& 13 -.Ve -.PP +.IP +.nf + $ rlm_ippool_tool -c ip-pool.db ip-index.db + 13 +.fi +.P To see all active entries in this pool, use: -.PP -.Vb 8 -\& $ rlm_ippool_tool -a ip-pool.db ip-index.db -\& 192.168.1.5 -\& 192.168.1.82 -\& 192.168.1.244 -\& 192.168.1.57 -\& 192.168.1.120 -\& 192.168.1.27 -\& [...] -.Ve -.PP +.IP +.nf + $ rlm_ippool_tool -a ip-pool.db ip-index.db + 192.168.1.5 + 192.168.1.82 + 192.168.1.244 + 192.168.1.57 + 192.168.1.120 + 192.168.1.27 + [...] +.fi +.P To see all information about the active entries in the use, use: -.PP -.Vb 8 -\& $ rlm_ippool_tool -av ip-pool.db ip-index.db -\& NAS:172.16.1.1 port:0x2e8 - ipaddr:192.168.1.5 active:1 cli:0 num:1 -\& NAS:172.16.1.1 port:0x17c - ipaddr:192.168.1.82 active:1 cli:0 num:1 -\& NAS:172.16.1.1 port:0x106 - ipaddr:192.168.1.244 active:1 cli:0 num:1 -\& NAS:172.16.1.1 port:0x157 - ipaddr:192.168.1.57 active:1 cli:0 num:1 -\& NAS:172.16.1.1 port:0x2d8 - ipaddr:192.168.1.120 active:1 cli:0 num:1 -\& NAS:172.16.1.1 port:0x162 - ipaddr:192.168.1.27 active:1 cli:0 num:1 -\& [...] -.Ve -.PP +.IP +.nf + $ rlm_ippool_tool -av ip-pool.db ip-index.db + NAS:172.16.1.1 port:0x2e8 - ipaddr:192.168.1.5 active:1 cli:0 num:1 + NAS:172.16.1.1 port:0x17c - ipaddr:192.168.1.82 active:1 cli:0 num:1 + NAS:172.16.1.1 port:0x106 - ipaddr:192.168.1.244 active:1 cli:0 num:1 + NAS:172.16.1.1 port:0x157 - ipaddr:192.168.1.57 active:1 cli:0 num:1 + NAS:172.16.1.1 port:0x2d8 - ipaddr:192.168.1.120 active:1 cli:0 num:1 + NAS:172.16.1.1 port:0x162 - ipaddr:192.168.1.27 active:1 cli:0 num:1 + [...] +.fi +.P To see only information of one entry, use: -.PP -.Vb 2 -\& $ rlm_ippool_tool -v ip-pool.db ip-index.db 192.168.1.1 -\& NAS:172.16.1.1 port:0x90 - ipaddr:192.168.1.1 active:0 cli:0 num:0 -.Ve -.PP -To add an \s-1IP\s0 address usage entry, use: -.PP -.Vb 4 -\& $ rlm_ippool_tool -n ip-pool.db ip-index.db 192.168.1.1 172.16.1.1 0x90 -\& rlm_ippool_tool: Allocating ip to nas/port: 172.16.1.1/144 -\& rlm_ippool_tool: num: 1 -\& rlm_ippool_tool: Allocated ip 192.168.1.1 to client on nas 172.16.1.1,port 144 -.Ve -.SH "AUTHOR" -.IX Header "AUTHOR" +.IP +.nf + $ rlm_ippool_tool -v ip-pool.db ip-index.db 192.168.1.1 + NAS:172.16.1.1 port:0x90 - ipaddr:192.168.1.1 active:0 cli:0 num:0 +.fi +.P +To add an IP address usage entry, use: +.IP +.nf + $ rlm_ippool_tool -n ip-pool.db ip-index.db 192.168.1.1 172.16.1.1 0x90 + rlm_ippool_tool: Allocating ip to nas/port: 172.16.1.1/144 + rlm_ippool_tool: num: 1 + rlm_ippool_tool: Allocated ip 192.168.1.1 to client on nas 172.16.1.1,port 144 +.fi + +.SH SEE ALSO +radiusd(8) +.SH AUTHORS Currently part of the FreeRADIUS Project (http://www.freeradius.org) Originally by Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org) -.PP + Mailing list details are at http://www.freeradius.org/ -.SH "BUGS" -.IX Header "BUGS" diff --git a/src/modules/rlm_ippool/rlm_ippool_tool.pod b/src/modules/rlm_ippool/rlm_ippool_tool.pod deleted file mode 100644 index 2719aa48754..00000000000 --- a/src/modules/rlm_ippool/rlm_ippool_tool.pod +++ /dev/null @@ -1,106 +0,0 @@ -# -# $Id$ -# - -=head1 NAME - -B - dump the contents of the FreeRadius ippool database files. - -=head1 SYNOPSIS - -B [B] > > [B] - -B I<-n> > > > > > - -=head1 DESCRIPTION - -B dumps the contents of the FreeRADIUS ippool databases for -analyses or for removal of active (stuck?) entries. - -B adds a usage entry to the FreeRADIUS ippool databases. - -Options are: - -=over 8 - -=item B<-a> - -Print all active entries. - -=item B<-c> - -Report the number of active entries. - -=item B<-r> - -Remove active entries. - -=item B<-v> - -Verbose report of all entries - -=item B<-n> - -Database addition mode ("New") - -=back - -=head1 EXAMPLES - -Given the syntax in the FreeRadius radiusd.conf: - - ippool myippool { - range-start = 192.168.1.0 - range-stop = 192.168.1.255 - [...] - session-db = ${raddbdir}/ip-pool.db - ip-index = ${raddbdir}/ip-index.db - } - -To see the number of active entries in this pool, use: - - $ rlm_ippool_tool -c ip-pool.db ip-index.db - 13 - -To see all active entries in this pool, use: - - $ rlm_ippool_tool -a ip-pool.db ip-index.db - 192.168.1.5 - 192.168.1.82 - 192.168.1.244 - 192.168.1.57 - 192.168.1.120 - 192.168.1.27 - [...] - -To see all information about the active entries in the use, use: - - $ rlm_ippool_tool -av ip-pool.db ip-index.db - NAS:172.16.1.1 port:0x2e8 - ipaddr:192.168.1.5 active:1 cli:0 num:1 - NAS:172.16.1.1 port:0x17c - ipaddr:192.168.1.82 active:1 cli:0 num:1 - NAS:172.16.1.1 port:0x106 - ipaddr:192.168.1.244 active:1 cli:0 num:1 - NAS:172.16.1.1 port:0x157 - ipaddr:192.168.1.57 active:1 cli:0 num:1 - NAS:172.16.1.1 port:0x2d8 - ipaddr:192.168.1.120 active:1 cli:0 num:1 - NAS:172.16.1.1 port:0x162 - ipaddr:192.168.1.27 active:1 cli:0 num:1 - [...] - -To see only information of one entry, use: - - $ rlm_ippool_tool -v ip-pool.db ip-index.db 192.168.1.1 - NAS:172.16.1.1 port:0x90 - ipaddr:192.168.1.1 active:0 cli:0 num:0 - -To add an IP address usage entry, use: - - $ rlm_ippool_tool -n ip-pool.db ip-index.db 192.168.1.1 172.16.1.1 0x90 - rlm_ippool_tool: Allocating ip to nas/port: 172.16.1.1/144 - rlm_ippool_tool: num: 1 - rlm_ippool_tool: Allocated ip 192.168.1.1 to client on nas 172.16.1.1,port 144 - -=head1 AUTHOR - -Currently part of the FreeRADIUS Project (http://www.freeradius.org) -Originally by Edwin Groothuis, edwin@mavetju.org (http://www.mavetju.org) - -Mailing list details are at http://www.freeradius.org/ - -=head1 BUGS