48 #define PRINTF(...) printf(__VA_ARGS__) 
   63 #ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL 
   64 #define BROADCAST_ANNOUNCEMENT_CHANNEL RIME_CONF_BROADCAST_ANNOUNCEMENT_CHANNEL 
   66 #define BROADCAST_ANNOUNCEMENT_CHANNEL 2 
   69 #ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_BUMP_TIME 
   70 #define BROADCAST_ANNOUNCEMENT_BUMP_TIME RIME_CONF_BROADCAST_ANNOUNCEMENT_BUMP_TIME 
   72 #define BROADCAST_ANNOUNCEMENT_BUMP_TIME CLOCK_SECOND * 32 / NETSTACK_RDC_CHANNEL_CHECK_RATE 
   75 #ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_MIN_TIME 
   76 #define BROADCAST_ANNOUNCEMENT_MIN_TIME RIME_CONF_BROADCAST_ANNOUNCEMENT_MIN_TIME 
   78 #define BROADCAST_ANNOUNCEMENT_MIN_TIME CLOCK_SECOND * 60 
   81 #ifdef RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME 
   82 #define BROADCAST_ANNOUNCEMENT_MAX_TIME RIME_CONF_BROADCAST_ANNOUNCEMENT_MAX_TIME 
   84 #define BROADCAST_ANNOUNCEMENT_MAX_TIME CLOCK_SECOND * 3600UL 
   92 rime_sniffer_add(
struct rime_sniffer *s)
 
   98 rime_sniffer_remove(
struct rime_sniffer *s)
 
  106   struct rime_sniffer *s;
 
  110   c = chameleon_parse();
 
  113     if(s->input_callback != 
NULL) {
 
  140   broadcast_announcement_init(BROADCAST_ANNOUNCEMENT_CHANNEL,
 
  141                               BROADCAST_ANNOUNCEMENT_BUMP_TIME,
 
  142                               BROADCAST_ANNOUNCEMENT_MIN_TIME,
 
  143                               BROADCAST_ANNOUNCEMENT_MAX_TIME);
 
  147 packet_sent(
void *ptr, 
int status, 
int num_tx)
 
  149   struct channel *c = ptr;
 
  150   struct rime_sniffer *s;
 
  154     PRINTF(
"rime: collision after %d tx\n", num_tx);
 
  157     PRINTF(
"rime: noack after %d tx\n", num_tx);
 
  160     PRINTF(
"rime: sent after %d tx\n", num_tx);
 
  163     PRINTF(
"rime: error %d after %d tx\n", status, num_tx);
 
  168     if(s->output_callback != 
NULL) {
 
  169       s->output_callback(status);
 
  173   abc_sent(c, status, num_tx);
 
  177 rime_output(
struct channel *c)
 
  180   if(chameleon_create(c)) {
 
  183     NETSTACK_LLSEC.send(packet_sent, c);
 
Linked list manipulation routines. 
    Header file for Chameleon, Rime's header processing module  
The MAC layer deferred the transmission for a later time. 
void * list_item_next(void *item)
Get the next item following this item. 
#define NULL
The null pointer. 
The structure of a network driver in Contiki. 
void list_remove(list_t list, void *item)
Remove a specific element from a list. 
void abc_input(struct channel *channel)
Internal Rime function: Pass a packet to the abc layer. 
    Header file for the Rime stack  
void(* input)(void)
Callback for getting notified of incoming packet. 
    Header file for the announcement primitive  
void * list_head(list_t list)
Get a pointer to the first element of a list. 
void packetbuf_compact(void)
Compact the packetbuf. 
void list_add(list_t list, void *item)
Add an item at the end of a list. 
void announcement_init(void)
Initialize the announcement module. 
#define LIST(name)
Declare a linked list. 
void(* init)(void)
Initialize the network driver. 
void packetbuf_clear(void)
Clear and reset the packetbuf. 
The MAC layer transmission was OK. 
    Neighbor discovery header file  
The MAC layer did not get an acknowledgement for the packet. 
    Include file for the Contiki low-layer network stack (NETSTACK)  
    Header file for the Rime route table