Infuse-IoT SDK API 0.0.1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
ePacket filter APIs

ePacket filter API More...

Enumerations

enum  epacket_filter_flags { FILTER_FORWARD_ONLY_DECRYPTED = BIT(0) , FILTER_FORWARD_ONLY_TDF = BIT(1) , FILTER_FORWARD_ONLY_TDF_ANNOUNCE = BIT(2) }
 

Functions

bool epacket_gateway_forward_filter (uint8_t flags, uint8_t percent, struct net_buf *buf)
 Determine whether a packet should be forwarded.
 

Detailed Description

ePacket filter API

Enumeration Type Documentation

◆ epacket_filter_flags

#include <infuse/epacket/filter.h>

Enumerator
FILTER_FORWARD_ONLY_DECRYPTED 

Only forward packets that successfully decrypted.

FILTER_FORWARD_ONLY_TDF 

Only forward TDF packets.

FILTER_FORWARD_ONLY_TDF_ANNOUNCE 

Only forward TDF packets that contain a TDF_ANNOUNCE reading.

Implies ONLY_DECRYPTED and ONLY_TDF)

Function Documentation

◆ epacket_gateway_forward_filter()

bool epacket_gateway_forward_filter ( uint8_t flags,
uint8_t percent,
struct net_buf * buf )

#include <infuse/epacket/filter.h>

Determine whether a packet should be forwarded.

Parameters
flagsCriteria from epacket_filter_flags for forwarding packet
percentPercent of packets to forward that pass flags (255 = all, 128 = half, 0 = none)
bufePacket that was received
Returns
true Packet should be forwarded
false Packet should be dropped