getpib(7) Atheros Powerline Toolkit getpib(7)
NAME
getpib - Atheros PIB Data Extractor
SYNOPSIS
getpib file offset format [length]
DESCRIPTION
This program is a companion to program setpib and is designed to support shell scripts. It
extracts PIB file parameters so that a scripting language can evaluate, manipulate or
store them with minimal effort. Good scripting skills and some imagination may be required
to make effective use of this program.
Users having a detailed knowledge of PIB content and structure can make extremely effec‐
tive use of this program; however, Atheros is under no obligation to provide customers
with the offset, length or format of PIB file parameters.
This program is part of the Atheros Powerline Toolkit. See the AMP man page for an
overview and installation instructions.
OPTIONS
-q Enable quiet mode which has no effect.
-v Print a dump of the edited region. The extent of displayed data can be changed
using option -w.
-?,--help
Print program help summary on stdout. This option takes precedence over other
options on the command line.
-!,--version
Print program version information on stdout. This option takes precedence over
other options on the command line. Usethis option when sending screen dumps to
Atheros Technical Support so that they know exactly which version of the Linux
Toolkit you are using.
ARGUMENTS
file The PIB filename. This argument is required and must appear first on the command
line. No assumptions are made based on filename and no filename conventions are
enforced; however, an invalid PIB file will be rejected.
offset The data offset in bytes expressed in hexadecimal. This argument is required and
must follow the filename. A leading "0x" prefix is optional. The data offset plus
the data length cannot exceed the file extent.
format The output format. This argument is required and must follow the offset. Some for‐
mats imply fixed data length. Others formats are for variable length data. The
fixed data formats are byte, word, long, hfid, mac and key. The variable data for‐
mats are data and text. The formats are described in the next section.
length The data length in bytes expressed in decimal. This argument is only required for
the the data formats data and text. The data offset plus the data length cannot
exceed the file extent. The data length cannot exceed 1024.
FORMATS
byte Extract 1 byte and display it as an unsigned decimal integer string. The offset
advances byte before starting another extraction.
word Extract 2 consecutive bytes and display them as an unsigned decimal integer string
after endian conversion. The offset advances bytes before starting another
extraction.
long Extract 4 consecutive bytes and display them as an unsigned decimal integer string
after endian conversion. The offset advances 4 bytes before starting another
extraction.
hfid Extract 64 consecutive bytes and display them as an ASCII string that terminates at
the first non-printable character. The offset advances 64 bytes before starting
another extraction. This format is equivalent to "text 64".
mac Extract 6 bytes and display them as a colon-separated hexadecimal string. The off‐
set advances bytes before starting another extraction. This is similar to "data 6"
but colons separate octets.
key Extract 16 bytes and display them as a colon-separated hexadecimal string. The off‐
set advances 16 bytes before starting another extraction. This is similar to "data
16" but colons separate octets.
data length
Extract the specified number of bytes and display them as a hexadecimal string with
no punctuation to separate octets. The offset advances length bytes before starting
another extraction. The minimum length is 1. The maximum length is 1024.
text length
Extract the specified number of bytes and display them as an ASCII string termi‐
nated at first non-printable character. The offset advances length bytes before
starting another extraction. The minimum length is 1. The maximum length is 1024.
skip length
Advance the specified number of bytes without displaying anything. The offset
advances by length bytes before starting another extraction. The minimum length is
1. The maximum length is 1024.
EXAMPLES
The following example extracts one byte from offset 01F7 of PIB file abc.pib and displays
it as an unsigned decimal integer string. No length specification is needed because the
byte format has an implied length of 1 byte. The displayed value is 232 because the byte
format is decimal. We could have specified "data 1" to display the byte in hexadecimal.
The return prompt appears on the display line because option -n was omitted.
# getpib abc.pib 01F7 byte
232#
The next example extracts two bytes at offset 01F7 and displays them as a hexadecimal
string. A length of 2 is needed because the data format is variable length. We could have
specified "word" to display these bytes as an unsigned decimal integer string. The hex‐
adecimal string consists two octets E8 and 8A. The first byte is the same one extracted in
the last example. The return prompt appears on a new line because option -n was present.
# getpib abc.pib 01F7 data 2 -n
E88A
#
DISCLAIMER
PIB file structure and content is proprietary to Atheros Communications, Ocala FL USA.
Consequently, public information is not available. Atheros Communications reserves the
right to modify PIB file structure or content in future firmware releases without any
obligation to notify or compensate users of this program.
SEE ALSO
chkpib(7), modpib(7), mrgpib(7), setpib(7), pxe(7)
CREDITS
Charles Maier <charles.maier@atheros.com>
int6000-utils-linux Atheros Communications getpib(7)