latest.ipv8.messaging.payload
Module Contents
Classes
Payload sent to peers that we are not connected to yet but have been punctured for us. |
|
New introduction request that supports non-IPv4 addresses. |
|
Response to introduction requests. |
|
New introduction response that supports non-IPv4 addresses. |
|
Payload to ask someone to puncture a third party for us. |
|
New puncture request that supports non-IPv4 addresses. |
|
Attempt to puncture a NAT layer. |
|
New puncture payload that supports non-IPv4 addresses. |
Functions
|
Convert a type string to a tuple. |
|
Convert connection type flags to a type string. |
- latest.ipv8.messaging.payload.encode_connection_type(type: str) tuple[int, int]
Convert a type string to a tuple.
- latest.ipv8.messaging.payload.decode_connection_type(bit_0: int, bit_1: int) str
Convert connection type flags to a type string.
- class latest.ipv8.messaging.payload.IntroductionRequestPayload(destination_address: latest.ipv8.types.Address, source_lan_address: latest.ipv8.types.Address, source_wan_address: latest.ipv8.types.Address, advice: bool, connection_type: str, identifier: int, extra_bytes: bytes, supports_new_style: bool = True)
Bases:
latest.ipv8.messaging.serialization.Payload
Payload sent to peers that we are not connected to yet but have been punctured for us.
- msg_id = 246
- format_list = ['ipv4', 'ipv4', 'ipv4', 'bits', 'H', 'raw']
- classmethod from_unpack_list(destination_address: latest.ipv8.types.Address, source_lan_address: latest.ipv8.types.Address, source_wan_address: latest.ipv8.types.Address, connection_type_0: bool, connection_type_1: bool, supports_new_style: bool, dflag1: bool, dflag2: bool, tunnel: bool, sync: bool, advice: bool, identifier: int, extra_bytes: bytes) IntroductionRequestPayload
Unpack a payload from the given data.
- class latest.ipv8.messaging.payload.NewIntroductionRequestPayload(*args: Any, **kwargs)
Bases:
latest.ipv8.messaging.lazy_payload.VariablePayloadWID
New introduction request that supports non-IPv4 addresses.
- msg_id = 234
- format_list = ['ip_address', 'ip_address', 'ip_address', 'H', 'bits', 'raw']
- names = ['destination_address', 'source_lan_address', 'source_wan_address', 'identifier',...
- destination_address: latest.ipv8.types.Address
- source_lan_address: latest.ipv8.types.Address
- source_wan_address: latest.ipv8.types.Address
- class latest.ipv8.messaging.payload.IntroductionResponsePayload(destination_address: latest.ipv8.types.Address, source_lan_address: latest.ipv8.types.Address, source_wan_address: latest.ipv8.types.Address, lan_introduction_address: latest.ipv8.types.Address, wan_introduction_address: latest.ipv8.types.Address, connection_type: str, identifier: int, extra_bytes: bytes, supports_new_style: bool = True, intro_supports_new_style: bool = False, peer_limit_reached: bool = False)
Bases:
latest.ipv8.messaging.serialization.Payload
Response to introduction requests.
- msg_id = 245
- format_list = ['ipv4', 'ipv4', 'ipv4', 'ipv4', 'ipv4', 'bits', 'H', 'raw']
- classmethod from_unpack_list(destination_address: latest.ipv8.types.Address, source_lan_address: latest.ipv8.types.Address, source_wan_address: latest.ipv8.types.Address, introduction_lan_address: latest.ipv8.types.Address, introduction_wan_address: latest.ipv8.types.Address, connection_type_0: bool, connection_type_1: bool, dflag0: bool, supports_new_style: bool, intro_supports_new_style: bool, peer_limit_reached: bool, dflag4: bool, dflag5: bool, identifier: int, extra_bytes: bytes) IntroductionResponsePayload
Convert the raw data to a payload.
- class latest.ipv8.messaging.payload.NewIntroductionResponsePayload(*args: Any, **kwargs)
Bases:
latest.ipv8.messaging.lazy_payload.VariablePayloadWID
New introduction response that supports non-IPv4 addresses.
- msg_id = 233
- format_list = ['ip_address', 'ip_address', 'ip_address', 'ip_address', 'ip_address', 'H', 'bits', 'raw']
- names = ['destination_address', 'source_lan_address', 'source_wan_address', 'lan_introduction_address',...
- destination_address: latest.ipv8.types.Address
- source_lan_address: latest.ipv8.types.Address
- source_wan_address: latest.ipv8.types.Address
- lan_introduction_address: latest.ipv8.types.Address
- wan_introduction_address: latest.ipv8.types.Address
- class latest.ipv8.messaging.payload.PunctureRequestPayload(lan_walker_address: latest.ipv8.types.Address, wan_walker_address: latest.ipv8.types.Address, identifier: int)
Bases:
latest.ipv8.messaging.serialization.Payload
Payload to ask someone to puncture a third party for us.
- msg_id = 250
- format_list = ['ipv4', 'ipv4', 'H']
- classmethod from_unpack_list(lan_walker_address: latest.ipv8.types.Address, wan_walker_address: latest.ipv8.types.Address, identifier: int) PunctureRequestPayload
Create a payload from the given data.
- class latest.ipv8.messaging.payload.NewPunctureRequestPayload(*args: Any, **kwargs)
Bases:
latest.ipv8.messaging.lazy_payload.VariablePayloadWID
New puncture request that supports non-IPv4 addresses.
- msg_id = 232
- format_list = ['ip_address', 'ip_address', 'H']
- names = ['lan_walker_address', 'wan_walker_address', 'identifier']
- lan_walker_address: latest.ipv8.types.Address
- wan_walker_address: latest.ipv8.types.Address
- class latest.ipv8.messaging.payload.PuncturePayload(source_lan_address: latest.ipv8.types.Address, source_wan_address: latest.ipv8.types.Address, identifier: int)
Bases:
latest.ipv8.messaging.serialization.Payload
Attempt to puncture a NAT layer.
- msg_id = 249
- format_list = ['ipv4', 'ipv4', 'H']
- classmethod from_unpack_list(lan_walker_address: latest.ipv8.types.Address, wan_walker_address: latest.ipv8.types.Address, identifier: int) PuncturePayload
Conver the given data to a payload.
- class latest.ipv8.messaging.payload.NewPuncturePayload(*args: Any, **kwargs)
Bases:
latest.ipv8.messaging.lazy_payload.VariablePayloadWID
New puncture payload that supports non-IPv4 addresses.
- msg_id = 231
- format_list = ['ip_address', 'ip_address', 'H']
- names = ['source_lan_address', 'source_wan_address', 'identifier']
- source_lan_address: latest.ipv8.types.Address
- source_wan_address: latest.ipv8.types.Address