1 --- net-tools-1.60/arp.c 2001-04-08 10:05:05.000000000 -0700
2 +++ net-tools-1.60.new/arp.c 2006-01-31 13:10:01.479716750 -0800
3 @@ -100,7 +100,7 @@ static int arp_del(char **args)
8 + struct sockaddr_storage ss;
12 @@ -112,12 +112,12 @@ static int arp_del(char **args)
15 safe_strncpy(host, *args, (sizeof host));
16 - if (ap->input(0, host, &sa) < 0) {
17 + if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
21 /* If a host has more than one address, use the correct one! */
22 - memcpy((char *) &req.arp_pa, (char *) &sa, sizeof(struct sockaddr));
23 + memcpy((char *) &req.arp_pa, (char *) &ss, sizeof(struct sockaddr));
26 req.arp_ha.sa_family = hw->type;
27 @@ -177,11 +177,11 @@ static int arp_del(char **args)
29 if (strcmp(*args, "255.255.255.255") != 0) {
31 - if (ap->input(0, host, &sa) < 0) {
32 + if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
36 - memcpy((char *) &req.arp_netmask, (char *) &sa,
37 + memcpy((char *) &req.arp_netmask, (char *) &ss,
38 sizeof(struct sockaddr));
39 req.arp_flags |= ATF_NETMASK;
41 @@ -260,7 +260,7 @@ static int arp_set(char **args)
46 + struct sockaddr_storage ss;
49 memset((char *) &req, 0, sizeof(req));
50 @@ -271,12 +271,12 @@ static int arp_set(char **args)
53 safe_strncpy(host, *args++, (sizeof host));
54 - if (ap->input(0, host, &sa) < 0) {
55 + if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
59 /* If a host has more than one address, use the correct one! */
60 - memcpy((char *) &req.arp_pa, (char *) &sa, sizeof(struct sockaddr));
61 + memcpy((char *) &req.arp_pa, (char *) &ss, sizeof(struct sockaddr));
63 /* Fetch the hardware address. */
65 @@ -346,11 +346,11 @@ static int arp_set(char **args)
67 if (strcmp(*args, "255.255.255.255") != 0) {
69 - if (ap->input(0, host, &sa) < 0) {
70 + if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
74 - memcpy((char *) &req.arp_netmask, (char *) &sa,
75 + memcpy((char *) &req.arp_netmask, (char *) &ss,
76 sizeof(struct sockaddr));
79 @@ -519,7 +519,7 @@ static void arp_disp(char *name, char *i
80 static int arp_show(char *name)
84 + struct sockaddr_storage ss;
88 @@ -535,11 +535,11 @@ static int arp_show(char *name)
90 /* Resolve the host name. */
91 safe_strncpy(host, name, (sizeof host));
92 - if (ap->input(0, host, &sa) < 0) {
93 + if (ap->input(0, host, (struct sockaddr*)&ss) < 0) {
97 - safe_strncpy(host, ap->sprint(&sa, 1), sizeof(host));
98 + safe_strncpy(host, ap->sprint((struct sockaddr*)&ss, 1), sizeof(host));
100 /* Open the PROCps kernel table. */
101 if ((fp = fopen(_PATH_PROCNET_ARP, "r")) == NULL) {
102 @@ -575,10 +575,11 @@ static int arp_show(char *name)
106 - if (ap->input(0, ip, &sa) < 0)
107 + if (ap->input(0, ip, (struct sockaddr*)&ss) < 0)
110 - hostname = ap->sprint(&sa, opt_n | 0x8000);
111 + hostname = ap->sprint((struct sockaddr*)&ss,
113 if (strcmp(hostname, ip) == 0)