summaryrefslogtreecommitdiff
path: root/package/traceroute/patches/patch-traceroute_mod-dccp_c
blob: 18dcbedafbbb13af098cbc718503a5644c5a6cf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- traceroute-2.0.19.orig/traceroute/mod-dccp.c	2012-11-19 16:51:53.000000000 +0100
+++ traceroute-2.0.19/traceroute/mod-dccp.c	2013-12-29 20:01:35.000000000 +0100
@@ -30,7 +30,7 @@ static unsigned int dest_port = 0;
 static int raw_sk = -1;
 static int last_ttl = 0;
 
-static u_int8_t buf[1024];	/*  enough, enough...  */
+static uint8_t buf[1024];	/*  enough, enough...  */
 static size_t csum_len = 0;
 static struct dccp_hdr *dh = NULL;
 static struct dccp_hdr_ext *dhe = NULL;
@@ -51,8 +51,8 @@ static int dccp_init (const sockaddr_any
 	int af = dest->sa.sa_family;
 	sockaddr_any src;
 	socklen_t len;
-	u_int8_t *ptr;
-	u_int16_t *lenp;
+	uint8_t *ptr;
+	uint16_t *lenp;
 
 
 	dest_addr = *dest;
@@ -117,10 +117,10 @@ static int dccp_init (const sockaddr_any
 		ptr += len;
 	}
 
-	lenp = (u_int16_t *) ptr;
-	ptr += sizeof (u_int16_t);
-        *((u_int16_t *) ptr) = htons ((u_int16_t) IPPROTO_DCCP);
-        ptr += sizeof (u_int16_t);
+	lenp = (uint16_t *) ptr;
+	ptr += sizeof (uint16_t);
+        *((uint16_t *) ptr) = htons ((uint16_t) IPPROTO_DCCP);
+        ptr += sizeof (uint16_t);
 
 
 	/*  Construct DCCP header   */
@@ -153,7 +153,7 @@ static int dccp_init (const sockaddr_any
 	if (csum_len > sizeof (buf))
 		error ("impossible");	/*  paranoia   */
 
-	len = ptr - (u_int8_t *) dh;
+	len = ptr - (uint8_t *) dh;
 	if (len & 0x03)  error ("impossible");  /*  as >>2 ...  */
 
 	*lenp = htons (len);
@@ -232,7 +232,7 @@ static probe *dccp_check_reply (int sk,
 						    char *buf, size_t len) {
 	probe *pb;
 	struct dccp_hdr *ndh = (struct dccp_hdr *) buf;
-	u_int16_t sport, dport;
+	uint16_t sport, dport;
 
 
 	if (len < 8)  return NULL;	    /*  too short   */