Default (PyPCAPKit) Tools

pcapkit.toolkit.default contains all you need for pcapkit handy usage. All functions returns with a flag to indicate if usable for its caller.

pcapkit.toolkit.default.ipv4_reassembly(frame)[source]

Make data for IPv4 reassembly.

Parameters

frame (pcapkit.protocols.pcap.frame.Frame) – PCAP frame.

Returns

A tuple of data for IPv4 reassembly.

Return type

Tuple[bool, Dict[str, Any]]

See also

IPv4Reassembly

pcapkit.toolkit.default.ipv6_reassembly(frame)[source]

Make data for IPv6 reassembly.

Parameters

frame (pcapkit.protocols.pcap.frame.Frame) – PCAP frame.

Returns

A tuple of data for IPv6 reassembly.

Return type

Tuple[bool, Dict[str, Any]]

See also

IPv6Reassembly

pcapkit.toolkit.default.tcp_reassembly(frame)[source]

Make data for TCP reassembly.

Parameters

frame (pcapkit.protocols.pcap.frame.Frame) – PCAP frame.

Returns

A tuple of data for TCP reassembly.

  • If the frame can be used for TCP reassembly. A frame can be reassembled if it contains TCP layer (pcapkit.protocols.transport.tcp.TCP).

  • If the frame can be reassembled, then the dict mapping of data for TCP reassembly (tcp.packet) will be returned; otherwise, returns None.

Return type

Tuple[bool, Dict[str, Any]]

See also

TCPReassembly

pcapkit.toolkit.default.tcp_traceflow(frame, *, data_link)[source]

Trace packet flow for TCP.

Parameters

frame (pcapkit.protocols.pcap.frame.Frame) – PCAP frame.

Keyword Arguments

data_link (str) – Data link layer protocol (from global header).

Returns

A tuple of data for TCP reassembly.

  • If the packet can be used for TCP flow tracing. A frame can be reassembled if it contains TCP layer (pcapkit.protocols.transport.tcp.TCP).

  • If the frame can be reassembled, then the dict mapping of data for TCP flow tracing (trace.packet) will be returned; otherwise, returns None.

Return type

Tuple[bool, Dict[str, Any]]

See also

TraceFlow