getpib.1 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. .TH getpib 1 "Mar 2014" "plc-utils-2.1.6" "Qualcomm Atheros Powerline Toolkit"
  2. .SH NAME
  3. getpib - Qualcomm Atheros PIB Data Extractor
  4. .SH SYNOPSIS
  5. .BR getpib
  6. .IR file
  7. .IR offset
  8. .IR format
  9. .RI [ length ]
  10. .SH DESCRIPTION
  11. This program is a companion to program \fBsetpib\fR and is designed to support shell scripts.
  12. It extracts PIB file parameters so that a scripting language can evaluate, manipulate or store them with minimal effort.
  13. Good scripting skills and some imagination may be required to make effective use of this program.
  14. .PP
  15. Users having a detailed knowledge of PIB content and structure can make extremely effective use of this program; however, Atheros is under no obligation to provide customers with the offset, length or format of PIB file parameters.
  16. .PP
  17. This program is part of the Qualcomm Atheros Powerline Toolkit.
  18. See the \fBAMP\fR man page for an overview and installation instructions.
  19. .SH OPTIONS
  20. .TP
  21. - \fBc \fIcharacter\fR
  22. The appended character.
  23. Append this character each line of output instead of newline.
  24. Use this to create a comma separated list of value, for example, by specifying a comma.
  25. .TP
  26. .RB - n
  27. Append a newline to the output.
  28. .TP
  29. .RB - q
  30. Enable quiet mode which has no effect.
  31. .TP
  32. .RB - v
  33. Verbose mode.
  34. Does nothing.
  35. .TP
  36. .RB - ? ,-- help
  37. Print program help summary on stdout.
  38. This option takes precedence over other options on the command line.
  39. .TP
  40. .RB - ! ,-- version
  41. Print program version information on stdout.
  42. This option takes precedence over other options on the command line.
  43. Usethis option when sending screen dumps to Atheros Technical Support so that they know exactly which version of the Linux Toolkit you are using.
  44. .SH ARGUMENTS
  45. .TP
  46. .IR file
  47. The PIB filename.
  48. This argument is required and must appear first on the command line.
  49. No assumptions are made based on filename and no filename conventions are enforced; however, an invalid PIB file will be rejected.
  50. .TP
  51. .IR offset
  52. The data offset in bytes expressed in hexadecimal.
  53. This argument is required and must follow the filename.
  54. A leading "\fB0x\fR" prefix is optional.
  55. The data \fIoffset\fR plus the data \fIlength\fR cannot exceed the file extent.
  56. .TP
  57. .IB format
  58. The output format.
  59. This argument is required and must follow the offset.
  60. Some formats imply fixed data length.
  61. Others formats are for variable length data.
  62. The fixed data formats are \fBbyte\fR, \fBword\fR, \fBlong\fR, \fBhfid\fR, \fBmac\fR and \fBkey\fR.
  63. The variable data formats are \fBdata\fR and \fBtext\fR.
  64. The formats are described in the next section.
  65. .TP
  66. .IB length
  67. The data length in bytes expressed in decimal.
  68. This argument is only required for the the data formats \fBdata\fR and \fBtext\fR.
  69. The data \fIoffset\fR plus the data \fIlength\fR cannot exceed the file extent.
  70. The data \fIlength\fR cannot exceed \fB1024\fR.
  71. .SH FORMATS
  72. .TP
  73. .BR byte
  74. Extract 1 byte and display it as an unsigned decimal integer value.
  75. The offset advances \f1\fR byte before starting another extraction.
  76. .TP
  77. .BR word
  78. Extract 2 consecutive bytes and display them as an unsigned decimal integer value after endian conversion.
  79. The offset advances \f2\fR bytes before starting another extraction.
  80. .TP
  81. .BR long
  82. Extract 4 consecutive bytes and display them as an unsigned decimal integer value after endian conversion.
  83. The offset advances \fB4\fR bytes before starting another extraction.
  84. .TP
  85. .BR huge
  86. Extract 8 consecutive bytes and display them as an unsigned decimal integer value after endian conversion.
  87. The offset advances \fB8\fR bytes before starting another extraction.
  88. .TP
  89. .BR xbyte
  90. Extract 1 byte and display it as a hexadecimal integer value.
  91. The offset advances \f1\fR byte before starting another extraction.
  92. .TP
  93. .BR xword
  94. Extract 2 consecutive bytes and display them as a hexadecimal integer value after endian conversion.
  95. The offset advances \f2\fR bytes before starting another extraction.
  96. .TP
  97. .BR xlong
  98. Extract 4 consecutive bytes and display them as a hexadecimal integer value after endian conversion.
  99. The offset advances \fB4\fR bytes before starting another extraction.
  100. .TP
  101. .BR xhuge
  102. Extract 8 consecutive bytes and display them as a hexadecimal integer value after endian conversion.
  103. The offset advances \fB8\fR bytes before starting another extraction.
  104. .TP
  105. \fBdata \fIlength\fR
  106. Extract the specified number of bytes and display them as a hexadecimal string with no punctuation to separate octets.
  107. The offset advances \fIlength\fR bytes before starting another extraction.
  108. The minimum length is \fB1\fR.
  109. The maximum length is \fB1024\fR.
  110. .TP
  111. .BR mac
  112. Extract 6 bytes and display them as a colon-separated hexadecimal string.
  113. The offset advances 6 bytes before starting another extraction.
  114. This is similar to "\fBdata 6\fR" but colons separate each octet.
  115. .TP
  116. .BR key
  117. Extract 16 bytes and display them as a colon-separated hexadecimal string.
  118. The offset advances 16 bytes before starting another extraction.
  119. This is similar to "\fBdata 16\fR" but colons separate each octet.
  120. .TP
  121. .BR hfid
  122. Extract 64 consecutive bytes and display them as an ASCII string that terminates at the first non-printable character.
  123. The offset advances \fB64\fR bytes before starting another extraction.
  124. This is equivalent to "\fBtext 64\fR".
  125. .TP
  126. \fBskip \fIlength\fR
  127. Advance the specified number of bytes without displaying anything.
  128. The offset advances by \fIlength\fR bytes before starting another extraction.
  129. The minimum length is \fB1\fR.
  130. The maximum length is \fB1024\fR.
  131. .TP
  132. \fBtext \fIlength\fR
  133. Extract the specified number of bytes and display them as an ASCII string that terminates at the first non-printable character.
  134. The offset advances the specified number of bytes before starting another extraction.
  135. .SH TR-069
  136. .TP
  137. .BR accesspassword
  138. Extract 65 consecutive bytes and display them as an ASCII string that terminates at the first non-printable character.
  139. The offset advances \fB65\fR bytes before starting another extraction.
  140. This format is equivalent to "\fBtext 65\fR".
  141. .TP
  142. .BR accessusername
  143. Extract 33 consecutive bytes and display them as an ASCII string that terminates at the first non-printable character.
  144. The offset advances \fB33\fR bytes before starting another extraction.
  145. This format is equivalent to "\fBtext 33\fR".
  146. .TP
  147. .BR adminpassword
  148. Extract 33 consecutive bytes and display them as an ASCII string that terminates at the first non-printable character.
  149. The offset advances \fB33\fR bytes before starting another extraction.
  150. This format is equivalent to "\fBtext 33\fR".
  151. .TP
  152. .BR adminusername
  153. Extract 33 consecutive bytes and display them as an ASCII string that terminates at the first non-printable character.
  154. The offset advances \fB33\fR bytes before starting another extraction.
  155. This format is equivalent to "\fBtext 33\fR".
  156. .TP
  157. .BR password
  158. Extract 257 consecutive bytes and display them as an ASCII string that terminates at the first non-printable character.
  159. The offset advances \fB257\fR bytes before starting another extraction.
  160. This format is equivalent to "\fBtext 257\fR".
  161. .TP
  162. .BR url
  163. Extract 257 consecutive bytes and display them as an ASCII string that terminates at the first non-printable character.
  164. The offset advances \fB257\fR bytes before starting another extraction.
  165. This format is equivalent to "\fBtext 257\fR".
  166. .TP
  167. .BR username
  168. Extract 257 consecutive bytes and display them as an ASCII string that terminates at the first non-printable character.
  169. The offset advances \fB257\fR bytes before starting another extraction.
  170. This format is equivalent to "\fBtext 257\fR".
  171. .SH EXAMPLES
  172. The following example extracts one byte from offset \fB01F7\fR of PIB file \fBabc.pib\fR and displays it as an unsigned decimal integer string.
  173. No length specification is needed because the \fBbyte\fR format has an implied length of \fB1\fR byte.
  174. The displayed value is \fB232\fR because the \fBbyte\fR format is decimal.
  175. We could have specified "\fBdata 1\fR" to display the byte in hexadecimal.
  176. The return prompt appears on the display line because option \fB-n\fR was omitted.
  177. .PP
  178. # getpib abc.pib 01F7 byte
  179. 232#
  180. .PP
  181. The next example extracts two bytes at offset \fB01F7\fR and displays them as a hexadecimal string.
  182. A length of \fB2\fR is needed because the \fBdata\fR format is variable length.
  183. We could have specified "\fBword\fR" to display these bytes as an unsigned decimal integer string.
  184. The hexadecimal string consists two octets \fBE8\fR and \fB8A\fR.
  185. The first byte is the same one extracted in the last example.
  186. The return prompt appears on a new line because option \fB-n\fR was present.
  187. .PP
  188. # getpib abc.pib 01F7 data 2 -n
  189. E88A
  190. #
  191. .SH DISCLAIMER
  192. PIB file structure and content is proprietary to Qualcomm Atheros, Ocala FL USA.
  193. Consequently, public information is not available.
  194. Qualcomm Atheros 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.
  195. .SH SEE ALSO
  196. .BR chkpib (7),
  197. .BR chkpib2 (7),
  198. .BR modpib ( 1 ),
  199. .BR pib2xml ( 1 ),
  200. .BR pibcomp ( 1 ),
  201. .BR pibdump ( 1 ),
  202. .BR setpib ( 1 ),
  203. .BR xml2pib ( 1 )
  204. .SH CREDITS
  205. Charles Maier <cmaier@qca.qualcomm.com>