Go through more effort to show packet types
This commit is contained in:
parent
361059c549
commit
06fe62ed7b
1 changed files with 9 additions and 3 deletions
12
src/decode.c
12
src/decode.c
|
@ -112,15 +112,21 @@ static int frame_fprint(FILE *stream,
|
|||
}
|
||||
|
||||
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_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;
|
||||
}
|
||||
}
|
||||
|
||||
if (fprintf(stream, " proto %02x %ld bytes\n", frame->proto, len) < 0) {
|
||||
if (fprintf(stream, " total %zu bytes\n", len) < 0) {
|
||||
goto error_io;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue