def _default_read_frame(self, *, frame=None, mpkit=None):
        """Read frames with default engine.

        - Extract frames and each layer of packets.
        - Make Info object out of frame properties.
        - Append Info.
        - Write plist & append Info.

        """
        from pcapkit.toolkit.default import (ipv4_reassembly, ipv6_reassembly,
                                             tcp_reassembly, tcp_traceflow)

        # read frame header
        if not self._flag_m:
            frame = Frame(self._ifile, num=self._frnum+1, proto=self._dlink,
                          layer=self._exlyr, protocol=self._exptl, nanosecond=self._nnsec)
            self._frnum += 1

        # verbose output
        if self._flag_v:
            print(f' - Frame {self._frnum:>3d}: {frame.protochain}')

        # write plist
        frnum = f'Frame {self._frnum}'
        if not self._flag_q:
            if self._flag_f:
                ofile = self._ofile(f'{self._ofnm}/{frnum}.{self._fext}')
                ofile(frame.info, name=frnum)
            else:
                self._ofile(frame.info, name=frnum)

        # record fragments
        if self._ipv4:
            flag, data = ipv4_reassembly(frame)
            if flag:
                self._reasm[0](data)  # pylint: disable=E1102
        if self._ipv6:
            flag, data = ipv6_reassembly(frame)
            if flag:
                self._reasm[1](data)  # pylint: disable=E1102
        if self._tcp:
            flag, data = tcp_reassembly(frame)
            if flag:
                self._reasm[2](data)  # pylint: disable=E1102

        # trace flows
        if self._flag_t:
            flag, data = tcp_traceflow(frame, data_link=self._dlink)
            if flag:
                self._trace(data)

        # record frames
        if self._exeng == 'pipeline':
            if self._flag_d:
                # frame._file = NotImplemented
                mpkit.frames[self._frnum] = frame
                # print(self._frnum, 'stored')
            mpkit.current += 1
        elif self._exeng == 'server':
            # record frames
            if self._flag_d:
                # frame._file = NotImplemented
                self._frame.append(frame)
                # print(self._frnum, 'stored')
            self._frnum += 1
        else:
            if self._flag_d:
                self._frame.append(frame)
            self._proto = frame.protochain.chain

        # return frame record
        return frame
def _default_read_frame ( self , * , frame = None , mpkit = None ) : from pcapkit . toolkit . default import ( ipv4_reassembly , ipv6_reassembly , tcp_reassembly , tcp_traceflow ) if not self . _flag_m : frame = Frame ( self . _ifile , num = self . _frnum + 1 , proto = self . _dlink , layer = self . _exlyr , protocol = self . _exptl , nanosecond = self . _nnsec ) self . _frnum += 1 if self . _flag_v : print ( f' - Frame {self._frnum:>3d}: {frame.protochain}' ) frnum = f'Frame {self._frnum}' if not self . _flag_q : if self . _flag_f : ofile = self . _ofile ( f'{self._ofnm}/{frnum}.{self._fext}' ) ofile ( frame . info , name = frnum ) else : self . _ofile ( frame . info , name = frnum ) if self . _ipv4 : flag , data = ipv4_reassembly ( frame ) if flag : self . _reasm [ 0 ] ( data ) if self . _ipv6 : flag , data = ipv6_reassembly ( frame ) if flag : self . _reasm [ 1 ] ( data ) if self . _tcp : flag , data = tcp_reassembly ( frame ) if flag : self . _reasm [ 2 ] ( data ) if self . _flag_t : flag , data = tcp_traceflow ( frame , data_link = self . _dlink ) if flag : self . _trace ( data ) if self . _exeng == 'pipeline' : if self . _flag_d : mpkit . frames [ self . _frnum ] = frame mpkit . current += 1 elif self . _exeng == 'server' : if self . _flag_d : self . _frame . append ( frame ) self . _frnum += 1 else : if self . _flag_d : self . _frame . append ( frame ) self . _proto = frame . protochain . chain return frame
Read frames with default engine.

        - Extract frames and each layer of packets.
        - Make Info object out of frame properties.
        - Append Info.
        - Write plist & append Info.