STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
fsw::net::DaqBindResult Struct Reference

Which local NIC board traffic leaves from. More...

#include <DaqInterface.hpp>

Collaboration diagram for fsw::net::DaqBindResult:
[legend]

Public Attributes

bool ok = true
 False means the caller must abort startup: the operator asked for something impossible.
std::string address = "0.0.0.0"
 Address to bind.
bool pinned = false
 True when address names a real NIC.
std::string detail
 Human-readable account of the decision.

Detailed Description

Which local NIC board traffic leaves from.

The DAQ used to own its machine, so "the route the kernel picks" and "the board LAN" were the same sentence. It now shares the apps box with the Docker stack and the site LAN, and they are not: an unbound UDP socket sending to a broadcast address, or to a board whose subnet is reachable two ways, can leave on the wrong wire with no error anywhere.

The fix every board-facing socket uses is to bind its local address to the NIC holding the board subnet. That is deliberately not SO_BINDTODEVICE: the services run as unprivileged systemd --user units and SO_BINDTODEVICE needs CAP_NET_RAW, which none of them has.

The selection rule mirrors deploy/bootstrap_daq.sh, which already picks the board NIC by address rather than by name (the name varies — eth0, enxXXXXXXXX — the address does not, because the firmware hardcodes the server at 192.168.2.20).

Definition at line 27 of file DaqInterface.hpp.

Member Data Documentation

◆ address

std::string fsw::net::DaqBindResult::address = "0.0.0.0"

Address to bind.

"0.0.0.0" means unpinned — see pinned.

Definition at line 31 of file DaqInterface.hpp.

◆ detail

std::string fsw::net::DaqBindResult::detail

Human-readable account of the decision.

Already logged by resolveDaqBindAddress().

Definition at line 35 of file DaqInterface.hpp.

◆ ok

bool fsw::net::DaqBindResult::ok = true

False means the caller must abort startup: the operator asked for something impossible.

Definition at line 29 of file DaqInterface.hpp.

◆ pinned

bool fsw::net::DaqBindResult::pinned = false

True when address names a real NIC.

False on the dev/CI path, where nothing matched.

Definition at line 33 of file DaqInterface.hpp.


The documentation for this struct was generated from the following file: