updated on Thu Jan 19 00:16:31 UTC 2012
[aur-mirror.git] / sendip / sendip-2.5.patch
bloba5aedb5d7d76e2776028214fadfce3c9555adb6f
1 Common subdirectories: sendip-2.5/contrib and sendip-2.5-a/contrib
2 diff -up sendip-2.5/ipv4.c sendip-2.5-a/ipv4.c
3 --- sendip-2.5/ipv4.c 2003-04-21 21:23:22.000000000 +0800
4 +++ sendip-2.5-a/ipv4.c 2009-02-11 09:16:13.000000000 +0800
5 @@ -204,7 +204,7 @@ bool do_opt(char *opt, char *arg, sendip
6 if(!strcmp(opt+2, "num")) {
7 /* Other options (auto legnth) */
8 u_int8_t cp, cls, num, len;
9 - u_int8_t *data = malloc(strlen(arg)+2);
10 + char *data = malloc(strlen(arg)+2);
11 if(!data) {
12 fprintf(stderr,"Out of memory!\n");
13 return FALSE;
14 @@ -214,7 +214,7 @@ bool do_opt(char *opt, char *arg, sendip
15 cp=(*data&0x80)>>7;
16 cls=(*data&0x60)>>5;
17 num=(*data&0x1F);
18 - addoption(cp,cls,num,len+1,data+1,pack);
19 + addoption(cp,cls,num,len+1,(u_int8_t*)(data+1),pack);
20 free(data);
21 } else if(!strcmp(opt+2, "eol")) {
22 /* End of list */
23 @@ -226,7 +226,7 @@ bool do_opt(char *opt, char *arg, sendip
24 /* Record route
25 * Format is the same as for loose source route
27 - char *data = strdup(arg);
28 + char *data = strdup(arg);
29 u_int8_t len;
30 if(!data) {
31 fprintf(stderr,"Out of memory!\n");
32 @@ -237,7 +237,7 @@ bool do_opt(char *opt, char *arg, sendip
33 free(data);
34 return FALSE;
35 } else {
36 - addoption(0,0,7,len+2,data,pack);
37 + addoption(0,0,7,len+2,(u_int8_t*)data,pack);
38 free(data);
40 } else if(!strcmp(opt+2, "ts")) {
41 @@ -352,7 +352,7 @@ bool do_opt(char *opt, char *arg, sendip
42 data_in = next;
45 - addoption(0,2,4,data_out-data+2,data,pack);
46 + addoption(0,2,4,data_out-data+2,(u_int8_t*)data,pack);
47 free(data);
48 /* End of timestamp parsing */
50 @@ -377,7 +377,7 @@ bool do_opt(char *opt, char *arg, sendip
51 free(data);
52 return FALSE;
53 } else {
54 - addoption(1,0,3,len+2,data,pack);
55 + addoption(1,0,3,len+2,(u_int8_t*)data,pack);
56 free(data);
58 } else if(!strcmp(opt+2, "sid")) {
59 @@ -399,7 +399,7 @@ bool do_opt(char *opt, char *arg, sendip
60 free(data);
61 return FALSE;
62 } else {
63 - addoption(1,0,9,len+2,data,pack);
64 + addoption(1,0,9,len+2,(u_int8_t*)data,pack);
65 free(data);
67 } else {
68 Only in sendip-2.5-a: sendip.1
69 Only in sendip-2.5-a: sendip.spec
70 diff -up sendip-2.5/tcp.c sendip-2.5-a/tcp.c
71 --- sendip-2.5/tcp.c 2003-06-11 04:15:43.000000000 +0800
72 +++ sendip-2.5-a/tcp.c 2009-02-11 09:18:06.000000000 +0800
73 @@ -204,8 +204,8 @@ bool do_opt(char *opt, char *arg, sendip
74 fprintf(stderr,"Out of memory!\n");
75 return FALSE;
77 - sprintf(data,"0x%s",arg);
78 - len = compact_string(data);
79 + sprintf((char*)data,"0x%s",arg);
80 + len = compact_string((char*)data);
81 if(len==1)
82 addoption(*data,1,NULL,pack);
83 else
84 @@ -230,7 +230,7 @@ bool do_opt(char *opt, char *arg, sendip
85 addoption(4,2,NULL,pack);
86 } else if (!strcmp(opt+2, "sack")) {
87 /* Selective Acknowledge rfc1323 */
88 - unsigned char *next;
89 + char *next;
90 u_int32_t le, re;
91 u_int8_t *comb, *c;
92 int count=0;