efsu(7)                             Atheros Powerline Toolkit                             efsu(7)

NAME
       efsu - Ethernet Frame Send Utility

SYNOPSIS
       efsu [options] file [file] [...]

       efsu [options] [<stdin]

DESCRIPTION
       Sends custom Ethernet frames over a specific host Ethernet interface.

       A  frame  is  specified by a text stream of hexadecimal octets read from one or more frame
       description files or from stdin. Each octet is converted to a binary  byte,  buffered  and
       transmitted  over  the  network  on the specified host interface. The program assumes that
       frames are valid and will transmit whatever you specify, right or wrong. The program  only
       checks minimum and maximum frame length.

       Frame  descriptions may be stored as plain text files. Multiple frames may be specified in
       one file by separating their descriptions with a semicolon. All descriptions in a file are
       read  and  sent  immediately  but  multiple files may be specified on the command line and
       options allow pauses between files, command line repetition  and  pauses  between  command
       line iterations.

       Frame descriptions are continuous streams of hexadecimal digits. Intervening text, punctu‐
       ation, white space and comments are discarded. Hex characters inside script-style, C-style
       or  C++-style comments are ignored. Script-style comments include all characters between a
       hash (’#’) and the next newline or EOF. C-style and C++-style comments follow normal  lan‐
       guage  rules.  Comments may be used to document frame descriptions or hide frame segments.
       In the end, there must be an even number of hex digits that represent 60 to 1518 octets;

OPTIONS
       -d address
              Replace the destination Ethernet address of each transmitted frame with the  option
              argument.  The  destination  address  consists  of 12 hex digits in upper, lower or
              mixed case. Octets may be seperated with colons for  clarity  but  colons  are  not
              required.

       -e ethertype
              Echo received frames having ethertype. This effectively filters received frames but
              does not filter transmitted frames. The ethertype is expressed in hexadecimal with‐
              out the "0x" prefix. The keyword "hp10" can be used for 887B and keyword "hpav" can
              be used for 88E1.

       -h     Replace the source address of each transmitted frame with the Ethernet  address  of
              the  host interface used to send the frame. This allows frames to be sent correctly
              from any host interface. Use option -i to specify an interface.

       -i interface
              The host interface used to send frames. The default is "eth1" because  most  people
              use  "eth0"  as their principle network connection; however, if the string "PLC" is
              defined in the environment then it will over-ride the program default.  Any  inter‐
              face specified on the command line will over-ride the default.

       -l count
              Loop count times causing all frames to be sent each time. The default is 1.

       -v     Dumps  transmitted frames on stdout as they are sent. If an Ethertype was specified
              using option -e the received frames having that Ethertype will also be dumped.

       -w count
              Wait count seconds between loop iterations. The default is 0 seconds.

ARGUMENTS
       file   The name of a file containing one or more frame specifications. When more than  one
              file  is  specified,  efsu behaves like the cat utility by reading and sending each
              file in turn. The program makes no assumptions based on filename or  extension  and
              enforces no filename conventions; however, giving frame description files the *.hex
              extension is a good convention. Some toolkit  distributions  include  example  .hex
              files in the source folder. These files are not needed for proper execution and may
              be deleted.

NOTES
       One way to create a frame description file is to cut-and-paste output from a packet  snif‐
       fer  program  and  discard the line numbers and ASCII text columns. You can then break out
       selected frame segments onto new lines and insert comments.

EXAMPLES
       For example, a simple file might look like:

          #!/usr/local/bin/efsu -ieth0
          # =====================================
          # this is an example frame description;
          # -------------------------------------
          00 B0 52 00 00 01
          // 00 B0 52 BE DE 73
          00 E0 45 DA DA 07
          88 E1
          /* content */
          00 00 00 00 00 00 00 00
          00 00 00 00 00 00 00 00
          00000000 0000 00 /* control byte */ 00
          00 00 00 00 00 00 00 00
          00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
          00 00 00 00 00 00 00 00

       The bang path permits direct execution of the file, provided efsu is installed in the bang
       path  directory,  the  description  file  has execute permissions and the user has execute
       priviledges for that file. The script-style, C++-style and C-style comments are ignored as
       is  the  white  space.  Only the hexadecimal octets are read and sent. Since the number of
       octets exceeds 60 and the number of digits is even, efsu will report no  errors  and  send
       the packet. There is no guarantee that this packet is valid.

       Assuming  the above file is named abc.hex, we can transmit the file over the network as an
       Ethernet frame with the next command. A hexadecimal dump of the transmitted frame  appears
       on the console because option -v is present.

          # efsu abc.hex -v
          00000000 00 B0 52 00 00 01 00 E0 45 DA DA 07 88 E1 00 00 ..R.....E.......
          00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000040 00 00 00 00 00 00                               ......

       Since  every  host  interface has a different hardware address, one can replace the source
       address of transmitted frames with the actual host  interface  address  using  option  -h.
       Observe  that  the  original  source address has been replaced with that of the local host
       interface used to transmit the frame.

          # efsu abc.hex -h
          00000000 00 B0 52 00 00 01 00 0F EA 10 D5 1C 88 E1 00 00 ..R.............
          00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000040 00 00 00 00 00 00                               ......

       You can also direct the frame to another device using option -d. Observe that the original
       destination address has been replaced with the one specified on the command line.

          # efsu abc.hex -vhd 00b052beef01
          00000000 00 B0 52 BE EF 01 00 0F EA 10 D5 1C 88 E1 00 00 ..R.............
          00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
          00000040 00 00 00 00 00 00                               ......

SEE ALSO
       hpav(7), AMP(7)

CREDITS
        Charles Maier <charles.maier@atheros.com>

int6000-utils-linux            Atheros Communications, Ocala FL USA                       efsu(7)