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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
--- tcptraceroute.c.old 2003-07-03 19:56:41.000000000 +0000
+++ tcptraceroute.c 2005-04-15 09:49:58.000000000 +0000
@@ -189,7 +189,7 @@
};
/* Various globals */
-u_long dst_ip, src_ip;
+unsigned int dst_ip, src_ip;
u_short src_prt, dst_prt;
char *device, *name, *dst, *src;
char dst_name[TEXTSIZE], dst_prt_name[TEXTSIZE], filter[TEXTSIZE];
@@ -213,7 +213,7 @@
/* interface linked list, built later by getinterfaces() */
struct interface_entry {
char *name;
- u_long addr;
+ unsigned int addr;
struct interface_entry *next;
} *interfaces;
@@ -223,7 +223,7 @@
u_short id, src_prt;
struct timeval timestamp;
double delta;
- u_long addr;
+ unsigned int addr;
char *state;
char *string;
} proberecord;
@@ -451,7 +451,7 @@
*/
#define IPTOSBUFFERS 12
-char *iptos(u_long in)
+char *iptos(unsigned int in)
{
static char output[IPTOSBUFFERS][3*4+3+1];
static short which;
@@ -468,7 +468,7 @@
* RFC1918 space.
*/
-char *iptohost(u_long in)
+char *iptohost(unsigned int in)
{
u_char *p = (u_char *)∈
@@ -538,7 +538,7 @@
struct ifconf ifc;
struct ifreq *ifrp, ifr;
int numreqs, i, s;
- u_long addr;
+ unsigned int addr;
int salen;
char *x;
@@ -679,7 +679,7 @@
* given destination address.
*/
-u_long findsrc(u_long dest)
+unsigned int findsrc(unsigned int dest)
{
struct sockaddr_in sinsrc, sindest;
int s, size;
@@ -715,7 +715,7 @@
* interface exists with an address of 127.0.0.1.
*/
-char *finddev(u_long with_src)
+char *finddev(unsigned int with_src)
{
struct interface_entry *p;
char *device = NULL;
@@ -812,7 +812,7 @@
/* Variables to keep state between calls */
static char laststate[TEXTSIZE];
static int lastttl;
- static u_long lastaddr;
+ static unsigned int lastaddr;
static int everprint;
int printflag = 0;
@@ -960,7 +960,7 @@
void defaults(void)
{
struct servent *serv;
- u_long recommended_src;
+ unsigned int recommended_src;
getinterfaces();
|