ipsend.c (24583) | ipsend.c (26119) |
---|---|
1/* 2 * ipsend.c (C) 1995 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 * --- 161 unchanged lines hidden (view full) --- 170 * 65535 is maximum packet size...you never know... 171 */ 172 ip = (ip_t *)calloc(1, 65536); 173 ti = (struct tcpiphdr *)ip; 174 tcp = (tcphdr_t *)&ti->ti_sport; 175 ip->ip_len = sizeof(*ip); 176 ip->ip_hl = sizeof(*ip) >> 2; 177 | 1/* 2 * ipsend.c (C) 1995 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 * --- 161 unchanged lines hidden (view full) --- 170 * 65535 is maximum packet size...you never know... 171 */ 172 ip = (ip_t *)calloc(1, 65536); 173 ti = (struct tcpiphdr *)ip; 174 tcp = (tcphdr_t *)&ti->ti_sport; 175 ip->ip_len = sizeof(*ip); 176 ip->ip_hl = sizeof(*ip) >> 2; 177 |
178 while ((c = getopt(argc, argv, "IP:TUd:f:g:m:o:s:t:")) != -1) | 178 while ((c = (char)getopt(argc, argv, "IP:TUd:f:g:m:o:s:t:")) != -1) |
179 switch (c) 180 { 181 case 'I' : 182 if (ip->ip_p) 183 { 184 fprintf(stderr, "Protocol already set: %d\n", 185 ip->ip_p); 186 break; --- 161 unchanged lines hidden --- | 179 switch (c) 180 { 181 case 'I' : 182 if (ip->ip_p) 183 { 184 fprintf(stderr, "Protocol already set: %d\n", 185 ip->ip_p); 186 break; --- 161 unchanged lines hidden --- |