/* * Shared raw-packet hex dump for the RX and TX single callpoints * (main.c's rx_work_handler, tx_queue.c's process_item) - one place logs * raw on-air bytes, in or out, same as main.c's dispatch is the one * place that logs "a frame was received" and tx_queue is the one place * that logs "a frame was sent". Packet consumers (beacon_rx, cbf, * payload_rx, ...) never log raw bytes themselves. * * Its own log module/level (LOG_LEVEL_PKT_LOG, see log_levels.h) is * deliberately separate from LOG_LEVEL_MAIN/LOG_LEVEL_TX_QUEUE: flipping * it to DBG traces every raw frame crossing the radio without also * pulling in main.c's or tx_queue.c's own unrelated DBG tracing, and * vice versa. */ #ifndef PKT_LOG_H_ #define PKT_LOG_H_ #include #include /* Logs buf[0..len) as a single-line, no-delimiter hex dump (greps/diffs * as one token), tagged with label (e.g. "RX raw", "TX raw"). len must * not exceed FRAME_MAX_LEN (see frame.h) - every caller today already * enforces that on its own buffer before this point. Compiles out * entirely unless LOG_LEVEL_PKT_LOG is LOG_LEVEL_DBG. */ void pkt_log_raw(const char *label, const uint8_t *buf, size_t len); #endif /* PKT_LOG_H_ */