--- embedaddon/libnet/src/libnet_build_dns.c 2013/07/22 11:54:42 1.1.1.2 +++ embedaddon/libnet/src/libnet_build_dns.c 2023/09/27 11:11:38 1.1.1.3 @@ -1,5 +1,5 @@ /* - * $Id: libnet_build_dns.c,v 1.1.1.2 2013/07/22 11:54:42 misho Exp $ + * $Id: libnet_build_dns.c,v 1.1.1.3 2023/09/27 11:11:38 misho Exp $ * * libnet * libnet_build_dns.c - DNS packet assembler @@ -30,14 +30,7 @@ * */ -#if (HAVE_CONFIG_H) -#include "../include/config.h" -#endif -#if (!(_WIN32) || (__CYGWIN__)) -#include "../include/libnet.h" -#else -#include "../include/win32/libnet.h" -#endif +#include "common.h" libnet_ptag_t @@ -48,7 +41,7 @@ libnet_build_dnsv4(uint16_t h_len, uint16_t id, uint16 { uint32_t n, h; - uint offset; + uint32_t offset; libnet_pblock_t *p; struct libnet_dnsv4_hdr dns_hdr; @@ -84,7 +77,7 @@ libnet_build_dnsv4(uint16_t h_len, uint16_t id, uint16 * anyway. */ memset(&dns_hdr, 0, sizeof(dns_hdr)); - dns_hdr.h_len = htons(n - sizeof (dns_hdr.h_len)); + dns_hdr.h_len = htons((u_short)(n - sizeof (dns_hdr.h_len))); dns_hdr.id = htons(id); dns_hdr.flags = htons(flags); dns_hdr.num_q = htons(num_q); @@ -113,4 +106,9 @@ bad: return (-1); } -/* EOF */ +/** + * Local Variables: + * indent-tabs-mode: nil + * c-file-style: "stroustrup" + * End: + */