Module nic

Module nic 

Source
Expand description

Network interface utilities for GigE Vision streaming.

This module provides helpers for querying network interface capabilities and constructing UDP sockets tuned for high-throughput GVSP traffic. The functionality is intentionally conservative so it can operate on most Unix like systems without additional privileges. Platform specific code paths are gated via conditional compilation and otherwise fall back to sane defaults.

Structs§

BufferPool
Simple lock-free pool for reusable buffers backing frame assembly.
Iface
Representation of a host network interface.
McOptions
Multicast socket options applied while binding.

Constants§

DEFAULT_RCVBUF_BYTES
Default socket receive buffer size used when the caller does not provide a custom value. The number mirrors what many operating systems allow without requiring elevated privileges.

Functions§

best_packet_size
Compute an optimal GVSP payload size from the link MTU.
bind_multicast
Bind a UDP socket subscribed to the provided multicast group on the interface.
bind_udp
Bind a UDP socket configured for GVSP traffic.
default_bind_addr
Helper returning the default bind address for discovery convenience.
join_multicast
Subscribe the provided socket to a multicast group on the supplied interface.
mtu
Read the MTU configured for the provided interface.