47 #define PRINTF(...) printf(__VA_ARGS__)
48 #define PRINTADDR(addr) PRINTF(" %02x%02x:%02x%02x:%02x%02x:%02x%02x ", ((uint8_t *)addr)[0], ((uint8_t *)addr)[1], ((uint8_t *)addr)[2], ((uint8_t *)addr)[3], ((uint8_t *)addr)[4], ((uint8_t *)addr)[5], ((uint8_t *)addr)[6], ((uint8_t *)addr)[7])
51 #define PRINTADDR(addr)
63 struct nullmac_hdr *hdr;
68 rimeaddr_copy(&(hdr->receiver), packetbuf_addr(PACKETBUF_ADDR_RECEIVER));
69 return sizeof(
struct nullmac_hdr);
71 PRINTF(
"PNULLMAC-UT: too large header: %u\n", len);
78 struct nullmac_hdr *hdr;
81 packetbuf_set_addr(PACKETBUF_ADDR_SENDER, &(hdr->sender));
82 packetbuf_set_addr(PACKETBUF_ADDR_RECEIVER, &(hdr->receiver));
84 PRINTF(
"PNULLMAC-IN: ");
85 PRINTADDR(packetbuf_addr(PACKETBUF_ADDR_SENDER));
86 PRINTADDR(packetbuf_addr(PACKETBUF_ADDR_RECEIVER));
89 return sizeof(
struct nullmac_hdr);
95 set_pan_id(uint16_t pan_id)
100 const struct framer framer_nullmac = {
101 create, parse, set_pan_id