efsu.1.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. efsu.1
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='efru.1.html' title=' efru.1 '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='evse.1.html' title=' evse.1 '>NEXT</a>]
  19. </div>
  20. <pre>
  21. efsu(1) Qualcomm Atheros Open Powerline Toolkit efsu(1)
  22. NAME
  23. efsu - Ethernet Frame Send Utility
  24. SYNOPSIS
  25. efsu [options] file [file] [...]
  26. efsu [options] [&lt;stdin]
  27. DESCRIPTION
  28. Sends custom Ethernet frames over a specific host Ethernet interface.
  29. A frame is specified as a text stream of hexadecimal octets read from one or more frame description files or from stdin.
  30. Each octet is converted to a binary byte, buffered and transmitted over the network on the specified host interface. The
  31. program assumes that frames are valid and will transmit whatever you specify, right or wrong. The program only checks
  32. minimum and maximum frame length.
  33. Frame descriptions are stored as plain text files. Multiple frames may be specified in one file by separating them with
  34. a semicolon. All descriptions in a file are read and sent immediately but multiple files may be specified on the command
  35. line and options allow pauses between files, command line repetition and pauses between command line iterations.
  36. A frame descriptions is a continuous stream of hexadecimal digits. Intervening text, punctuation, white space and com‐
  37. ments are discarded. Hex characters inside script-style, C-style or C++-style comments are ignored. Script-style com‐
  38. ments include all characters between a hash ('#') and the next newline or EOF. C-style and C++-style comments follow
  39. normal language rules. Comments may be used to document frame descriptions or hide frame segments. In the end, there
  40. must be an even number of hex digits that represent 60 to 1518 octets;
  41. OPTIONS
  42. -d address
  43. Replace the destination Ethernet address of each transmitted frame with the option argument. The destination
  44. address consists of 12 hex digits in upper, lower or mixed case. Octets may be seperated with colons for clarity
  45. but colons are not required.
  46. -e ethertype
  47. Echo received frames having ethertype. This effectively filters received frames but does not filter transmitted
  48. frames. The ethertype is expressed in hexadecimal without the &quot;0x&quot; prefix. The keyword &quot;hp10&quot; can be used for
  49. 887B and keyword &quot;hpav&quot; can be used for 88E1.
  50. -h Replace the source address of each transmitted frame with the Ethernet address of the host interface used to send
  51. the frame. This allows frames to be sent correctly from any host interface. Use option -i to specify an inter‐
  52. face.
  53. -i interface
  54. The host interface used to send frames. The default is &quot;eth1&quot; because most people use &quot;eth0&quot; as their principle
  55. network connection; however, if the string &quot;PLC&quot; is defined in the environment then it will over-ride the program
  56. default. Any interface specified on the command line will over-ride the default.
  57. -l count
  58. Repeat command line count times by re-sending all files each time. The default is 1.
  59. -p seconds
  60. Pause between each file on the command line. The default is 0 seconds.
  61. -t timer
  62. Read timeout in milliseconds. Values range from 0 through UINT_MAX. This is the maximum time allowed for a
  63. response. The default is 50 milliseconds.
  64. -v Dumps transmitted frames on stdout as they are sent. If an Ethertype was specified using option -e the received
  65. frames having that Ethertype will also be dumped.
  66. -w seconds
  67. Wait between command line iterations. The default is 0 seconds.
  68. ARGUMENTS
  69. file The name of a file containing one or more frame specifications. When more than one file is specified, efsu
  70. behaves like the cat utility by reading and sending each file in turn. The program makes no assumptions based on
  71. filename or extension and enforces no filename conventions; however, giving frame description files the *.hex
  72. extension is a good convention. Some toolkit distributions include example .hex files in the source folder.
  73. These files are not needed for proper execution and may be deleted.
  74. NOTES
  75. One way to create a frame description file is to cut-and-paste output from a packet sniffer program and discard the line
  76. numbers and ASCII text columns. You can then break out selected frame segments onto new lines and insert comments.
  77. EXAMPLES
  78. For example, a simple file might look like:
  79. #!/usr/local/bin/efsu -ieth0
  80. # file: abc.hex
  81. # =====================================
  82. # this is an example frame description;
  83. # -------------------------------------
  84. 00 B0 52 00 00 01
  85. // 00 B0 52 BE DE 73
  86. 00 E0 45 DA DA 07
  87. 88 E1
  88. /* content */
  89. 00 00 00 00 00 00 00 00
  90. 00 00 00 00 00 00 00 00
  91. 00000000 0000 00 /* control byte */ 00
  92. 00 00 00 00 00 00 00 00
  93. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  94. 00 00 00 00 00 00 00 00
  95. The bang path permits direct execution of the file if 1) efsu is installed in the bang path directory, 2) the description
  96. file has execute permissions and 3) the user has execute privileges for that file. The script-style, C++-style and C-
  97. style comments are ignored along with any white space. Only the hexadecimal octets are read and sent. Since the number
  98. of octets exceeds 60 and the number of digits is even, efsu will report no errors and send the packet. There is no guar‐
  99. antee that this packet is valid.
  100. Assuming the above file is named abc.hex, we can transmit the file over the network as an Ethernet frame with the next
  101. command. A hexadecimal dump of the transmitted frame appears on the console because option -v is present.
  102. # efsu abc.hex -v
  103. 00000000 00 B0 52 00 00 01 00 E0 45 DA DA 07 88 E1 00 00 ..R.....E.......
  104. 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  105. 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  106. 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  107. 00000040 00 00 00 00 00 00 ......
  108. Since every host interface has a different hardware address, one can replace the source address of transmitted frames
  109. with the actual host interface address using option -h. Observe that the source address above has been replaced with
  110. that of the local host interface used to transmit the frame.
  111. # efsu abc.hex -vh
  112. 00000000 00 B0 52 00 00 01 00 0F EA 10 D5 1C 88 E1 00 00 ..R.............
  113. 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  114. 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  115. 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  116. 00000040 00 00 00 00 00 00 ......
  117. You can also direct the frame to another device using option -d. Observe that the destination address above has been
  118. replaced with the one specified on the command line.
  119. # efsu abc.hex -vhd 00b052beef01
  120. 00000000 00 B0 52 BE EF 01 00 0F EA 10 D5 1C 88 E1 00 00 ..R.............
  121. 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  122. 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  123. 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  124. 00000040 00 00 00 00 00 00 ......
  125. SEE ALSO
  126. amp(1), hpav(1)
  127. CREDITS
  128. Charles Maier &lt;cmaier@qca.qualcomm.com&gt;
  129. open-plc-utils-0.0.3 Mar 2014 efsu(1)
  130. </pre>
  131. <div class='footerlink'>
  132. [<a href='efru.1.html' title=' efru.1 '>PREV</a>]
  133. [<a href='toolkit.html' title=' Index '>HOME</a>]
  134. [<a href='evse.1.html' title=' evse.1 '>NEXT</a>]
  135. </div>
  136. </body>
  137. </html>