iptest.c (24583) | iptest.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 * --- 94 unchanged lines hidden (view full) --- 103 /* 104 * 65535 is maximum packet size...you never know... 105 */ 106 ip = (ip_t *)calloc(1, 65536); 107 ti = (struct tcpiphdr *)ip; 108 ip->ip_len = sizeof(*ip); 109 ip->ip_hl = sizeof(*ip) >> 2; 110 | 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 * --- 94 unchanged lines hidden (view full) --- 103 /* 104 * 65535 is maximum packet size...you never know... 105 */ 106 ip = (ip_t *)calloc(1, 65536); 107 ti = (struct tcpiphdr *)ip; 108 ip->ip_len = sizeof(*ip); 109 ip->ip_hl = sizeof(*ip) >> 2; 110 |
111 while ((c = getopt(argc, argv, "1234567IP:TUd:f:g:m:o:p:s:t:")) != -1) | 111 while ((c = (char)getopt(argc, argv, 112 "1234567IP:TUd:f:g:m:o:p:s:t:")) != -1) |
112 switch (c) 113 { 114 case '1' : 115 case '2' : 116 case '3' : 117 case '4' : 118 case '5' : 119 case '6' : --- 95 unchanged lines hidden --- | 113 switch (c) 114 { 115 case '1' : 116 case '2' : 117 case '3' : 118 case '4' : 119 case '5' : 120 case '6' : --- 95 unchanged lines hidden --- |