Deleted Added
full compact
resend.c (53024) resend.c (72003)
1/*
2 * resend.c (C) 1995-1998 Darren Reed
3 *
4 * This was written to test what size TCP fragments would get through
5 * various TCP/IP packet filters, as used in IP firewalls. In certain
6 * conditions, enough of the TCP header is missing for unpredictable
7 * results unless the filter is aware that this can happen.
8 *
9 * Redistribution and use in source and binary forms are permitted
10 * provided that this notice is preserved and due credit is given
11 * to the original author and the contributors.
12 */
13#if !defined(lint)
14static const char sccsid[] = "@(#)resend.c 1.3 1/11/96 (C)1995 Darren Reed";
1/*
2 * resend.c (C) 1995-1998 Darren Reed
3 *
4 * This was written to test what size TCP fragments would get through
5 * various TCP/IP packet filters, as used in IP firewalls. In certain
6 * conditions, enough of the TCP header is missing for unpredictable
7 * results unless the filter is aware that this can happen.
8 *
9 * Redistribution and use in source and binary forms are permitted
10 * provided that this notice is preserved and due credit is given
11 * to the original author and the contributors.
12 */
13#if !defined(lint)
14static const char sccsid[] = "@(#)resend.c 1.3 1/11/96 (C)1995 Darren Reed";
15static const char rcsid[] = "@(#)$Id: resend.c,v 2.1 1999/08/04 17:31:12 darrenr Exp $";
15static const char rcsid[] = "@(#)$Id: resend.c,v 2.1.4.1 2001/01/10 06:21:20 darrenr Exp $";
16#endif
17#include <stdio.h>
18#include <netdb.h>
19#include <string.h>
20#include <stdlib.h>
21#include <unistd.h>
22#include <sys/types.h>
23#include <sys/time.h>

--- 68 unchanged lines hidden (view full) ---

92 else
93 fd = (*r->r_open)("-");
94
95 if (fd < 0)
96 exit(-1);
97
98 ip = (struct ip *)pbuf;
99 eh = (ether_header_t *)malloc(sizeof(*eh));
16#endif
17#include <stdio.h>
18#include <netdb.h>
19#include <string.h>
20#include <stdlib.h>
21#include <unistd.h>
22#include <sys/types.h>
23#include <sys/time.h>

--- 68 unchanged lines hidden (view full) ---

92 else
93 fd = (*r->r_open)("-");
94
95 if (fd < 0)
96 exit(-1);
97
98 ip = (struct ip *)pbuf;
99 eh = (ether_header_t *)malloc(sizeof(*eh));
100 if(!eh)
101 {
102 perror("malloc failed");
103 return -2;
104 }
100
101 bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost));
102 if (gwip.s_addr && (arp((char *)&gwip, dhost) == -1))
103 {
104 perror("arp");
105 return -2;
106 }
107

--- 35 unchanged lines hidden ---
105
106 bzero((char *)A_A eh->ether_shost, sizeof(eh->ether_shost));
107 if (gwip.s_addr && (arp((char *)&gwip, dhost) == -1))
108 {
109 perror("arp");
110 return -2;
111 }
112

--- 35 unchanged lines hidden ---