+static void hexdump_msg(const char *title, const struct xbee_msg *msg)
+{
+ unsigned i;
+
+ printf_P(PSTR("dump %s\r\n"), title);
+ for (i = 0; i < msg->iovlen; i++) {
+ printf_P(PSTR("iovec %d at %p, len=%d\r\n"), i,
+ msg->iov[i].buf, msg->iov[i].len);
+ __hexdump(msg->iov[i].buf, msg->iov[i].len);
+ }
+}
+
+static void hexdump(const char *title, const void *buf, unsigned int len)
+{
+ printf_P(PSTR("dump %s at [%p], len=%d\r\n"), title, buf, len);
+ __hexdump(buf, len);
+}
+