Deleted Added
full compact
in.c (71999) in.c (72012)
1/*
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)in.c 8.4 (Berkeley) 1/9/95
1/*
2 * Copyright (c) 1982, 1986, 1991, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)in.c 8.4 (Berkeley) 1/9/95
34 * $FreeBSD: head/sys/netinet/in.c 71999 2001-02-04 13:13:25Z phk $
34 * $FreeBSD: head/sys/netinet/in.c 72012 2001-02-04 16:08:18Z phk $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/sockio.h>
40#include <sys/malloc.h>
41#include <sys/socket.h>
42#include <sys/kernel.h>

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

87 register struct in_ifaddr *ia;
88
89 if (subnetsarelocal) {
90 for (ia = TAILQ_FIRST(&in_ifaddrhead); ia;
91 ia = TAILQ_NEXT(ia, ia_link))
92 if ((i & ia->ia_netmask) == ia->ia_net)
93 return (1);
94 } else {
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/sockio.h>
40#include <sys/malloc.h>
41#include <sys/socket.h>
42#include <sys/kernel.h>

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

87 register struct in_ifaddr *ia;
88
89 if (subnetsarelocal) {
90 for (ia = TAILQ_FIRST(&in_ifaddrhead); ia;
91 ia = TAILQ_NEXT(ia, ia_link))
92 if ((i & ia->ia_netmask) == ia->ia_net)
93 return (1);
94 } else {
95 for (ia = TAILQ_FIRST(&in_ifaddrhead); ia;
96 ia = TAILQ_NEXT(ia, ia_link))
95 TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link)
97 if ((i & ia->ia_subnetmask) == ia->ia_subnet)
98 return (1);
99 }
100 return (0);
101}
102
103/*
104 * Determine whether an IP address is in a reserved set of addresses

--- 750 unchanged lines hidden ---
96 if ((i & ia->ia_subnetmask) == ia->ia_subnet)
97 return (1);
98 }
99 return (0);
100}
101
102/*
103 * Determine whether an IP address is in a reserved set of addresses

--- 750 unchanged lines hidden ---