Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Best-effort network flooding

The netflood module does best-effort flooding.

The netflood primitive sends a single packet to all nodes in the network. The netflood primitive uses polite broadcasts at every hop to reduce the number of redundant transmissions. The netflood primitive does not perform retransmissions of flooded packets and packets are not tagged with version numbers. Instead, the netflood primitive sets the end-to-end sender and end-to-end packet ID attributes on the packets it sends. A forwarding node saves the end-to-end sender and packet ID of the last packet it forwards and does not forward a packet if it has the same end-to-end sender and packet ID as the last packet. This reduces the risk of routing loops, but does not eliminate them entirely as the netflood primitive saves the attributes of the latest packet seen only. Therefore, the netflood primitive also uses the time to live attribute, which is decreased by one before forwarding a packet. If the time to live reaches zero, the primitive does not forward the packet.

Channels

The netflood module uses 1 channel.

Data Structures

struct  netflood_callbacks
 
struct  netflood_conn
 

Files

file  netflood.h
 
    Header file for the best-effort network flooding (netflood)

 

Macros

#define NETFLOOD_ATTRIBUTES
 

Functions

void netflood_close (struct netflood_conn *c)
 
void netflood_open (struct netflood_conn *c, clock_time_t queue_time, uint16_t channel, const struct netflood_callbacks *u)
 
int netflood_send (struct netflood_conn *c, uint8_t seqno)
 

#define NETFLOOD_ATTRIBUTES
Value:
Definition: packetbuf.h:370
#define PACKETBUF_ATTR_BIT
Definition: packetbuf.h:444
#define IPOLITE_ATTRIBUTES
Definition: ipolite.h:103
Definition: packetbuf.h:372
#define PACKETBUF_ADDRSIZE
Definition: packetbuf.h:446
Definition: packetbuf.h:379

void netflood_close ( struct netflood_conn c)
void netflood_open ( struct netflood_conn c,
clock_time_t  queue_time,
uint16_t  channel,
const struct netflood_callbacks u 
)
int netflood_send ( struct netflood_conn c,
uint8_t  seqno 
)