48 #include "lib/random.h"
53 #define MAX(a, b) ((a) > (b)? (a) : (b))
57 #define MIN(a, b) ((a) < (b)? (a) : (b))
63 #define PRINTF(...) printf(__VA_ARGS__)
70 recv(
struct broadcast_conn *broadcast,
const rimeaddr_t *from)
81 if(c->dups == c->maxdups) {
96 sent(
struct broadcast_conn *bc,
int status,
int num_tx)
106 PRINTF(
"%d.%d: ipolite: send queuebuf %p\n",
111 queuebuf_to_packetbuf(c->q);
130 PRINTF(
"ipolite open channel %d\n", channel);
149 PRINTF(
"%d.%d: ipolite_send: cancel old send\n",
154 c->hdrsize = hdrsize;
156 PRINTF(
"%d.%d: ipolite_send: interval 0\n",
166 c->q = queuebuf_new_from_packetbuf();
169 interval / 2 + (random_rand() % (interval / 2)),
173 PRINTF(
"%d.%d: ipolite_send: could not allocate queue buffer\n",