str_msg
fprintf(stderr, "Sending msg: %s\n", str_msg(msg, buf));
fprintf(stderr, "Received msg: %s\n", str_msg(msg, buf));