oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ove::NetIfConfig Class Reference

Builder for ove_netif_config_t. More...

#include <net.hpp>

Public Member Functions

 NetIfConfig ()
 Default-constructs a zeroed configuration.
 
NetIfConfigstatic_ip (const Address &ip, const Address &mask, const Address &gw)
 Configures a static IP address.
 
NetIfConfigdhcp ()
 Enables DHCP.
 
NetIfConfigdns (const Address &d)
 Sets the DNS server address.
 

Public Attributes

ove_netif_config_t raw
 The underlying C configuration struct.
 

Detailed Description

Builder for ove_netif_config_t.

Wraps the C configuration struct and provides a fluent builder API. The raw member can be passed directly to the C API if needed.

Member Function Documentation

◆ static_ip()

NetIfConfig & ove::NetIfConfig::static_ip ( const Address ip,
const Address mask,
const Address gw 
)
inline

Configures a static IP address.

Parameters
[in]ipStatic IP address.
[in]maskSubnet mask.
[in]gwDefault gateway.
Returns
Reference to this object for chaining.

◆ dhcp()

NetIfConfig & ove::NetIfConfig::dhcp ( )
inline

Enables DHCP.

Returns
Reference to this object for chaining.

◆ dns()

NetIfConfig & ove::NetIfConfig::dns ( const Address d)
inline

Sets the DNS server address.

Parameters
[in]dDNS server address.
Returns
Reference to this object for chaining.

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