Skip to main content

Module netif

Module netif 

Source
Expand description

Cross-platform network interface and neighbor enumeration.

liblsl enumerates interfaces with GetAdaptersAddresses on Windows and getifaddrs on Linux and macOS (src/netinterfaces.cpp:21-114). This module gives the same interface list on Unix and Windows, plus the IPv4 directed broadcast address and local ARP neighbors for fallback discovery (docs/discovery.md).

Structs§

Ipv4Interface
One local IPv4 interface address.

Functions§

directed_broadcast
Compute the directed broadcast address from an IPv4 address and prefix.
local_interface_indexes
Every interface index on this machine, with zero at the front.
local_ipv4_addresses
Every local IPv4 address on this machine, for multicast binds and sends.
local_ipv4_interfaces
Every active IPv4 interface on this machine.
local_ipv4_neighbors
Local IPv4 neighbors from the operating system ARP table.
parse_proc_arp
Parse Linux /proc/net/arp text into valid unicast IPv4 neighbors.
prefix_to_mask
Convert a prefix length (0 to 32) to a big-endian IPv4 bitmask.