IP Address Fields¶
IP Addresses¶
- class pcapkit.corekit.fields.ipaddress.IPv4AddressField(default=<pcapkit.corekit.fields.field.NoValueType object>, callback=<function IPv4AddressField.<lambda>>)[source]¶
Bases:
_IPAddressField
[IPv4Address
]IPv4 address value for protocol fields.
- Parameters:
default (
IPv4Address
|NoValueType
) – Field default value, if any.callback (
Callable
[[Self
,dict
[str
,Any
]],None
]) – Callback function to be called uponself.__call__
.
- class pcapkit.corekit.fields.ipaddress.IPv6AddressField(default=<pcapkit.corekit.fields.field.NoValueType object>, callback=<function IPv6AddressField.<lambda>>)[source]¶
Bases:
_IPAddressField
[IPv6Address
]IPv6 address value for protocol fields.
- Parameters:
default (
IPv6Address
|NoValueType
) – Field default value, if any.callback (
Callable
[[Self
,dict
[str
,Any
]],None
]) – Callback function to be called uponself.__call__
.
IP Interface¶
- class pcapkit.corekit.fields.ipaddress.IPv4InterfaceField(default=<pcapkit.corekit.fields.field.NoValueType object>, callback=<function IPv4InterfaceField.<lambda>>)[source]¶
Bases:
_IPInterfaceField
[IPv4Interface
]IPv4 interface value for protocol fields.
- Parameters:
default (
IPv4Interface
|NoValueType
) – Field default value, if any.callback (
Callable
[[Self
,dict
[str
,Any
]],None
]) – Callback function to be called uponself.__call__
.
- class pcapkit.corekit.fields.ipaddress.IPv6InterfaceField(default=<pcapkit.corekit.fields.field.NoValueType object>, callback=<function IPv6InterfaceField.<lambda>>)[source]¶
Bases:
_IPInterfaceField
[IPv6Interface
]IPv6 interface value for protocol fields.
- Parameters:
default (
IPv6Interface
|NoValueType
) – Field default value, if any.callback (
Callable
[[Self
,dict
[str
,Any
]],None
]) – Callback function to be called uponself.__call__
.
Internal Definitions¶
- class pcapkit.corekit.fields.ipaddress._IPField(length, default=<pcapkit.corekit.fields.field.NoValueType object>, callback=<function Field.<lambda>>)[source]¶
-
Internal IP related value for protocol fields.
- Parameters:
- class pcapkit.corekit.fields.ipaddress._IPAddressField(length, default=<pcapkit.corekit.fields.field.NoValueType object>, callback=<function Field.<lambda>>)[source]¶
-
Internal IP address value for protocol fields.
- Parameters:
- class pcapkit.corekit.fields.ipaddress._IPInterfaceField(length, default=<pcapkit.corekit.fields.field.NoValueType object>, callback=<function Field.<lambda>>)[source]¶
-
Internal IP interface value for protocol fields.
- Parameters:
length (
Union
[int
,Callable
[[dict
[str
,Any
]],int
]]) – Field size (in bytes); if a callable is given, it should return an integer value and accept the current packet as its only argument.default (
Union
[TypeVar
(_T
),NoValueType
]) – Field default value, if any.callback (
Callable
[[Self
,dict
[str
,Any
]],None
]) – Callback function to be called uponself.__call__
.
Type Variables¶
- pcapkit.corekit.fields.ipaddress._T: ipaddress.IPv4Address | ipaddress.IPv6Address | ipaddress.IPv4Interface | ipaddress.IPv6Interface¶
- pcapkit.corekit.fields.ipaddress._AT: ipaddress.IPv4Address | ipaddress.IPv6Address¶
- pcapkit.corekit.fields.ipaddress._IT: ipaddress.IPv4Interface | ipaddress.IPv6Interface¶