+static void
+ack_print(register const u_char *bp, int length)
+{
+ u_char nAcks;
+ int i;
+
+ if (vflag <= 1)
+ return;
+
+ if (length <= sizeof(struct rx_header))
+ return;
+
+ bp += sizeof(struct rx_header);
+
+ /*
+ * Packets < firstPacket are implicitly acknowledged and may
+ * be discarded by the sender.
+ *
+ * Packets >= firstPacket+nAcks are implicitly NOT acknowledged.
+ *
+ * No packets with sequence numbers >= firstPacket should be
+ * discarded by the sender (they may thrown out at any time by
+ * the receiver)
+ */
+#define RX_ACK_REASONS "RDOXSprn"
+ /* Requested, Duplicate, Out_of_sequence, eXceeds_window, no_Space,
+ * Ping, ping_Response, No_{progress, particular_reason}.
+ */
+#if 0
+ struct rx_ackPacket {
+ u_short bufferSpace; /* Skip! */
+ u_short maxSkew; /* Skip! */
+ u_long firstPacket;
+ u_long previousPacket; /* Obsolete! */
+ u_long serial; /* Serial that prompted the ack, */
+ u_char reason; /* and the reason why. */
+ u_char nAcks;
+ u_char acks[RX_MAXACKS]; /* Selective acks (not a bitmap). */
+ };
+#endif
+#define RX_ACK_TYPE_NACK 0
+
+ TCHECK2(bp[0], 8); /* bufferSpace and maxSkew */
+ bp += 4;
+ printf(" fir %u", (unsigned)EXTRACT_32BITS(bp));
+ bp += 4;
+ TCHECK2(bp[0], 8); /* previousPacket and serial */
+ bp += 4;
+ printf(" %u", (unsigned)EXTRACT_32BITS(bp));
+ bp += 4;
+ TCHECK2(bp[0], 1);
+ printf("%c", RX_ACK_REASONS[(*bp - 1) & 07u]);
+ bp += 1; /* reason */
+ TCHECK2(bp[0], 1);
+ nAcks = *bp;
+ bp += 1; /* nAcks */
+
+ for (i = 0; i < nAcks; i++) {
+ TCHECK2(bp[0], 1);
+ putchar(*bp == RX_ACK_TYPE_NACK? '-' : '*');
+ bp += 1;
+ }
+
+ return;
+
+trunc:
+ printf(" [|ack]");
+}
+