Anonymous best-effort local area broadcast
[The Rime communication stack]

The abc module sends packets to all local area neighbors. More...

Data Structures

struct  abc_callbacks
 Callback structure for abc. More...

Files

file  abc.c
 

Anonymous best-effort local area Broad Cast (abc).


file  abc.h
 

Header file for the Rime module Anonymous BroadCast (abc).


Functions

void abc_open (struct abc_conn *c, uint16_t channel, const struct abc_callbacks *u)
 Set up an anonymous best-effort broadcast connection.
void abc_close (struct abc_conn *c)
 Close an abc connection.
int abc_send (struct abc_conn *c)
 Send an anonymous best-effort broadcast packet.
void abc_input (struct channel *channel)
 Internal Rime function: Pass a packet to the abc layer.

Detailed Description

The abc module sends packets to all local area neighbors.

The abc module adds no headers to outgoing packets.

Channels

The abc module uses 1 channel.


Function Documentation

void abc_close ( struct abc_conn *  c  ) 

Close an abc connection.

Parameters:
c A pointer to a struct abc_conn

This function closes an abc connection that has previously been opened with abc_open().

This function typically is called as an exit handler.

Referenced by broadcast_close().

void abc_input ( struct channel *  channel  ) 

Internal Rime function: Pass a packet to the abc layer.

This function is used internally by Rime to pass packets to the abc layer. Should never be called directly.

void abc_open ( struct abc_conn *  c,
uint16_t  channel,
const struct abc_callbacks u 
)

Set up an anonymous best-effort broadcast connection.

Parameters:
c A pointer to a struct abc_conn
channel The channel on which the connection will operate
u A struct abc_callbacks with function pointers to functions that will be called when a packet has been received

This function sets up an abc connection on the specified channel. The caller must have allocated the memory for the struct abc_conn, usually by declaring it as a static variable.

The struct abc_callbacks pointer must point to a structure containing a pointer to a function that will be called when a packet arrives on the channel.

Referenced by broadcast_open().

int abc_send ( struct abc_conn *  c  ) 

Send an anonymous best-effort broadcast packet.

Parameters:
c The abc connection on which the packet should be sent
Return values:
Non-zero if the packet could be sent, zero otherwise

This function sends an anonymous best-effort broadcast packet. The packet must be present in the packetbuf before this function is called.

The parameter c must point to an abc connection that must have previously been set up with abc_open().

Referenced by broadcast_send().


Generated on Mon Apr 11 14:23:52 2011 for Contiki 2.5 by  doxygen 1.6.1