View | Details | Raw Unified | Return to bug 246187 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-8 / +5 lines)
Lines 2-20 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	aslookup
4
PORTNAME=	aslookup
5
PORTVERSION=	0.12
5
PORTVERSION=	0.13d
6
PORTREVISION=	1
6
DISTVERSION=	beta0.13d
7
CATEGORIES=	net
7
CATEGORIES=	net
8
MASTER_SITES=	http://www.bugest.net/software/aslookup/
8
MASTER_SITES=	http://aslookup.bgpview.org/download/
9
DISTNAME=	${PORTNAME}-alpha${PORTVERSION}
9
DISTNAME=	${PORTNAME}-beta${PORTVERSION}
10
10
11
MAINTAINER=	jmohacsi@bsd.hu
11
MAINTAINER=	jmohacsi@bsd.hu
12
COMMENT=	Tool that searches the sequence of AS numbers
12
COMMENT=	Tool that searches the sequence of AS numbers
13
13
14
BROKEN=		unfetchable
14
CFLAGS+=	-DARINDB -DJPNICDB -DAPNICDB
15
DEPRECATED=	Broken for more than 6 months
16
EXPIRATION_DATE=	2020-05-05
17
18
OPTIONS_DEFINE=	DOCS
15
OPTIONS_DEFINE=	DOCS
19
16
20
post-patch:
17
post-patch:
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (aslookup-alpha0.12.tar.gz) = b5bbbf48dad6f2133078b060dae59afc12ee82ff326088458c5953f2a476c3d6
1
TIMESTAMP = 1600092142
2
SIZE (aslookup-alpha0.12.tar.gz) = 12979
2
SHA256 (aslookup-beta0.13d.tar.gz) = bed372c27329cc87e2438c19015695ca16586e4083ae73f54fd92471fc506a35
3
SIZE (aslookup-beta0.13d.tar.gz) = 12986
(-)files/patch-Makefile (-11 / +11 lines)
Lines 1-11 Link Here
1
--- ./Makefile.orig	Wed Apr  5 05:36:20 2000
1
--- Makefile.orig	2009-09-20 11:00:57 UTC
2
+++ ./Makefile	Wed Nov  9 22:52:32 2005
2
+++ Makefile
3
@@ -34,7 +34,7 @@
3
@@ -36,7 +36,7 @@ MANDIR	=/usr/local/man/man1
4
 # CFLAGS  = -DJPIXDB -DJPNICDB -DAPNICDB
4
 # AND, If you are using solaris, Please add option "-DSOLARIS".
5
 # CFLAGS  = -DRALOCAL -DJPNICDB -DAPNICDB 
5
 # CFLAGS  =
6
 # CFLAGS  = -DJPNICDB -DAPNICDB -DLOG -DSOLARIS
6
 # CFLAGS  = -DJPIXDB -DJPNICDB -DAPNICDB -g -O
7
-CFLAGS  = -DARINDB -DJPNICDB -DAPNICDB -DLOG -DDEBUG
7
-CFLAGS  = -DRALOCAL -DJPNICDB -DAPNICDB -g -O
8
+CFLAGS  = -DARINDB -DJPNICDB -DAPNICDB 
8
+# CFLAGS  = -DRALOCAL -DJPNICDB -DAPNICDB -g -O
9
 INCDIR	= -I./
9
 # CFLAGS  = -DJPNICDB -DAPNICDB -DLOG -DSOLARIS -g -O
10
 
10
 # CFLAGS  = -DARINDB -DJPNICDB -DAPNICDB -DLOG -DDEBUG -g -O
11
 # This line is for solaris.
11
 # CFLAGS  = -DARINDB -DJPNICDB -DAPNICDB -g -O
(-)files/patch-aslookup.c (-45 / +225 lines)
Lines 1-56 Link Here
1
--- ./aslookup.c.orig	Wed Apr  5 05:35:56 2000
1
--- aslookup.c.orig	2009-09-20 11:00:21 UTC
2
+++ ./aslookup.c	Wed Nov  9 22:53:13 2005
2
+++ aslookup.c
3
@@ -249,7 +249,7 @@
3
@@ -109,7 +109,7 @@ char *connecthost;
4
 			break;
4
 }
5
 		case 'C':
5
 #endif /* _ifdef LOG */
6
 
7
-int dbopen()
8
+void dbopen()
9
 {
10
 	struct hostent		*hp;
11
 	struct sockaddr_in	sin;
12
@@ -137,14 +137,14 @@ int dbopen()
13
 #endif
14
 }
15
 
16
-int dbclose()
17
+void dbclose()
18
 {
19
 	write(sc, "q\n", 2);
20
 	close(sc);
21
 
22
 }
23
 
24
-int batchmode()
25
+void batchmode()
26
 {
27
 	write(sc, "!!\n", 3);
28
 }
29
@@ -198,7 +198,7 @@ char *type;
30
 	return(ret);
31
 }
32
 
33
-int sread(buf, len)
34
+void sread(buf, len)
35
 char *buf;
36
 int  len;
37
 {
38
@@ -285,7 +285,7 @@ u_long asn;
39
 	char	asstr[128];
40
 	char	*data;
41
 
42
-	sprintf(asstr, "!man,AS%d\n", asn);
43
+	sprintf(asstr, "!man,AS%lu\n", asn);
44
 
6
 #ifdef DEBUG
45
 #ifdef DEBUG
7
-			printf("Compleate\n");
46
 	printf("Command : %s", asstr);
8
+			printf("Complete\n");
47
@@ -512,7 +512,7 @@ char	*retc;
48
 	connectlog(JPWHOIS);
9
 #endif
49
 #endif
10
 			stop = 1;
11
 			break;
12
@@ -936,7 +936,7 @@
13
 
50
 
14
 		if (strncmp(&line[3], "       ", 7) == 0) {
51
-	sprintf(line, "AS%d\n", asn);
52
+	sprintf(line, "AS%lu\n", asn);
53
 	write(jpsoc,line,strlen(line));
54
 
55
 	jpfd = fdopen(jpsoc, "r");
56
@@ -571,7 +571,7 @@ char	*retc;
57
 	connectlog(APWHOIS);
58
 #endif
59
 
60
-	sprintf(line, "AS%d\n", asn);
61
+	sprintf(line, "AS%lu\n", asn);
62
 	write(apsoc,line,strlen(line));
63
 
64
 	apfd = fdopen(apsoc, "r");
65
@@ -686,7 +686,7 @@ char	*retc;
66
 	connectlog(JIWHOIS);
67
 #endif
68
 
69
-	sprintf(line, "AS%d\n", asn);
70
+	sprintf(line, "AS%lu\n", asn);
71
 	write(jisoc,line,strlen(line));
72
 
73
 	jifd = fdopen(jisoc, "r");
74
@@ -710,7 +710,7 @@ char	*retc;
75
 }
76
 #endif /* _JPIXDB */
77
 
78
-int searchas(aslist)
79
+void searchas(aslist)
80
 char *aslist;
81
 {
82
 	char	aslistbuf[1024];
83
@@ -738,7 +738,7 @@ char *aslist;
15
 #ifdef DEBUG
84
 #ifdef DEBUG
16
-			printf("Old Data Concatinate\n");
85
 					printf("DEBUG: descr field not found\n");
17
+			printf("Old Data Concatenate\n");
18
 #endif
86
 #endif
19
 			bzero(buf,40);
87
-					printf("  AS%d:????????\n", asnum);
20
 			strncpy(buf, pathcache.data, 3);
88
+					printf("  AS%lu:????????\n", asnum);
21
@@ -952,7 +952,7 @@
89
 				}
22
 			printf("%s:\n",pathcache.data);
90
 #ifdef DEBUG
23
 			searchas(pathcache.pathstr);
91
 				printf("DB Type -> RPSL?\n");
92
@@ -771,7 +771,7 @@ char *aslist;
93
 				if (desce != NULL) {
94
 					*desce = '\0';
95
 				}
96
-				printf("  AS%d:%s\n", asnum, descs);
97
+				printf("  AS%lu:%s\n", asnum, descs);
98
 			}
99
 			free(obj);
24
 		} else {
100
 		} else {
25
-			printf("%s: Dplicated AS Path\n",pathcache.data);
101
@@ -779,7 +779,7 @@ char *aslist;
26
+			printf("%s: Duplicated AS Path\n",pathcache.data);
102
 
27
 		}
103
 #ifdef JPIXDB
104
 		if (jpix(asnum, &asname) != NULL) {
105
-			printf("  AS%d:%s\n", asnum, asname);
106
+			printf("  AS%lu:%s\n", asnum, asname);
107
 		} else {
108
 #endif
109
 #ifdef ARINDB
110
@@ -790,7 +790,7 @@ char *aslist;
111
 #ifdef JPNICDB
112
 				if (strcmp(asname, JPNICTAG) == 0) {
113
 					if (jpnic(asnum, &asname) != NULL) {
114
-						printf("  AS%d:%s (JPNIC)\n",
115
+						printf("  AS%lu:%s (JPNIC)\n",
116
 								 asnum, asname);
117
 						fg = 1;
118
 					} else {
119
@@ -801,7 +801,7 @@ char *aslist;
120
 #ifdef APNICDB
121
 				if (strcmp(asname, APNICTAG) == 0) {
122
 					if (apnic(asnum, &asname) != NULL) {
123
-						printf("  AS%d:%s (APNIC)\n",
124
+						printf("  AS%lu:%s (APNIC)\n",
125
 								 asnum, asname);
126
 						fg = 1;
127
 					} else {
128
@@ -811,11 +811,11 @@ char *aslist;
129
 #endif
130
 				if (strlen(asname) != 0) {
131
 					if (fg == 0) {
132
-						printf("  AS%d:%s (ARIN)\n",
133
+						printf("  AS%lu:%s (ARIN)\n",
134
 								 asnum, asname);
135
 					}
136
 				} else {
137
-					printf("  AS%d:????????\n", asnum);
138
+					printf("  AS%lu:????????\n", asnum);
139
 				}
140
 			}
141
 #endif /* ARINDB */
142
@@ -823,11 +823,11 @@ char *aslist;
143
 #ifdef JPNICDB
144
 #ifdef APNICDB
145
 			if (jpnic(asnum, &asname) != NULL) {
146
-				printf("  AS%d:%s (JPNIC)\n", asnum, asname);
147
+				printf("  AS%lu:%s (JPNIC)\n", asnum, asname);
148
 			} else if (apnic(asnum, &asname) != NULL) {
149
-				printf("  AS%d:%s (APNIC)\n", asnum, asname);
150
+				printf("  AS%lu:%s (APNIC)\n", asnum, asname);
151
 			} else {
152
-				printf("  AS%d:????????\n", asnum);
153
+				printf("  AS%lu:????????\n", asnum);
154
 			}
155
 #endif
156
 #endif
157
@@ -835,9 +835,9 @@ char *aslist;
158
 #ifdef JPNICDB
159
 #ifndef APNICDB
160
 			if (jpnic(asnum, &asname) != NULL) {
161
-				printf("  AS%d:%s (JPNIC)\n", asnum, asname);
162
+				printf("  AS%lu:%s (JPNIC)\n", asnum, asname);
163
 			} else {
164
-				printf("  AS%d:????????\n", asnum);
165
+				printf("  AS%lu:????????\n", asnum);
166
 			}
167
 #endif
168
 #endif
169
@@ -845,16 +845,16 @@ char *aslist;
170
 #ifndef JPNICDB
171
 #ifdef APNICDB
172
 			if (apnic(asnum, &asname) != NULL) {
173
-				printf("  AS%d:%s (APNIC)\n", asnum, asname);
174
+				printf("  AS%lu:%s (APNIC)\n", asnum, asname);
175
 			} else {
176
-				printf("  AS%d:????????\n", asnum);
177
+				printf("  AS%lu:????????\n", asnum);
178
 			}
179
 #endif
180
 #endif
181
 
182
 #ifndef JPNICDB
183
 #ifndef APNICDB
184
-			printf("  AS%d:????????\n", asnum);
185
+			printf("  AS%lu:????????\n", asnum);
186
 #endif
187
 #endif
188
 
189
@@ -906,7 +906,7 @@ ASPATHCACHE *data;
190
 	return(ret);
191
 }
192
 
193
-int freecache()
194
+void freecache()
195
 {
196
 	ASPATHCACHE *ptr;
197
 
198
@@ -918,7 +918,7 @@ int freecache()
28
 	}
199
 	}
200
 }
201
 
202
-int parsestdin()
203
+void parsestdin()
204
 {
205
 
206
 	char	line[2048];
207
@@ -1020,6 +1020,7 @@ char *fname;
208
 	}
209
 	fclose(fp);
29
 	freecache();
210
 	freecache();
30
@@ -987,7 +987,7 @@
211
+	return(0);
212
 }
31
 
213
 
32
                 if (strncmp(&line[3], "       ", 7) == 0) {
214
 int host2as(hn)
215
@@ -1065,7 +1066,7 @@ char	*hn;
216
 #endif
217
 
218
 	if (getas(adstr, &getasnum) == 0) {
219
-		printf("% Search Fail\n");
220
+		printf("%% Search Fail\n");
221
 	} else {
33
 #ifdef DEBUG
222
 #ifdef DEBUG
34
-                        printf("Old Data Concatinate: %s\n",olddata);
223
 		printf("Search AS : %s\n",getasnum);
35
+                        printf("Old Data Concatenate: %s\n",olddata);
224
@@ -1088,10 +1089,11 @@ char	*hn;
36
 #endif
225
 			asptr++;
37
                         if (strlen(olddata) > 0) {
226
 		}
38
                                 bzero(buf,40);
39
@@ -1007,7 +1007,7 @@
40
                         printf("%s:\n",pathcache.data);
41
                         searchas(pathcache.pathstr);
42
                 } else {
43
-                        printf("%s: Dplicated AS Path\n",pathcache.data);
44
+                        printf("%s: Duplicated AS Path\n",pathcache.data);
45
                 }
46
 	}
227
 	}
47
 	fclose(fp);
228
+	return(0);
48
@@ -1034,7 +1034,7 @@
229
 }
49
 	if (a == 0) {
230
 
50
 		hp = gethostbyname(hn);
231
 
51
 		if (hp == NULL) {
232
-main(argc, argv)
52
-			printf("Could not resolv : %s\n",hn);
233
+int main(argc, argv)
53
+			printf("Could not resolve : %s\n",hn);
234
 int argc;
54
 			return(1);
235
 char *argv[];
55
 		}
236
 {
56
 		bzero(&sin, sizeof(struct sockaddr_in));
(-)pkg-descr (-1 / +1 lines)
Lines 8-11 Link Here
8
You can search to ARIN, JPNIC and APNIC whois dabase.
8
You can search to ARIN, JPNIC and APNIC whois dabase.
9
You can srarch AS Number from IP Addresses.
9
You can srarch AS Number from IP Addresses.
10
10
11
WWW: http://www.bugest.net/software/aslookup/index-e.html
11
WWW: http://aslookup.bgpview.org/index-e.html

Return to bug 246187