code: def _import_next_layer(self, proto, length, error=False):
          
          if proto == 1:
              from pcapkit.protocols.link import Ethernet as Protocol
          elif proto == 228:
              from pcapkit.protocols.internet import IPv4 as Protocol
          elif proto == 229:
              from pcapkit.protocols.internet import IPv6 as Protocol
          else:
              from pcapkit.protocols.raw import Raw as Protocol
          next_ = Protocol(self._file, length, error=error,
                           layer=self._exlayer, protocol=self._exproto)
          return next_
docs: Import next layer extractor.
  
          Positional arguments:
              * proto -- str, next layer protocol name
              * length -- int, valid (not padding) length
  
          Keyword arguments:
              * error -- bool, if function call on error
  
          Returns:
              * bool -- flag if extraction of next layer succeeded
              * Info -- info of next layer
              * ProtoChain -- protocol chain of next layer
              * str -- alias of next layer
  
          Protocols:
              * Ethernet (data link layer)
              * IPv4 (internet layer)
              * IPv6 (internet layer)