MACROS IN THE MORNING, MACROS IN THE EVENING, MACROS AT SUPPER TIME

This commit is contained in:
XANTRONIX Development 2015-07-17 23:13:13 -05:00
parent 712b7fbdad
commit 2f7988701f
2 changed files with 13 additions and 0 deletions

View file

@ -40,6 +40,9 @@
#define PATTY_AX25_CONTROL_UNNUMBERED_RESET(c) \ #define PATTY_AX25_CONTROL_UNNUMBERED_RESET(c) \
(c = 0x03) (c = 0x03)
#define PATTY_AX25_CONTROL_UNNUMBERED_MODIFIER(c) \
((c & 0xe0) >> 5)
#define PATTY_AX25_CONTROL_UNNUMBERED_SABM(c) \ #define PATTY_AX25_CONTROL_UNNUMBERED_SABM(c) \
(((c & 0xe0) == 0x10) && ((c & 0x0f) == 0x0f)) (((c & 0xe0) == 0x10) && ((c & 0x0f) == 0x0f))

View file

@ -73,6 +73,16 @@ int main(int argc, char **argv) {
} }
address_fprint(stderr, &frame); address_fprint(stderr, &frame);
if (frame.type == PATTY_AX25_FRAME_INFO) {
fprintf(stderr, " ns %d", PATTY_AX25_CONTROL_SEQ_SEND(frame.control));
fprintf(stderr, " nr %d", PATTY_AX25_CONTROL_SEQ_RECV(frame.control));
}
if (frame.payload) {
fprintf(stderr, " proto %02x", frame.proto);
}
fprintf(stderr, " %ld bytes\n", len); fprintf(stderr, " %ld bytes\n", len);
} }