def _import_next_layer(self, proto, length, error=False):
if proto == <NUM_LIT:1>:<EOL><INDENT>from pcapkit.protocols.link import Ethernet as Protocol<EOL><DEDENT>elif proto == <NUM_LIT>:<EOL><INDENT>from pcapkit.protocols.internet import IPv4 as Protocol<EOL><DEDENT>elif proto == <NUM_LIT>:<EOL><INDENT>from pcapkit.protocols.internet import IPv6 as Protocol<EOL><DEDENT>else:<EOL><INDENT>from pcapkit.protocols.raw import Raw as Protocol<EOL><DEDENT>next_ = Protocol(self._file, length, error=error,<EOL>layer=self._exlayer, protocol=self._exproto)<EOL>return next_<EOL>
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)