latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs

Module Contents

Classes

sockaddr_in

IPv4 address struct.

sockaddr_in6

IPv6 address struct.

sockaddr

Unknown address struct, can be sockaddr_in or sockaddr_in6.

ifa_ifu

Union to capture both broadcast addresses and "normal" addresses.

ifaddrs

Stub for pointers to the next ifaddrs struct.

GetIfAddrs

Attempt to find local addresses using the getifaddrs system call.

Attributes

libc

NETMASK0_V4

NETMASK0_V6

latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.libc
latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.NETMASK0_V4
latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.NETMASK0_V6
class latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.sockaddr_in

Bases: ctypes.Structure

IPv4 address struct.

_fields_ = [('sin_family',), ('sin_port',), ('sin_addr',), ('sin_zero',)]
class latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.sockaddr_in6

Bases: ctypes.Structure

IPv6 address struct.

_fields_ = [('sin6_family',), ('sin6_port',), ('sin6_flowinfo',), ('sin6_addr',), ('sin6_scope_id',)]
class latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.sockaddr

Bases: ctypes.Structure

Unknown address struct, can be sockaddr_in or sockaddr_in6.

_fields_ = [('sa_family',), ('sa_data',)]
class latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.ifa_ifu

Bases: ctypes.Union

Union to capture both broadcast addresses and “normal” addresses.

_fields_ = [('ifu_broadaddr',), ('ifu_dstaddr',)]
class latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.ifaddrs

Bases: ctypes.Structure

Stub for pointers to the next ifaddrs struct.

class latest.ipv8.messaging.interfaces.lan_addresses.unix.getifaddrs.GetIfAddrs(verbose: bool = False)

Bases: latest.ipv8.messaging.interfaces.lan_addresses.addressprovider.AddressProvider

Attempt to find local addresses using the getifaddrs system call.

get_addresses() set

Attempt to use getifaddrs() to retrieve addresses.