NAME
bin2packet - Convert a RADIUS packet payload into a useable test point
SYNOPSIS
bin2packet --dictionary dictfile [--authenticator auth-string]
[--code code] [--description packet-desc] [--dont-embed-dict]
[--dump] [--help] [--identifier id] [--noprompt] [--output file]
[--secret secret] [--slots number] dump-file...
DESCRIPTION
This tool is used to convert the payload of a RADIUS packet stored in dump-file into a "test input". This test input can then be used by the test harness included in the Net::Radius::Packet(3) distribution as part of the regression tests.
The following options are supported (Options can be shortened - See Getopt::Long(3)):
- --dictionary dictfile...
-
Specifies one or more dictionary files to use for decoding the supplied packet. Those dictionaries may be required for derived tests to work properly (ie, match the expected attribute names and/or values).
A serialized dictionary is appended to the test input.
This argument is mandatory.
- --authenticator auth-string
-
Specifies the RADIUS packet authenticator. If the provided packet dump can be decoded by Net::Radius::Packet, this value will be supplied automatically. If the guess is wrong, you must use this option to provide a correct value.
- --code code
-
The RADIUS packet code. If the provided packet dump can be decoded by Net::Radius::Packet, this value will be supplied automatically. If the guess is wrong, you must use this option to provide a correct value.
- --description packet-desc
-
A (hopefully) informative description of this packet. The most relevant information items that should be present is the name/version of the device that generated the packet, as well as a concise reference to where this packet belongs (ie, simple user authentication).
- --dont-embed-dict
-
Causes the resulting test input to not embed the Net::Radius::Dictionary(3) object used to contain the dictionary data. This can be used when only dictionaries found in the distribution are used to process the packet.
- --dump
-
Dump the decoded packet and exit without further actions.
- --help
-
Shows this documentation, then exits.
- --identifier id
-
Specifies the RADIUS packet identifier, if known. If the provided packet dump can be decoded by Net::Radius::Packet, this value will be supplied automatically. If the guess is wrong, you must use this option to provide a correct value.
- --noprompt
-
All the packet information items available in the command-line will be prompted if not specified. This option causes non-supplied options to remain undefined, which may prevent certain tests over the packet.
- --output file
-
Name of the file where this test input will be stored. The .p extension will be automatically added.
- --secret secret
-
Specify the RADIUS secret to use for decoding the packet. If not specified, it will be prompted depending on the --noprompt option.
- --slots number
-
Specify the number of attribute slots (ie, attribute-value tuples) stored in the RADIUS packet. If the provided packet dump can be decoded by Net::Radius::Packet, this value will be supplied automatically. If the guess is wrong, you must use this option to provide a correct value.
HISTORY
$Log$
Revision 1.2 2007/01/14 18:51:42 lem
When Dump()ing and eval()ing back the packet, IO::Prompt::ReturnVal
may not be within reach of the test script (different machine,
etc). Make sure we drop this magic when we generate the test input.
Revision 1.1 2007/01/09 17:55:10 lem
First release of bin2packet added
LICENSE AND WARRANTY
This code and all accompanying software comes with NO WARRANTY. You use it at your own risk.
This code and all accompanying software can be used freely under the same terms as Perl version 5.8.6 itself.
AUTHOR
Luis E. Muñoz <luismunoz@cpan.org>
SEE ALSO
perl(1), Getopt::Long(3), Net::Radius::Packet(3), Net::Radius::Dictionary(3).
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 313:
Non-ASCII character seen before =encoding in 'Muñoz'. Assuming UTF-8