Deleted Added
full compact
ip_reass.c (38373) ip_reass.c (38482)
1/*
2 * Copyright (c) 1982, 1986, 1988, 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 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94
1/*
2 * Copyright (c) 1982, 1986, 1988, 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 * @(#)ip_input.c 8.2 (Berkeley) 1/4/94
34 * $Id: ip_input.c,v 1.97 1998/07/13 12:12:24 bde Exp $
34 * $Id: ip_input.c,v 1.98 1998/08/17 01:05:24 bde Exp $
35 * $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
36 */
37
38#define _IP_VHL
39
40#include "opt_bootp.h"
41#include "opt_ipfw.h"
42#include "opt_ipdivert.h"

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

137#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
138#undef COMPAT_IPFW
139#define COMPAT_IPFW 1
140#else
141#undef COMPAT_IPFW
142#endif
143
144#ifdef COMPAT_IPFW
35 * $ANA: ip_input.c,v 1.5 1996/09/18 14:34:59 wollman Exp $
36 */
37
38#define _IP_VHL
39
40#include "opt_bootp.h"
41#include "opt_ipfw.h"
42#include "opt_ipdivert.h"

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

137#if !defined(COMPAT_IPFW) || COMPAT_IPFW == 1
138#undef COMPAT_IPFW
139#define COMPAT_IPFW 1
140#else
141#undef COMPAT_IPFW
142#endif
143
144#ifdef COMPAT_IPFW
145
146#include <netinet/ip_fw.h>
147
145/* Firewall hooks */
146ip_fw_chk_t *ip_fw_chk_ptr;
147ip_fw_ctl_t *ip_fw_ctl_ptr;
148
149/* IP Network Address Translation (NAT) hooks */
150ip_nat_t *ip_nat_ptr;
151ip_nat_ctl_t *ip_nat_ctl_ptr;
152#endif

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

1229struct mbuf *
1230ip_srcroute()
1231{
1232 register struct in_addr *p, *q;
1233 register struct mbuf *m;
1234
1235 if (ip_nhops == 0)
1236 return ((struct mbuf *)0);
148/* Firewall hooks */
149ip_fw_chk_t *ip_fw_chk_ptr;
150ip_fw_ctl_t *ip_fw_ctl_ptr;
151
152/* IP Network Address Translation (NAT) hooks */
153ip_nat_t *ip_nat_ptr;
154ip_nat_ctl_t *ip_nat_ctl_ptr;
155#endif

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

1232struct mbuf *
1233ip_srcroute()
1234{
1235 register struct in_addr *p, *q;
1236 register struct mbuf *m;
1237
1238 if (ip_nhops == 0)
1239 return ((struct mbuf *)0);
1237 m = m_get(M_DONTWAIT, MT_SOOPTS);
1240 m = m_get(M_DONTWAIT, MT_HEADER);
1238 if (m == 0)
1239 return ((struct mbuf *)0);
1240
1241#define OPTSIZ (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt))
1242
1243 /* length is (nhops+1)*sizeof(addr) + sizeof(nop + srcrt header) */
1244 m->m_len = ip_nhops * sizeof(struct in_addr) + sizeof(struct in_addr) +
1245 OPTSIZ;

--- 354 unchanged lines hidden ---
1241 if (m == 0)
1242 return ((struct mbuf *)0);
1243
1244#define OPTSIZ (sizeof(ip_srcrt.nop) + sizeof(ip_srcrt.srcopt))
1245
1246 /* length is (nhops+1)*sizeof(addr) + sizeof(nop + srcrt header) */
1247 m->m_len = ip_nhops * sizeof(struct in_addr) + sizeof(struct in_addr) +
1248 OPTSIZ;

--- 354 unchanged lines hidden ---