IPX - Internetwork Packet Exchange¶
pcapkit.protocols.internet.ipx contains
IPX only,
which implements extractor for Internetwork Packet
Exchange (IPX) [*], whose structure is described
as below:
Octets |
Bits |
Name |
Description |
|---|---|---|---|
0 |
0 |
|
Checksum |
2 |
16 |
|
Packet Length (header includes) |
4 |
32 |
|
Transport Control (hop count) |
5 |
40 |
|
Packet Type |
6 |
48 |
|
Destination Address |
18 |
144 |
|
Source Address |
- class pcapkit.protocols.internet.ipx.IPX(file=None, length=None, **kwargs)[source]¶
-
This class implements Internetwork Packet Exchange.
Changed in version 1.5.0:
from_data()rebuilds a parsed packet rather than raisingstruct.error(#1315), and the octets past the IPX Length field are kept astrailer(#1433).- make(chksum=b'\\x00\\x00', count=0, type=<Packet.Unknown: 0>, type_default=None, type_namespace=None, type_reversed=False, total_length=None, dst=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', src=b'\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00', payload=b'', trailer=b'', **kwargs)[source]¶
Make (construct) packet data.
- Parameters:
chksum (
bytes) – Checksum.count (
int) – Transport Control (hop count).type (
Packet|IntEnum|IntEnum|str|int) – Packet Type.type_default (
int|None) – Default value for undefined packet type.type_namespace (
dict[str,int] |dict[int,str] |Type[IntEnum] |Type[IntEnum] |None) – Namespace for packet type.type_reversed (
bool) – Reverse namespace for packet type.total_length (
int|None) – Packet length (header includes); computed as30plus the payload length when not given.dst (
bytes) – Destination Address.src (
bytes) – Source Address.payload (
bytes|ProtocolBase|Schema) – Payload data.trailer (
bytes) – Octets after the packet, outside the Packet Length, such as link-layer padding; written as is.**kwargs (
Any) – Arbitrary keyword arguments.
- Return type:
- Returns:
Constructed packet data.
Header Schemas¶
- class pcapkit.protocols.schema.internet.ipx.IPX(*args: _VT, **kwargs: _VT)[source]¶
Bases:
SchemaHeader schema for IPX packet.
- trailer: bytes = <PayloadField trailer>¶
Octets captured past the Packet Length, such as Ethernet minimum-frame padding. A
PayloadFieldwith no length takes whatever the payload leaves on unpack and writes its value verbatim on pack, so the octets survive whatever they hold.
Data Models¶
- class pcapkit.protocols.data.internet.ipx.IPX(*args: VT, **kwargs: VT)[source]¶
Bases:
ProtocolData model for Internetwork Packet Exchange.
- class pcapkit.protocols.data.internet.ipx.Address(*args: VT, **kwargs: VT)[source]¶
Bases:
DataData model for IPX address.
Footnotes