#endif
#include "pcap-int.h"
+#include "diag-control.h"
#ifdef NEED_STRERROR_H
#include "strerror.h"
bp = (unsigned char *)handle->buffer;
} else
bp = handle->bp;
+
+ /*
+ * Loop through each message.
+ *
+ * This assumes that a single buffer of message will have
+ * <= INT_MAX packets, so the message count doesn't overflow.
+ */
ep = bp + len;
while (bp < ep) {
const struct nlmsghdr *nlh = (const struct nlmsghdr *) bp;
static unsigned int seq_id;
if (!seq_id)
+DIAG_OFF_NARROWING
seq_id = time(NULL);
+DIAG_ON_NARROWING
++seq_id;
nlh->nlmsg_len = NLMSG_LENGTH(sizeof(struct nfgenmsg));