25static const char*
s_tag =
"L3SW";
75 *out_open = (uint8_t)(
s_state.opened ? 1U : 0U);
76 *out_promisc = (uint8_t)(
s_state.promiscuous ? 1U : 0U);
static const char * s_tag
Logging / check tag.
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_not_supported
Requested feature not compiled in, not wired, or not supported by this MCU variant.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_err_exists
Item already exists – cannot create again.
@ k_ra8_err_invalid_state
Module in wrong state for requested operation.
@ k_ra8_err_not_initialized
Module not initialized – _init() not yet called successfully.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_layer3_switch_close(void)
Close the Layer-3 switch driver.
ra8_err_t ra8_layer3_switch_open(const ra8_layer3_switch_cfg_t *cfg)
Open the Layer-3 switch driver.
ra8_err_t ra8_layer3_switch_route_add(const ra8_layer3_switch_route_t *route)
Add a route to the forwarding table.
ra8_err_t ra8_layer3_switch_status_get(uint8_t *out_open, uint8_t *out_promisc)
Snapshot the open / promiscuous flags.
ra8_err_t ra8_layer3_switch_route_delete(uint32_t dst_ip, uint32_t mask)
Remove a route from the forwarding table.
Layer-3 Ethernet switch driver – placeholder.
Lightweight Logging Interface for ra8-firmware.
#define ra8_log_info_val(tag, message, value)
RA8 log info val.
Configuration descriptor for ra8_layer3_switch_open.
uint16_t mtu_bytes
Maximum transfer unit per port.
uint8_t promiscuous
Non-zero to put switch in promisc.
uint8_t port_count
Number of physical ports.
A single forwarding-table entry.
bool promiscuous
Promiscuous.