ip_fastfwd.c (196019) | ip_fastfwd.c (196881) |
---|---|
1/*- 2 * Copyright (c) 2003 Andre Oppermann, Internet Business Solutions AG 3 * 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 --- 60 unchanged lines hidden (view full) --- 69 */ 70 71/* 72 * Many thanks to Matt Thomas of NetBSD for basic structure of ip_flow.c which 73 * is being followed here. 74 */ 75 76#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003 Andre Oppermann, Internet Business Solutions AG 3 * 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 --- 60 unchanged lines hidden (view full) --- 69 */ 70 71/* 72 * Many thanks to Matt Thomas of NetBSD for basic structure of ip_flow.c which 73 * is being followed here. 74 */ 75 76#include <sys/cdefs.h> |
77__FBSDID("$FreeBSD: head/sys/netinet/ip_fastfwd.c 196019 2009-08-01 19:26:27Z rwatson $"); | 77__FBSDID("$FreeBSD: head/sys/netinet/ip_fastfwd.c 196881 2009-09-06 07:29:22Z pjd $"); |
78 79#include "opt_ipfw.h" 80#include "opt_ipstealth.h" 81 82#include <sys/param.h> 83#include <sys/systm.h> 84#include <sys/kernel.h> 85#include <sys/malloc.h> --- 60 unchanged lines hidden (view full) --- 146 return NULL; 147 } 148 return dst; 149} 150 151/* 152 * Try to forward a packet based on the destination address. 153 * This is a fast path optimized for the plain forwarding case. | 78 79#include "opt_ipfw.h" 80#include "opt_ipstealth.h" 81 82#include <sys/param.h> 83#include <sys/systm.h> 84#include <sys/kernel.h> 85#include <sys/malloc.h> --- 60 unchanged lines hidden (view full) --- 146 return NULL; 147 } 148 return dst; 149} 150 151/* 152 * Try to forward a packet based on the destination address. 153 * This is a fast path optimized for the plain forwarding case. |
154 * If the packet is handled (and consumed) here then we return 1; 155 * otherwise 0 is returned and the packet should be delivered | 154 * If the packet is handled (and consumed) here then we return NULL; 155 * otherwise mbuf is returned and the packet should be delivered |
156 * to ip_input for full processing. 157 */ 158struct mbuf * 159ip_fastforward(struct mbuf *m) 160{ 161 struct ip *ip; 162 struct mbuf *m0 = NULL; 163 struct route ro; --- 453 unchanged lines hidden --- | 156 * to ip_input for full processing. 157 */ 158struct mbuf * 159ip_fastforward(struct mbuf *m) 160{ 161 struct ip *ip; 162 struct mbuf *m0 = NULL; 163 struct route ro; --- 453 unchanged lines hidden --- |