diff --git a/include/patty/ax25.h b/include/patty/ax25.h index aaa8408..396c426 100644 --- a/include/patty/ax25.h +++ b/include/patty/ax25.h @@ -32,9 +32,36 @@ typedef struct _patty_ax25_address { #define PATTY_AX25_CONTROL_SUPER(c) \ ((c & 0x03) == 0x01) +#define PATTY_AX25_CONTROL_SUPER_RR(c) \ + ((c & 0x0f) == 0x01) + +#define PATTY_AX25_CONTROL_SUPER_RNR(c) \ + ((c & 0x0f) == 0x05) + +#define PATTY_AX25_CONTROL_SUPER_REJ(c) \ + ((c & 0x0f) == 0x09) + #define PATTY_AX25_CONTROL_UNNUMBERED(c) \ ((c & 0x03) == 0x03) +#define PATTY_AX25_CONTROL_UNNUMBERED_SABM(c) \ + (((c & 0xe0) == 0x10) && ((c & 0x0f) == 0x0f)) + +#define PATTY_AX25_CONTROL_UNNUMBERED_DISC(c) \ + (((c & 0xe0) == 0x20) && ((c & 0x0f) == 0x03)) + +#define PATTY_AX25_CONTROL_UNNUMBERED_DM(c) \ + (((c & 0xe0) == 0x00) && ((c & 0x0f) == 0x0f)) + +#define PATTY_AX25_CONTROL_UNNUMBERED_UA(c) \ + (((c & 0xe0) == 0x30) && ((c & 0x0f) == 0x03)) + +#define PATTY_AX25_CONTROL_UNNUMBERED_FRMR(c) \ + (((c & 0xe0) == 0x40) && ((c & 0x0f) == 0x07)) + +#define PATTY_AX25_CONTROL_UNNUMBERED_UI(c) \ + (((c & 0xe0) == 0x00) && ((c & 0x0f) == 0x02)) + #define PATTY_AX25_CONTROL_SEQ_SEND(c) \ ((c & 0x0e) >> 1)