ip_reass.c (68169) | ip_reass.c (69152) |
---|---|
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 * $FreeBSD: head/sys/netinet/ip_input.c 68169 2000-11-01 11:21:45Z ru $ | 34 * $FreeBSD: head/sys/netinet/ip_input.c 69152 2000-11-25 07:35:38Z jlemon $ |
35 */ 36 37#define _IP_VHL 38 39#include "opt_bootp.h" 40#include "opt_ipfw.h" 41#include "opt_ipdn.h" 42#include "opt_ipdivert.h" --- 187 unchanged lines hidden (view full) --- 230 231 for (i = 0; i < IPREASS_NHASH; i++) 232 ipq[i].next = ipq[i].prev = &ipq[i]; 233 234 maxnipq = nmbclusters/4; 235 236 ip_id = time_second & 0xffff; 237 ipintrq.ifq_maxlen = ipqmaxlen; | 35 */ 36 37#define _IP_VHL 38 39#include "opt_bootp.h" 40#include "opt_ipfw.h" 41#include "opt_ipdn.h" 42#include "opt_ipdivert.h" --- 187 unchanged lines hidden (view full) --- 230 231 for (i = 0; i < IPREASS_NHASH; i++) 232 ipq[i].next = ipq[i].prev = &ipq[i]; 233 234 maxnipq = nmbclusters/4; 235 236 ip_id = time_second & 0xffff; 237 ipintrq.ifq_maxlen = ipqmaxlen; |
238 mtx_init(&ipintrq.ifq_mtx, "ip_inq", MTX_DEF); |
|
238 239 register_netisr(NETISR_IP, ipintr); 240} 241 242static struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET }; 243static struct route ipforward_rt; 244 245/* --- 494 unchanged lines hidden (view full) --- 740} 741 742/* 743 * IP software interrupt routine - to go away sometime soon 744 */ 745static void 746ipintr(void) 747{ | 239 240 register_netisr(NETISR_IP, ipintr); 241} 242 243static struct sockaddr_in ipaddr = { sizeof(ipaddr), AF_INET }; 244static struct route ipforward_rt; 245 246/* --- 494 unchanged lines hidden (view full) --- 741} 742 743/* 744 * IP software interrupt routine - to go away sometime soon 745 */ 746static void 747ipintr(void) 748{ |
748 int s; | |
749 struct mbuf *m; 750 | 749 struct mbuf *m; 750 |
751 while(1) { 752 s = splimp(); | 751 while (1) { |
753 IF_DEQUEUE(&ipintrq, m); | 752 IF_DEQUEUE(&ipintrq, m); |
754 splx(s); | |
755 if (m == 0) 756 return; 757 ip_input(m); 758 } 759} 760 761/* 762 * Take incoming datagram fragment and try to reassemble it into --- 1012 unchanged lines hidden --- | 753 if (m == 0) 754 return; 755 ip_input(m); 756 } 757} 758 759/* 760 * Take incoming datagram fragment and try to reassemble it into --- 1012 unchanged lines hidden --- |