From c981967451a4586d32d793b203eec54503c6a4e2 Mon Sep 17 00:00:00 2001 From: darrenr Date: Tue, 19 Mar 2002 11:48:16 +0000 Subject: fix conflicts generated by import, completing import of ipf3.4.25 --- contrib/ipfilter/ipsend/ipsend.c | 3 +++ contrib/ipfilter/ipsend/iptests.c | 22 +++++++++++++--------- contrib/ipfilter/ipsend/sbpf.c | 4 +++- contrib/ipfilter/ipsend/sock.c | 7 ++++--- 4 files changed, 23 insertions(+), 13 deletions(-) (limited to 'contrib/ipfilter/ipsend') diff --git a/contrib/ipfilter/ipsend/ipsend.c b/contrib/ipfilter/ipsend/ipsend.c index 41eb7ec..688cc9e 100644 --- a/contrib/ipfilter/ipsend/ipsend.c +++ b/contrib/ipfilter/ipsend/ipsend.c @@ -9,6 +9,9 @@ * * See the IPFILTER.LICENCE file for details on licencing. */ +#ifdef __sgi +# include +#endif #include #include #include diff --git a/contrib/ipfilter/ipsend/iptests.c b/contrib/ipfilter/ipsend/iptests.c index b5b759a..12cdf83 100644 --- a/contrib/ipfilter/ipsend/iptests.c +++ b/contrib/ipfilter/ipsend/iptests.c @@ -3,6 +3,9 @@ * * See the IPFILTER.LICENCE file for details on licencing. */ +#ifdef __sgi +# include +#endif #include #include #include @@ -77,7 +80,7 @@ #if 0 #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: iptests.c,v 2.1.4.2 2001/07/15 22:00:14 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: iptests.c,v 2.1.4.5 2002/02/22 15:32:58 darrenr Exp $"; #endif #endif @@ -303,14 +306,14 @@ int ptest; ip->ip_len = MIN(768 + 20, mtu - 68); i = 512; for (; i < (63 * 1024 + 768); i += 768) { - ip->ip_off = htons(IP_MF | (i >> 3)); + ip->ip_off = htons(IP_MF | ((i >> 3) & 0x1fff)); (void) send_ip(nfd, mtu, ip, gwip, 1); printf("%d\r", i); fflush(stdout); PAUSE(); } ip->ip_len = 896 + 20; - ip->ip_off = htons(i >> 3); + ip->ip_off = htons((i >> 3) & 0x1fff); (void) send_ip(nfd, mtu, ip, gwip, 1); printf("%d\r", i); putchar('\n'); @@ -337,7 +340,7 @@ int ptest; ip->ip_len = MIN(768 + 20, mtu - 68); i = 512; for (; i < (63 * 1024 + 768); i += 768) { - ip->ip_off = htons(IP_MF | (i >> 3)); + ip->ip_off = htons(IP_MF | ((i >> 3) & 0x1fff)); if ((rand() & 0x1f) != 0) { (void) send_ip(nfd, mtu, ip, gwip, 1); printf("%d\r", i); @@ -347,7 +350,7 @@ int ptest; PAUSE(); } ip->ip_len = 896 + 20; - ip->ip_off = htons(i >> 3); + ip->ip_off = htons((i >> 3) & 0x1fff); if ((rand() & 0x1f) != 0) { (void) send_ip(nfd, mtu, ip, gwip, 1); printf("%d\r", i); @@ -374,14 +377,14 @@ int ptest; ip->ip_len = MIN(768 + 20, mtu - 68); i = 512; for (; i < (32 * 1024 + 768); i += 768) { - ip->ip_off = htons(IP_MF | (i >> 3)); + ip->ip_off = htons(IP_MF | ((i >> 3) & 0x1fff)); (void) send_ip(nfd, mtu, ip, gwip, 1); printf("%d\r", i); fflush(stdout); PAUSE(); } ip->ip_len = 896 + 20; - ip->ip_off = htons(i >> 3); + ip->ip_off = htons((i >> 3) & 0x1fff); (void) send_ip(nfd, mtu, ip, gwip, 1); printf("%d\r", i); putchar('\n'); @@ -1034,6 +1037,7 @@ int ptest; struct sockaddr_in sin; int fd, slen; + fd = -1; bzero((char *)&sin, sizeof(sin)); for (i = 1; i < 63; i++) { @@ -1266,7 +1270,7 @@ int ptest; for (j = 768; j < 3584; j += 768) { ip->ip_len = sizeof(*ip) + 768; - ip->ip_off = htons(IP_MF|(j>>3)); + ip->ip_off = htons(IP_MF|((j>>3) & 0x1fff)); (void) send_ip(nfd, 1500, ip, gwip, 1); printf("%d %d\r", i, j); fflush(stdout); @@ -1274,7 +1278,7 @@ int ptest; ip->ip_len = sizeof(*ip) + 128; for (k = j - 768; k < j; k += 128) { - ip->ip_off = htons(IP_MF|(k>>3)); + ip->ip_off = htons(IP_MF|((k>>3) & 0x1fff)); (void) send_ip(nfd, 1500, ip, gwip, 1); printf("%d %d\r", i, k); fflush(stdout); diff --git a/contrib/ipfilter/ipsend/sbpf.c b/contrib/ipfilter/ipsend/sbpf.c index 5a97ec7..82db7ca 100644 --- a/contrib/ipfilter/ipsend/sbpf.c +++ b/contrib/ipfilter/ipsend/sbpf.c @@ -42,7 +42,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)sbpf.c 1.3 8/25/95 (C)1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: sbpf.c,v 2.1.4.1 2001/06/26 10:43:22 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: sbpf.c,v 2.1.4.2 2001/09/30 04:04:28 darrenr Exp $"; #endif /* @@ -62,6 +62,8 @@ int sport, tout; char bpfname[16]; int fd, i; + fd = -1; + for (i = 0; i < 16; i++) { (void) sprintf(bpfname, "/dev/bpf%d", i); diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index da497c8..46a399a 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -4,6 +4,9 @@ * * See the IPFILTER.LICENCE file for details on licencing. */ +#ifdef __sgi +# include +#endif #include #include #include @@ -63,7 +66,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)sock.c 1.2 1/11/96 (C)1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: sock.c,v 2.1.4.3 2001/07/15 22:00:14 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id: sock.c,v 2.1.4.5 2002/02/22 15:32:58 darrenr Exp $"; #endif @@ -188,8 +191,6 @@ struct tcpiphdr *ti; if (!(p = getproc())) return NULL; -printf("fl %x ty %x cn %d mc %d\n", -f->f_flag, f->f_type, f->f_count, f->f_msgcount); up = (struct user *)malloc(sizeof(*up)); #ifndef ultrix if (KMCPY(up, p->p_uarea, sizeof(*up)) == -1) -- cgit v1.1