Deleted Added
full compact
in_rmx.c (38128) in_rmx.c (46381)
1/*
2 * Copyright 1994, 1995 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

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

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
1/*
2 * Copyright 1994, 1995 Massachusetts Institute of Technology
3 *
4 * Permission to use, copy, modify, and distribute this software and
5 * its documentation for any purpose and without fee is hereby
6 * granted, provided that both the above copyright notice and this
7 * permission notice appear in all copies, that both the above
8 * copyright notice and this permission notice appear in all

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

21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * $Id: in_rmx.c,v 1.34 1998/03/30 09:52:46 phk Exp $
29 * $Id: in_rmx.c,v 1.35 1998/08/05 16:59:20 bde Exp $
30 */
31
32/*
33 * This code does two things necessary for the enhanced TCP metrics to
34 * function in a useful manner:
35 * 1) It marks all non-host routes as `cloning', thus ensuring that
36 * every actual reference to such a route actually gets turned
37 * into a reference to a host route to the specific destination

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

157 rt->rt_rmx.rmx_expire = 0;
158 }
159 }
160 return rn;
161}
162
163static int rtq_reallyold = 60*60;
164 /* one hour is ``really old'' */
30 */
31
32/*
33 * This code does two things necessary for the enhanced TCP metrics to
34 * function in a useful manner:
35 * 1) It marks all non-host routes as `cloning', thus ensuring that
36 * every actual reference to such a route actually gets turned
37 * into a reference to a host route to the specific destination

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

157 rt->rt_rmx.rmx_expire = 0;
158 }
159 }
160 return rn;
161}
162
163static int rtq_reallyold = 60*60;
164 /* one hour is ``really old'' */
165SYSCTL_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire,
166 CTLFLAG_RW, &rtq_reallyold , 0, "");
165SYSCTL_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW,
166 &rtq_reallyold , 0,
167 "Default expiration time on dynamically learned routes");
167
168static int rtq_minreallyold = 10;
169 /* never automatically crank down to less */
168
169static int rtq_minreallyold = 10;
170 /* never automatically crank down to less */
170SYSCTL_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire,
171 CTLFLAG_RW, &rtq_minreallyold , 0, "");
171SYSCTL_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW,
172 &rtq_minreallyold , 0,
173 "Minimum time to attempt to hold onto dynamically learned routes");
172
173static int rtq_toomany = 128;
174 /* 128 cached routes is ``too many'' */
174
175static int rtq_toomany = 128;
176 /* 128 cached routes is ``too many'' */
175SYSCTL_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache,
176 CTLFLAG_RW, &rtq_toomany , 0, "");
177
177SYSCTL_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW,
178 &rtq_toomany , 0, "Upper limit on dynamically learned routes");
178
179/*
180 * On last reference drop, mark the route as belong to us so that it can be
181 * timed out.
182 */
183static void
184in_clsroute(struct radix_node *rn, struct radix_node_head *head)
185{

--- 228 unchanged lines hidden ---
179
180/*
181 * On last reference drop, mark the route as belong to us so that it can be
182 * timed out.
183 */
184static void
185in_clsroute(struct radix_node *rn, struct radix_node_head *head)
186{

--- 228 unchanged lines hidden ---