- * If it's after the current snapend, it's not valid. We
- * silently ignore the new setting; that means that our callers
- * don't have to do this check themselves, and also means that
- * if the new length is used when dissecting, we'll go past the
- * snapend and report an error.
- *
- * If it's before the beginning of the packet, it's not valid.
- * That "should not happen", but might happen with a *very*
- * large adjustment to the snapend; our callers *should* check
- * for that, so we fail if they haven't done so.
+ * We're restricted to packets with at most UINT_MAX bytes;
+ * cast the result to u_int, so that we don't get truncation
+ * warnings on LP64 and LLP64 platforms. (ptrdiff_t is
+ * signed and we want an unsigned difference; the pointer
+ * should at most be equal to snapend, and must *never*
+ * be past snapend.)