Go through more effort to show packet types

This commit is contained in:
XANTRONIX Development 2020-05-27 18:16:06 -04:00 committed by XANTRONIX Industrial
parent 361059c549
commit 06fe62ed7b

View file

@ -112,15 +112,21 @@ static int frame_fprint(FILE *stream,
} }
if (frame->type == PATTY_AX25_FRAME_INFO) { if (frame->type == PATTY_AX25_FRAME_INFO) {
if (fprintf(stream, " poll %d ns %d nr %d", if (fprintf(stream, " type I poll %d ns %d nr %d payload %zu",
PATTY_AX25_CONTROL_POLL(frame->control), PATTY_AX25_CONTROL_POLL(frame->control),
PATTY_AX25_CONTROL_SEQ_SEND(frame->control), PATTY_AX25_CONTROL_SEQ_SEND(frame->control),
PATTY_AX25_CONTROL_SEQ_RECV(frame->control)) < 0) { PATTY_AX25_CONTROL_SEQ_RECV(frame->control),
frame->payloadsz) < 0) {
goto error_io;
}
} else if (frame->type == PATTY_AX25_FRAME_UNNUMBERED) {
if (fprintf(stream, " type U payload %zu",
frame->payloadsz) < 0) {
goto error_io; goto error_io;
} }
} }
if (fprintf(stream, " proto %02x %ld bytes\n", frame->proto, len) < 0) { if (fprintf(stream, " total %zu bytes\n", len) < 0) {
goto error_io; goto error_io;
} }