def read_ethernet(self, length):
if length is None:<EOL><INDENT>length = len(self)<EOL><DEDENT>_dstm = self._read_mac_addr()<EOL>_srcm = self._read_mac_addr()<EOL>_type = self._read_protos(<NUM_LIT:2>)<EOL>ethernet = dict(<EOL>dst=_dstm,<EOL>src=_srcm,<EOL>type=_type,<EOL>)<EOL>length -= <NUM_LIT><EOL>ethernet['<STR_LIT>'] = self._read_packet(header=<NUM_LIT>, payload=length)<EOL>return self._decode_next_layer(ethernet, _type, length)<EOL>
Read Ethernet Protocol.

        Structure of Ethernet Protocol header [RFC 7042]:
            Octets      Bits        Name                    Description
              0           0     eth.dst                 Destination MAC Address
              1           8     eth.src                 Source MAC Address
              2          16     eth.type                Protocol (Internet Layer)