Browse code

misc/tools/protoshoot: removed svn id and history

(cherry picked from commit e3875c01adf576f179374a926e69e99c0094e5b4)
(cherry picked from commit 105b15422f611ba1dcc59be30f7f4d474b294d03)
(cherry picked from commit fa2c7c16881b25bb99a33f69b67bda97c3092fe0)

Daniel-Constantin Mierla authored on 04/08/2021 12:15:09 • Henning Westerholt committed on 22/10/2021 12:04:24
Showing 1 changed files
... ...
@@ -1,4 +1,3 @@
1
-/* $Id$ */
2 1
 /*
3 2
  *
4 3
  * Copyright (C) 2001-2003 FhG Fokus
... ...
@@ -20,14 +19,10 @@
20 19
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 20
  * GNU General Public License for more details.
22 21
  *
23
- * You should have received a copy of the GNU General Public License 
24
- * along with this program; if not, write to the Free Software 
22
+ * You should have received a copy of the GNU General Public License
23
+ * along with this program; if not, write to the Free Software
25 24
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
26 25
  */
27
-/*
28
- * History:
29
- *  2005-09-09  basic tcp support added (andrei)
30
- */
31 26
 
32 27
 
33 28
 
... ...
@@ -50,7 +45,6 @@
50 45
 #include <signal.h>
51 46
 
52 47
 
53
-static char *id="$Id$";
54 48
 static char *version="protoshoot 0.4";
55 49
 static char* help_msg="\
56 50
 Usage: protoshoot -f file -d address -p port -c count [-v]\n\
... ...
@@ -87,7 +81,7 @@ int main (int argc, char** argv)
87 81
 	char buf[BUF_SIZE];
88 82
 	struct hostent* he;
89 83
 	struct sockaddr_in addr;
90
-	
84
+
91 85
 	int count;
92 86
 	int verbose;
93 87
 	char *fname;
... ...
@@ -104,7 +98,7 @@ int main (int argc, char** argv)
104 98
 	struct linger t_linger;
105 99
 	int k;
106 100
 	int err;
107
-	
101
+
108 102
 	/* init */
109 103
 	count=1;
110 104
 	verbose=0;
... ...
@@ -190,7 +184,6 @@ int main (int argc, char** argv)
190 184
 				break;
191 185
 			case 'V':
192 186
 				printf("version: %s\n", version);
193
-				printf("%s\n",id);
194 187
 				exit(0);
195 188
 				break;
196 189
 			case 'h':
... ...
@@ -213,7 +206,7 @@ int main (int argc, char** argv)
213 206
 					abort();
214 207
 		}
215 208
 	}
216
-	
209
+
217 210
 	/* check if all the required params are present */
218 211
 	if (fname==0){
219 212
 		fprintf(stderr, "Missing -f file\n");
... ...
@@ -238,13 +231,13 @@ int main (int argc, char** argv)
238 231
 		exit(-1);
239 232
 	}
240 233
 	if (proto==PROTO_UDP || (proto==PROTO_SCTP && !sctp_o2o)) con_no=1;
241
-	
234
+
242 235
 	/* ignore sigpipe */
243 236
 	if (signal(SIGPIPE, SIG_IGN)==SIG_ERR){
244 237
 		fprintf(stderr, "failed to ignore SIGPIPE: %s\n", strerror(errno));
245 238
 		exit(-1);
246 239
 	}
247
-	
240
+
248 241
 	/* open packet file */
249 242
 	fd=open(fname, O_RDONLY);
250 243
 	if (fd<0){
... ...
@@ -274,7 +267,7 @@ int main (int argc, char** argv)
274 267
 	addr.sin_len=sizeof(struct sockaddr_in);
275 268
 #endif
276 269
 	memcpy(&addr.sin_addr.s_addr, he->h_addr_list[0], he->h_length);
277
-	
270
+
278 271
 	for (k=0; k<con_no; k++){
279 272
 		switch(proto){
280 273
 			case PROTO_UDP:
... ...
@@ -285,7 +278,7 @@ int main (int argc, char** argv)
285 278
 				break;
286 279
 #ifdef USE_SCTP
287 280
 			case PROTO_SCTP:
288
-				sock = socket(he->h_addrtype, 
281
+				sock = socket(he->h_addrtype,
289 282
 								sctp_o2o?SOCK_STREAM:SOCK_SEQPACKET,
290 283
 								IPPROTO_SCTP);
291 284
 				break;
... ...
@@ -333,8 +326,7 @@ int main (int argc, char** argv)
333 326
 			fprintf(stderr, "ERROR: connect: %s\n", strerror(errno));
334 327
 			goto error;
335 328
 		}
336
-		
337
-		
329
+
338 330
 		/* flood loop */
339 331
 		t=throttle;
340 332
 		for (r=0; r<count; r++){
... ...
@@ -366,7 +358,7 @@ int main (int argc, char** argv)
366 358
 				}
367 359
 			}
368 360
 		}
369
-		
361
+
370 362
 		close(sock);
371 363
 		if ((verbose) && (k%1000==999)) { putchar('#'); fflush(stdout); }
372 364
 	}