bp = handle->bp;
ep = bp + len;
while (bp < ep) {
+ const struct nlmsghdr *nlh = (const struct nlmsghdr *) bp;
+ u_int32_t msg_len;
+ nftype_t type = OTHER;
/*
* Has "pcap_breakloop()" been called?
* If so, return immediately - if we haven't read any
*/
break;
}
- const struct nlmsghdr *nlh = (const struct nlmsghdr *) bp;
- u_int32_t msg_len;
- nftype_t type = OTHER;
if (nlh->nlmsg_len < sizeof(struct nlmsghdr) || (u_int)len < nlh->nlmsg_len) {
pcap_snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Message truncated: (got: %d) (nlmsg_len: %u)", len, nlh->nlmsg_len);