summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2012-10-29 11:15:47 -0700
committerSam Roberts <vieuxtech@gmail.com>2012-10-29 11:15:47 -0700
commit3b41127aa2c1cfb63635ede6e86b0dc3ff2815e6 (patch)
tree6df8802805a14a36f4cac28600e85304c468a2f0
parentd9de9df515a4305582fbd9880055a9705f11cb64 (diff)
downloadlibnet-3b41127aa2c1cfb63635ede6e86b0dc3ff2815e6.tar.gz
Convert uses of non-standard uint to uint32_t.
-rw-r--r--libnet/include/win32/libnet.h2
-rw-r--r--libnet/sample/tftp.c2
-rw-r--r--libnet/src/libnet_build_dns.c2
-rw-r--r--libnet/src/libnet_build_ospf.c8
-rw-r--r--libnet/src/libnet_cq.c4
-rw-r--r--libnet/src/libnet_crc.c2
6 files changed, 9 insertions, 11 deletions
diff --git a/libnet/include/win32/libnet.h b/libnet/include/win32/libnet.h
index 0025ffe..fe37c91 100644
--- a/libnet/include/win32/libnet.h
+++ b/libnet/include/win32/libnet.h
@@ -95,8 +95,6 @@ extern "C" {
#include "stdint.h"
-typedef uint32_t uint; /* FIXME all uses of uint need to be fixed, it not portable */
-
/* Libnet's unnamespaced ICMP6_ macros stomp on the enumerated versions of
these names in the MS headers, so pre-include this header. */
#include <iphlpapi.h> /* From the Microsoft Platform SDK */
diff --git a/libnet/sample/tftp.c b/libnet/sample/tftp.c
index f190a86..30d3393 100644
--- a/libnet/sample/tftp.c
+++ b/libnet/sample/tftp.c
@@ -49,7 +49,7 @@ main(int argc, char *argv[])
char *filename = "/etc/passwd";
char mode[] = "netascii";
u_char *payload = NULL;
- uint payload_s = 0;
+ uint32_t payload_s = 0;
printf("libnet 1.1 packet shaping: UDP + payload[raw] == TFTP\n");
diff --git a/libnet/src/libnet_build_dns.c b/libnet/src/libnet_build_dns.c
index bb282cc..26c6f3a 100644
--- a/libnet/src/libnet_build_dns.c
+++ b/libnet/src/libnet_build_dns.c
@@ -41,7 +41,7 @@ libnet_build_dnsv4(uint16_t h_len, uint16_t id, uint16_t flags,
{
uint32_t n, h;
- uint offset;
+ uint32_t offset;
libnet_pblock_t *p;
struct libnet_dnsv4_hdr dns_hdr;
diff --git a/libnet/src/libnet_build_ospf.c b/libnet/src/libnet_build_ospf.c
index 9806714..8f9fe90 100644
--- a/libnet/src/libnet_build_ospf.c
+++ b/libnet/src/libnet_build_ospf.c
@@ -201,7 +201,7 @@ bad:
libnet_ptag_t
-libnet_build_ospfv2_lsr(uint32_t type, uint lsid, uint32_t advrtr,
+libnet_build_ospfv2_lsr(uint32_t type, uint32_t lsid, uint32_t advrtr,
const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
{
uint32_t n, h;
@@ -295,7 +295,7 @@ bad:
libnet_ptag_t
-libnet_build_ospfv2_lsa(uint16_t age, uint8_t opts, uint8_t type, uint lsid,
+libnet_build_ospfv2_lsa(uint16_t age, uint8_t opts, uint8_t type, uint32_t lsid,
uint32_t advrtr, uint32_t seqnum, uint16_t sum, uint16_t len,
const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
{
@@ -460,7 +460,7 @@ bad:
libnet_ptag_t
-libnet_build_ospfv2_lsa_sum(uint32_t nmask, uint32_t metric, uint tos,
+libnet_build_ospfv2_lsa_sum(uint32_t nmask, uint32_t metric, uint32_t tos,
const uint8_t *payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag)
{
uint32_t n, h;
@@ -509,7 +509,7 @@ bad:
libnet_ptag_t
-libnet_build_ospfv2_lsa_as(uint32_t nmask, uint metric, uint32_t fwdaddr,
+libnet_build_ospfv2_lsa_as(uint32_t nmask, uint32_t metric, uint32_t fwdaddr,
uint32_t tag, const uint8_t *payload, uint32_t payload_s, libnet_t *l,
libnet_ptag_t ptag)
{
diff --git a/libnet/src/libnet_cq.c b/libnet/src/libnet_cq.c
index a4580b8..7b59aba 100644
--- a/libnet/src/libnet_cq.c
+++ b/libnet/src/libnet_cq.c
@@ -44,7 +44,7 @@ static libnet_cqd_t l_cqd = {0, CQ_LOCK_UNLOCKED, NULL};
static int
-set_cq_lock(uint x)
+set_cq_lock(uint32_t x)
{
if (check_cq_lock(x))
{
@@ -56,7 +56,7 @@ set_cq_lock(uint x)
}
static int
-clear_cq_lock(uint x)
+clear_cq_lock(uint32_t x)
{
if (!check_cq_lock(x))
{
diff --git a/libnet/src/libnet_crc.c b/libnet/src/libnet_crc.c
index 886f5dc..85c3056 100644
--- a/libnet/src/libnet_crc.c
+++ b/libnet/src/libnet_crc.c
@@ -33,7 +33,7 @@
#include "common.h"
/* CRC routines based off of sample code in appendix of RFC 2083 */
-static uint crc_table[256] =
+static uint32_t crc_table[256] =
{
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,