void handle_loop(const u_char * pkt, int len, void *userdata) { unsigned int family = nptohl(pkt); if (is_family_inet(family)) handle_ip((struct ip *)(pkt + 4), len - 4, userdata); }
dns_message * handle_loop(const u_char * pkt, int len) { unsigned int family; memcpy(&family, pkt, sizeof(family)); if (is_family_inet(family)) return handle_ip((struct ip *) (pkt + 4), len - 4); return NULL; }