15 #define LOGLEVEL CONF_LOGLEVEL
17 #define LOGLEVEL LOGL_INF
33 static void dtn_network_init(
void)
50 LOG(LOGD_DTN,
LOG_NET, LOGL_DBG,
"init");
59 static void dtn_network_input(
void)
62 uint8_t * buffer =
NULL;
64 packetbuf_attr_t rssi = 0;
69 rimeaddr_copy(&source, packetbuf_addr(PACKETBUF_ADDR_SENDER));
72 rssi = packetbuf_attr(PACKETBUF_ATTR_RSSI);
74 convergence_layer_incoming_frame(&source, buffer, length, rssi);
82 static void dtn_network_sent(
void * pointer,
int status,
int num_tx)
92 outcome = CONVERGENCE_LAYER_STATUS_NOSEND;
94 case MAC_TX_ERR_FATAL:
96 outcome = CONVERGENCE_LAYER_STATUS_FATAL;
99 outcome = CONVERGENCE_LAYER_STATUS_NOACK;
107 convergence_layer_status(pointer, outcome);
112 uint8_t * buffer =
NULL;
129 leds_on(LEDS_YELLOW);
135 packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, destination);
136 packetbuf_set_attr(PACKETBUF_ADDRSIZE, 2);
139 NETSTACK_MAC.send(&dtn_network_sent, reference);
141 leds_off(LEDS_YELLOW);